/* ==========================================================
   Mèfi : feuille de style de la page de lancement
   Règles : texte de 18 px minimum, boutons de 44 px minimum,
   contrastes AA, parfait sur mobile.
   ========================================================== */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/caveat-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --encre: #1D2B4F;
  --accent: #2346A8;
  --accent-fonce: #16306F;
  --surligneur: #FFE45C;
  --fond-doux: #F2F5FA;
  --blanc: #FFFFFF;
  --texte-2: #3A4864;
  --texte-3: #4A5873;
  --bordure-champ: #66738C;
  --ligne: #D5DCE7;
  --erreur: #B42318;
  --erreur-fond: #FDECEA;
  --succes: #0F6B3E;

  --police: "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;
  --manuscrit: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --rayon: 14px;
  --largeur: 1120px;
  --gouttiere: clamp(16px, 4vw, 24px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.125rem;          /* 18 px */
  line-height: 1.55;
  color: var(--encre);
  background: var(--blanc);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-fonce); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }

.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lien-evitement {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--encre);
  color: var(--blanc);
  font-weight: 700;
  border-radius: 10px;
}
.lien-evitement:focus { top: 12px; color: var(--blanc); }

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}
.conteneur--etroit { max-width: 860px; }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 24px;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.bouton:active { transform: translateY(1px); }

.bouton--plein {
  color: var(--blanc);
  background: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 3px 0 var(--accent-fonce);
}
.bouton--plein:hover { background: var(--accent-fonce); color: var(--blanc); }
.bouton--plein[disabled] { cursor: progress; opacity: .8; }

.bouton--contour {
  min-height: 48px;
  padding: 8px 18px;
  color: var(--encre);
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 999px;
}
.bouton--contour:hover { background: var(--surligneur); color: var(--encre); }

.bouton--surligneur {
  color: var(--encre);
  background: var(--surligneur);
  border: 2px solid var(--encre);
}
.bouton--surligneur:hover { color: var(--encre); box-shadow: 0 3px 0 var(--encre); }

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

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.entete--defile { border-bottom-color: var(--ligne); }

.entete__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
}

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--encre);
  text-decoration: none;
  z-index: 0;
}
.logo::after {
  content: "";
  position: absolute;
  left: -4px; right: -6px;
  bottom: 9px;
  height: 12px;
  background: var(--surligneur);
  border-radius: 3px 8px 4px 9px;
  transform: rotate(-2deg);
  z-index: -1;
}
.logo:hover { color: var(--encre); }

@media (max-width: 420px) {
  .entete__bouton { padding: 8px 14px; font-size: 1.125rem; }
  .logo { font-size: 1.5rem; }
}

/* ---------- Accroche ---------- */

.accroche { padding: clamp(24px, 5vw, 56px) 0 clamp(64px, 9vw, 104px); }

.accroche__grille {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "titre"
    "message"
    "texte";
}

@media (min-width: 900px) {
  .accroche__grille {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "titre message"
      "texte message";
    column-gap: 64px;
    row-gap: 28px;
    align-items: start;
  }
}

.accroche__titre {
  grid-area: titre;
  align-self: end;
  font-size: clamp(2.375rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  hyphens: manual;
}

/* Test A/B du titre : la variante est choisie avant l'affichage, sans clignotement. */
.titre-b { display: none; }
html[data-variante="B"] .titre-a { display: none; }
html[data-variante="B"] .titre-b { display: inline; }

.surligne {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}
.surligne::after {
  content: "";
  position: absolute;
  left: -0.06em; right: -0.08em;
  bottom: 0.04em;
  height: 0.36em;
  background: var(--surligneur);
  border-radius: 0.1em 0.3em 0.12em 0.32em;
  transform: rotate(-1.2deg);
  z-index: -1;
}

.accroche__texte {
  grid-area: texte;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.accroche__sous-titre {
  font-size: clamp(1.1875rem, 2vw, 1.375rem);
  line-height: 1.55;
  color: var(--texte-2);
  max-width: 34em;
}

/* ---------- Le faux message annoté ---------- */

.message {
  grid-area: message;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}

.message__etiquette {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-left: 12px;
  font-family: var(--manuscrit);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
}
.message__fleche { flex: none; transform: translateY(14px); }

.message__ecran {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
  background: var(--fond-doux);
  border: 2px solid var(--encre);
  border-radius: 28px;
  box-shadow: 8px 10px 0 var(--encre);
  transform: rotate(-1.2deg);
}

.message__expediteur { display: flex; align-items: center; gap: 12px; }

.message__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #C9D3E3;
  font-weight: 700;
  font-size: 1.375rem;
}

.message__qui { display: flex; flex-direction: column; line-height: 1.3; }
.message__qui span { color: var(--texte-3); }

.message__bulle {
  position: relative;
  padding: 18px 20px;
  background: var(--blanc);
  border-radius: 4px 22px 22px 22px;
  font-size: clamp(1.1875rem, 2.4vw, 1.3125rem);
  line-height: 1.85;
  box-shadow: 0 1px 0 rgba(29, 43, 79, .08);
}

/* Le surligneur qui passe sur les signes d'alerte */
.signe {
  color: var(--encre);
  padding: 0.05em 0.2em;
  margin: 0 -0.05em;
  border-radius: 0.25em 0.5em 0.3em 0.45em;
  background-color: transparent;
  background-image: linear-gradient(100deg, rgba(255, 228, 92, .85), var(--surligneur) 8%, var(--surligneur) 92%, rgba(255, 228, 92, .75));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pastille {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  margin-left: 4px;
  vertical-align: 0.05em;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  font-family: var(--manuscrit);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--accent);
  background: var(--blanc);
}

.message__notes ol {
  margin: 0;
  padding: 0 0 0 6px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--manuscrit);
  font-size: clamp(1.625rem, 3.2vw, 1.875rem);
  line-height: 1.15;
  color: var(--accent);
}
.message__notes li { display: flex; align-items: baseline; gap: 12px; }

