/*
 * Parti pris : page de conversion, pas plaquette.
 *
 * Le trafic vient de la publicité Meta, sur mobile, sans intention préalable.
 * Il faut donc dans le premier écran : un bénéfice chiffré, un champ de saisie
 * évident, et la preuve qu'un humain crédible est derrière. Charte navy/or de
 * l'agence, contrastes francs, gros boutons.
 */

:root {
  --navy: #16273f;
  --navy-2: #1f3552;
  --or: #c9a227;
  --or-clair: #e3c766;
  --creme: #fbf8f2;
  --creme-2: #f3ece0;
  --blanc: #ffffff;
  --gris: #5d6875;
  --gris-clair: #97a1ad;
  --trait: #e2dccf;
  --vert: #1f7a4d;
  --rouge: #b1452f;

  --serif: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --large: 1180px;
  --ombre: 0 18px 48px rgba(22, 39, 63, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--blanc);
}

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.centre-large { max-width: var(--large); margin: 0 auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

.etiquette {
  font-size: .72rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--or);
}

/* ════════════════════════════════════════════════════════════ en-tête */

.barre {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--blanc);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.barre-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.02em; }
.logo-pastille { width: 10px; height: 10px; background: var(--or); transform: rotate(45deg); }
.barre-tel {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  background: rgba(255, 255, 255, .1); padding: .5rem .9rem; border-radius: 999px;
  white-space: nowrap;
}
.barre-tel:hover { background: rgba(255, 255, 255, .18); }

/* ═════════════════════════════════════════════════════════════ bannière */

.banniere {
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(201, 162, 39, .22) 0%, rgba(201, 162, 39, 0) 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--blanc);
  padding-block: clamp(2.6rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.banniere-grille { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .banniere-grille { grid-template-columns: 1.15fr .85fr; } }

.banniere h1 { font-size: clamp(2.15rem, 5.6vw, 3.9rem); max-width: 16ch; }
.banniere h1 .or { color: var(--or-clair); }
.banniere-chapo { font-size: clamp(1.02rem, 1.9vw, 1.2rem); color: #cbd5e2; max-width: 48ch; margin-top: 1.1rem; }

.arguments { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .7rem; }
.arguments li { display: flex; gap: .7rem; align-items: flex-start; font-size: 1rem; color: #e6ecf3; }
.arguments li::before {
  content: "✓"; flex: none; width: 22px; height: 22px; margin-top: 2px;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  background: var(--or); color: var(--navy); border-radius: 50%;
}

/* Bloc de saisie : la seule chose à faire dans le premier écran. */
.bloc-saisie {
  background: var(--blanc); color: var(--navy);
  border-radius: 18px; padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--ombre);
}
.bloc-saisie h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.bloc-saisie .sous { color: var(--gris); font-size: .93rem; margin-bottom: 1.3rem; }

.champ-adresse { position: relative; margin-bottom: .9rem; }
.champ-adresse input {
  width: 100%; padding: 1.05rem 1.1rem; font: inherit; font-size: 1.02rem;
  border: 2px solid var(--trait); border-radius: 12px; outline: none; background: var(--creme);
  transition: border-color .15s, background .15s;
}
.champ-adresse input:focus { border-color: var(--or); background: var(--blanc); }
.champ-adresse input::placeholder { color: var(--gris-clair); }

.suggestions {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: .3rem; list-style: none;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: var(--ombre); max-height: 290px; overflow-y: auto;
}
.suggestions li { padding: .6rem .75rem; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; }
.suggestions li:hover, .suggestions li.actif { background: var(--creme-2); }
.suggestions strong { font-weight: 700; font-size: .95rem; }
.suggestions span { font-size: .78rem; color: var(--gris); }

.rassurance { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1rem; font-size: .82rem; color: var(--gris); }
.rassurance span { display: inline-flex; align-items: center; gap: .35rem; }

.note-clients {
  display: flex; align-items: center; gap: .75rem; margin-top: 1.3rem;
  padding-top: 1.1rem; border-top: 1px solid var(--trait);
}
.note-clients .etoiles { color: var(--or); font-size: 1.05rem; letter-spacing: .1em; }
.note-clients small { color: var(--gris); font-size: .84rem; }

/* ═══════════════════════════════════════════════════════════ boutons */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: 1.1rem 1.6rem; font: inherit; font-size: 1.05rem; font-weight: 800;
  border: none; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--or); color: var(--navy);
  box-shadow: 0 10px 24px rgba(201, 162, 39, .32);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.bouton:hover:not(:disabled) { background: var(--or-clair); transform: translateY(-1px); }
.bouton:disabled { background: var(--trait); color: var(--gris-clair); box-shadow: none; cursor: not-allowed; }
.bouton-auto { width: auto; }
.bouton-navy { background: var(--navy); color: var(--blanc); box-shadow: 0 10px 24px rgba(22, 39, 63, .28); }
.bouton-navy:hover:not(:disabled) { background: var(--navy-2); }
.bouton-fantome { width: auto; background: transparent; color: var(--gris); box-shadow: none; font-weight: 600; padding-inline: .2rem; }
.bouton-fantome:hover { background: transparent; color: var(--navy); transform: none; }

/* ════════════════════════════════════════════════════════════ chiffres */

.bandeau-chiffres { background: var(--creme); border-block: 1px solid var(--trait); }
.bandeau-chiffres .centre-large { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); padding-block: 2.2rem; }
.chiffre strong { display: block; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.chiffre span { font-size: .88rem; color: var(--gris); }

/* ══════════════════════════════════════════════════════════ sections */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-creme { background: var(--creme); }
.section-navy { background: var(--navy); color: var(--blanc); }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 20ch; }
.section-chapo { color: var(--gris); max-width: 58ch; font-size: 1.02rem; }
.section-navy .section-chapo { color: #cbd5e2; }

.cartes { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-top: 2.4rem; }
.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 1.7rem; }
.carte-num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: .9rem;
  background: var(--navy); color: var(--or); font-weight: 800; border-radius: 10px; font-size: .95rem;
}
.carte h3 { font-size: 1.1rem; }
.carte p { margin: 0; color: var(--gris); font-size: .95rem; }

