/* Point IA. Référence : app McKinsey Insights.
   Une famille de bleus (nuit, bleu, bleu clair), déclinée par transparence. Pas de gris neutre.
   Texte : Host Grotesk, graisse normale partout. Noms de l'app et des rubriques : Newsreader.
   Tailles : 16 notes, 18 texte, 26 titres, 30 titre de tête. Rien sous 16. */
@font-face { font-family: "Host Grotesk"; src: url("./fonts/host-grotesk.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("./fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --nuit: #061a33;
  --bleu: #2b50f5;
  --clair: #a9c1ff;
  --fond: var(--nuit);
  --encre: #ffffff;
  --texte: rgb(255 255 255 / .82);
  --note: rgb(255 255 255 / .72);
  --discret: rgb(255 255 255 / .56);
  --trait: rgb(255 255 255 / .16);
  --accent: #ffffff;
  --lien: #ffffff;
  --sans: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --marge: 20px;
  --colonne: 680px;
}

* { box-sizing: border-box; }
html { background: var(--nuit); -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; min-height: 100dvh; background: var(--nuit); color: var(--encre);
  font: 400 18px/29px var(--sans); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.app { max-width: calc(var(--colonne) + 2 * var(--marge)); margin: 0 auto; padding: 0 var(--marge); overflow-x: clip; }
h1, h2, h3, p, figure { margin: 0; font-weight: 400; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clair); outline-offset: 3px; }
[hidden] { display: none !important; }

.note { font-size: 16px; line-height: 24px; color: var(--note); }
.source { margin-top: 12px; font-size: 16px; line-height: 24px; color: var(--discret); }
.source a { text-decoration: none; }
.source a:hover { text-decoration: underline; text-underline-offset: 4px; }
.fort { color: var(--encre); }
.attente { padding: 60px 0; }

/* En-tête et onglets */
.tete { padding: 22px 0 12px; }
.marque { display: inline-block; font: 400 30px/36px var(--serif); text-decoration: none; }
.verre {
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .15);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
.onglets {
  position: sticky; top: calc(8px + env(safe-area-inset-top)); z-index: 5;
  display: flex; gap: 4px; margin: 0 -8px; padding: 4px; border-radius: 999px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets a { padding: 10px 15px; border-radius: 999px; font-size: 18px; line-height: 24px; text-decoration: none; color: var(--texte); transition: background .2s; }
.onglets a:hover { background: rgb(255 255 255 / .1); }
.onglets a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / .18); }

/* Titres et texte */
.titre-tete { font-size: 30px; line-height: 38px; letter-spacing: -.01em; margin-bottom: 14px; }
.titre { font-size: 26px; line-height: 33px; letter-spacing: -.01em; margin: 0 0 12px; }
.nom-rubrique { font: 400 44px/48px var(--serif); letter-spacing: -.01em; }
.entete-rubrique { padding: 46px 0 40px; }
.entete-rubrique .note { margin-top: 8px; }
.texte { color: var(--texte); }
.texte + .texte { margin-top: 14px; }
.section { margin-bottom: 68px; }
.section > * + .titre, .section > * + .titre-tete { margin-top: 56px; }
.section > * + .figure, .section > .figure + .texte { margin-top: 30px; }
.apres-etapes { margin-top: 20px; }
.section > button.lien, .section > div > button.lien { margin-top: 4px; }

/* Bande claire : mêmes composants, couleurs inversées */
.claire {
  --fond: #ffffff; --encre: var(--nuit); --texte: rgb(6 26 51 / .82); --note: rgb(6 26 51 / .72);
  --discret: rgb(6 26 51 / .6); --trait: rgb(6 26 51 / .16); --accent: var(--nuit); --lien: var(--bleu);
  background: #fff; color: var(--nuit);
  margin-left: calc(-1 * var(--marge)); margin-right: calc(-1 * var(--marge));
  padding: 56px var(--marge) 60px;
}

/* Liens et lignes cliquables */
.lien {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--lien);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; transition: opacity .2s;
}
.lien:hover { opacity: .75; }
.fleche { flex: none; width: 24px; height: 24px; transition: transform .25s; }
.lien:hover .fleche, .ligne:hover .fleche { transform: translateX(6px); }
.ligne {
  display: block; text-decoration: none; transition: background .25s;
  margin: 0 calc(-1 * var(--marge)); padding: 18px var(--marge) 20px;
}
.ligne:hover { background: rgb(43 80 245 / .38); }
.ligne:active { background: rgb(43 80 245 / .55); }
.ligne-haut { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ligne-nom { font: 400 30px/36px var(--serif); }
.ligne .texte { display: block; margin-top: 6px; }
.ligne .source { display: block; margin-top: 4px; }
.ligne.lue .ligne-nom { color: var(--note); }
.bande { background: rgb(43 80 245 / .42); padding-top: 30px; padding-bottom: 48px; }
.bande .ligne-nom { font-size: 32px; line-height: 38px; }

/* Une */
.visuel-une { display: block; width: calc(100% + 2 * var(--marge)); max-width: none; margin: 14px calc(-1 * var(--marge)) 0; aspect-ratio: 13 / 7; object-fit: cover; }
.tete-une { margin: 22px 0 34px; }

/* Figures */
.figure-titre { color: var(--encre); font-size: 18px; line-height: 27px; margin-bottom: 16px; }
.figure .note { margin-top: 14px; }

.points { display: flex; flex-wrap: wrap; gap: 11px; max-width: 350px; }
.points span { width: 18px; height: 18px; border-radius: 50%; background: var(--bleu); }
.points .marque-point { background: var(--accent); }

.anneaux { display: flex; flex-direction: column; gap: 16px; }
.anneau-ligne { display: flex; align-items: center; gap: 14px; color: var(--texte); }
.anneau { flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--trait) 0); }
.anneau span { width: 72px; height: 72px; border-radius: 50%; background: var(--fond); color: var(--encre); display: grid; place-items: center; font-size: 20px; line-height: 26px; }

