/* Site public Viser juste : mêmes couleurs que l'appli (frontend/src/styles.scss), toujours en clair.
   Le citron n'a de contraste que sur le bleu nuit : sur fond clair, il sert seulement de surlignage sous l'encre nuit. */
:root {
  --nuit: #0E1530;
  --impact: #C8F04B;
  --sur-nuit: #C5CCE0;
  --fond: #F3F4F0;
  --carte: #FFFFFF;
  --encre: #0E1530;
  --discret: #596178;
  --trait: #E3E4DD;
  --trait-fort: #C9CBC2;
  --rayon: 16px;
  --ombre: 0 1px 2px rgb(14 21 48 / .04), 0 18px 40px -24px rgb(14 21 48 / .3);
  --gouttiere: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid #2A6FBB; outline-offset: 2px; border-radius: 4px; }
.nuit :focus-visible { outline-color: var(--impact); }

.conteneur { width: min(1120px, 100%); margin-inline: auto; padding-inline: var(--gouttiere); }
.etroit { width: min(780px, 100%); }
section { padding-block: 88px; }
.blanc { background: var(--carte); }
.nuit { position: relative; overflow: hidden; background: var(--nuit); color: #fff; }

.surtitre { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.nuit .surtitre { color: var(--impact); }
h2 { margin-top: 10px; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.intro { margin-top: 16px; max-width: 62ch; font-size: 19px; color: var(--discret); }
.nuit .intro { color: var(--sur-nuit); }
.legende { margin-top: 10px; font-size: 14px; color: var(--discret); }
.lien { font-weight: 600; text-underline-offset: 3px; }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--nuit);
  font-weight: 600; font-size: 16px; text-align: center; text-decoration: none; transition: transform .15s ease; }
.bouton:hover { transform: translateY(-1px); }
.bouton.plein { background: var(--nuit); color: #fff; }
.bouton.citron { background: var(--impact); border-color: var(--impact); color: var(--nuit); }
.bouton.petit { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 10; background: rgb(243 244 240 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait); }
.entete .conteneur { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.marque { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.marque img { width: 34px; height: 34px; }
.entete nav { display: flex; gap: 24px; margin-right: auto; font-size: 15px; }
.entete nav a { text-decoration: none; color: var(--discret); }
.entete nav a:hover, .entete nav a[aria-current] { color: var(--encre); }
.connexion { font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.connexion:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Haut de page */
.ouverture { position: relative; overflow: hidden; padding-block: 72px 0; }
.anneaux { position: absolute; pointer-events: none; }
.ouverture .anneaux { right: -220px; top: -260px; width: 760px; height: 760px; }
.ouverture .conteneur { position: relative; }
h1 { font-size: clamp(46px, 8vw, 92px); line-height: 1.04; font-weight: 700; letter-spacing: -.04em; }
h1 span { display: block; }
h1 mark { padding: 0 .12em; margin-left: -.12em; background: var(--impact); color: var(--nuit); border-radius: .12em; }
.ouverture .surtitre { margin-bottom: 18px; }
.accroche { margin-top: 26px; max-width: 58ch; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--discret); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.vitrine { margin: 56px auto 0; }
.vitrine img { width: 100%; border-radius: var(--rayon) var(--rayon) 0 0; border: 1px solid var(--trait-fort); border-bottom: 0; box-shadow: var(--ombre); }
.sous-vitrine { padding-block: 12px; background: var(--carte); border-top: 1px solid var(--trait); }

/* Grilles */
.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 44px; }
.trois p { margin-top: 8px; color: var(--discret); }

.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 44px; }
.etapes .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--impact); color: var(--nuit); font-size: 15px; font-weight: 700; }
.etapes h3 { margin-top: 14px; }
.etapes p { margin-top: 6px; color: var(--sur-nuit); font-size: 16px; }
.nuit .anneaux { right: -200px; bottom: -320px; width: 680px; height: 680px; }
.nuit .conteneur { position: relative; }

.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.chiffres b { display: block; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.chiffres span { display: block; margin-top: 8px; color: var(--discret); }
.note { margin-top: 28px; font-size: 13px; line-height: 1.5; color: var(--discret); }

.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.duo + .duo { margin-top: 80px; }
.duo.inverse > :first-child { order: 2; }
.duo p { margin-top: 12px; color: var(--discret); }
.duo .puces { margin-top: 16px; }
.cadre { overflow: hidden; border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: var(--fond); box-shadow: var(--ombre); }
.cadre img { width: 100%; }
.cadre + .legende { margin-top: 10px; }

.puces li { position: relative; padding-left: 26px; margin-top: 10px; color: var(--discret); }
.puces li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--encre); }
.puces li b { color: var(--encre); font-weight: 600; }

.deux { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; margin-top: 44px; }

/* Exemple de plan de mémoire */
.plan { padding: 22px 24px 18px; background: var(--carte); }
.plan .angle { margin: 0; padding-bottom: 14px; font-size: 15px; line-height: 1.45; color: var(--encre); border-bottom: 1px solid var(--trait); }
.plan li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--trait); }
.plan li > div { flex: 1; min-width: 0; }
.plan .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--nuit); color: var(--impact); font-size: 13px; font-weight: 700; }
.plan .tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; align-items: baseline; }
.plan .tete b { font-size: 16px; line-height: 1.3; }
.plan .tete span { font-size: 13px; color: var(--discret); }
.plan li p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--encre); }
.plan li p.pq { color: var(--discret); }
.plan li em { font-style: normal; font-weight: 600; }
.plan .sortie { margin: 12px 0 0; font-size: 13px; color: var(--discret); }

