/* FinNance – landing page liste d'attente. Mobile d'abord. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* Couleurs relevées sur la planche de Finn */
  --creme: #fbf8f3;          /* fond de la planche */
  --creme-2: #f5eee4;        /* sections alternées */
  --peche: #ffefcf;          /* visage de Finn */
  --orange: #ff7a00;         /* pelage de Finn : action principale */
  --orange-ombre: #d96800;
  --orange-texte: #b34a00;   /* orange lisible sur crème (7:1) */
  --brun: #2b1300;           /* contour de Finn : texte */
  --brun-doux: #5c4434;      /* texte secondaire (8:1) */
  --bleu: #2b7fff;           /* coffre de Finn : couleur secondaire */
  --bleu-fonce: #1a5ccc;
  --bleu-pale: #e8f0ff;
  --blanc: #ffffff;
  --bordure: #e8dfd3;
  --erreur: #b3261e;
  --succes: #1e7d3c;

  --titre: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rayon: 20px;
  --largeur: 1120px;
  --marge: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--brun);
  font: 400 1rem/1.6 var(--texte);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-texte); text-underline-offset: 3px; }
a:hover { color: var(--brun); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
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: -9999px; top: 8px; z-index: 100; background: var(--blanc); padding: 10px 14px; border-radius: 10px; }
.lien-evitement:focus { left: 8px; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--marge); }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.entete.defile { border-bottom-color: var(--bordure); }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brun); text-decoration: none; font: 600 1.375rem/1 var(--titre); }
.logo img { width: 34px; height: 34px; }
.entete .entete__cta { display: none; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 14px 24px;
  border: 0; border-radius: 999px;
  background: var(--orange); color: var(--brun);
  font: 700 1.0625rem/1.15 var(--texte);
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 4px 0 var(--orange-ombre);
  transition: transform .08s, box-shadow .08s, background-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.bouton:hover { background: #ff8a1f; color: var(--brun); }
.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-ombre); }
.bouton[disabled] { opacity: .7; cursor: progress; }
.bouton--secondaire { background: var(--blanc); box-shadow: 0 3px 0 var(--bordure); border: 2px solid var(--bordure); }
.bouton--secondaire:hover { background: var(--creme); }
.bouton--petit { min-height: 44px; padding: 10px 18px; font-size: .9375rem; }

/* ---------- Formulaire d'inscription (présent 3 fois) ---------- */
.inscription { display: grid; gap: 9px; width: 100%; max-width: 520px; }
.inscription__email {
  width: 100%; min-height: 54px; padding: 14px 18px;
  border: 2px solid var(--bordure); border-radius: 16px;
  background: var(--blanc); color: var(--brun);
  font: 500 1.0625rem/1.2 var(--texte);
  transition: border-color .15s, box-shadow .15s;
}
.inscription__email::placeholder { color: #8d7767; }
.inscription__email:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-pale); }
.inscription__email[aria-invalid="true"] { border-color: var(--erreur); }
.inscription .bouton { width: 100%; }
.consentement {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start;
  font-size: .8125rem; line-height: 1.4; color: var(--brun-doux); cursor: pointer;
}
.consentement input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 24px; height: 24px; border: 2px solid #b9a796; border-radius: 7px; background: var(--blanc);
  display: grid; place-content: center; cursor: pointer;
}
.consentement input::before {
  content: ""; width: 12px; height: 12px; transform: scale(0);
  transition: transform .1s; background: var(--brun);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.consentement input:checked { background: var(--orange); border-color: var(--orange-ombre); }
.consentement input:checked::before { transform: scale(1); }
.consentement input[aria-invalid="true"] { border-color: var(--erreur); box-shadow: 0 0 0 3px #f9dedc; }
.inscription__message { min-height: 0; font-size: .9375rem; font-weight: 600; }
.inscription__message:empty { display: none; }
.inscription__message.erreur { color: var(--erreur); }
.inscription__message.succes { color: var(--succes); }
.inscription__note { font-size: .875rem; font-weight: 600; color: var(--brun-doux); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inscription__note span[aria-hidden] { color: var(--orange); }
.hero .inscription__note { margin-top: 12px; }
.surtitre--seul { display: block; margin-bottom: 12px; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 14px 0 40px; }
.hero .conteneur { position: relative; }
.hero__finn {
  position: absolute; top: -4px; right: 8px;
  width: 92px; height: 92px;
}
.hero h1 {
  font-size: clamp(1.8rem, 8vw, 3.6rem);
  padding-right: 96px;
  margin-bottom: 10px;
}
.hero h1 em { font-style: normal; color: var(--orange-texte); }
.hero__sous-titre { font-size: 1rem; line-height: 1.5; color: var(--brun-doux); max-width: 34em; margin-bottom: 16px; }
.parrainage-banniere {
  display: flex; align-items: center; gap: 10px;
  background: var(--bleu-pale); color: var(--brun);
  border-radius: 12px; padding: 8px 12px; margin: 10px 0 0;
  font-size: .875rem; font-weight: 600; line-height: 1.3;
}
.parrainage-banniere[hidden] { display: none; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section--alt { background: var(--creme-2); }
.section__tete { display: grid; gap: 12px; justify-items: start; margin-bottom: 28px; }
.section__tete img { width: 112px; height: 112px; }
.section h2 { font-size: clamp(1.75rem, 6.6vw, 2.75rem); }
.section__intro { font-size: 1.0625rem; color: var(--brun-doux); max-width: 38em; }
.surtitre {
  font: 700 .8125rem/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-texte);
}

/* Problème */
.problemes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.problemes li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: var(--rayon);
  padding: 16px; font-size: 1.0625rem; font-weight: 500;
}
.problemes .pastille {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--peche); font-size: 1.375rem;
}

/* Piliers */
.piliers { display: grid; gap: 14px; }
.pilier {
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: var(--rayon);
  padding: 20px; box-shadow: 0 4px 0 var(--bordure);
}
.pilier h3 { font-size: 1.375rem; margin: 12px 0 6px; }
.pilier p { color: var(--brun-doux); }
.icone {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--peche); color: var(--orange-texte);
}
.icone svg { width: 28px; height: 28px; }
.icone--bleu { background: var(--bleu-pale); color: var(--bleu-fonce); }

