:root {
  /* Palette reprise d'alliancemoving.com — voir design.md */
  --color-primary: #3a98b2;
  --color-primary-dark: #286c7f;
  --color-primary-contrast: #ffffff;
  --color-ink: #132a35;
  --color-steel: #738697;
  --color-accent: #f2b91d;
  --color-accent-contrast: #132a35;
  --color-beige: #fef8e8;

  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-text: #1f2328;
  --color-muted: var(--color-steel);
  --color-border: #e2e2e0;

  --color-success-bg: #ecfdf5;
  --color-success-text: #065f46;
  --color-error-bg: #fef2f2;
  --color-error-text: #b91c1c;

  --font-family: "Work Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Largeur de la toile hero : l'en-tête de la landing s'aligne sur ses bords. */
  --wide-width: min(1240px, calc(100vw - 32px));

  --shadow-soft: 1px 1px 12px 1px rgba(71, 71, 71, 0.1);
}

* {
  box-sizing: border-box;
}

/* Page d'au moins 100vh, pied de page collé en bas ; overflow-x: clip en filet de sécurité
   contre un défilement horizontal parasite (les causes connues sont corrigées plus bas). */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.test-banner {
  background: var(--color-accent);
  color: var(--color-ink);
  text-align: center;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-ink);
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

main.container {
  width: 100%;
  flex: 1 0 auto;
  padding-bottom: 48px;
}

.site-footer {
  flex: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  color: var(--color-ink);
}

h1 {
  margin-top: 0;
}

.hint {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.site-footer {
  background: var(--color-ink);
  color: #c8d2d8;
  padding: 32px 16px;
  font-size: 0.9rem;
}

.site-footer a {
  color: #ffffff;
}

.footer-inner nav {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

a {
  color: var(--color-primary);
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-ink);
  background: var(--color-surface);
  margin-right: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-family);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button:hover {
  box-shadow: var(--shadow-soft);
}

.button-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-contrast);
}

.button-secondary {
  background: var(--color-surface);
}

.link-button {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  font-family: var(--font-family);
}

form {
  max-width: 640px;
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

legend {
  font-weight: 600;
  padding: 0 6px;
  color: var(--color-ink);
}

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}

.checkbox-label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-family);
  margin-top: 4px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

textarea {
  min-height: 100px;
}

.field-error {
  color: var(--color-error-text);
  font-size: 0.9rem;
  margin: -8px 0 12px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.flash-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.flash-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}

th {
  color: var(--color-steel);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---------- En-tête ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Figtree", var(--font-family);
  letter-spacing: -0.01em;
}

/* Logo : trois pastilles jaune, orange, vert — une par devis. */
.brand-mark {
  display: block;
  width: 40px;
  height: 12px;
}

/* Marque à gauche, actions à droite. */
.header-inner .brand,
.header-inner .main-nav {
  flex: 1 1 0;
}

.header-inner .main-nav {
  justify-content: flex-end;
  gap: 20px;
}

.main-nav .button {
  margin: 0;
  padding: 9px 20px;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Le logo et le bouton de droite tombent pile sur les bords de la toile hero (même largeur). */
.header-inner {
  width: var(--wide-width);
  max-width: none;
  margin: 0 0 0 50%;
  translate: -50% 0;
  padding-left: 0;
  padding-right: 0;
}

/* Bouton burger : visible seulement sur mobile, et seulement si le JavaScript est actif
   (sans JS, les liens restent affichés sous le logo). */
.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
}

.nav-toggle:focus-visible,
.nav-close:focus-visible {
  outline: 3px solid rgba(42, 123, 246, 0.4);
  outline-offset: 2px;
}

.nav-toggle svg,
.nav-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Barre du haut du menu plein écran (logo + croix) : inutile sur ordinateur. */
.nav-top {
  display: none;
}

.nav-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
}

