/* Les couleurs et les polices de l'application (app/.../theme/Couleurs.kt, cahier §8). */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("polices/atkinson_hyperlegible_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("polices/atkinson_hyperlegible_bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("polices/bricolage_grotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --encre: #14303d;
  --papier: #f6f6f3;
  --blanc: #ffffff;
  --pierre: #edeee8;
  --trait: #d2d4cb;
  --gris: #566669;
  --or: #a8781f;
  --nuit: #233949;
  --alerte: #8e3e29;
  --alerte-fond: #f4e4df;
  --rassurant: #2f5b3b;
  --rassurant-fond: #e3ede4;
  --attention: #8a6510;
  /* Texte posé sur une couleur franche (alerte, nuit…) : blanc dans les deux modes. */
  --sur-couleur: #ffffff;
  /* Les couleurs d'alerte servent de fond et de texte ; en mode sombre, le texte s'éclaircit. */
  --alerte-texte: var(--alerte);
  --alerte-fonce: #6b2416;
  --rassurant-texte: var(--rassurant);
  --conversation: #e9ece6;
  --lien-message: #2357b5;
  --pied: #233949;
  --ombre: rgba(20, 48, 61, 0.18);
  --rayon: 18px;
  --largeur: 68rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { font-size: 125%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

p { margin: 0 0 1rem; max-width: 62ch; }

a { color: var(--encre); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--alerte-texte); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 4px; }

.saut {
  position: absolute; left: -999px; top: 0;
  background: var(--encre); color: var(--blanc); padding: 0.6rem 1rem;
}
.saut:focus { left: 1rem; top: 1rem; z-index: 2; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 1rem; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.entete { background: var(--papier); border-bottom: 1px solid var(--trait); }
.entete .conteneur {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.6rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.marque {
  display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 750; font-size: 1.4rem;
}
.marque img { width: 2.2rem; height: 2.2rem; }
.navigation { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.9rem; }
.navigation a { text-decoration: none; padding: 0.3rem 0; }
.navigation a:hover, .navigation a[aria-current="page"] { text-decoration: underline; }

/* ── Sections ────────────────────────────────────────────────────────────── */
section { padding: 3.5rem 0; }
section + section { border-top: 1px solid var(--trait); }
.chapeau { font-size: 1.15rem; color: var(--gris); }

.ouverture { padding: 3.5rem 0 3rem; }
.ouverture .conteneur {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}
.ouverture .chapeau { font-size: 1.2rem; }
.pastille {
  display: inline-block; margin: 0.3rem 0 0; padding: 0.55rem 1.1rem;
  background: var(--nuit); color: var(--sur-couleur); border-radius: 999px; font-weight: 700;
}
.mention { color: var(--gris); font-size: 0.85rem; margin-top: 0.8rem; }

.ecran {
  margin: 0 auto; max-width: 17rem; border-radius: 26px; overflow: hidden;
  border: 8px solid var(--nuit); background: var(--nuit);
  box-shadow: 0 18px 40px rgba(20, 48, 61, 0.18);
}
.ecran img { display: block; width: 100%; height: auto; }
figure { margin: 0; }
figcaption { text-align: center; color: var(--gris); font-size: 0.85rem; margin-top: 0.7rem; }

.grille { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.carte {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 1.3rem 1.4rem;
}
.carte p:last-child { margin-bottom: 0; }
.numero {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: 0.6rem;
  border-radius: 50%; background: var(--nuit); color: var(--sur-couleur); font-weight: 700;
}

.deux-ecrans { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2rem; }

.jamais { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.jamais li {
  background: var(--rassurant-fond); color: var(--rassurant-texte); border-radius: var(--rayon);
  padding: 1rem 1.2rem; font-weight: 700;
}
.jamais li span { display: block; font-weight: 400; color: var(--encre); }

.limites {
  background: var(--pierre); border-left: 6px solid var(--or); border-radius: 0 var(--rayon) var(--rayon) 0;
  padding: 1.3rem 1.5rem;
}
.limites ul { margin: 0; padding-left: 1.2rem; }

.bouton {
  display: inline-block; background: var(--encre); color: var(--blanc); text-decoration: none;
  padding: 0.8rem 1.4rem; border-radius: 14px; font-weight: 700;
}
.bouton:hover { background: var(--nuit); color: var(--sur-couleur); }

/* ── Fiches ──────────────────────────────────────────────────────────────── */
.sommaire { columns: 2 18rem; padding-left: 1.2rem; }
.sommaire li { margin-bottom: 0.3rem; break-inside: avoid; }
.fiche { scroll-margin-top: 1rem; margin-bottom: 1.4rem; }
.texte .fiche h2 { margin-top: 0.2rem; }
.frequence {
  display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.7rem;
  border-radius: 999px; background: var(--pierre); color: var(--gris); margin-bottom: 0.6rem;
}
.signal { background: var(--alerte-fond); color: var(--alerte-texte); border-radius: 12px; padding: 0.8rem 1rem; }
.signal strong { color: var(--alerte-texte); }
.reflexes { padding-left: 1.2rem; margin: 0; }

/* ── Pages légales ───────────────────────────────────────────────────────── */
.texte { padding: 3rem 0; }
.texte h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.a-completer { background: #fff3c4; color: #3d2e00; padding: 0 0.3rem; border-radius: 4px; font-weight: 700; }

/* ── Pied ────────────────────────────────────────────────────────────────── */
.pied { background: var(--pied); color: #dfe6e8; padding: 2.5rem 0; font-size: 0.85rem; }
.pied a { color: #ffffff; }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.pied p { margin: 0; }

@media (max-width: 760px) {
  .ouverture .conteneur { grid-template-columns: 1fr; }
  section { padding: 2.5rem 0; }
}

/* ── Ce qui bouge ────────────────────────────────────────────────────────── */
/* Sans JavaScript, la classe « js » manque et tout reste visible. */
.js .apparait {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delai, 0s);
}
.js .apparait.visible { opacity: 1; transform: none; }

.carte { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.carte:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20, 48, 61, 0.1); }

.pastille::before {
  content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.55rem;
  border-radius: 50%; background: #bb9a4c; vertical-align: 0.05rem;
  animation: battement 2.4s ease-in-out infinite;
}
@keyframes battement {
  0%, 100% { box-shadow: 0 0 0 0 rgba(187, 154, 76, 0.7); }
  60% { box-shadow: 0 0 0 0.5rem rgba(187, 154, 76, 0); }
}

.nombre-arnaques {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 3.4rem; line-height: 1;
  color: var(--alerte-texte); display: block; margin-bottom: 0.3rem; font-variant-numeric: tabular-nums;
}

/* Le téléphone de l'ouverture : un faux SMS arrive, Osema le regarde, l'alerte descend. */
.demo {
  position: relative; margin: 0 auto; width: 100%; max-width: 19rem; aspect-ratio: 9 / 17;
  border: 9px solid var(--nuit); border-radius: 34px; background: var(--conversation); overflow: hidden;
  box-shadow: 0 24px 50px rgba(20, 48, 61, 0.22); font-size: 0.72rem; line-height: 1.4;
}
.demo-barre {
  display: flex; justify-content: space-between; padding: 0.45rem 1rem 0.3rem;
  font-size: 0.62rem; color: var(--gris); font-weight: 700;
}
.demo-conversation { padding: 0.6rem 0.8rem; }
.demo-expediteur { text-align: center; font-weight: 700; color: var(--gris); margin: 0.2rem 0 0.8rem; }
.demo-bulle {
  background: var(--blanc); border-radius: 16px 16px 16px 4px; padding: 0.7rem 0.8rem; max-width: 88%;
  box-shadow: 0 2px 6px rgba(20, 48, 61, 0.08);
  animation: bulle 11s ease-in-out infinite;
}
.demo-bulle .lien { color: var(--lien-message); text-decoration: underline; }
.demo-analyse {
  display: flex; align-items: center; gap: 0.5rem; margin: 0.9rem 0.8rem 0; color: var(--gris);
  animation: analyse 11s ease-in-out infinite;
}
.demo-analyse i {
  width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--or);
  animation: point 0.9s ease-in-out infinite;
}
.demo-analyse i:nth-child(2) { animation-delay: 0.15s; }
.demo-analyse i:nth-child(3) { animation-delay: 0.3s; }
.demo-alerte {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.6rem;
  background: var(--blanc); border-radius: 18px; overflow: hidden;
  box-shadow: 0 14px 32px rgba(20, 48, 61, 0.28);
  animation: alerte 11s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.demo-titre {
  display: flex; align-items: center; gap: 0.5rem; background: var(--alerte); color: var(--sur-couleur);
  padding: 0.7rem 0.8rem; font-weight: 700; font-size: 0.78rem; line-height: 1.25;
}
.demo-titre img { width: 1.4rem; height: 1.4rem; flex: none; }
.demo-alerte ol { list-style: none; margin: 0; padding: 0.7rem 0.7rem 0.2rem; display: grid; gap: 0.4rem; }
.demo-alerte li {
  display: flex; gap: 0.5rem; align-items: flex-start; background: var(--alerte-fond); color: var(--alerte-texte);
  border-radius: 10px; padding: 0.45rem 0.55rem;
}
.demo-alerte li b {
  flex: none; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background: var(--alerte); color: var(--sur-couleur); font-size: 0.62rem;
}
.demo-alerte li:nth-child(1) { animation: raison1 11s ease-out infinite; }
.demo-alerte li:nth-child(2) { animation: raison2 11s ease-out infinite; }
.demo-alerte li:nth-child(3) { animation: raison3 11s ease-out infinite; }
.demo-conseil {
  margin: 0.5rem 0.7rem 0.8rem; padding-left: 0.6rem; border-left: 3px solid var(--or); color: var(--encre);
  animation: raison4 11s ease-out infinite;
}

@keyframes bulle {
  0%, 3% { opacity: 0; transform: translateY(14px) scale(0.97); }
  9%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes analyse { 0%, 13% { opacity: 0; } 17%, 29% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes point { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes alerte {
  0%, 30% { opacity: 0; transform: translateY(115%); }
  36%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes raison1 { 0%, 40% { opacity: 0; transform: translateX(-10px); } 45%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes raison2 { 0%, 48% { opacity: 0; transform: translateX(-10px); } 53%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes raison3 { 0%, 56% { opacity: 0; transform: translateX(-10px); } 61%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes raison4 { 0%, 64% { opacity: 0; } 70%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* Recherche dans les arnaques */
.recherche { margin: 1.4rem 0 0.4rem; max-width: 34rem; }
.recherche label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.recherche input {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.8rem 1rem; border-radius: 14px;
  border: 2px solid var(--trait); background: var(--blanc); color: var(--encre);
}
.recherche input:focus { border-color: var(--encre); outline: none; }
.resultat { min-height: 1.6rem; color: var(--gris); margin: 0 0 1rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Moins de mouvement quand le téléphone le demande : tout est là, rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .apparait { opacity: 1; transform: none; }
  .demo-analyse { display: none; }
}

/* ── Réglages de lecture ─────────────────────────────────────────────────── */
html.taille-grande { font-size: 140%; }
html.taille-tres-grande { font-size: 160%; }
html.contraste {
  --encre: #07171f; --papier: #ffffff; --pierre: #e6e7e0; --trait: #6b7070; --gris: #2e3a3c;
  --or: #6b4a05; --alerte: #6b2416; --alerte-fond: #fbefec; --rassurant: #1b3d24; --rassurant-fond: #edf4ee;
}
.reglages-lecture { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.reglages-lecture button { flex: none; white-space: nowrap; overflow-wrap: normal; }
.reglages-lecture button, .demo-choix button, .themes button, .situation {
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  border: 2px solid var(--trait); background: var(--blanc); color: var(--encre);
  border-radius: 999px; padding: 0.4rem 0.85rem; min-height: 2.4rem;
}
.reglages-lecture button[aria-pressed="true"], .demo-choix button[aria-pressed="true"],
.themes button[aria-pressed="true"], .situation[aria-expanded="true"] {
  background: var(--encre); color: var(--blanc); border-color: var(--encre);
}

.bouton { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.bouton-clair { background: var(--blanc); color: var(--encre); border: 2px solid var(--encre); }
.bouton-clair:hover { background: var(--pierre); color: var(--encre); }
.lien-bouton {
  font: inherit; background: none; border: 0; padding: 0; color: var(--encre); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
}

.demo-choix { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.9rem; }
.carte-lien { display: block; text-decoration: none; color: inherit; }
.carte-lien h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ── Vérifier un message ─────────────────────────────────────────────────── */
.confidentiel { background: var(--rassurant-fond); color: var(--rassurant-texte); border-radius: 14px; padding: 0.9rem 1.1rem; }
.verification label { display: block; font-weight: 700; margin: 1.2rem 0 0.4rem; }
.verification textarea {
  width: 100%; font: inherit; padding: 0.9rem 1rem; border-radius: 14px; resize: vertical;
  border: 2px solid var(--trait); background: var(--blanc); color: var(--encre);
}
.verification textarea:focus { border-color: var(--encre); outline: none; }
.actions-verification { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-top: 0.9rem; }
.exemples { color: var(--gris); font-size: 0.9rem; }
.verdict { margin-top: 2rem; border-radius: var(--rayon); overflow: hidden; border: 1px solid var(--trait); background: var(--blanc); }
.texte .verdict-titre { margin: 0; padding: 1rem 1.3rem; color: var(--sur-couleur); font-size: 1.35rem; }
.verdict-titre:focus { outline: none; }
.verdict-douteux .verdict-titre { background: var(--alerte); }
.verdict-incertain .verdict-titre { background: var(--attention); }
.verdict-rien .verdict-titre { background: var(--rassurant); }
.verdict-corps { padding: 1.2rem 1.3rem 1.3rem; }
.verdict-raisons { padding-left: 1.4rem; }
.verdict-raisons li { margin-bottom: 0.4rem; }
.verdict-conseil { border-left: 4px solid var(--or); padding-left: 0.9rem; }
.js .verdict { animation: monte 0.45s ease-out; }

/* ── Quiz ────────────────────────────────────────────────────────────────── */
.quiz { max-width: 40rem; }
.quiz-avancement { color: var(--gris); font-weight: 700; }
.quiz-message { background: var(--conversation); border-radius: var(--rayon); padding: 1.2rem; margin-bottom: 1.2rem; }
.quiz-de { font-weight: 700; color: var(--gris); font-size: 0.9rem; margin-bottom: 0.5rem; }
.quiz-bulle { background: var(--blanc); border-radius: 16px 16px 16px 4px; padding: 0.9rem 1rem; max-width: 92%; }
.quiz-choix { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1rem 0; }
.quiz-arnaque { background: var(--alerte); color: var(--sur-couleur); }
.quiz-arnaque:hover { background: var(--alerte-fonce); color: var(--sur-couleur); }
.quiz-retour { border-radius: var(--rayon); padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.quiz-retour-arnaque { background: var(--alerte-fond); }
.quiz-retour-honnete { background: var(--rassurant-fond); }
.quiz-verdict { font-weight: 700; font-size: 1.1rem; }
.quiz-score {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 4rem; margin: 0; color: var(--encre);
}
.js .quiz-retour { animation: monte 0.45s ease-out; }
@keyframes monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── J'ai été piégé ──────────────────────────────────────────────────────── */
.situations { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; }
.situation { border-radius: 14px; font-size: 0.95rem; padding: 0.7rem 1rem; }
.demarche { margin-bottom: 1.2rem; scroll-margin-top: 1rem; }
.texte .demarche h2 { margin-top: 0; }
.demarche h2:focus { outline: none; }
.etapes { padding-left: 1.4rem; margin: 0; }
.etapes li { margin-bottom: 0.6rem; }
.appel {
  display: inline-block; font-weight: 700; white-space: nowrap; background: var(--encre); color: var(--blanc);
  padding: 0.05rem 0.6rem; border-radius: 8px; text-decoration: none;
}
.appel:hover { background: var(--nuit); color: var(--sur-couleur); }

/* ── Arnaques : thèmes et actions ────────────────────────────────────────── */
.themes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0.4rem; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-items: center; margin-top: 1rem; font-size: 0.9rem; }
.partage-info { color: var(--rassurant-texte); }

/* ── Impression d'une fiche : elle seule, en noir sur blanc ──────────────── */
@media print {
  html { font-size: 12pt; }
  body { background: #fff; color: #000; }
  .entete, .pied, .saut, .recherche, .themes, .resultat, .sommaire, .fiche-actions, .demo-choix,
  .reglages-lecture { display: none !important; }
  .impression-fiche main h1, .impression-fiche main .chapeau,
  .impression-fiche .fiche:not(.a-imprimer) { display: none !important; }
  .fiche { border: 0; box-shadow: none; break-inside: avoid; }
  .js .apparait { opacity: 1 !important; transform: none !important; }
  .impression-fiche .a-imprimer::after { content: "Osema · conseils contre les arnaques"; display: block; margin-top: 1.5rem; color: #555; }
}

@media (prefers-reduced-motion: reduce) {
  .js .verdict, .js .quiz-retour { animation: none; }
}

/* ── Mode sombre ──────────────────────────────────────────────────────────
   Suit le réglage du téléphone ou de l'ordinateur, sauf choix contraire fait
   avec le bouton « Mode sombre » (classes « sombre » et « clair », posées par
   lecture.js). */
@media (prefers-color-scheme: dark) {
  :root:not(.clair) {
    color-scheme: dark;
    --encre: #e8eef0; --papier: #0f1c22; --blanc: #172930; --pierre: #1e333c; --trait: #36515c;
    --gris: #a8b7bb; --or: #d9b25f; --nuit: #2b4654; --pied: #091319;
    --alerte: #a8472f; --alerte-fond: #3a221c; --alerte-texte: #f2a58f; --alerte-fonce: #8e3e29;
    --attention: #8a6510; --rassurant: #3f7a50; --rassurant-fond: #18301f; --rassurant-texte: #9fd6ac;
    --conversation: #1c3039; --lien-message: #8fb8ff;
  }
  :root.contraste:not(.clair) {
    --encre: #ffffff; --papier: #000000; --blanc: #0b0f11; --pierre: #141b1e; --trait: #9aa6aa;
    --gris: #dde4e6; --or: #ffd27a; --alerte-texte: #ffb9a6; --rassurant-texte: #b6f0c4;
    --alerte-fond: #2a1410; --rassurant-fond: #0f2416; --conversation: #161f23;
  }
}
:root.sombre {
  color-scheme: dark;
  --encre: #e8eef0; --papier: #0f1c22; --blanc: #172930; --pierre: #1e333c; --trait: #36515c;
  --gris: #a8b7bb; --or: #d9b25f; --nuit: #2b4654; --pied: #091319;
  --alerte: #a8472f; --alerte-fond: #3a221c; --alerte-texte: #f2a58f; --alerte-fonce: #8e3e29;
  --attention: #8a6510; --rassurant: #3f7a50; --rassurant-fond: #18301f; --rassurant-texte: #9fd6ac;
  --conversation: #1c3039; --lien-message: #8fb8ff;
}
:root.sombre.contraste {
  --encre: #ffffff; --papier: #000000; --blanc: #0b0f11; --pierre: #141b1e; --trait: #9aa6aa;
  --gris: #dde4e6; --or: #ffd27a; --alerte-texte: #ffb9a6; --rassurant-texte: #b6f0c4;
  --alerte-fond: #2a1410; --rassurant-fond: #0f2416; --conversation: #161f23;
}
:root.sombre .ecran, :root.sombre .demo { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.copyright { opacity: 0.85; }

/* ── Espace famille (pages servies par famille/) ─────────────────────────── */
.espace .carte { margin: 1.4rem 0; }
.espace .carte h2 { margin-top: 0; }
.formulaire { max-width: 34rem; margin: 1.4rem 0; }
.formulaire label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.formulaire input[type="email"], .formulaire input[type="text"] {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.8rem 1rem; border-radius: 14px;
  border: 2px solid var(--trait); background: var(--blanc); color: var(--encre);
}
.formulaire input:focus { border-color: var(--encre); outline: 3px solid var(--or); outline-offset: 2px; }
.formulaire input[aria-invalid="true"] { border-color: var(--alerte); }
.formulaire .aide { color: var(--gris); font-size: 0.9rem; margin: 0.5rem 0 1rem; }
.formulaire-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.8rem; max-width: none; }
.formulaire-ligne label { flex-basis: 100%; margin-bottom: 0; }
.formulaire-ligne input[type="text"] { flex: 1 1 14rem; width: auto; }
.message { border-radius: 14px; padding: 0.8rem 1rem; margin: 0.6rem 0; }
.message-erreur { background: var(--alerte-fond); color: var(--alerte-texte); font-weight: 700; }
.message-info { background: var(--pierre); }
.espace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.lien-discret { color: var(--gris); }
.zone-danger { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.6rem; }
.bouton-danger { background: var(--alerte); color: var(--sur-couleur); }
.bouton-danger:hover { background: var(--alerte-fonce); }

/* ── L'option famille ────────────────────────────────────────────────────── */
/* Quatre cartes : deux par ligne plutôt que trois et une orpheline. */
.grille-quatre { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.etapes-famille { padding-left: 1.4rem; }
.etapes-famille li { margin-bottom: 0.6rem; padding-left: 0.3rem; }
.etapes-famille li::marker { font-weight: 700; color: var(--or); }
.tarif {
  background: var(--nuit); color: var(--sur-couleur); border-radius: var(--rayon);
  padding: 1.6rem 1.8rem; margin: 2.4rem 0; max-width: 40rem;
}
.tarif p { margin: 0 0 0.6rem; }
.tarif .mention { color: #c9d4d9; margin: 0.8rem 0 0; }
.tarif-prix { font-size: 1.15rem; }
.tarif-prix strong { font-family: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 2.2rem; }
.tarif-annuel strong { font-size: 1.6rem; }
.questions details {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; margin-bottom: 0.7rem;
}
.questions summary { cursor: pointer; font-weight: 700; padding: 0.9rem 1.1rem; }
.questions summary:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 14px; }
.questions details p { margin: 0; padding: 0 1.1rem 1rem; }
.code-liaison {
  font-family: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 3rem; font-weight: 750; letter-spacing: 0.12em; margin: 1rem 0 0.4rem;
}
/* Le code QR garde son fond blanc, même en thème sombre : un lecteur attend du sombre sur du clair. */
.cadre-qr { margin: 1.4rem 0; width: max-content; max-width: 100%; }
.code-qr { display: block; width: 15rem; height: 15rem; max-width: 100%; border-radius: 8px; }
.cadre-qr figcaption { text-align: left; }
