/* =============================================================================
   MonPermisCPF — Réseau moniteurs · Système de design partagé
   Charte réelle (logo officiel) : cyan #0097d4, rose #ed79ac, encre #1d1d1b.
   Polices auto-hébergées (conformité RGPD — aucun CDN Google Fonts).
   Un seul fichier, appliqué à toutes les pages du funnel. N'affecte pas le
   câblage JS (noms de champs, ids, appels API conservés à l'identique).
   ========================================================================== */

/* --- Polices auto-hébergées (variable, sous-ensemble latin) --------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens ---------------------------------------------------------------- */
:root {
  /* Marque */
  --brand:        #0097d4;   /* cyan logo — surfaces, aplats */
  --brand-strong: #0374a6;   /* cyan foncé — CTA / liens (contraste AA sur blanc) */
  --brand-ink:    #075b7f;   /* cyan très foncé — titres teintés */
  --accent:       #ed79ac;   /* rose logo — accents dosés */
  --accent-strong:#d24d8a;

  /* Neutres teintés cyan (choisis, pas des gris purs) */
  --ink:    #16242b;         /* texte principal (encre légèrement cyan) */
  --muted:  #5b6b73;         /* texte secondaire */
  --faint:  #8a979d;         /* légendes */
  --line:   #e2e9ec;         /* filets */
  --bg:     #f2f7f9;         /* fond page (cyan très pâle) */
  --bg-2:   #e8f1f5;         /* fond alterné */
  --card:   #ffffff;

  /* Sémantique (distincte de l'accent) */
  --ok:     #0f8a5f;  --ok-bg:  #e7f7ef;
  --err:    #d64545;  --err-bg: #fdecec;

  /* Rayons / ombres / rythme */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 18px;  --r-xl: 26px;  --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(16,40,52,.06), 0 1px 3px rgba(16,40,52,.05);
  --sh-md: 0 6px 20px rgba(9,52,72,.08);
  --sh-lg: 0 18px 48px rgba(9,52,72,.14);
  --ring: 0 0 0 3px rgba(0,151,212,.22);
  --maxw: 940px;

  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* --- Reset léger ----------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; color: var(--ink); }
a { color: var(--brand-strong); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Barre de marque (nav légère) ----------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand .brand-sub { font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  color: var(--brand-ink); letter-spacing: -.01em; padding-left: 12px; border-left: 1px solid var(--line); }
.topbar .tel { font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.topbar .tel span { color: var(--accent-strong); }
@media (max-width: 560px){ .brand .brand-sub { display: none; } .topbar .tel { font-size: .85rem; } }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(237,121,172,.42), transparent 55%),
    linear-gradient(155deg, #0aa6e3 0%, var(--brand) 42%, var(--brand-strong) 100%);
}
.hero::after { /* liseré rose signature en bas du hero */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #ffd27a);
}
.hero .wrap { padding: 54px 22px 62px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.34);
  padding: 6px 13px; border-radius: var(--r-pill); margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3rem); margin: 0 0 14px; max-width: 15ch; }
.hero .lede { font-size: clamp(1.02rem, 2vw, 1.2rem); opacity: .96; margin: 0; max-width: 56ch; }
.badges { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32);
  padding: 8px 14px; border-radius: var(--r-pill); font-size: .88rem; font-weight: 500;
}
.badge b { font-weight: 700; }

/* --- Bande de réassurance (inline, pas de "hero-metric") ------------------ */
.trust { background: var(--card); border-bottom: 1px solid var(--line); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: center; padding: 15px 22px; }
.tr-item { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink); font-weight: 500; }
.tr-item::before { content: "✓"; color: var(--brand-strong); font-weight: 800; }
.tr-item b { color: var(--brand-ink); font-weight: 700; }
.tr-item.qualiopi { color: var(--muted); font-size: .84rem; }
.tr-item.qualiopi::before { content: none; }
.tr-item.qualiopi .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
@media (max-width: 560px){ .trust .wrap { gap: 8px 18px; } .tr-item { font-size: .84rem; } }

