/* =====================================================================
   Solida : feuille de style (mobile-first)
   Sommaire : 1 Variables · 2 Base · 3 Boutons · 4 Header · 5 Hero
              6 Sections & cartes · 7 Étapes · 8 Formules · 9 Preuves
              10 FAQ · 11 Contact/formulaire · 12 Footer · 13 Animations
   ===================================================================== */

/* ---------- 1. Variables ---------- */
:root {
  --navy-900: #0f1f3d;
  --navy-700: #1c3a6b;
  --navy-500: #4a6fa5;
  --accent: #e0a458;
  --accent-dark: #9a5b0f;
  --teal: #7fc4b0;
  --teal-soft: #a8e0d0; /* texte de petite taille sur fond bleu : contraste >= 4.5:1 */
  --halo: #2b4a80;
  --sand: #e8d5a8;
  --ink: #14213d;
  --muted: #55607a;
  --bg: #ffffff;
  --tint: #f3f5f9;
  --line: #dde3ed;
  --radius: 20px;
  --shadow: 0 10px 30px -12px rgba(15, 31, 61, .25);
  --shadow-lg: 0 24px 50px -16px rgba(15, 31, 61, .35);
  --font-title: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 1.0625rem; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-title); margin: 0 0 .6em; }
/* Tracking et interlignage propres à chaque taille : plus le texte est grand, plus il se resserre */
h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--navy-700); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .section--dark :focus-visible, .section--brand :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .consent :focus-visible { outline-color: var(--accent); }
.form-card :focus-visible { outline-color: var(--navy-700); }