.note__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px; height: 34px;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  font-size: 1.5rem;
  transform: translateY(4px);
}

/* Animation : le stylo annote le message (désactivée si l'utilisateur préfère moins de mouvement) */
@media (prefers-reduced-motion: no-preference) {
  .signe {
    background-size: 0% 100%;
    animation: surligner .55s cubic-bezier(.3, .7, .4, 1) forwards;
    animation-delay: calc(.5s + var(--n) * .6s);
  }
  .pastille {
    transform: scale(0);
    animation: apparaitre .35s cubic-bezier(.3, 1.6, .5, 1) forwards;
    animation-delay: calc(.8s + var(--n) * .6s);
  }
  .message__notes li {
    opacity: 0;
    transform: translateY(8px) rotate(-1deg);
    animation: ecrire .5s ease forwards;
    animation-delay: calc(.9s + var(--n) * .6s);
  }
  .message__etiquette {
    opacity: 0;
    animation: ecrire .5s ease .3s forwards;
  }
}
@keyframes surligner { to { background-size: 100% 100%; } }
@keyframes apparaitre { to { transform: scale(1); } }
@keyframes ecrire { to { opacity: 1; transform: none; } }

/* ---------- Formulaire ---------- */

.formulaire { max-width: 560px; }
.formulaire__champs { display: flex; flex-direction: column; gap: 10px; }

.formulaire__label { font-weight: 700; }

.formulaire__ligne { display: flex; flex-wrap: wrap; gap: 10px; }

.champ {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  font: inherit;
  font-size: 1.1875rem;
  color: var(--encre);
  background: var(--blanc);
  border: 2px solid var(--bordure-champ);
  border-radius: 12px;
}
.champ::placeholder { color: #6A7690; opacity: 1; }
.champ:focus-visible { outline-offset: 2px; border-color: var(--accent); }
.champ[aria-invalid="true"] { border-color: var(--erreur); background: var(--erreur-fond); }

.formulaire__ligne .bouton { flex: 1 1 auto; min-height: 56px; }
@media (min-width: 520px) {
  .formulaire__ligne .bouton { flex: 0 0 auto; }
}

.formulaire__erreur:empty { display: none; }
.formulaire__erreur {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  color: var(--erreur);
  background: var(--erreur-fond);
  border-radius: 10px;
  font-weight: 700;
}

.formulaire__note { color: var(--texte-3); }

.formulaire__succes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--surligneur);
}
.formulaire__succes[hidden] { display: none; }
.formulaire__succes:focus { outline: none; }
.formulaire__succes:focus-visible { outline: 3px solid var(--accent); }
.formulaire__succes-titre { font-size: 1.5rem; font-weight: 700; }