@media (max-width: 640px) {
  .header-inner .brand {
    flex: none;
  }

  /* Pas de décalage par translate ici : il ferait du conteneur le repère du menu en position
     fixed, qui ne couvrirait plus tout l'écran. */
  .header-inner {
    translate: none;
    margin: 0 auto;
  }

  .js .nav-toggle {
    display: inline-grid;
  }

  .header-inner .main-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .js .header-inner .main-nav {
    display: none;
  }

  /* Menu plein écran : recouvre tout (bannière comprise), liens centrés. */
  .js .header-inner .main-nav.is-open {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 96px 24px 32px;
    overflow-y: auto;
    background: var(--color-surface);
  }

  .js .main-nav .nav-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
  }

  .js .main-nav > a:not(.button),
  .js .main-nav .link-button {
    padding: 8px 4px;
    text-align: center;
    font: 600 1.35rem "Figtree", var(--font-family);
  }

  .js .main-nav > a:not(.button) {
    color: var(--color-primary-dark);
  }

  .js .main-nav .button {
    width: 100%;
    max-width: 360px;
    padding: 14px 20px;
    font-size: 1.05rem;
    text-align: center;
  }

  .main-nav .inline-form {
    max-width: none;
    text-align: center;
  }
}

/* Défilement de la page bloqué tant que le menu plein écran est ouvert. */
html.nav-open {
  overflow: hidden;
}

/* ---------- Landing page (inspirée de ChronoTask — voir design.md, v3) ---------- */

.lp {
  --lp-blue: #2a7bf6;
  --lp-blue-dark: #1b63d6;
  --lp-ink: #1d1d1f;
  --lp-soft: #9a9ca3;
  --lp-canvas: #f1f2f4;
  --lp-dot: rgba(29, 29, 31, 0.07);
  --lp-folder: #e6e7ea;
  --lp-paper: #ffffff;
  --lp-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px -8px rgba(16, 24, 40, 0.16);
  --lp-shadow-tile: 0 1px 1px rgba(16, 24, 40, 0.05), 0 8px 18px -6px rgba(16, 24, 40, 0.22),
    inset 0 -2px 0 rgba(16, 24, 40, 0.05);
  --lp-font: "Figtree", var(--font-family);
  color: var(--lp-ink);
  padding-top: 16px;
}

.lp h1,
.lp h2,
.lp h3 {
  font-family: var(--lp-font);
  color: var(--lp-ink);
}

.lp section {
  margin-bottom: 96px;
}

/* Toile grise pointillée aux coins arrondis — le « plan de travail » de la maquette. */
.lp-hero,
.lp-cta {
  position: relative;
  width: var(--wide-width);
  margin-left: 50%;
  translate: -50% 0;
  background-color: var(--lp-canvas);
  background-image: radial-gradient(var(--lp-dot) 1px, transparent 1.2px);
  background-size: 6px 6px;
  border: 1px solid #e3e4e7;
  border-radius: 28px;
  overflow: hidden;
}

.lp-hero {
  min-height: 640px;
  display: grid;
  place-items: center;
  padding: 72px 24px;
  margin-bottom: 80px !important;
}

.lp-hero-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
}

.app-tile {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  background: var(--lp-paper);
  border-radius: 24px;
  box-shadow: var(--lp-shadow-tile);
  margin-bottom: 32px;
}

.app-tile .brand-mark {
  width: 60px;
  height: 18px;
}