/* --- Zone principale / cartes --------------------------------------------- */
main { padding: 38px 0 8px; }
main.pull { margin-top: -36px; position: relative; z-index: 5; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 30px; box-shadow: var(--sh-md);
}
.card + .card { margin-top: 22px; }
.card h2 { font-size: 1.5rem; margin: 0 0 6px; }
.card .card-intro { color: var(--muted); margin: 0 0 22px; }

/* Trio de bénéfices — mise en page éditoriale (sans chrome de carte) */
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px 30px; margin: 36px 0 30px; }
.grid .item { padding: 18px 0 2px; border-top: 2px solid var(--brand); }
.grid .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(150deg, #e2f4fb, #cfeaf6); color: var(--brand-strong); margin-bottom: 14px; }
.grid .ic svg { width: 22px; height: 22px; }
.grid h3 { margin: 0 0 6px; font-size: 1.08rem; font-family: var(--font-display); }
.grid p { margin: 0; color: var(--muted); font-size: .92rem; }

/* --- Formulaire ------------------------------------------------------------ */
form { display: grid; gap: 16px; margin-top: 4px; }
label { font-weight: 600; font-size: .9rem; color: var(--ink); }
form label { display: block; margin-bottom: 6px; }  /* label en bloc au-dessus du champ */
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff; transition: border-color .14s, box-shadow .14s;
}
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: #cdd8dd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin: 0; }
legend { font-weight: 700; font-size: .9rem; padding: 0 8px; color: var(--brand-ink); font-family: var(--font-display); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 6px; }
.checks label { font-weight: 500; display: flex; gap: 9px; align-items: center; cursor: pointer; font-size: .95rem; }
.checks input { width: auto; accent-color: var(--brand); }
.cond { display: none; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: .85rem; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; }
.consent input { width: auto; margin-top: 3px; accent-color: var(--brand); }

/* Aide de saisie inline + regroupement des permis */
.hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.hint.err { color: var(--err); font-weight: 600; }
.permis-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; margin-top: 8px; }
.permis-groups .pg-t { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.permis-groups .pg label { display: flex; gap: 9px; align-items: center; cursor: pointer; font-weight: 500; font-size: .95rem; margin-bottom: 8px; }
.permis-groups .pg input { width: auto; accent-color: var(--brand); }
fieldset.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(214,69,69,.12); }
@media (max-width: 620px){ .permis-groups { grid-template-columns: 1fr; gap: 12px; } }

/* Canal d'aide sous le CTA */
.help { text-align: center; font-size: .88rem; color: var(--muted); margin: 4px 0 0; }
.help a { color: var(--brand-strong); font-weight: 600; text-decoration: none; }
.help a:hover { text-decoration: underline; }

/* --- Boutons --------------------------------------------------------------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--brand-strong); color: #fff; border: 0; padding: 15px 22px;
  border-radius: var(--r-md); font-size: 1.05rem; font-weight: 700; font-family: var(--font-body);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s; text-decoration: none;
  box-shadow: 0 6px 16px rgba(3,116,166,.28);
}
button:hover:not(:disabled), .btn:hover { background: #036a97; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(3,116,166,.32); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: none; box-shadow: var(--ring); }

/* --- Divers ---------------------------------------------------------------- */
.hp { position: absolute; left: -9999px; top: -9999px; }  /* honeypot anti-bot */
.footnote { font-size: .8rem; color: var(--muted); margin: 2px 0 0; }
.footnote strong { color: var(--ink); }
.note { font-size: .8rem; color: var(--faint); margin-top: 10px; }
#msg { padding: 14px 16px; border-radius: var(--r-md); margin-top: 6px; display: none; font-size: .95rem; font-weight: 500; }
#msg.ok  { background: var(--ok-bg);  color: #0b5c40; border: 1px solid #b9e6d1; display: block; }
#msg.err { background: var(--err-bg); color: #a82323; border: 1px solid #f4c6c6; display: block; }

footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 44px 22px; border-top: 1px solid var(--line); margin-top: 40px; }
footer a { color: var(--muted); }
footer .legal { margin-top: 6px; color: var(--faint); font-size: .78rem; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 620px){
  .grid, .row, .checks { grid-template-columns: 1fr; }
  .card { padding: 22px; border-radius: var(--r-lg); }
  .hero .wrap { padding: 40px 22px 48px; }
}

/* --- Accessibilité / mouvement -------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