.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 40px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ---------- 3. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95rem 1.75rem; border-radius: 999px; font: 600 1rem var(--font-body);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
/* Retour immédiat à l'appui (pas au relâchement) */
.btn:active { transform: scale(.97); transition-duration: .08s; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } .btn:active { transform: scale(.97); } }
.btn-accent { background: var(--accent); color: #14213d; box-shadow: 0 10px 24px -10px rgba(224, 164, 88, .8); }
.btn-accent:hover, .btn-accent:focus-visible { background: #ebb673; box-shadow: 0 14px 28px -10px rgba(224, 164, 88, .9); }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { border-color: var(--navy-700); color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }
.btn-small { padding: .6rem 1.25rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- 4. Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header.scrolled { background: rgba(15, 31, 61, .72); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font: 800 1.6rem var(--font-title); color: #fff; text-decoration: none; letter-spacing: -.03em; }
.logo-dot { color: var(--accent); }
.logo--light { color: #fff; }
/* Mobile : le menu se déploie depuis le bouton (coin haut-droit), sans display:none pour pouvoir animer */
.nav {
  display: flex; flex-direction: column; gap: 6px; position: absolute; top: 72px; left: 12px; right: 12px;
  padding: 16px; border-radius: 16px; background: rgba(15, 31, 61, .92);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: scale(.96) translateY(-6px); transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
}
.nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 8px 4px; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
@media (hover: hover) { .nav a:not(.btn):hover::after { transform: scaleX(1); } }
.nav a[aria-current="true"]::after { transform: scaleX(1); } /* section en cours */
.nav-toggle { background: none; border: 0; padding: 10px; cursor: pointer; display: grid; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 8rem 0 5rem;
  background: radial-gradient(circle at 80% 10%, var(--halo) 0, transparent 45%), linear-gradient(160deg, var(--navy-700), var(--navy-900));
}
.shape { position: absolute; border-radius: 50%; opacity: .5; filter: blur(2px); }
.shape-1 { width: 320px; height: 320px; background: var(--accent); left: -140px; bottom: -120px; opacity: .12; }
.shape-2 { width: 160px; height: 160px; border: 22px solid var(--teal); right: 6%; top: 18%; opacity: .1; }
.hero-inner { position: relative; display: grid; gap: 48px; align-items: center; }
.eyebrow { font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-soft); margin-bottom: 1em; }
.eyebrow--dark { color: var(--navy-700); }
.hl { color: var(--teal); }
.lead { font-size: 1.15rem; opacity: .92; max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.hero-note { font-size: .92rem; opacity: .8; margin: 0; }
.hero-visual svg { width: 100%; max-width: 480px; margin-inline: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .25)); }
.curve { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.2s .5s ease forwards; }
.bars rect { transform-origin: bottom; animation: grow .9s ease both; }
.bars rect:nth-child(2) { animation-delay: .15s; } .bars rect:nth-child(3) { animation-delay: .3s; }

/* Variante : hero centré */
.hero--centered .hero-inner { text-align: center; }
.hero--centered .hero-copy { margin-inline: auto; max-width: 820px; }
.hero--centered .lead { margin-inline: auto; }
.hero--centered .cta-row { justify-content: center; }
.hero--centered .hero-visual { display: none; }

/* ---------- 6. Sections & cartes ---------- */
.section { padding: 5.25rem 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy-900); color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.1rem; }
.grid { display: grid; gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease;
}
@media (hover: hover) { .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); } }
.card p { color: var(--muted); margin: 0; }
.icon { width: 56px; height: 56px; border-radius: 16px; background: var(--tint); display: grid; place-items: center; margin-bottom: 20px; }
.icon svg { width: 28px; height: 28px; fill: none; stroke: var(--navy-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 7. Étapes ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; counter-reset: s; }
.step { position: relative; padding: 28px 24px 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.step p { color: var(--muted); margin: 0; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-700); color: #fff; font: 700 1.2rem var(--font-title); margin-bottom: 16px; }
.step:nth-child(4) .step-n { background: var(--accent); color: var(--ink); }

/* ---------- 8. Formules ---------- */
.plan { display: flex; flex-direction: column; }
.plan-tag { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--navy-700) !important; margin-bottom: .8em !important; }
.plan-tag--pop { color: var(--accent-dark) !important; }
.plan-desc { margin-bottom: 20px !important; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; flex: 1; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1f3d' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan-price { font: 700 1.1rem var(--font-title); color: var(--ink) !important; margin-bottom: 16px !important; }
.plan--featured { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); } /* mise en avant sans casser l'alignement des cartes */

/* ---------- 9. Preuves ---------- */
.stats { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); text-align: center; }
.stat-n { display: block; font: 800 clamp(2rem, 6vw, 3.2rem) var(--font-title); color: var(--teal); letter-spacing: -.03em; }
.stat-l { display: block; font-size: .95rem; opacity: .85; }
.placeholder-note { text-align: center; font-size: .85rem; color: var(--sand); margin-bottom: 56px; }
.quote { margin: 0; padding: 32px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
.quote blockquote { margin: 0 0 18px; font: 600 1.15rem/1.5 var(--font-title); }
.quote figcaption { font-size: .95rem; opacity: .85; }

/* ---------- 10. FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font: 600 1.1rem var(--font-title); padding: 20px 40px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--accent-dark); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq { interpolate-size: allow-keywords; }
.faq details::details-content { height: 0; overflow: clip; transition: height .3s ease, content-visibility .3s allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* ---------- 11. Contact & formulaire ---------- */
.section--brand { background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); color: #fff; position: relative; overflow: hidden; }
.section--brand::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: var(--accent); opacity: .15; right: -140px; top: -120px; }
.contact-inner { position: relative; display: grid; gap: 40px; align-items: center; }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-lg); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 13px 14px; border: 1.5px solid #7f8aa3; /* >= 3:1 (WCAG 1.4.11) */ border-radius: 12px; font: inherit; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(74, 111, 165, .2); }
.field.invalid input { border-color: #c62828; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.field-note { font-size: .85rem; color: var(--muted); margin: 0 0 16px; }
.field-note a { color: var(--navy-700); }
.error { color: #c62828; font-size: .88rem; margin: 6px 0 0; min-height: 0; }
.form-status { margin: 14px 0 0; font-weight: 600; text-align: center; }
.form-status.ok { color: #0b7a55; }
.form-status.ko { color: #c62828; }

/* ---------- 12. Footer ---------- */
.site-footer { background: #0a1529; color: #c9d1e0; padding: 48px 0 24px; font-size: .95rem; }
.footer-inner { display: grid; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-tag { margin: 8px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: start; }
.footer-links a { text-decoration: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; color: #fff; }
.footer-links a:hover { text-decoration: underline; color: #fff; }
.copyright { margin: 20px auto 0; font-size: .85rem; opacity: .75; }
.disclaimer { margin-top: 6px; }

/* ---------- Pages légales ---------- */
.site-header.static { position: static; background: var(--navy-900); }
.legal { padding: 3rem 0 5rem; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); color: var(--navy-900); }
.legal h2 { font-size: 1.35rem; margin: 2.2em 0 .5em; color: var(--navy-700); letter-spacing: -.01em; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.3rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: .6rem .7rem; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--tint); }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal a { color: var(--navy-700); }
/* Champs à compléter : bien visibles pour ne pas être oubliés avant la mise en ligne */
mark.todo { background: var(--sand); color: var(--ink); padding: 0 .25em; border-radius: 4px; }

/* ---------- Bandeau de consentement (affiché seulement si des traceurs sont activés) ---------- */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; max-width: 720px; margin-inline: auto; background: var(--navy-900); color: #fff; border-radius: 16px; padding: 1.25rem; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); }
.consent h2 { font-size: 1.1rem; margin: 0 0 .4rem; letter-spacing: 0; }
.consent p { margin: 0 0 1rem; font-size: .95rem; }
.consent a { color: var(--teal-soft); }
.consent-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
/* Les trois choix ont la même importance visuelle (recommandation CNIL) */
.consent .btn { flex: 1 1 8rem; padding: .7rem 1rem; background: #fff; color: var(--ink); border-color: #fff; }
.consent-options { margin: 0 0 1rem; padding: 0; border: 0; display: grid; gap: .6rem; }
.consent-options label { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.consent-options input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.consent[hidden], .consent-options[hidden] { display: none; }

/* ---------- 13. Animations ---------- */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
/* L'état masqué n'existe que si le JS est actif (sinon tout reste visible) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid .reveal:nth-child(2), .js .steps .reveal:nth-child(2), .js .stats .reveal:nth-child(2) { transition-delay: .1s; }
.js .grid .reveal:nth-child(3), .js .steps .reveal:nth-child(3), .js .stats .reveal:nth-child(3) { transition-delay: .2s; }
.js .steps .reveal:nth-child(4), .js .stats .reveal:nth-child(4) { transition-delay: .3s; }

/* Mouvement réduit : plus de déplacement ni d'animation, mais on garde de courts fondus qui aident à comprendre */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { transform: none; transition: opacity .3s ease; transition-delay: 0s !important; }
  .btn:hover, .btn:active, .card:hover { transform: none; }
  .nav { transform: none; }
  .faq details::details-content { transition: none; }
  .curve { stroke-dashoffset: 0; }
}

/* Transparence réduite : surfaces pleines, sans flou */
@media (prefers-reduced-transparency: reduce) {
  .site-header.scrolled, .nav { background: var(--navy-900); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Contraste renforcé : fonds pleins et bordures nettes */
@media (prefers-contrast: more) {
  .site-header.scrolled, .nav { background: var(--navy-900); backdrop-filter: none; border: 1px solid #fff; }
  .card, .step, .quote { border: 2px solid currentColor; }
  .field input, .field textarea { border-color: var(--ink); }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { position: static; flex-direction: row; align-items: center; gap: 26px; padding: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .hero { padding: 10.5rem 0 6.5rem; }
  .hero--split .hero-inner { grid-template-columns: 1.15fr .85fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .contact-inner { grid-template-columns: 1fr 1fr; gap: 64px; }
  .form-card { padding: 2.25rem; }
  .footer-inner { grid-template-columns: 1fr auto; }
}