/* Aperçu */
.apercu {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 6px var(--marge) 18px; margin: 0 calc(-1 * var(--marge));
  scrollbar-width: none; list-style: none;
}
.apercu::-webkit-scrollbar { display: none; }
.apercu li { scroll-snap-align: center; }
.telephone {
  margin: 0; background: var(--brun); padding: 7px; border-radius: 30px;
  box-shadow: 0 14px 30px -12px rgba(43, 19, 0, .45);
}
.telephone img { border-radius: 24px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--creme); }
.apercu figcaption { margin-top: 12px; text-align: center; font-weight: 600; font-size: .9375rem; }
.apercu__note { font-size: .8125rem; color: var(--brun-doux); margin-top: 4px; }

/* Avantages */
.avantages { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.avantages li {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start;
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: var(--rayon); padding: 16px;
}
.avantages h3 { font-size: 1.1875rem; margin-bottom: 2px; }
.avantages p { color: var(--brun-doux); font-size: .9375rem; }
.paliers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px;
}
.palier {
  border-radius: var(--rayon); padding: 16px; background: var(--brun); color: var(--creme);
}
.palier strong { display: block; font: 600 2rem/1 var(--titre); color: var(--orange); margin-bottom: 6px; }
.palier span { font-size: .9375rem; }
.palier--bleu strong { color: #8db8ff; }
.encart-formulaire {
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: 24px; padding: 20px;
  display: grid; gap: 14px;
}
.encart-formulaire h3 { font-size: 1.375rem; }

/* Qui est derrière */
.fondateur {
  display: grid; gap: 18px; align-items: center;
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: 24px; padding: 22px;
}
.fondateur img { width: 128px; height: 128px; }
.fondateur p + p { margin-top: 10px; }
.fondateur .signature { font: 600 1.125rem/1.2 var(--titre); margin-top: 14px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--blanc); border: 2px solid var(--bordure); border-radius: 18px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; position: relative;
  font-weight: 700; font-size: 1.0625rem; min-height: 56px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 3px solid var(--orange-texte); border-bottom: 3px solid var(--orange-texte);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 18px 18px; color: var(--brun-doux); }
.faq details > div p + p { margin-top: 8px; }

/* Appel final */
.final { text-align: center; padding: 64px 0 72px; }
.final .conteneur { display: grid; justify-items: center; gap: 14px; }
.final img.finn { width: 150px; height: 150px; }
.final h2 { font-size: clamp(2rem, 8vw, 3.25rem); }
.final .inscription { text-align: left; margin-top: 6px; }
.compteur { font-weight: 600; color: var(--brun-doux); }
.compteur strong { color: var(--orange-texte); font-size: 1.25rem; }
.compteur[hidden] { display: none; }

