/* ==========================================================================
   Feuille de style commune aux quatre niches.
   Les couleurs viennent de site.config.json et sont injectées en variables
   CSS dans le <head> de chaque page : ce fichier reste identique partout.

   Aucune ressource externe : ni police, ni image, ni script tiers. La
   politique de sécurité de contenu du reverse proxy les bloquerait, et les
   illustrations sont des SVG écrits à la main, intégrés au HTML.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}

a { color: var(--primary); }

/* --- Premier écran -------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  /* Halo discret derrière le contenu : donne du relief sans image. */
  background:
    radial-gradient(1100px 520px at 78% 12%,
      color-mix(in srgb, var(--primary) 13%, transparent), transparent 70%),
    radial-gradient(760px 420px at 6% 92%,
      color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  border-bottom: 1px solid var(--border);
  padding-bottom: 54px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 1.06rem;
  color: var(--text);
  text-decoration: none;
}

.brand .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}

.badge {
  font-size: 0.76rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--card) 70%, transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 44px;
  align-items: center;
  padding-top: 26px;
}

.hero-copy { min-width: 0; }

h1 {
  font-size: clamp(2.05rem, 4.8vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 6px 0 16px;
  font-weight: 700;
  text-wrap: balance;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 54ch;
}

/* Illustration : décorative, masquée sur mobile pour ne pas repousser le
   formulaire sous la ligne de flottaison. */
.hero-art-wrap { display: grid; place-items: center; }
.hero-art { width: 100%; max-width: 360px; height: auto; display: block; }

/* Un schéma porte du texte : il lui faut plus de largeur qu'un motif
   carré, sinon les libellés deviennent illisibles. */
.hero-art--diagram { max-width: 480px; }

/* Photo du premier écran. Servie depuis notre domaine : la politique de
   sécurité de contenu (img-src 'self') bloquerait une image distante. */
.hero-photo {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 18px 44px -24px rgba(0,0,0,.5);
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; padding-top: 14px; }
  .hero-art-wrap { display: none; }
}

/* --- Réassurance ---------------------------------------------------------- */

ul.trust {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.87rem;
  color: var(--muted);
}

ul.trust li {
  display: flex;
  align-items: center;
  gap: 7px;
}

ul.trust li::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 65%, transparent);
}

/* --- Carte du formulaire -------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px -18px rgba(0,0,0,.45);
  max-width: 520px;
}

.card-title {
  margin: 0 0 18px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.field { margin-bottom: 15px; }

label {
  display: block;
  font-size: 0.89rem;
  font-weight: 550;
  margin-bottom: 7px;
}

label .opt { font-weight: 400; color: var(--muted); }

input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

textarea { resize: vertical; min-height: 92px; line-height: 1.5; }

input[type="email"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

.consent input[type="checkbox"] {
  margin: 3px 0 0;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--primary);
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 20px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 620;
  color: var(--on-primary);
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s, opacity .15s, transform .08s;
}

button:hover:not(:disabled) { filter: brightness(1.07); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }

/* Piège à robots : invisible pour un humain, rempli par un automate naïf.
   Ni display:none ni hidden, que certains robots savent détecter. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.note {
  font-size: 0.81rem;
  color: var(--muted);
  margin: 14px 0 0;
  text-align: center;
}

/* --- Retours utilisateur -------------------------------------------------- */

.msg {
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.91rem;
  display: none;
}