.lp-title {
  font-size: clamp(2.3rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
}

.lp-title-soft {
  display: block;
  color: var(--lp-soft);
}

.lp-title-sm {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.lp-lead {
  font-size: 1.08rem;
  color: #3a3b40;
  max-width: 520px;
  margin: 0 auto 28px;
}

.lp-button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid var(--lp-blue-dark);
  background: linear-gradient(180deg, #3d89f8 0%, var(--lp-blue) 100%);
  color: #fff;
  font: 500 1rem/1.2 var(--lp-font);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px -6px rgba(42, 123, 246, 0.7);
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}

.lp-button:hover {
  translate: 0 -1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 20px -8px rgba(42, 123, 246, 0.8);
}

.lp-button:focus-visible {
  outline: 3px solid rgba(42, 123, 246, 0.35);
  outline-offset: 2px;
}

.lp-button-ghost {
  background: var(--lp-paper);
  color: var(--lp-ink);
  border-color: #d9dade;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

/* --- Objets flottants --- */

.float {
  position: absolute;
  z-index: 1;
  animation: lp-float 7s ease-in-out infinite;
}

@keyframes lp-float {
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .float {
    animation: none;
  }
}

.tile {
  display: grid;
  place-items: center;
  background: var(--lp-paper);
  border-radius: 18px;
  box-shadow: var(--lp-shadow-tile);
}

/* Chemise cartonnée avec onglet — le motif récurrent de la maquette. */
.folder {
  position: relative;
  background: var(--lp-folder);
  border-radius: 4px 16px 16px 16px;
  padding: 16px;
  box-shadow: var(--lp-shadow);
}

.folder::before {
  content: "";
  position: absolute;
  left: 0;
  top: -14px;
  width: 44%;
  height: 18px;
  background: inherit;
  border-radius: 12px 14px 0 0;
}

.folder-title {
  font: 600 0.95rem/1.2 var(--lp-font);
  margin: 0 0 12px;
  color: var(--lp-ink);
}

.folder-paper {
  background: var(--lp-paper);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.paper-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.paper-sub {
  margin: 0 0 10px;
  font-size: 0.75rem;
  color: var(--lp-soft);
}

.chip-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #e5f6fb;
  color: #1a7fa0;
  font-size: 0.78rem;
  font-weight: 600;
}

.chip-time svg {
  width: 14px;
  height: 14px;
}

/* Haut gauche : post-it + chemise + case cochée */
.float-note {
  top: 36px;
  left: 28px;
  width: 230px;
  height: 260px;
  rotate: -4deg;
}

.float-note .folder-back {
  position: absolute;
  left: -40px;
  top: 70px;
  width: 210px;
  height: 180px;
  background: #f7f7f8;
  rotate: 10deg;
}

.sticky-note {
  position: absolute;
  left: 20px;
  top: 0;
  width: 190px;
  min-height: 160px;
  padding: 26px 18px 18px;
  background: linear-gradient(170deg, #fff6a8 0%, #fdeb7a 100%);
  font: 500 1.35rem/1.15 "Caveat", cursive;
  color: #2b2b2b;
  rotate: 4deg;
  box-shadow: 0 14px 24px -12px rgba(120, 100, 0, 0.45);
}

.pin {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a7a, #e0362a 70%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.25);
}

.tile-check {
  position: absolute;
  left: 0;
  top: 170px;
  width: 64px;
  height: 64px;
  color: var(--lp-blue);
  rotate: 4deg;
}

.tile-check svg {
  width: 32px;
  height: 32px;
}

/* Haut droite : échéance + chronomètre */
.float-deadline {
  top: 40px;
  right: -20px;
  width: 260px;
  rotate: 6deg;
  animation-delay: -2s;
}

.float-deadline .folder {
  padding-bottom: 28px;
}

.tile-chrono {
  position: absolute;
  left: -48px;
  top: 30px;
  width: 76px;
  height: 76px;
  rotate: -6deg;
}

.tile-chrono svg {
  width: 48px;
  height: 48px;
}

/* Bas gauche : liste des devis */
.float-quotes {
  bottom: -46px;
  left: 40px;
  width: 290px;
  rotate: -3deg;
  animation-delay: -4s;
}

.quote-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quote-rows li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 4px 8px;
  background: var(--lp-paper);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.badge {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #ffc12d;
  color: var(--lp-ink);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Les trois couleurs du logo, une par devis. */
.quote-rows li:nth-child(2) .badge {
  background: #ff914d;
}

.quote-rows li:nth-child(3) .badge {
  background: #01bf63;
  color: #fff;
}

.row-title {
  font-weight: 600;
}

.row-state {
  font-size: 0.7rem;
  color: var(--lp-soft);
}

.row-state.is-done {
  color: #1a8a5e;
}

.bar {
  grid-column: 2;
  height: 5px;
  border-radius: 99px;
  background: #e8e9ec;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4fa3f9, var(--lp-blue));
}

.row-meta {
  font-size: 0.7rem;
  color: var(--lp-soft);
}

/* Bas droite : métiers en tuiles */
.float-trades {
  bottom: -30px;
  right: 40px;
  width: 270px;
  height: 190px;
  rotate: 4deg;
  animation-delay: -1s;
}

.float-trades .folder {
  height: 190px;
}

.trade-tiles {
  position: absolute;
  left: -24px;
  top: 58px;
  display: flex;
}

.trade-tiles .tile {
  width: 82px;
  height: 82px;
  margin-right: -10px;
}

.trade-tiles .tile:nth-child(1) {
  rotate: -8deg;
}

.trade-tiles .tile:nth-child(2) {
  rotate: 4deg;
  translate: 0 -14px;
}

.trade-tiles .tile:nth-child(3) {
  rotate: 10deg;
}

.tile-trade svg {
  width: 40px;
  height: 40px;
}

.t-roof {
  color: #e2483d;
}

.t-paint {
  color: #1fb57a;
}

.t-elec {
  color: #f2a91d;
}

@media (max-width: 1080px) {
  .float-note,
  .float-deadline {
    scale: 0.8;
    transform-origin: top center;
  }

  .float-note {
    left: -30px;
  }

  .float-deadline {
    right: -70px;
  }

  .float-quotes,
  .float-trades {
    scale: 0.8;
    transform-origin: bottom center;
  }

  .float-quotes {
    left: -20px;
  }

  .float-trades {
    right: -10px;
  }
}

@media (max-width: 820px) {
  .float {
    display: none;
  }

  .lp-hero {
    min-height: 0;
    padding: 56px 20px 64px;
  }
}

/* --- Formulaire de demande --- */

.lp-request {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.lp-eyebrow {
  margin: 0 0 8px;
  font: 600 0.8rem/1 var(--lp-font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lp-blue);
}

.lp-h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.lp-center {
  text-align: center;
  margin-bottom: 48px;
}

.lp-request-copy p:last-child {
  color: #55575d;
  margin: 0;
}

.quote-teaser {
  background: var(--lp-paper);
  border: 1px solid #e6e7ea;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--lp-shadow);
}

.quote-teaser form {
  max-width: none;
  display: grid;
  gap: 14px;
}

.quote-teaser label {
  margin: 0;
  font-size: 0.88rem;
  color: #3a3b40;
}

.quote-teaser input,
.quote-teaser select {
  border-radius: 10px;
  background: #fafafb;
  border-color: #e3e4e7;
}

.quote-teaser input:focus,
.quote-teaser select:focus {
  outline: 3px solid rgba(42, 123, 246, 0.25);
  border-color: var(--lp-blue);
}

.quote-teaser .lp-button {
  justify-self: start;
  margin-top: 6px;
}

@media (max-width: 820px) {
  .lp-request {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* --- Comment ça marche : deux chemises --- */

.journeys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 14px;
}

.folder-lg {
  padding: 28px;
  border-radius: 4px 22px 22px 22px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.folder-lg::before {
  top: -16px;
  height: 20px;
  width: 52%;
  border-radius: 16px 18px 0 0;
}

.folder-lg .folder-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6d74;
}

.folder-lg h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  width: 100%;
  flex: 1;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--lp-paper);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--lp-ink);
  color: #fff;
  font: 600 0.78rem/1 var(--lp-font);
  margin-top: 1px;
}

@media (max-width: 820px) {
  .journeys {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* --- Métiers : tuiles façon icônes d'apps --- */

.trade-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 28px 16px;
}

.trade-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.3;
}

.trade-grid .tile {
  width: 72px;
  height: 72px;
  color: var(--lp-ink);
  transition: rotate 0.2s ease, translate 0.2s ease;
}

.trade-grid .tile svg {
  width: 32px;
  height: 32px;
}

.trade-grid li:nth-child(4n + 1) .tile {
  color: #e2483d;
}

.trade-grid li:nth-child(4n + 2) .tile {
  color: var(--lp-blue);
}

.trade-grid li:nth-child(4n + 3) .tile {
  color: #1fb57a;
}

.trade-grid li:nth-child(4n + 4) .tile {
  color: #e79a0c;
}

.trade-grid li:hover .tile {
  rotate: -6deg;
  translate: 0 -3px;
}

/* --- Pourquoi nous --- */

.why-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Les trois cartes reprennent les teintes du logo (jaune #ffc12d, orange #ff914d, vert #01bf63)
   éclaircies à environ 40 %, avec un texte sombre pour rester très lisible. */
.why-grid li {
  padding: 24px;
  border-radius: 20px;
  color: var(--lp-ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px -12px rgba(16, 24, 40, 0.25);
}

.why-grid li:nth-child(1) {
  background: #ffe6ab;
}

.why-grid li:nth-child(2) {
  background: #ffd3b8;
}

.why-grid li:nth-child(3) {
  background: #99e5c1;
}

.why-stat {
  display: block;
  font: 500 2.6rem/1 var(--lp-font);
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.why-grid h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.why-grid p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--lp-ink);
}

@media (max-width: 720px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Transparence : grand post-it épinglé --- */

.transparency-note {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 40px 36px;
  background: linear-gradient(170deg, #fff8b8 0%, #fdec82 100%);
  rotate: -1deg;
  box-shadow: 0 24px 40px -24px rgba(120, 100, 0, 0.5);
}

.transparency-note .pin {
  top: -8px;
  width: 16px;
  height: 16px;
}

.transparency-note h2 {
  font: 500 2rem/1.1 "Caveat", cursive;
  margin: 0 0 12px;
}

.transparency-note p {
  margin: 0;
  font-size: 1.05rem;
  color: #2b2b2b;
}

/* --- Bandeau final --- */

.lp-cta {
  text-align: center;
  padding: 72px 24px;
  margin-bottom: 64px !important;
}

.lp-cta .app-tile {
  margin-bottom: 24px;
}

.lp-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}

.main-nav > a:not(.button) {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.main-nav > a:not(.button):hover {
  color: var(--color-primary);
}

.lp-cta-join {
  margin: 20px 0 0;
  font-size: 0.95rem;
  color: #3a3b40;
}

.lp-cta-join a {
  color: var(--lp-blue-dark);
}

/* ---------- Candidature entreprise (/rejoindre-le-reseau) ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.req {
  color: var(--color-error-text);
}

.join {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 40px;
}

.join-eyebrow {
  margin: 0 0 8px;
  font: 600 0.8rem/1 "Figtree", var(--font-family);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
}

.join h1 {
  font-family: "Figtree", var(--font-family);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.join h2 {
  font-family: "Figtree", var(--font-family);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.join-lead {
  font-size: 1.1rem;
  color: #3a3b40;
  margin: 0 0 28px;
}

.join-points {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.join-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.join-points svg {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  fill: none;
  stroke: var(--color-primary-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.join-steps {
  margin-bottom: 48px;
}

/* Quatre étapes en ligne, séparées par un simple filet : pas de numéros décoratifs. */
.join-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.join-steps li {
  border-top: 3px solid var(--color-ink);
  padding-top: 12px;
  font-size: 0.95rem;
}

.form-summary {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
}

.form-summary p {
  margin: 0;
}

.apply-form {
  max-width: none;
}

.apply-form fieldset {
  min-width: 0;
}

.apply-section {
  padding: 20px 20px 8px;
  margin-bottom: 20px;
}

.apply-section > legend {
  font-size: 1.05rem;
}

.field {
  margin-bottom: 16px;
}

.field label {
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="file"],
.field select,
.field textarea {
  min-height: 48px;
  font-size: 1rem;
  margin-top: 0;
}

.field select {
  background-color: var(--color-surface);
}

.field textarea {
  min-height: 120px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}

@media (min-width: 600px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field-hint,
.field-note {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--color-steel);
}

.field-note {
  color: var(--color-ink);
  background: var(--color-beige);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.field .field-error,
.choice-group .field-error {
  margin: 6px 0 0;
  font-weight: 500;
}

.has-error input,
.has-error select,
.has-error textarea {
  border-color: var(--color-error-text);
}

.choice-group {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  background: none;
  box-shadow: none;
}

.choice-group > legend {
  padding: 0;
  font-weight: 500;
  margin-bottom: 6px;
}

.choice-list {
  display: grid;
  gap: 4px;
}

@media (min-width: 600px) {
  .choice-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  margin: 0;
  padding: 8px 4px;
  min-height: 44px;
  cursor: pointer;
}

.choice input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--color-primary-dark);
}

.consent {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  margin-bottom: 20px;
}

.consent.has-error {
  border-color: var(--color-error-text);
}

.apply-submit {
  width: 100%;
  margin: 0;
  padding: 16px 24px;
  font-size: 1.05rem;
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

@media (min-width: 600px) {
  .apply-submit {
    width: auto;
    min-width: 280px;
  }
}

.apply-form input:focus-visible,
.apply-form select:focus-visible,
.apply-form textarea:focus-visible,
.apply-submit:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Champ piège : hors écran plutôt que display:none, que certains robots détectent. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Administration : candidatures ---------- */

.admin-filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  max-width: none;
}

.admin-filters label {
  margin-bottom: 0;
}

.admin-filters select {
  width: auto;
  min-width: 140px;
}

.admin-filters .button {
  margin: 0;
}

.badge-count,
.badge-warn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

.badge-count {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.badge-warn {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  margin-left: 6px;
}

.detail-table {
  max-width: 760px;
}

.detail-table th {
  width: 220px;
  vertical-align: top;
}

button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Petits écrans : rien ne doit élargir la page ---------- */

.admin-filters label {
  flex: 1 1 150px;
  min-width: 0;
}

.admin-filters select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  /* Les tableaux défilent dans leur propre cadre au lieu d'élargir la page. */
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  /* Fiches clé/valeur : une ligne par information, sans défilement. */
  .detail-table,
  .detail-table tbody,
  .detail-table tr,
  .detail-table th,
  .detail-table td {
    display: block;
    width: auto;
    overflow-wrap: anywhere;
  }

  .detail-table th {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* ---------- Pages d'accès : connexion, mot de passe oublié (même toile que la landing) ---------- */

.page-auth {
  background-color: #f1f2f4;
  background-image: radial-gradient(rgba(29, 29, 31, 0.07) 1px, transparent 1.2px);
  background-size: 6px 6px;
}

.auth-shell {
  flex: 1 0 auto;
  display: flex;
  padding: 16px;
}

.auth-card {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
  border: 1px solid #e3e4e7;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px -8px rgba(16, 24, 40, 0.16);
  max-width: 1240px;
  margin: 0 auto;
}

/* Photo : cadre intérieur arrondi, comme la maquette ; texte lisible grâce au dégradé. */
.auth-visual {
  position: relative;
  margin: 12px;
  border-radius: 20px;
  overflow: hidden;
  background: #1d1d1f;
  display: flex;
  align-items: flex-end;
  min-height: 0;
}

.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 42, 53, 0.25) 0%, rgba(19, 42, 53, 0) 35%, rgba(19, 42, 53, 0.88) 100%);
}

.auth-visual-text {
  position: relative;
  z-index: 1;
  padding: 32px;
  color: #fff;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font: 600 0.75rem/1 "Figtree", var(--font-family);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-eyebrow::after {
  content: "";
  width: 96px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
}

.auth-headline {
  margin: 0 0 14px;
  font: 500 clamp(2rem, 3.6vw, 3.2rem) / 1.05 "Figtree", var(--font-family);
  letter-spacing: -0.03em;
}

.auth-headline span {
  display: block;
  color: rgba(255, 255, 255, 0.6);
}

.auth-visual-sub {
  margin: 0;
  max-width: 340px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 24px;
  min-width: 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 1.15rem "Figtree", var(--font-family);
  letter-spacing: -0.01em;
  color: var(--color-ink);
  text-decoration: none;
  border-radius: 8px;
}

.auth-brand:focus-visible,
.auth-panel a:focus-visible {
  outline: 3px solid rgba(42, 123, 246, 0.4);
  outline-offset: 3px;
}

.auth-main {
  flex: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.auth-title {
  margin: 0 0 8px;
  text-align: center;
  font: 500 clamp(1.9rem, 3vw, 2.5rem) / 1.1 "Figtree", var(--font-family);
  letter-spacing: -0.03em;
  color: var(--color-ink);
}

.auth-lead {
  margin: 0 0 32px;
  text-align: center;
  font-size: 0.95rem;
  color: #5b5d63;
}

.auth-main .flash {
  margin-bottom: 20px;
}

.auth-form {
  max-width: none;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.auth-input {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f4f5f7;
  font: 400 1rem var(--font-family);
  color: var(--color-ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-field input::placeholder {
  color: #8b8d94;
}

.auth-field input[type="password"],
.auth-field input[data-pw] {
  padding-right: 48px;
}

.auth-input:has(.auth-eye) input {
  padding-right: 48px;
}

.auth-field input:focus {
  outline: none;
  background: #fff;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(19, 42, 53, 0.12);
}

.auth-field.has-error input {
  border-color: var(--color-error-text);
  background: var(--color-error-bg);
}

.auth-field .field-error {
  margin: 6px 0 0;
  font-weight: 500;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #5b5d63;
  cursor: pointer;
}

.auth-eye:hover {
  color: var(--color-ink);
  background: rgba(19, 42, 53, 0.06);
}

.auth-eye:focus-visible {
  outline: 3px solid rgba(42, 123, 246, 0.4);
}

.auth-eye svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-eye[aria-pressed="true"] svg {
  opacity: 0.55;
}

.auth-forgot {
  margin: -6px 0 22px;
  text-align: right;
  font-size: 0.88rem;
}

.auth-forgot a,
.auth-switch a {
  color: var(--color-ink);
  font-weight: 500;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--color-ink);
  color: #fff;
  font: 500 1rem "Figtree", var(--font-family);
  cursor: pointer;
  transition: translate 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-submit:hover {
  background: #0c1d26;
  translate: 0 -1px;
  box-shadow: 0 10px 20px -10px rgba(19, 42, 53, 0.7);
}

.auth-submit:focus-visible {
  outline: 3px solid rgba(42, 123, 246, 0.4);
  outline-offset: 2px;
}

.auth-alert,
.auth-notice {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.auth-alert {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.auth-notice {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.auth-footer {
  width: 100%;
  text-align: center;
}

.auth-switch {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: #5b5d63;
}

.auth-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
}

.auth-legal a {
  color: #7a7c83;
}

.auth-legal a:hover {
  color: var(--color-ink);
}

@media (max-width: 860px) {
  .auth-shell {
    padding: 0;
  }

  .auth-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Sur mobile, la photo devient un bandeau et seul le slogan reste. */
  .auth-visual {
    margin: 12px 12px 0;
    min-height: 200px;
  }

  .auth-visual-text {
    padding: 20px;
  }

  .auth-eyebrow,
  .auth-visual-sub {
    display: none;
  }

  .auth-headline {
    margin: 0;
    font-size: 1.7rem;
  }

  .auth-panel {
    padding: 24px 20px 20px;
  }

  .auth-main {
    justify-content: flex-start;
    padding: 24px 0 32px;
  }
}

.auth-forgot a,
.auth-legal a,
.auth-brand {
  text-decoration: none;
}

.auth-forgot a:hover,
.auth-legal a:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

/* --- Inscription syndic : formulaire plus long dans le même cadre --- */

.auth-main-wide {
  max-width: 520px;
}

/* Formulaire plus haut que l'écran : la photo reste en vue pendant le défilement. */
.auth-card-long .auth-visual {
  align-self: start;
  position: sticky;
  top: 12px;
  height: calc(100dvh - 24px);
  max-height: 900px;
}

.auth-card-long .auth-visual-text {
  padding-bottom: 56px;
}

@media (max-width: 860px) {
  .auth-card-long .auth-visual {
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
  }

  .auth-card-long .auth-visual-text {
    padding-bottom: 20px;
  }
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 14px;
}

@media (min-width: 560px) {
  .auth-row {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #7a7c83;
}

.auth-sep {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 24px 0;
}

.auth-check {
  margin: 4px 0 22px;
}

.auth-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  font-size: 0.92rem;
  cursor: pointer;
}

.auth-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--color-ink);
}

.auth-check a {
  color: var(--color-ink);
  font-weight: 500;
}

.auth-check .field-error {
  margin: 6px 0 0;
  font-weight: 500;
}

/* --- Bandeau d'en-tête de /rejoindre-le-reseau : photo floutée sous un voile sombre --- */

.join-hero {
  position: relative;
  isolation: isolate;
  width: var(--wide-width);
  margin: 24px 0 0 50%;
  translate: -50% 0;
  padding: 64px 24px;
  border-radius: 28px;
  overflow: hidden;
  background: #132a35;
  color: #fff;
}

.join-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
  filter: blur(8px);
  transform: scale(1.1); /* cache les bords que le flou rend transparents */
}

.join-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 18, 26, 0.62);
}

.join-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.join-hero h1,
.join-hero .join-lead,
.join-hero .join-points strong {
  color: #fff;
}

.join-hero .join-eyebrow {
  color: #ffd66b;
}

.join-hero .join-lead {
  color: rgba(255, 255, 255, 0.88);
}

.join-hero .join-points {
  margin-bottom: 0;
}

.join-hero .join-points li {
  color: rgba(255, 255, 255, 0.92);
}

.join-hero .join-points svg {
  stroke: #ffd66b;
}

.join-hero + .join {
  padding-top: 48px;
}

@media (max-width: 640px) {
  .join-hero {
    padding: 40px 20px;
    border-radius: 20px;
  }
}

/* --- /rejoindre-le-reseau : les 4 étapes en grandes cartes reliées par de petites flèches --- */

.join-flow {
  width: var(--wide-width);
  margin: 56px 0 0 50%;
  translate: -50% 0;
}

.join-flow h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 28px;
}

.join-flow ol {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.join-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 200px;
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--color-ink);
}

.join-flow li svg {
  flex: none;
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--color-primary-dark);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Petite flèche centrée dans l'espace entre deux cartes. */
.join-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -21px;
  width: 14px;
  height: 14px;
  translate: 0 -50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23738697' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 900px) {
  .join-flow ol {
    grid-template-columns: 1fr;
  }

  .join-flow li {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 20px;
  }

  /* En colonne, la flèche pointe vers le bas, entre deux cartes. */
  .join-flow li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -21px;
    left: 50%;
    translate: -50% 0;
    rotate: 90deg;
  }
}