.carte-fond { position: relative; margin: 0 calc(-1 * var(--marge)); }
.carte-fond img { display: block; width: 100%; height: auto; }
.carte-point { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgb(255 255 255 / .2); transition: all .25s; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); }
.carte-point.choisi { width: 16px; height: 16px; margin: -8px 0 0 -8px; box-shadow: 0 0 0 7px rgb(255 255 255 / .28); }
.choix { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 4px; }
.choix button { min-height: 48px; padding: 12px 0 10px; color: var(--note); border-bottom: 1px solid transparent; transition: color .2s; }
.choix button:hover { color: var(--encre); }
.choix button[aria-pressed="true"] { color: var(--encre); border-bottom-color: var(--encre); }
.carte-texte { margin-top: 14px; color: var(--texte); }

.etapes { display: flex; flex-direction: column; gap: 2px; margin: 22px calc(-1 * var(--marge)) 0; }
.etape { display: block; width: 100%; padding: 14px var(--marge) 16px; color: #fff; background: rgb(43 80 245 / var(--a)); transition: filter .2s; }
.etape:hover { filter: brightness(1.15); }
.etape-haut { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; }
.etape-n { font: 400 20px/29px var(--serif); }
.etape-detail { display: block; margin: 6px 0 0 32px; color: rgb(255 255 255 / .88); }

.surfaces { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px; }
.surface { display: flex; flex-direction: column; gap: 8px; color: var(--texte); }
.surface i { display: block; width: var(--c); height: var(--c); background: var(--accent); }
.surface.grande i { background: var(--bleu); }
.surface.dedans { position: relative; }
.surface.dedans span { position: absolute; left: 12px; bottom: 12px; color: #fff; }

.courbe { display: block; width: 100%; max-width: 350px; height: auto; overflow: visible; }
.courbe .aire { fill: rgb(43 80 245 / .35); }
.courbe .trace { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.courbe .base { stroke: var(--trait); stroke-width: 1; }
.courbe circle { fill: var(--accent); }
.courbe .valeur { fill: var(--encre); font-size: 18px; }
.courbe .axe { fill: var(--note); font-size: 16px; }

.barres { display: flex; flex-direction: column; gap: 18px; }
.barre-haut { display: flex; justify-content: space-between; align-items: baseline; color: var(--texte); }
.barre-piste { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--trait); }
.barre-piste i { display: block; height: 8px; border-radius: 999px; background: var(--bleu); width: calc(var(--v) * 1%); }
.barre.mise .barre-haut { color: var(--encre); }
.barre.mise .barre-piste i { background: var(--accent); }

/* Quiz */
.quiz { margin: 26px calc(-1 * var(--marge)) 0; padding: 30px var(--marge) 44px; background: rgb(43 80 245 / .32); }
.quiz-page { margin-top: 40px; }
.question { font-size: 26px; line-height: 33px; letter-spacing: -.01em; margin-bottom: 14px; }
.reponses { display: flex; flex-wrap: wrap; gap: 8px 34px; }
.reponses button { min-width: 48px; min-height: 48px; padding: 6px 4px; font-size: 26px; line-height: 34px; border-bottom: 1px solid rgb(255 255 255 / .3); transition: opacity .2s; }
.reponses button:hover:not(:disabled) { opacity: .75; }
.reponses button:disabled { cursor: default; color: rgb(255 255 255 / .4); }
.reponses button.juste { color: #fff; border-bottom-color: #fff; }
.reponses.longues { flex-direction: column; gap: 4px; }
.reponses.longues button { font-size: 18px; line-height: 29px; padding: 10px 0; border-bottom-color: rgb(255 255 255 / .2); width: 100%; }
.verdict { margin-top: 16px; color: var(--texte); }

.maj { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 18px; border-radius: 999px; background: var(--bleu); }
.pied { padding: 40px 0 56px; }

@media (min-width: 760px) {
  :root { --marge: 32px; }
  .titre-tete { font-size: 38px; line-height: 46px; }
  .nom-rubrique { font-size: 56px; line-height: 60px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