.msg.show { display: block; }
.msg.ok   { background: color-mix(in srgb, var(--accent) 14%, transparent);
            color: var(--text);
            border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.msg.err  { background: color-mix(in srgb, #d94141 12%, transparent);
            color: var(--text);
            border: 1px solid color-mix(in srgb, #d94141 38%, transparent); }

/* --- Corps de page -------------------------------------------------------- */

main { padding: 48px 0 8px; max-width: 760px; }

h2 {
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  margin: 46px 0 18px;
  font-weight: 650;
}

main > h2:first-child { margin-top: 0; }

.prose { color: var(--muted); margin: 0 0 8px; }

ul.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 13px;
}

ul.benefits li {
  position: relative;
  padding-left: 30px;
}

ul.benefits li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Étapes (section optionnelle) ---------------------------------------- */

ol.steps {
  list-style: none;
  counter-reset: etape;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

ol.steps li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}

ol.steps li::before {
  content: counter(etape);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--on-primary);
  background: var(--primary);
}

/* Le <li> compte TROIS éléments de grille pour deux colonnes : la pastille
   ::before, le titre, puis le texte. Sans cette contrainte, le texte retombe
   en colonne 1 — large de 30 px — et la liste s'étire sur des milliers de
   pixels. Les deux doivent donc être épinglés en colonne 2. */
ol.steps li > strong,
ol.steps li > span { grid-column: 2; }

ol.steps strong { display: block; margin-bottom: 2px; }
ol.steps span { color: var(--muted); font-size: 0.95rem; }

/* --- Bloc mis en avant : ce que le visiteur y gagne ----------------------- */

.highlight {
  margin: 52px 0;
  padding: 34px 32px 30px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
  background:
    radial-gradient(620px 320px at 82% 8%,
      color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    color-mix(in srgb, var(--primary) 7%, var(--card));
}

.highlight h2 { margin-top: 0; }

ul.outcome {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}

@media (min-width: 620px) {
  ul.outcome { grid-template-columns: 1fr 1fr; gap: 26px 34px; }
}

ul.outcome strong {
  display: block;
  font-size: 1.06rem;
  letter-spacing: -0.012em;
  margin-bottom: 4px;
}

ul.outcome span { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 520px) {
  .highlight { padding: 26px 22px 24px; border-radius: 16px; }
}

/* --- Outils connectés (section optionnelle) ------------------------------- */

ul.tools {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

ul.tools li {
  font-size: 0.9rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  white-space: nowrap;
}

.tools-note { margin-top: 16px; font-size: 0.93rem; }

/* --- FAQ (section optionnelle) ------------------------------------------- */

.faq details { border-bottom: 1px solid var(--border); padding: 2px 0; }
.faq details:first-child { border-top: 1px solid var(--border); }

.faq summary {
  cursor: pointer;
  padding: 14px 26px 14px 0;
  font-weight: 550;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1;
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Rappel d'appel à l'action ------------------------------------------- */

.closing { margin: 44px 0 8px; }

a.cta-again {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 620;
  text-decoration: none;
  transition: filter .15s;
}

a.cta-again:hover { filter: brightness(1.07); }

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

footer {
  border-top: 1px solid var(--border);
  margin-top: 46px;
  padding: 26px 0 46px;
  font-size: 0.85rem;
  color: var(--muted);
}

footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
footer a { color: var(--muted); }

/* --- Pages légales -------------------------------------------------------- */

.legal { padding-bottom: 64px; max-width: 760px; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.legal h2 { margin-top: 34px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 16px 0;
  display: block;
  overflow-x: auto;
}
.legal th, .legal td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal th { font-weight: 600; white-space: nowrap; }

/* ==========================================================================
   Ajouts pour la niche libertine.

   Tous ces sélecteurs sont NOUVEAUX — select, .hint, .checks, .second-form,
   .age-gate. Aucune règle existante n'est modifiée, donc le rendu des quatre
   autres niches ne peut pas changer : elles ne contiennent aucun de ces
   éléments.
   ========================================================================== */

/* --- Listes déroulantes --------------------------------------------------- */
/* Mêmes dimensions que les champs texte. L'apparence native est conservée
   pour la flèche : la remplacer coûterait un fond en image et casserait
   l'accessibilité sur mobile. */
select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* Une règle annoncée AVANT l'inscription plutôt que découverte après : la
   cooptation des hommes seuls est le cœur du positionnement, la cacher
   reviendrait à acheter des inscriptions qu'on perdra. */
.hint {
  margin: 7px 0 0;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

/* --- Cases à cocher multiples -------------------------------------------- */
.checks {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.checks legend {
  padding: 0;
  margin-bottom: 9px;
  font-size: 0.9rem;
  font-weight: 550;
}

.check {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: none;
  margin: 0;
  accent-color: var(--primary);
}

/* --- Second formulaire : public différent du premier --------------------- */
.second-form {
  margin: 56px 0 8px;
  padding: 30px 0 0;
  border-top: 1px solid var(--border);
}

.second-form .card { margin-top: 20px; }

/* --- Écran de confirmation de majorité ----------------------------------- */
/* Visible SANS JavaScript : le contenu ne doit pas s'afficher avant la
   déclaration. Le script ne sert qu'à retirer l'écran. */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}

.age-gate[hidden] { display: none; }

/* Empêche le défilement du contenu derrière l'écran. La classe est posée par
   le script ; sans JavaScript, l'écran couvre déjà toute la fenêtre. */
.age-gate-actif, .age-gate-actif body { overflow: hidden; }

.age-gate-box {
  max-width: 440px;
  padding: 32px 28px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.age-gate-box h2 { margin: 0 0 12px; font-size: 1.4rem; }

.age-gate-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.age-gate-actions { margin-top: 24px; }

.age-gate-non {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* --- Badge long sur petit écran ------------------------------------------ */
/* Le badge porte parfois un argument et non une mention : un tarif, une
   région d'ouverture. En `white-space: nowrap` il sortait du cadre sur
   mobile et se faisait couper par l'`overflow: hidden` du premier écran —
   « Diagnostic offert · à partir de 4 ». L'argument disparaissait avec. */
@media (max-width: 560px) {
  header { flex-wrap: wrap; }

  .badge {
    white-space: normal;
    max-width: 100%;
  }
}