.pot-de-miel {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Bandes de contenu ---------- */

.bande { padding: clamp(64px, 9vw, 96px) 0; }
.bande--douce { background: var(--fond-doux); }
.bande--encre { background: var(--encre); color: var(--blanc); }

.titre-section {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  letter-spacing: -0.015em;
}

.texte-large {
  font-size: clamp(1.1875rem, 2vw, 1.3125rem);
  color: var(--texte-2);
  max-width: 34em;
}

/* Étapes */
.etapes {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 36px 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.etape {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 3px solid var(--encre);
}
.etape h3 { font-size: 1.375rem; line-height: 1.3; }
.etape p { color: var(--texte-2); }
.etape__num {
  font-family: var(--manuscrit);
  font-size: 3.25rem;
  line-height: .9;
  color: var(--accent);
}

/* « J'ai un doute » */
.doute {
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 860px) {
  .doute { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 72px; }
}
.doute__texte { display: flex; flex-direction: column; gap: 18px; }

.telephone {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.telephone__cadre {
  width: min(100%, 290px);
  padding: 12px;
  background: var(--encre);
  border-radius: 40px;
  box-shadow: 10px 12px 0 var(--surligneur);
  transform: rotate(2deg);
}
.telephone__ecran {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  min-height: 380px;
  padding: 28px 22px;
  background: var(--fond-doux);
  border-radius: 30px;
}
.telephone__marque { font-weight: 700; font-size: 1.25rem; }
.telephone__bonjour { font-size: 1.5rem; font-weight: 700; margin-top: 8px; }
.telephone__bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  margin: 12px 0 8px;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--encre);
  background: var(--surligneur);
  border: 2.5px solid var(--encre);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--encre);
}
.telephone__ligne { height: 14px; border-radius: 7px; background: #D9E0EB; }
.telephone__ligne--courte { width: 60%; }
.telephone__legende {
  font-family: var(--manuscrit);
  font-size: 1.875rem;
  line-height: 1.15;
  color: var(--accent);
  text-align: center;
}

/* Engagements */
.bande--encre .titre-section { color: var(--blanc); }
.engagements {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 24px 48px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.engagements li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1.25rem;
}
.engagements svg { flex: none; margin-top: 1px; color: var(--surligneur); }

/* Questions */
.questions { margin-top: 24px; }
.questions details { border-bottom: 2px solid var(--ligne); }
.questions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 0;
  font-size: 1.3125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  margin-right: 6px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(45deg) translateY(-4px);
  transition: transform .2s ease;
}
.questions details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.questions details p { padding: 0 0 22px; color: var(--texte-2); max-width: 40em; }

/* Inscription */
.inscription {
  display: grid;
  gap: 32px 64px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .inscription { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.inscription > div:first-child { display: flex; flex-direction: column; gap: 16px; }
.inscription__carte {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--encre);
}
.precommande .bouton { width: 100%; }

/* ---------- Pied de page ---------- */

.pied { padding: 32px 0 48px; border-top: 1px solid var(--ligne); }
.pied__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--texte-3);
}
.pied__liens { display: flex; flex-wrap: wrap; gap: 0 24px; }
.pied__liens a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Pages de texte (légal, merci) ---------- */

.page-texte { padding: clamp(32px, 6vw, 64px) 0 clamp(64px, 9vw, 96px); }
.page-texte h1 { font-size: clamp(2.125rem, 5vw, 3rem); letter-spacing: -0.015em; margin-bottom: 12px; }
.page-texte h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.page-texte p, .page-texte li { color: var(--texte-2); max-width: 42em; }
.page-texte p + p { margin-top: 12px; }
.page-texte ul { padding-left: 1.3em; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.page-texte .date-maj { color: var(--texte-3); }

.a-completer {
  background: var(--surligneur);
  color: var(--encre);
  padding: 0 .25em;
  border-radius: 4px;
  font-weight: 700;
}

.carte-merci {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(24px, 5vw, 44px);
  background: var(--fond-doux);
  border: 2px solid var(--encre);
  border-radius: 28px;
  box-shadow: 8px 10px 0 var(--surligneur);
}
.carte-merci h1 { margin: 0; }
.carte-merci p { font-size: 1.25rem; color: var(--texte-2); }
.carte-merci__mot {
  font-family: var(--manuscrit);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent);
}

/* ---------- Page des chiffres (pour Steven) ---------- */

.stats-tableau-boite { overflow-x: auto; margin-top: 16px; border: 2px solid var(--ligne); border-radius: 14px; }
.stats-tableau { width: 100%; border-collapse: collapse; min-width: 640px; }
.stats-tableau th, .stats-tableau td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.stats-tableau th:first-child, .stats-tableau td:first-child { text-align: left; }
.stats-tableau thead th { background: var(--fond-doux); }
.stats-tableau tfoot td { font-weight: 700; background: var(--fond-doux); }
.stats-cartes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 24px; }
.stats-carte { padding: 18px 20px; border: 2px solid var(--encre); border-radius: 16px; }
.stats-carte strong { display: block; font-size: 2.25rem; line-height: 1.1; }
.stats-connexion { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-top: 24px; }

/* Garder ensemble : un mot composé, et un signe surligné avec sa pastille */
.insecable, .signe-groupe { white-space: nowrap; }

/* Un élément masqué reste masqué, même s'il a un affichage défini ailleurs */
[hidden] { display: none !important; }
.inscription__carte .formulaire__succes { padding: 0; border: 0; box-shadow: none; }