/* Registre de ventes : la preuve que les données sont réelles. */
.tableau-enveloppe { overflow-x: auto; border: 1px solid var(--trait); border-radius: 16px; background: var(--blanc); margin-top: 2rem; }
.registre { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.registre th {
  text-align: left; padding: .85rem 1rem; background: var(--creme-2);
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gris);
  border-bottom: 1px solid var(--trait); white-space: nowrap;
}
.registre td { padding: .85rem 1rem; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.registre tr:last-child td { border-bottom: none; }
.registre .adr { font-weight: 700; }
.registre .num { font-variant-numeric: tabular-nums; }
.registre .droite { text-align: right; }

/* ───────────────────────────────────────────────────────── témoignages */

.avis { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2.4rem; }
.avis-carte { background: var(--blanc); border-radius: 16px; padding: 1.6rem; border: 1px solid var(--trait); }
.avis-etoiles { color: var(--or); letter-spacing: .12em; margin-bottom: .7rem; }
.avis-carte blockquote { margin: 0 0 1rem; font-size: .98rem; line-height: 1.55; }
.avis-nom { font-weight: 700; font-size: .9rem; }
.avis-detail { font-size: .82rem; color: var(--gris); }

/* ─────────────────────────────────────────────────────── appel à agir */

.final { text-align: center; }
.final h2 { margin-inline: auto; }
.final .bouton { max-width: 340px; margin: 1.8rem auto 0; }

.pied { background: var(--navy); color: #aebbcb; padding-block: 2.6rem; font-size: .85rem; }
.pied a { color: var(--blanc); }
.pied p { max-width: 76ch; }

/* Barre d'action collée en bas sur mobile : le CTA reste toujours atteignable. */
.barre-mobile {
  position: fixed; inset: auto 0 0 0; z-index: 70; display: none;
  padding: .7rem clamp(1rem, 4vw, 2rem) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--trait);
  backdrop-filter: blur(8px);
}
@media (max-width: 780px) { .barre-mobile { display: block; } body { padding-bottom: 5rem; } }

/* Indispensable : la règle display:block ci-dessus neutralise l'attribut
   [hidden] posé par le script à l'entrée dans le tunnel. Sans ceci, la barre
   fixe reste affichée et recouvre le bouton « Continuer » à chaque étape —
   invisible sur ordinateur, bloquant sur téléphone. */
.barre-mobile[hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════════ tunnel */

.tunnel-cadre { max-width: 680px; margin: 0 auto; padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1.1rem, 4vw, 2rem) 4rem; }
.jauge { height: 6px; background: var(--creme-2); border-radius: 999px; overflow: hidden; }
.jauge-remplie { height: 100%; background: linear-gradient(90deg, var(--or), var(--or-clair)); border-radius: 999px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.question-rang { font-size: .78rem; font-weight: 700; color: var(--gris); margin: .7rem 0 1.8rem; letter-spacing: .06em; }

.question h2 { font-size: clamp(1.55rem, 4.2vw, 2.2rem); }
.question-aide { color: var(--gris); font-size: .97rem; margin-bottom: 1.8rem; max-width: 46ch; }

.reponses { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .6rem; }
.reponse {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  padding: 1.05rem 1.2rem; font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  background: var(--blanc); border: 2px solid var(--trait); border-radius: 12px;
  transition: border-color .12s, background .12s, transform .1s;
}
.reponse:hover { border-color: var(--or); transform: translateX(2px); }
.reponse.actif { border-color: var(--or); background: #fdf8e9; }
.reponse-touche {
  flex: none; width: 27px; height: 27px; display: grid; place-items: center;
  font-size: .78rem; font-weight: 800; border-radius: 7px;
  background: var(--creme-2); color: var(--gris);
}
.reponse.actif .reponse-touche { background: var(--or); color: var(--navy); }

.groupe + .groupe { margin-top: 1.7rem; }
.groupe > .etiquette { display: block; margin-bottom: .6rem; color: var(--gris); }
.reponses-ligne { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.puce {
  padding: .7rem 1.1rem; font: inherit; font-size: .94rem; font-weight: 600; cursor: pointer;
  background: var(--blanc); border: 2px solid var(--trait); border-radius: 999px;
}
.puce:hover { border-color: var(--or); }
.puce.actif { border-color: var(--or); background: var(--or); color: var(--navy); }

.champs { display: grid; gap: 1.1rem; margin-bottom: 1.6rem; }
.champs-duo { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.champ > .etiquette { display: block; margin-bottom: .35rem; color: var(--gris); }
.champ input, .champ select {
  width: 100%; padding: .95rem 1.05rem; font: inherit; color: var(--navy);
  background: var(--creme); border: 2px solid var(--trait); border-radius: 12px; outline: none;
}
.champ input:focus, .champ select:focus { border-color: var(--or); background: var(--blanc); }

.consentement {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1.05rem 1.2rem; background: var(--creme); border: 2px solid var(--trait);
  border-radius: 12px; font-size: .93rem; cursor: pointer;
}
.consentement:has(input:checked) { border-color: var(--or); background: #fdf8e9; }
.consentement input { flex: none; width: 21px; height: 21px; margin-top: 1px; accent-color: var(--or); }
.mention { font-size: .8rem; color: var(--gris); margin-top: .9rem; }
.piege { position: absolute; left: -9999px; }

.question-pied { display: flex; align-items: center; gap: 1rem; margin-top: 1.8rem; }
.question-pied .bouton { width: auto; min-width: 210px; margin-left: auto; }
.astuce { display: none; }

/* Sur téléphone, la largeur minimale de 210 px alignée à droite poussait le
   bouton hors de l'écran : il apparaissait tronqué à chaque étape. On empile,
   et le bouton principal prend toute la largeur — ce qui en fait aussi une
   cible tactile bien plus sûre. */
@media (max-width: 560px) {
  .question-pied { flex-direction: column-reverse; align-items: stretch; gap: .7rem; }
  .question-pied .bouton { width: 100%; min-width: 0; margin-left: 0; }
  .question-pied .bouton-fantome { align-self: center; width: auto; }
}

/* ═════════════════════════════════════════════════════════════ rapport */

.rapport { max-width: 800px; margin: 0 auto; padding: clamp(1.6rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2rem) 5rem; }

.verdict {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--blanc); border-radius: 20px; padding: clamp(1.8rem, 5vw, 3rem);
  text-align: center; box-shadow: var(--ombre); margin-bottom: 2.5rem;
}
.verdict .etiquette { color: var(--or-clair); }
.verdict .adresse { font-size: .95rem; color: #cbd5e2; margin: .5rem 0 1.2rem; }
.verdict .montant {
  font-size: clamp(2.6rem, 11vw, 4.4rem); font-weight: 800; letter-spacing: -.035em;
  line-height: 1; color: var(--or-clair); margin-bottom: .9rem;
}
.verdict .amplitude { font-size: 1rem; color: #dbe3ec; margin: 0; }
.verdict .amplitude strong { color: var(--blanc); }

.actions-rapport { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 2.5rem; }

.section-rapport { margin-bottom: 2.6rem; }
.section-rapport > h2 { font-size: 1.3rem; display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.section-rapport > h2::before {
  content: attr(data-rang); flex: none; width: 30px; height: 30px;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: var(--navy); color: var(--or); border-radius: 8px;
}
.section-rapport p { color: var(--gris); font-size: .95rem; }

.grille-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .8rem; }
.grille-chiffres > div { background: var(--creme); border: 1px solid var(--trait); border-radius: 14px; padding: 1rem 1.1rem; }
.grille-chiffres .val { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.grille-chiffres .lib { display: block; font-size: .8rem; color: var(--gris); margin-top: .15rem; }

.lignes { list-style: none; padding: 0; margin: 0; border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; }
.lignes li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; font-size: .95rem; background: var(--blanc); }
.lignes li + li { border-top: 1px solid var(--trait); }
.lignes .val { font-weight: 800; }
.positif { color: var(--vert); }
.negatif { color: var(--rouge); }

.encart {
  background: var(--creme); border: 2px solid var(--or); border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 2rem;
}
.encart h2 { font-size: 1.35rem; }
.encart p { color: var(--gris); font-size: .96rem; }
.encart .bouton { margin-top: .8rem; max-width: 380px; }

.avertissement { font-size: .78rem; color: var(--gris-clair); border-top: 1px solid var(--trait); padding-top: 1.2rem; }

@media print {
  .barre, .barre-mobile, .actions-rapport { display: none !important; }

  /* Le bouton d'appel devient du texte plutôt que de disparaître : sur un
     rapport imprimé ou archivé, le numéro est le seul moyen de recontact. */
  .encart .bouton {
    display: inline; background: none !important; box-shadow: none;
    color: var(--navy) !important; padding: 0; font-weight: 800;
  }
  body { background: #fff; font-size: 11.5pt; padding: 0; }
  .verdict { background: #fff !important; color: #000 !important; box-shadow: none; border: 2px solid #16273f; }
  .verdict .montant, .verdict .etiquette { color: #16273f !important; }
  .verdict .amplitude, .verdict .adresse { color: #333 !important; }

  /* Le conteneur à défilement horizontal découpe le tableau à l'impression :
     la colonne Distance disparaissait purement et simplement. On libère la
     largeur et on laisse le tableau se composer sur la page. */
  .rapport { padding: 0 !important; max-width: none; }
  .tableau-enveloppe { overflow: visible !important; border: none; }
  .registre { min-width: 0 !important; width: 100%; font-size: 9pt; }
  .registre th, .registre td { padding: .3rem .35rem; white-space: normal; }
  /* Répète l'en-tête si le tableau s'étale sur deux pages. */
  .registre thead { display: table-header-group; }

  /* Ne pas interdire la coupure d'une section entière : un bloc plus haut
     qu'une page était rejeté après le suivant, ce qui inversait l'ordre de
     lecture. On protège seulement les petits éléments indivisibles. */
  .section-rapport > h2 { break-after: avoid; }
  .grille-chiffres > div, .avis-carte, .lignes li { break-inside: avoid; }

  /* Évite la page blanche finale due aux marges de fin de document. */
  .rapport > :last-child { margin-bottom: 0 !important; }
  .avertissement { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