/* Pied de page */
.pied { background: var(--brun); color: #eadfd2; padding: 40px 0 110px; font-size: .9375rem; }
.pied a { color: #ffd3a8; }
.pied a:hover { color: var(--blanc); }
.pied .logo { color: var(--creme); margin-bottom: 14px; }
.pied__grille { display: grid; gap: 24px; }
.pied h2 { font: 700 .8125rem/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: #c9b6a4; margin-bottom: 10px; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.avertissement { border-top: 1px solid #4a3324; margin-top: 28px; padding-top: 18px; font-size: .8125rem; color: #c9b6a4; }
.avertissement p + p { margin-top: 6px; }

/* Barre d'action collante (mobile) */
.barre-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px var(--marge) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 243, .96); border-top: 1px solid var(--bordure);
  transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility .25s;
}
.barre-cta.visible { transform: none; visibility: visible; }
.barre-cta .bouton { width: 100%; }

/* Pages simples (légal, merci) */
.page { padding: 28px 0 64px; }
.page .conteneur { max-width: 760px; }
.page h1 { font-size: clamp(2rem, 7vw, 2.75rem); margin-bottom: 8px; }
.page h2 { font-size: 1.5rem; margin: 32px 0 10px; }
.page p, .page li { color: var(--brun-doux); }
.page p + p { margin-top: 10px; }
.page ul { padding-left: 1.2em; }
.page .maj { font-size: .875rem; margin-bottom: 18px; }
.carte { background: var(--blanc); border: 2px solid var(--bordure); border-radius: 24px; padding: 20px; margin-top: 18px; }
.carte h2 { margin-top: 0; }

/* Merci */
.retour { margin-top: 28px; text-align: center; }
.pied--simple { padding-bottom: 40px; }
.pied--simple .avertissement { border-top: 0; margin-top: 0; padding-top: 0; }
.merci-tete { display: grid; justify-items: center; text-align: center; gap: 10px; }
.merci-tete img { width: 160px; height: 160px; }
.lien-perso { display: flex; gap: 8px; margin: 14px 0 12px; }
.lien-perso input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px;
  border: 2px solid var(--bordure); border-radius: 14px; background: var(--creme);
  font: 600 .9375rem/1 var(--texte); color: var(--brun);
}
.partage { display: flex; flex-wrap: wrap; gap: 8px; }
.progression { margin-top: 18px; }
.progression__barre { height: 14px; border-radius: 999px; background: var(--creme-2); overflow: hidden; margin: 8px 0; }
.progression__barre span { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 999px; transition: width .6s ease; }
.progression p { font-size: .9375rem; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .875rem; background: var(--creme-2); color: var(--brun-doux); }
.badge.obtenu { background: var(--orange); color: var(--brun); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 10px 0 18px; }
.puces legend { font-weight: 700; color: var(--brun); margin-bottom: 10px; padding: 0; }
.puces label { position: relative; }
.puces input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.puces span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--bordure); border-radius: 999px; background: var(--blanc);
  font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.puces input:checked + span { background: var(--bleu-pale); border-color: var(--bleu); color: var(--bleu-fonce); }
.puces input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }
.stickers { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.stickers img { width: 96px; height: 96px; }

@keyframes flotter { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.flotte { animation: flotter 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  :root { --marge: 28px; }
  .inscription { grid-template-columns: 1fr auto; grid-template-areas: "email bouton" "consent consent" "message message"; }
  .inscription__email { grid-area: email; }
  .inscription .bouton { grid-area: bouton; width: auto; }
  .inscription .consentement { grid-area: consent; }
  .inscription .inscription__message { grid-area: message; }
  .piliers { grid-template-columns: repeat(3, 1fr); }
  .problemes { grid-template-columns: repeat(3, 1fr); }
  .problemes li { grid-template-columns: 1fr; align-content: start; }
  .apercu { grid-auto-columns: 36%; }
  .avantages { grid-template-columns: 1fr 1fr; }
  .fondateur { grid-template-columns: 128px 1fr; }
  .pied__grille { grid-template-columns: 2fr 1fr 1fr; }
  .barre-cta { display: none; }
  .pied { padding-bottom: 40px; }
}

/* ---------- Ordinateur ---------- */
@media (min-width: 960px) {
  .entete .entete__cta { display: inline-flex; }
  .hero { padding: 56px 0 72px; }
  .hero .conteneur { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
  .hero__finn {
    position: relative; top: auto; right: auto; width: 100%; height: auto; max-width: 380px; justify-self: center;
    grid-column: 2; grid-row: 1;
  }
  .hero__texte { grid-column: 1; grid-row: 1; }
  .hero__visuel { grid-column: 2; grid-row: 1; position: relative; display: grid; place-items: center; }
  .hero__visuel::before {
    content: ""; position: absolute; width: 92%; aspect-ratio: 1; border-radius: 50%; background: var(--peche);
  }
  .hero h1 { padding-right: 0; }
  .hero__sous-titre { font-size: 1.25rem; }
  .section { padding: 88px 0; }
  .section__tete { grid-template-columns: auto 1fr; align-items: center; column-gap: 24px; }
  .section__tete img { width: 132px; height: 132px; grid-row: span 3; }
  .apercu { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 6px 0 0; }
  .avantages { grid-template-columns: repeat(4, 1fr); }
  .avantages li { grid-template-columns: 1fr; }
  .bloc-maintenant { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .paliers { margin-bottom: 0; }
}

/* Bandeau de parrainage : au-dessus du hero pour ne pas passer sous Finn */
.conteneur--banniere:has(.parrainage-banniere[hidden]) { display: none; }
.conteneur--banniere { margin-bottom: 12px; }