/* Limites */
.limites { padding: 30px 32px; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); }
.limites p { margin-top: 8px; color: var(--discret); }

/* Questions */
.questions { margin-top: 24px; border-top: 1px solid var(--trait-fort); }
details { border-bottom: 1px solid var(--trait-fort); }
summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0; font-weight: 600; font-size: 18px; line-height: 1.35; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--encre); border-bottom: 2px solid var(--encre); transform: translateY(-2px) rotate(45deg); }
details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
details > div { padding-bottom: 20px; max-width: 68ch; color: var(--discret); }
details > div p + p, details > div p + ul, details > div ul + p { margin-top: 10px; }
details .puces li { margin-top: 6px; }
.groupe { margin-top: 52px; }
.groupe h2 { font-size: 24px; letter-spacing: -.015em; }

.page-titre { padding-block: 64px 24px; }
.page-titre h1 { font-size: clamp(38px, 6vw, 60px); letter-spacing: -.03em; }
.page-titre .accroche { margin-top: 16px; }
.page-corps { padding-block: 8px 88px; }

/* Appel final */
.appel h2 { font-size: clamp(32px, 5vw, 52px); max-width: 16em; }
.appel .actions { margin-top: 28px; }
.appel .connexion { color: #fff; }

/* Pied */
footer { padding-block: 32px; background: var(--carte); border-top: 1px solid var(--trait); font-size: 15px; color: var(--discret); }
footer .conteneur { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
footer .marque { margin-right: auto; color: var(--encre); font-size: 17px; }
footer .marque img { width: 28px; height: 28px; }
footer a { text-underline-offset: 3px; }

/* Texte légal */
.texte h2 { margin: 40px 0 8px; font-size: 22px; letter-spacing: -.01em; }
.texte p { margin-top: 8px; color: var(--discret); }

@media (max-width: 940px) {
  .entete nav { display: none; }
  .entete .connexion { margin-left: auto; }
  .etapes { grid-template-columns: repeat(2, 1fr); }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .duo.inverse > :first-child { order: 0; }
  .duo + .duo { margin-top: 64px; }
}

@media (max-width: 640px) {
  :root { --gouttiere: 16px; }
  body { font-size: 16px; }
  section { padding-block: 60px; }
  .ouverture { padding-block: 48px 0; }
  .ouverture .anneaux { right: -360px; top: -320px; }
  .trois, .chiffres, .deux { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .etapes { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .actions .bouton { width: 100%; }
  .entete .conteneur { gap: 12px; }
  .marque span { font-size: 17px; }
  .bouton.petit { padding: 0 12px; font-size: 14px; }
  .limites { padding: 22px 20px; }
  .plan { padding: 18px 16px 14px; }
  footer .marque { width: 100%; }
}

@media (max-width: 400px) {
  .entete .connexion { display: none; }
  .entete .bouton { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
  .bouton:hover { transform: none; }
}
