/* Appli élèves et parents : la charte « affiche » (30/09/2026, cinquième piste, essai à part de l'arène).
   Un univers chaud d'affiche et de stickers, pour des lycéens : papier crème et encre espresso côté clair (éclairci le 30/09, sur avis : le sable tirait sur le carton),
   espresso et crème côté sombre, mandarine pour l'action et l'actif, framboise pour l'attention (à revérifier,
   ✗, échéance proche), brique pour l'erreur, l'or reste aux pièces. Le jeu est dans la forme et la typo, visible
   sur chaque écran, jamais dans un graphique : cadres pleins de 2 px et ombre décalée (les cartes ressortent par
   construction, quelle que soit la couleur), coins arrondis de 16 px, étiquettes en stickers légèrement tournés,
   titres et chiffres en Bricolage Grotesque très gras, texte Figtree, dates en Space Mono. Rien en capitales.
   Quatre niveaux de surface (page, carte, panneau, creux) à 6 L* au moins, comme l'arène ; sombre par défaut pour
   l'élève, clair pour le parent, bascule dans les deux. Colonne de 600 px, boutons de 44 px, 390 px sans
   débordement, aucune animation sous prefers-reduced-motion. Les noms de jetons --af-* de l'arène sont conservés,
   ainsi que toutes les classes : seul le style change. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Figtree:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --af-fond: #E0D6C7; --af-fond-2: #D5C9B6; --af-fond-ext: #E0D6C7; --af-fond-ext-2: #E6DDD0; --af-carte: #FFFBF4; --af-panneau: #F0E8DC; --af-creux: #DDD0BD; --af-saillant: #FFFBF4;
  --af-encre: #2A1B12; --af-texte-2: #5A4636; --af-texte-3: #614C3C; --af-filet: #7A6452; --af-filet-opaque: #7A6452;
  --af-trait: #2A1B12; --af-ombre-dure: rgba(42, 27, 18, .9);
  --af-contour-accent: #9A3808; --af-contour-alerte: #A8203F; --af-contour-or: #8B5A0B;
  --af-accent: #E8641B; --af-accent-sur: #1F120B; --af-accent-texte: #9A3808; --af-accent-doux: #FBD9C3;
  --af-alerte: #C8285E; --af-alerte-sur: #FFFFFF; --af-alerte-texte: #A8203F; --af-alerte-doux: #F8D4DE;
  --af-teal: #5C7A1F; --af-teal-sur: #FFFFFF; --af-teal-texte: #4E6A18; --af-teal-doux: #DDE8C2;
  --af-or: #E0A61B; --af-or-texte: #8B5A0B; --af-or-encre: #2A1B12; --af-or-doux: #F7E4B4; --af-or-clair: #F5C54A; --af-or-profond: #CF8F12; --af-or-sur: #2A1B12;
  --af-soleil: #E0A61B; --af-soleil-encre: #2A1B12; --af-soleil-texte: #8B5A0B; --af-soleil-doux: #F7E4B4;
  --af-orange: #B5321F;
  --af-corail: #B5321F; --af-corail-sur: #FFFFFF; --af-corail-texte: #9E2A1B; --af-corail-doux: #F6D6CF;
  --af-violet: #8A4EA8; --af-violet-encre: #FFFFFF; --af-violet-texte: #6E3B8A; --af-violet-doux: #EAD8F1;
  --af-palier-gris: #9C8876; --af-palier-gris-texte: #5A4636;
  --af-palier-bronze: #B5651D; --af-palier-bronze-texte: #8A4A12;
  --af-palier-argent: #B9A48E; --af-palier-argent-texte: #5A4636;
  --af-palier-or: #E0A61B; --af-palier-or-texte: #8B5A0B;
  --af-palier-prisme: conic-gradient(from 200deg, #E8641B, #C8285E, #E0A61B, #E8641B); --af-palier-prisme-texte: #A8203F;
  --af-halo: rgba(232, 100, 27, .35); --af-halo-or: rgba(224, 166, 27, .35);
  --af-gris-doux: #E9E0D3;
  --af-ombre: 4px 4px 0 var(--af-ombre-dure); --af-ombre-petite: 2px 2px 0 var(--af-ombre-dure); --af-ombre-haute: 6px 6px 0 var(--af-ombre-dure), 0 18px 40px rgba(42, 27, 18, .25); --af-ombre-cadre: none;
  --af-rayon: 16px; --af-rayon-petit: 10px; --af-chanfrein: 0px; --af-chanfrein-petit: 0px;
  --af-onglets-h: 64px;
  --af-police-titre: "Bricolage Grotesque", "Figtree", "Segoe UI", system-ui, sans-serif;
  --af-police-texte: "Figtree", "Segoe UI", system-ui, sans-serif;
  --af-police-chiffres: "Bricolage Grotesque", "Figtree", "Segoe UI", system-ui, sans-serif;
  --af-police-mono: "Space Mono", ui-monospace, Consolas, monospace;
  --af-encre-2: var(--af-texte-2); --af-encre-3: var(--af-texte-3); --af-ligne: var(--af-filet);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --af-fond: #1A120D; --af-fond-2: #2E221B; --af-fond-ext: #1A120D; --af-fond-ext-2: #1F1611; --af-carte: #2B1F18; --af-panneau: #3D2D24; --af-creux: #4E3B30; --af-saillant: #3D2D24;
    --af-encre: #F7EEE3; --af-texte-2: #D8C7B6; --af-texte-3: #BFA995; --af-filet: #9C8570; --af-filet-opaque: #9C8570;
    --af-trait: #6B5545; --af-ombre-dure: #6A3F22;
    --af-contour-accent: #FF8A3D; --af-contour-alerte: #FF7FA3; --af-contour-or: #F2B84B;
    --af-accent: #FF8A3D; --af-accent-sur: #1F120B; --af-accent-texte: #FFA061; --af-accent-doux: #5E3418;
    --af-alerte: #FF6B93; --af-alerte-sur: #2A0C16; --af-alerte-texte: #FF9DB8; --af-alerte-doux: #5A2436;
    --af-teal: #B6D66A; --af-teal-sur: #1B2508; --af-teal-texte: #C9E387; --af-teal-doux: #3C4A1E;
    --af-or: #F2B84B; --af-or-texte: #F2B84B; --af-or-encre: #2A1B12; --af-or-doux: #5A4520; --af-or-clair: #F7CD78; --af-or-profond: #CF8F12; --af-or-sur: #2A1B12;
    --af-soleil: #F0C060; --af-soleil-encre: #2A1B12; --af-soleil-texte: #F0C060; --af-soleil-doux: #55421D;
    --af-orange: #F5877A;
    --af-corail: #F5877A; --af-corail-sur: #2A0E0A; --af-corail-texte: #FFA398; --af-corail-doux: #5A2B25;
    --af-violet: #D8B0F0; --af-violet-encre: #1E1026; --af-violet-texte: #E2C4F5; --af-violet-doux: #4B3358;
    --af-palier-gris: #9C8876; --af-palier-gris-texte: #D8C7B6;
    --af-palier-bronze: #C9782E; --af-palier-bronze-texte: #E5A063;
    --af-palier-argent: #C9B8A6; --af-palier-argent-texte: #D8C7B6;
    --af-palier-or: #F2B84B; --af-palier-or-texte: #F2B84B;
    --af-palier-prisme: conic-gradient(from 200deg, #FF8A3D, #FF6B93, #F2B84B, #FF8A3D); --af-palier-prisme-texte: #FFA061;
    --af-halo: rgba(255, 138, 61, .4); --af-halo-or: rgba(242, 184, 75, .35);
    --af-gris-doux: #4A3A30;
    --af-ombre: 4px 4px 0 var(--af-ombre-dure); --af-ombre-petite: 2px 2px 0 var(--af-ombre-dure); --af-ombre-haute: 6px 6px 0 var(--af-ombre-dure), 0 18px 40px rgba(0, 0, 0, .7); --af-ombre-cadre: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --af-fond: #1A120D; --af-fond-2: #2E221B; --af-fond-ext: #1A120D; --af-fond-ext-2: #1F1611; --af-carte: #2B1F18; --af-panneau: #3D2D24; --af-creux: #4E3B30; --af-saillant: #3D2D24;
  --af-encre: #F7EEE3; --af-texte-2: #D8C7B6; --af-texte-3: #BFA995; --af-filet: #9C8570; --af-filet-opaque: #9C8570;
  --af-trait: #6B5545; --af-ombre-dure: #6A3F22;
  --af-contour-accent: #FF8A3D; --af-contour-alerte: #FF7FA3; --af-contour-or: #F2B84B;
  --af-accent: #FF8A3D; --af-accent-sur: #1F120B; --af-accent-texte: #FFA061; --af-accent-doux: #5E3418;
  --af-alerte: #FF6B93; --af-alerte-sur: #2A0C16; --af-alerte-texte: #FF9DB8; --af-alerte-doux: #5A2436;
  --af-teal: #B6D66A; --af-teal-sur: #1B2508; --af-teal-texte: #C9E387; --af-teal-doux: #3C4A1E;
  --af-or: #F2B84B; --af-or-texte: #F2B84B; --af-or-encre: #2A1B12; --af-or-doux: #5A4520; --af-or-clair: #F7CD78; --af-or-profond: #CF8F12; --af-or-sur: #2A1B12;
  --af-soleil: #F0C060; --af-soleil-encre: #2A1B12; --af-soleil-texte: #F0C060; --af-soleil-doux: #55421D;
  --af-orange: #F5877A;
  --af-corail: #F5877A; --af-corail-sur: #2A0E0A; --af-corail-texte: #FFA398; --af-corail-doux: #5A2B25;
  --af-violet: #D8B0F0; --af-violet-encre: #1E1026; --af-violet-texte: #E2C4F5; --af-violet-doux: #4B3358;
  --af-palier-gris: #9C8876; --af-palier-gris-texte: #D8C7B6;
  --af-palier-bronze: #C9782E; --af-palier-bronze-texte: #E5A063;
  --af-palier-argent: #C9B8A6; --af-palier-argent-texte: #D8C7B6;
  --af-palier-or: #F2B84B; --af-palier-or-texte: #F2B84B;
  --af-palier-prisme: conic-gradient(from 200deg, #FF8A3D, #FF6B93, #F2B84B, #FF8A3D); --af-palier-prisme-texte: #FFA061;
  --af-halo: rgba(255, 138, 61, .4); --af-halo-or: rgba(242, 184, 75, .35);
  --af-gris-doux: #4A3A30;
  --af-ombre: 4px 4px 0 var(--af-ombre-dure); --af-ombre-petite: 2px 2px 0 var(--af-ombre-dure); --af-ombre-haute: 6px 6px 0 var(--af-ombre-dure), 0 18px 40px rgba(0, 0, 0, .7); --af-ombre-cadre: none;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--af-encre); font-family: var(--af-police-texte); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--af-accent) 14%, transparent) 0%, transparent 60%) fixed, var(--af-fond-ext); }
h1, h2, h3, h4 { font-family: var(--af-police-titre); margin: 0; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variation-settings: "opsz" 40; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0 0 10px; }
a { color: var(--af-accent-texte); text-decoration-thickness: 2px; text-underline-offset: 2px; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, textarea, select { font: inherit; color: var(--af-encre); background: var(--af-carte); border: 2px solid var(--af-trait); border-radius: var(--af-rayon-petit); padding: 10px 12px; width: 100%; min-height: 44px; }
input:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--af-accent); outline-offset: 2px; }
::selection { background: var(--af-accent); color: var(--af-accent-sur); }
.af-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.af-muet { color: var(--af-texte-2); }
.af-petit { font-size: 13.5px; }
.af-centre { text-align: center; }
.af-pile { display: grid; gap: 8px; }
.af-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.af-ligne .af-espace { flex: 1; }
.af-mono { font-family: var(--af-police-chiffres); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- le panneau « affiche » ----------
   Un cadre plein de 2 px et une ombre décalée, pleine, sans flou : c'est la marque de la charte. Les calques
   ::before et ::after de l'arène sont conservés (les composants les ciblent) mais neutralisés : ils ne
   dessinent plus rien, le cadre et le fond sont portés par l'élément lui-même. */
.af-carte, .af-quete, .af-tete-jeu, .af-onglets, .af-solde-hud, .af-modale, .af-jour, .af-compteurs div, .af-choix button, .af-choix label.af-opt, .af-bascule, .af-check, .af-picker, .af-emplacement, .af-cle .af-sym {
  position: relative; isolation: isolate; border: 2px solid var(--af-trait); background: var(--af-carte); border-radius: var(--af-rayon); box-shadow: var(--af-ombre);
}
.af-carte::before, .af-quete::before, .af-tete-jeu::before, .af-onglets::before, .af-solde-hud::before, .af-modale::before, .af-jour::before, .af-compteurs div::before, .af-choix button::before, .af-choix label.af-opt::before, .af-bascule::before, .af-check::before, .af-picker::before, .af-emplacement::before, .af-cle .af-sym::before,
.af-carte::after, .af-quete::after, .af-tete-jeu::after, .af-onglets::after, .af-solde-hud::after, .af-modale::after, .af-jour::after, .af-compteurs div::after, .af-choix button::after, .af-choix label.af-opt::after, .af-bascule::after, .af-check::after, .af-picker::after, .af-emplacement::after, .af-cle .af-sym::after {
  content: none;
}
.af-quete, .af-solde-hud, .af-jour, .af-compteurs div, .af-choix button, .af-choix label.af-opt, .af-bascule, .af-check, .af-picker, .af-emplacement, .af-cle .af-sym { background: var(--af-panneau); }
.af-solde-hud, .af-jour, .af-compteurs div, .af-choix button, .af-choix label.af-opt, .af-bascule, .af-check, .af-picker, .af-emplacement, .af-cle .af-sym { border-radius: var(--af-rayon-petit); box-shadow: var(--af-ombre-petite); }
/* l'élément actif : un liseré mandarine épais sur le bord gauche, arrondi avec la carte */
.af-en-cours { border-color: var(--af-accent); box-shadow: inset 6px 0 0 var(--af-accent), var(--af-ombre); }
.af-carte.af-appel { border-color: var(--af-accent); box-shadow: inset 6px 0 0 var(--af-accent), var(--af-ombre); }
.af-carte.af-or { border-color: var(--af-or); }
.af-quete.af-accompli { border-color: var(--af-or); background: linear-gradient(110deg, rgba(255, 255, 255, 0) 0 40%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, 0) 60%), linear-gradient(135deg, color-mix(in srgb, var(--af-or) 28%, var(--af-panneau)) 0%, color-mix(in srgb, var(--af-or) 10%, var(--af-panneau)) 100%); background-size: 250% 100%, 100% 100%; background-repeat: no-repeat; animation: af-scintille 6s linear infinite; }
@keyframes af-scintille { 0% { background-position: 120% 0, 0 0; } 100% { background-position: -20% 0, 0 0; } }

/* ---------- la colonne ---------- */
.af-page { max-width: 600px; margin: 0 auto; padding: 0 16px calc(var(--af-onglets-h) + 32px); min-height: 100vh; position: relative; display: flex; flex-direction: column; }
.af-contenu { flex: 1; }
.af-contenu > section:first-child { margin-top: 2px; }
.af-titre-onglet { margin: 16px 0 16px; font-size: 30px; letter-spacing: -.03em; }
.af-titre-onglet::after { content: ""; display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--af-accent); margin-top: 6px; transform: rotate(-2deg); }
.af-pied { margin-top: 36px; padding-top: 14px; border-top: 2px dashed var(--af-filet); font-size: 12.5px; color: var(--af-texte-3); }
@media (min-width: 700px) {
  .af-page { padding-bottom: 0; }
}

/* HUD : la bannière d'affiche, avatar rond, prénom, classe, pièce et solde */
.af-tete-jeu { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 16px 0 10px; }
.af-avatar { width: 46px; height: 46px; flex: none; color: var(--af-trait); }
.af-avatar svg { width: 100%; height: 100%; display: block; }
.af-avatar text { font-family: var(--af-police-titre); font-weight: 800; font-size: 20px; fill: var(--af-accent-sur); }
.af-tete-jeu .af-qui { flex: 1; min-width: 0; }
.af-tete-jeu .af-qui h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-tete-jeu .af-qui .af-sous { color: var(--af-texte-2); font-size: 13px; font-weight: 500; line-height: 1.25; margin-top: 1px; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.af-tete-jeu .af-outils { display: flex; align-items: center; gap: 6px; flex: none; }
.af-solde-hud { display: inline-flex; align-items: center; gap: 7px; flex: none; white-space: nowrap; min-height: 40px; padding: 4px 12px 4px 9px; font-family: var(--af-police-chiffres); font-weight: 800; font-size: 20px; line-height: 1; transition: box-shadow .5s ease; border-radius: 999px; }
.af-solde-hud .af-piece { width: 22px; height: 22px; flex: none; }
.af-solde-hud .af-plus { position: absolute; right: 6px; top: -14px; font-family: var(--af-police-chiffres); font-weight: 800; font-size: 20px; color: var(--af-or-texte); opacity: 0; pointer-events: none; }
.af-solde-hud { border-color: var(--af-or-profond); background: color-mix(in srgb, var(--af-or) 20%, var(--af-panneau)); color: var(--af-encre); }
.af-solde-hud.af-gain { box-shadow: 0 0 0 3px var(--af-accent), 0 0 20px var(--af-halo); }
.af-solde-hud.af-gain .af-plus { animation: af-monte 1.2s ease-out forwards; }
@keyframes af-monte { 0% { opacity: 0; transform: translateY(6px) rotate(-6deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px) rotate(-6deg); } }
.af-icone-btn { width: 40px; height: 40px; border: 2px solid var(--af-trait); border-radius: 50%; background: var(--af-panneau); color: var(--af-encre); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; box-shadow: var(--af-ombre-petite); transition: transform .1s; }
.af-icone-btn svg { width: 18px; height: 18px; }
.af-icone-btn:hover { border-color: var(--af-accent); }
.af-icone-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.af-date-hud { font-size: 12.5px; color: var(--af-texte-3); margin: 0 0 12px; font-family: var(--af-police-mono); letter-spacing: -.02em; }

/* onglets : la barre arrondie en bas, l'actif est un sticker mandarine */
.af-onglets { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 30; height: var(--af-onglets-h); display: grid; grid-template-columns: repeat(var(--af-nt, 6), minmax(0, 1fr)); gap: 3px; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); border-radius: 20px; box-shadow: var(--af-ombre); }
.af-onglets button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; border: 0; background: transparent; color: var(--af-texte-2); font-family: var(--af-police-texte); font-weight: 700; font-size: 11px; line-height: 1.1; padding: 4px 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-radius: 14px; transition: background .15s, color .15s; }
.af-onglets button svg { width: 21px; height: 21px; flex: none; stroke-width: 2; }
.af-onglets button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.af-onglets button[aria-selected="true"] { color: var(--af-accent-sur); background: var(--af-accent); box-shadow: inset 0 0 0 2px var(--af-trait); }
@media (min-width: 700px) {
  .af-onglets { position: sticky; bottom: 12px; margin: 16px 0 0; padding: 6px 8px; height: auto; left: auto; right: auto; }
  .af-onglets button { font-size: 12px; min-height: 48px; }
}

/* ---------- panneaux ---------- */
.af-carte { padding: 18px 16px; margin: 0 0 18px; }
.af-carte > h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.af-nb { font-size: 12.5px; font-weight: 700; color: var(--af-encre); background: var(--af-panneau); border: 2px solid var(--af-trait); border-radius: 999px; padding: 0 8px; font-family: var(--af-police-chiffres); letter-spacing: 0; line-height: 1.5; }
.af-grand { font-family: var(--af-police-chiffres); font-size: 56px; font-weight: 800; line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 96; }
.af-grand small { font-family: var(--af-police-chiffres); font-size: 20px; color: var(--af-texte-2); font-weight: 700; margin-left: 4px; letter-spacing: 0; }
.af-constat { border: 2px dashed var(--af-filet); border-radius: var(--af-rayon-petit); background: var(--af-panneau); padding: 10px 12px; margin: 12px 0 0; font-size: 14px; color: var(--af-texte-2); }
.af-info { border-left: 6px solid var(--af-accent); border-radius: 0 var(--af-rayon-petit) var(--af-rayon-petit) 0; background: var(--af-panneau); padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.af-alerte { border-left: 6px solid var(--af-corail); border-radius: 0 var(--af-rayon-petit) var(--af-rayon-petit) 0; background: var(--af-corail-doux); padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.af-citation { border-left: 6px solid var(--af-or); border-radius: 0 var(--af-rayon-petit) var(--af-rayon-petit) 0; background: var(--af-panneau); padding: 10px 12px; font-weight: 500; margin: 12px 0; }
.af-rien { text-align: center; padding: 20px 8px; color: var(--af-texte-2); }
.af-demo-bandeau { background: var(--af-encre); color: var(--af-fond); font-family: var(--af-police-titre); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-align: center; padding: 6px 12px; border-radius: 0 0 12px 12px; }

/* ---------- boutons ---------- */
.af-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 18px; border: 2px solid var(--af-trait); border-radius: 999px; font-family: var(--af-police-titre); font-weight: 700; font-size: 16px; letter-spacing: -.01em; background: var(--af-accent); color: var(--af-accent-sur); text-decoration: none; text-align: center; box-shadow: var(--af-ombre-petite); transition: transform .1s, box-shadow .1s, filter .15s; }
.af-btn:hover { filter: brightness(1.05); }
.af-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.af-btn.af-plein { width: 100%; }
.af-btn.af-gros { min-height: 54px; font-size: 18px; box-shadow: var(--af-ombre); }
.af-btn.af-gros:active { box-shadow: none; transform: translate(4px, 4px); }
.af-btn.af-blanc { background: var(--af-panneau); color: var(--af-encre); }
.af-btn.af-blanc:hover { border-color: var(--af-accent); filter: none; }
.af-btn.af-corail { background: var(--af-corail); color: var(--af-corail-sur); }
.af-btn.af-teal { background: var(--af-accent); color: var(--af-accent-sur); }
.af-btn.af-soleil { background: var(--af-or); color: var(--af-or-encre); }
.af-btn.af-sm { min-height: 40px; padding: 6px 13px; font-size: 14px; }
.af-btn.af-lien { background: transparent; color: var(--af-texte-2); min-height: 44px; padding: 6px 8px; border-color: transparent; box-shadow: none; font-family: var(--af-police-texte); font-weight: 600; font-size: 13.5px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.af-btn.af-lien:hover { color: var(--af-accent-texte); filter: none; }
.af-btn.af-lien:active { transform: none; }
.af-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.af-form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--af-texte-2); }
.af-form .af-remarque { font-size: 13px; color: var(--af-texte-3); }
.af-bascule { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; }
.af-bascule button { min-height: 40px; border: 2px solid transparent; border-radius: 999px; background: transparent; color: var(--af-texte-2); font-family: var(--af-police-titre); font-weight: 700; font-size: 15px; }
.af-bascule button[aria-pressed="true"] { background: var(--af-accent); border-color: var(--af-trait); color: var(--af-accent-sur); }

/* ---------- semaine : sept pilules et les jours ---------- */
.af-semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.af-jour { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; min-width: 0; padding: 4px 0; font-weight: 600; border-radius: 12px; }
.af-jour .af-n { font-family: var(--af-police-texte); font-size: 11px; font-weight: 700; color: var(--af-texte-3); }
.af-jour .af-d { font-family: var(--af-police-chiffres); font-size: 16px; color: var(--af-texte-2); font-weight: 800; line-height: 1; }
.af-jour .af-s { font-size: 18px; line-height: 1; min-height: 20px; font-weight: 800; }
.af-jour.V { color: var(--af-accent-sur); background: var(--af-accent); border-color: var(--af-trait); }
.af-jour.V .af-d, .af-jour.V .af-n { color: var(--af-accent-sur); }
.af-jour.X { color: var(--af-texte-2); }
.af-jour.af-auj { border-color: var(--af-accent); box-shadow: 0 0 0 3px var(--af-accent-doux), var(--af-ombre-petite); }
.af-jour.V.af-auj { border-color: var(--af-trait); }
.af-jour.af-futur { opacity: .5; box-shadow: none; }
.af-jour.af-hors { visibility: hidden; }
.af-jour.q { color: var(--af-alerte-texte); border-color: var(--af-alerte); }
.af-jour.af-neuf { border-color: var(--af-accent); }
.af-jour.af-conflit { border-color: var(--af-alerte); }
.af-jour.af-ignore { opacity: .4; }
.af-segments7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 24px 0 6px; position: relative; }
.af-segments7 i { display: block; height: 14px; background: var(--af-fond-2); border: 2px solid var(--af-trait); border-radius: 999px; transform-origin: left center; }
.af-segments7 i.af-allume { background: var(--af-accent); animation: af-remplir .4s ease-out; }
.af-segments7.af-atteint i.af-allume { background: var(--af-or); }
.af-segments7 .af-repere { position: absolute; top: -7px; bottom: -7px; width: 3px; border-radius: 2px; background: var(--af-encre); transform: translateX(-50%); }
.af-segments7 .af-repere::after { content: attr(data-l); position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-family: var(--af-police-texte); font-size: 11.5px; font-weight: 700; color: var(--af-texte-3); white-space: nowrap; }
.af-segments7.af-atteint .af-repere { background: var(--af-or-profond); }
.af-segments7.af-atteint .af-repere::after { color: var(--af-or-texte); }
.af-barre-semaine-legende { display: flex; justify-content: space-between; font-size: 13px; color: var(--af-texte-3); font-family: var(--af-police-chiffres); font-weight: 700; }
@keyframes af-remplir { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.af-wk { border-top: 2px dashed var(--af-filet); padding: 12px 0; }
.af-wk:first-of-type { border-top: 0; padding-top: 0; }
.af-wk-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.af-wk-tete .af-tot { font-family: var(--af-police-chiffres); font-weight: 800; font-size: 22px; }
.af-courbe svg { display: block; width: 100%; height: auto; }

/* ---------- fichier de suivi ---------- */
.af-etiq { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; max-width: 100%; text-align: left; line-height: 1.4; border: 2px solid transparent; border-radius: 999px; }
.af-etiq.af-solide { color: var(--af-or-texte); background: var(--af-or-doux); border-color: var(--af-contour-or); }
.af-etiq.af-progres { color: var(--af-accent-texte); background: var(--af-accent-doux); border-color: var(--af-contour-accent); }
.af-etiq.af-cours { color: var(--af-texte-2); background: var(--af-panneau); border-color: var(--af-filet-opaque); }
.af-etiq.af-fragile { color: var(--af-alerte-texte); background: var(--af-alerte-doux); border-color: var(--af-contour-alerte); }
.af-marque { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 7px; font-weight: 700; font-size: 14px; font-family: var(--af-police-mono); border: 2px solid transparent; border-radius: 8px; }
.af-marque.VV { background: var(--af-accent-doux); color: var(--af-accent-texte); border-color: var(--af-contour-accent); }
.af-marque.V { background: var(--af-panneau); color: var(--af-encre); border-color: var(--af-filet-opaque); }
.af-marque.T { background: var(--af-panneau); color: var(--af-alerte-texte); border-color: var(--af-filet-opaque); }
.af-marque.X { background: var(--af-alerte-doux); color: var(--af-alerte-texte); border-color: var(--af-alerte); }
.af-marque.Q { background: var(--af-alerte-doux); color: var(--af-alerte-texte); border-color: var(--af-alerte); }
.af-marque.af-restant { border: 2px dashed var(--af-filet-opaque); background: transparent; color: var(--af-texte-3); font-weight: 500; }
.af-marque.af-neuve { box-shadow: 0 0 0 3px var(--af-accent); }
.af-marque.af-plus { background: transparent; border: 2px dashed var(--af-texte-3); color: var(--af-texte-2); min-height: 30px; }
.af-marque.af-sel { outline: 3px solid var(--af-accent); outline-offset: 1px; }
.af-cercle { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 2px solid var(--af-trait); border-radius: 50%; background: var(--af-carte); font-family: var(--af-police-chiffres); font-weight: 800; font-size: 16px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; flex: none; box-shadow: var(--af-ombre-petite); }
.af-exo-mission { border-top: 2px dashed var(--af-filet); padding: 12px 0; }
.af-exo-mission:first-of-type { border-top: 0; }
.af-exo-mission .af-exo-mission-tete { display: flex; align-items: center; gap: 10px; }
.af-exo-mission .af-f { font-size: 12.5px; color: var(--af-texte-3); font-family: var(--af-police-texte); font-weight: 700; }
.af-exo-mission.af-solide { padding-left: 12px; border-left: 6px solid var(--af-or); border-radius: 4px 0 0 4px; }
.af-exo-mission.af-solide .af-cercle { border-color: var(--af-or-profond); background: var(--af-or); color: var(--af-or-encre); }
.af-emplacements { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; }
.af-emplacement { width: 42px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--af-police-mono); font-weight: 700; font-size: 13px; color: var(--af-texte-3); border-radius: 8px; box-shadow: none; border-color: var(--af-filet-opaque); }
.af-emplacement.af-plein { color: var(--af-accent-texte); border-color: var(--af-contour-accent); background: var(--af-accent-doux); }
.af-emplacement.af-casse { color: var(--af-alerte-texte); border-color: var(--af-alerte); background: var(--af-alerte-doux); }
.af-exo-mission.af-solide .af-emplacement.af-plein { color: var(--af-or-texte); border-color: var(--af-contour-or); background: var(--af-or-doux); }
.af-trophee { width: 24px; height: 24px; flex: none; margin-left: auto; color: var(--af-or-texte); }
.af-marques { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.af-marques > span { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.af-marques .af-d { font-size: 11.5px; color: var(--af-texte-3); white-space: nowrap; font-family: var(--af-police-mono); }
.af-marques.af-historique .af-marque { min-width: 28px; height: 24px; font-size: 12px; }
.af-cle .af-it { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 2px dashed var(--af-filet); }
.af-cle .af-it:first-child { border-top: 0; }
.af-cle .af-sym { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-weight: 700; font-size: 16px; flex: none; font-family: var(--af-police-mono); border-radius: 8px; }
.af-cle .af-sym.V { color: var(--af-accent-sur); background: var(--af-accent); }
.af-cle .af-sym.X { color: var(--af-texte-2); }
.af-regles { padding-left: 20px; margin: 0; }
.af-regles li { margin-bottom: 8px; }
.af-regles li::marker { font-family: var(--af-police-chiffres); font-weight: 800; color: var(--af-accent-texte); }
.af-rangee { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 2px dashed var(--af-filet); flex-wrap: wrap; }
.af-rangee:first-of-type { border-top: 0; }
.af-rangee .af-corps { flex: 1; min-width: 140px; }
.af-rangee .af-sur { font-family: var(--af-police-texte); font-size: 12.5px; color: var(--af-texte-3); font-weight: 700; }
.af-rangee .af-st { font-size: 13.5px; }
.af-compteurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 4px; }
.af-compteurs div { text-align: center; padding: 10px 4px; font-family: var(--af-police-chiffres); font-weight: 800; font-size: 32px; line-height: 1; }
.af-compteurs div small { display: block; font-family: var(--af-police-texte); color: var(--af-texte-2); font-weight: 500; font-size: 12px; line-height: 1.2; margin-top: 4px; }

/* ce soir : le cadre autour de la liste à revoir, et la coche qui s'anime */
.af-missions-tete { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; }
.af-missions-tete h2 { font-size: 18px; }
.af-missions input[type="checkbox"] { accent-color: var(--af-accent); outline: 2px solid var(--af-trait); outline-offset: -1px; border-radius: 4px; }
.af-missions input[type="checkbox"]:checked { animation: af-coche .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes af-coche { 0% { transform: scale(.7); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ---------- photo ---------- */
.af-choix { display: grid; gap: 8px; }
.af-choix button, .af-choix label.af-opt { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 48px; padding: 8px 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.af-choix .af-on { border-color: var(--af-accent); background: var(--af-accent-doux); box-shadow: inset 6px 0 0 var(--af-accent), var(--af-ombre-petite); }
.af-choix button .af-marque { flex: none; }
.af-choix input[type=radio] { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--af-accent); }
label.af-btn { cursor: pointer; }
input.af-fichier { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.af-apercu { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 12px; border: 2px solid var(--af-trait); border-radius: var(--af-rayon-petit); box-shadow: var(--af-ombre-petite); }
.af-attente { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--af-filet-opaque); border-top-color: var(--af-accent); animation: af-tourne .9s linear infinite; margin: 18px auto; }
@keyframes af-tourne { to { transform: rotate(360deg); } }
.af-lu { border-top: 2px dashed var(--af-filet); padding: 10px 0; }
.af-lu:first-of-type { border-top: 0; }
.af-lu .af-etat { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.af-lu .af-etat.af-conflit, .af-lu .af-etat.af-illisible { color: var(--af-alerte-texte); }
.af-lu .af-etat.af-ajout, .af-lu .af-etat.af-nouveau { color: var(--af-accent-texte); }
.af-lu .af-etat.af-neutre { color: var(--af-texte-3); }
.af-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 8px; }
.af-picker button { min-height: 44px; }
.af-rit { display: grid; grid-template-columns: 88px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; margin: 4px 0; }
.af-rit .af-lab { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-rit .af-hd { font-family: var(--af-police-texte); font-size: 11.5px; font-weight: 700; color: var(--af-texte-3); text-align: center; }
.af-cell { min-height: 44px; border: 2px solid var(--af-trait); border-radius: 10px; background: var(--af-panneau); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0; }
.af-cell.V { background: var(--af-accent); color: var(--af-accent-sur); }
.af-cell.q { border-color: var(--af-alerte); color: var(--af-alerte-texte); }
.af-cell.af-neuf { box-shadow: 0 0 0 3px var(--af-accent); }

/* ---------- pièces et objectifs ---------- */
.af-solde { display: flex; align-items: center; gap: 14px; }
.af-carte.af-solde-or, .af-carte.af-solde-or .af-muet, .af-carte.af-solde-or .af-grand small { color: var(--af-or-sur); }
.af-carte.af-solde-or { border-color: var(--af-or-profond); background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0 38%, rgba(255, 255, 255, .28) 46%, rgba(255, 255, 255, 0) 54%), linear-gradient(135deg, var(--af-or-profond) 0%, var(--af-or-clair) 100%); }
.af-carte.af-solde-or .af-piece { filter: drop-shadow(2px 2px 0 rgba(42, 27, 18, .35)); }
.af-solde .af-piece { width: 52px; height: 52px; flex: none; }
.af-quete { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0 0 10px; border-radius: var(--af-rayon); box-shadow: var(--af-ombre-petite); }
.af-quete .af-corps { flex: 1; min-width: 0; }
.af-quete .af-titre { font-family: var(--af-police-texte); font-weight: 700; font-size: 15.5px; }
.af-quete .af-delai { font-size: 13.5px; color: var(--af-texte-2); margin-top: 2px; font-family: var(--af-police-texte); font-weight: 600; }
.af-quete .af-delai.af-urgent { color: var(--af-alerte-texte); }
.af-quete .af-recompense { flex: none; display: inline-flex; align-items: center; gap: 5px; min-width: 56px; height: 32px; padding: 0 11px; background: var(--af-or); color: var(--af-or-encre); border: 2px solid var(--af-trait); border-radius: 999px; font-family: var(--af-police-chiffres); font-weight: 800; font-size: 16px; transform: rotate(3deg); box-shadow: var(--af-ombre-petite); }
.af-quete .af-recompense .af-piece { width: 16px; height: 16px; }
.af-quete.af-accompli .af-delai { color: var(--af-or-texte); }
.af-progression { position: relative; height: 12px; background: var(--af-fond-2); border: 2px solid var(--af-trait); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.af-progression i, .af-barre-semaine .af-remplie { display: block; height: 100%; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .25) 0 5px, transparent 5px 10px), var(--af-accent); transform-origin: left center; animation: af-remplir .4s ease-out; border-radius: 999px; }
.af-progression-l { font-family: var(--af-police-texte); font-size: 13.5px; font-weight: 600; color: var(--af-texte-2); margin-top: 4px; }
.af-gain { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 2px dashed var(--af-filet); }
.af-gain:first-of-type { border-top: 0; }
.af-gain .af-date { font-family: var(--af-police-mono); font-size: 12px; color: var(--af-texte-3); white-space: nowrap; min-width: 46px; padding-top: 3px; }
.af-gain .af-cause { flex: 1; font-size: 14px; }
.af-gain .af-val { font-family: var(--af-police-chiffres); font-weight: 800; font-size: 18px; color: var(--af-or-texte); white-space: nowrap; }

/* ---------- récompenses et rappels ---------- */
.af-recomp .af-delai.af-or-t { color: var(--af-or-texte); }
.af-interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 12px; border: 2px solid var(--af-trait); border-radius: var(--af-rayon-petit); background: var(--af-panneau); cursor: pointer; font-weight: 700; margin-top: 12px; }
.af-interrupteur input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.af-interrupteur i { position: relative; width: 48px; height: 28px; flex: none; background: var(--af-fond-2); border: 2px solid var(--af-trait); border-radius: 999px; transition: background .2s; }
.af-interrupteur i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--af-texte-2); transition: transform .2s, background .2s; }
.af-interrupteur.af-on i { background: var(--af-accent); }
.af-interrupteur.af-on i::after { transform: translateX(20px); background: var(--af-accent-sur); }
.af-interrupteur input:disabled ~ i { opacity: .45; }
.af-interrupteur input:focus-visible ~ i { outline: 3px solid var(--af-accent); outline-offset: 2px; }

/* ---------- modale, toast ---------- */
.af-modale-fond { position: fixed; inset: 0; background: rgba(26, 18, 13, .62); display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 0; }
.af-modale-fond.af-ouverte { display: flex; }
.af-modale { color: var(--af-encre); width: 100%; max-width: 600px; max-height: 92vh; overflow: auto; padding: 20px 16px 28px; border-radius: 24px 24px 0 0; border-bottom: 0; box-shadow: var(--af-ombre-haute); }
@media (min-width: 700px) { .af-modale-fond { align-items: center; padding: 16px; } .af-modale { border-radius: 24px; border-bottom: 2px solid var(--af-trait); } }
.af-modale h3 { margin-bottom: 10px; font-size: 19px; }
.af-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; cursor: pointer; margin-bottom: 12px; }
.af-check.af-ok { border-color: var(--af-accent); background: var(--af-accent-doux); }
.af-check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--af-accent); }
.af-fermer { position: sticky; top: 0; float: right; background: var(--af-panneau); border: 2px solid var(--af-trait); border-radius: 50%; width: 40px; height: 40px; font-size: 18px; font-weight: 700; z-index: 1; box-shadow: var(--af-ombre-petite); }
.af-toast { position: fixed; left: 50%; bottom: calc(var(--af-onglets-h) + 22px); transform: translateX(-50%) rotate(-1deg); background: var(--af-encre); color: var(--af-fond); padding: 10px 16px; font-weight: 600; font-size: 13.5px; max-width: calc(100% - 32px); z-index: 60; display: none; border-radius: 999px; box-shadow: 4px 4px 0 var(--af-accent); }
.af-toast.af-visible { display: block; }
@media (min-width: 700px) { .af-toast { bottom: 20px; } }

/* ---------- connexion ---------- */
.af-connexion { max-width: 440px; margin: 0 auto; padding: 28px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 700px) { .af-connexion { padding: 32px 28px 36px; } }
.af-connexion .af-logo { display: flex; align-items: center; gap: 10px; font-family: var(--af-police-titre); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-bottom: 24px; }
.af-connexion .af-logo svg { width: 32px; height: 32px; }
.af-connexion .af-logo .af-espace { flex: 1; }
.af-connexion h1 { font-size: 30px; margin-bottom: 6px; }
.af-connexion .af-lede { color: var(--af-texte-2); margin-bottom: 18px; font-size: 14.5px; }
.af-connexion .af-pied { margin-top: auto; }

/* ---------- mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .af-attente { border-top-color: var(--af-filet-opaque); }
  .af-quete.af-accompli { animation: none; background-position: 200% 0, 0 0; }
}

/* ---- le modèle d'apprenant (27/09/2026) : confiance avant une question, fiche de joueur, mode d'emploi ---- */
.af-conf { margin-top: 8px; }
.af-conf-q { margin: 6px 0; font-weight: 700; }
.af-conf-dit, .af-conf-bilan { margin: 6px 0; font-size: 14px; color: var(--af-texte-2); }
.af-conf-bilan { color: var(--af-encre); border-left: 6px solid var(--af-accent); border-radius: 0 var(--af-rayon-petit) var(--af-rayon-petit) 0; padding: 6px 10px; background: var(--af-panneau); }
.af-conf-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.af-conf-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.af-conf-btn { min-height: 52px; padding: 8px 4px; font-size: 14px; letter-spacing: 0; line-height: 1.15; overflow-wrap: normal; word-break: keep-all; hyphens: manual; border-radius: 14px; }
.af-joueur-nom { font-family: var(--af-police-titre); font-weight: 800; font-size: 32px; letter-spacing: -.03em; margin: 4px 0 2px; color: var(--af-accent-texte); }
.af-joueur-props { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.af-joueur-form { display: flex; gap: 8px; margin-top: 10px; }
.af-joueur-form input { flex: 1; min-width: 0; min-height: 44px; padding: 6px 12px; border: 2px solid var(--af-trait); border-radius: 999px; background: var(--af-carte); color: var(--af-encre); font: inherit; }
.af-dim { padding: 10px 0; border-top: 2px dashed var(--af-filet); }
.af-dim:first-of-type { border-top: 0; }
.af-dim-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.af-dim-titre { font-weight: 700; }
.af-dim-compte { font-family: var(--af-police-chiffres); font-size: 19px; font-weight: 800; }
.af-dim-off .af-dim-titre { color: var(--af-texte-2); }
.af-dim-barre { height: 12px; background: var(--af-creux); border: 2px solid var(--af-trait); border-radius: 999px; margin: 6px 0; overflow: hidden; }
.af-dim-barre span { display: block; height: 100%; background: var(--af-accent); border-radius: 999px; }
.af-dim-geste { margin: 4px 0 0; font-size: 14px; color: var(--af-texte-2); }
.af-dim-tend, .af-tend { font-weight: 800; }
.af-t-monte { color: var(--af-teal-texte); } .af-t-descend { color: var(--af-alerte-texte); } .af-t-stable { color: var(--af-texte-2); }
.af-cal li { margin-bottom: 6px; }

/* ---- « En savoir plus » et « Un exemple » (27/09/2026, décision (77)) ---- */
.af-plus { margin-top: 6px; border-left: 3px solid var(--af-filet); padding-left: 10px; }
.af-plus > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: 14px; font-weight: 700; color: var(--af-accent-texte); list-style: none; }
.af-plus > summary::-webkit-details-marker { display: none; }
.af-plus > summary::before { content: "+"; display: inline-block; width: 18px; font-family: var(--af-police-chiffres); font-weight: 800; }
.af-plus[open] > summary::before { content: "−"; }
.af-plus-geste { border-left-color: var(--af-accent); }
.af-moments-tete { margin: 8px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--af-texte-2); }
.af-moments { list-style: none; padding: 0; margin: 0 0 4px; }
.af-moment { display: flex; gap: 6px; align-items: baseline; font-size: 14px; line-height: 1.45; margin: 0 0 6px; }
.af-moment-sig { flex: none; width: 16px; font-family: var(--af-police-chiffres); font-weight: 800; }
.af-moment-plus .af-moment-sig { color: var(--af-teal-texte); }
.af-moment-moins .af-moment-sig { color: var(--af-alerte-texte); }
.af-moment-date { flex: none; font-family: var(--af-police-mono); font-size: 12.5px; color: var(--af-texte-2); }

/* ---- les paliers des barres (27/09/2026, décision (78)) ---- */
.af-dim-jauge { position: relative; margin: 6px 0; }
.af-dim-jauge .af-dim-barre { margin: 0; }
.af-repere { position: absolute; top: -3px; width: 3px; height: 18px; margin-left: -1px; border-radius: 2px; background: var(--af-encre); opacity: .55; }
.af-repere-ok { background: var(--af-or-profond); opacity: 1; }
.af-palier-ligne { margin: 4px 0 0; font-size: 13px; color: var(--af-texte-2); }

/* ---- La fiche « À revoir » à imprimer (27/09/2026, décision (80)) : inchangée, c'est du papier ---- */
.afi-liste { max-height: 50vh; overflow-y: auto; margin: 10px 0 0; border: 2px solid var(--af-trait); border-radius: var(--af-rayon-petit); padding: 4px 10px; }
.afi-choix { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 6px 0; border-bottom: 2px dashed var(--af-filet); font-size: 14px; }
.afi-choix:last-child { border-bottom: 0; }
.afi-choix input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--af-accent); }
.afi-tout { gap: 8px; margin-top: 8px; }
.afi-bouton-jour { margin: 4px 0 16px; }
#af-impression { display: none; }
@media print {
  @page { size: A4; margin: 12mm 12mm 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > *:not(#af-impression) { display: none !important; }
  #af-impression { display: block !important; }
}
.afi { font-family: "Figtree", "Segoe UI", Arial, sans-serif; color: #000; background: #fff; font-size: 10.5pt; line-height: 1.4; }
.afi-tete { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5pt solid #000; padding-bottom: 4pt; margin-bottom: 6pt; }
.afi-titre { font-size: 16pt; font-weight: 700; letter-spacing: .02em; }
.afi-qui { font-size: 10pt; }
.afi-mode { border: 1pt solid #000; padding: 6pt 8pt; margin-bottom: 10pt; font-size: 9.5pt; }
.afi-mode p { margin: 0 0 4pt; }
.afi-mode p:last-child { margin: 0; }
.afi-legende { display: flex; flex-wrap: wrap; gap: 4pt 14pt; }
.afi-exo { border-bottom: .75pt solid #888; padding: 7pt 0; break-inside: avoid; page-break-inside: avoid; }
.afi-ligne-marques { display: flex; align-items: center; gap: 5pt; }
.afi-num { display: inline-flex; align-items: center; justify-content: center; min-width: 30pt; height: 22pt; padding: 0 5pt; border: 1.5pt solid #000; border-radius: 50%; font-weight: 700; font-size: 11pt; margin-right: 6pt; }
.afi-case { display: inline-flex; align-items: center; justify-content: center; width: 22pt; height: 18pt; border: .75pt solid #000; font-size: 10pt; }
.afi-deja { background: #e6e6e6; color: #333; }
.afi-sujet { font-weight: 600; margin: 5pt 0 2pt; }
.afi-enonce { font-size: 10pt; }
.afi-libre { color: #555; font-style: italic; }
.afi-pied { margin-top: 10pt; font-size: 8.5pt; color: #333; }
.afi-reponses { break-before: page; page-break-before: always; }
.afi-petit { font-size: 9pt; margin: 2pt 0 6pt; }
.afi-rep { list-style: none; padding-left: 0; font-size: 10pt; }
.afi-rep li { margin: 0 0 4pt; }
.afi-num-petit { display: inline-block; min-width: 24pt; font-weight: 700; }

/* ---------- ordinateur et grande tablette (28/09/2026) ----------
   Même disposition que l'arène : à partir de 1024 px, les onglets passent en colonne à gauche (collée en haut au
   défilement), l'en-tête et le contenu à droite. Sous 1024 px, rien ne change. */
@media screen and (min-width: 1024px) {
  .af-page {
    max-width: 1120px; padding: 0 32px 48px;
    display: grid; grid-template-columns: 236px minmax(0, 1fr); column-gap: 36px; align-items: start;
    grid-template-areas: "nav hud" "nav bandeau" "nav contenu";
  }
  .af-tete-jeu-zone { grid-area: hud; }
  .af-bandeau { grid-area: bandeau; }
  .af-contenu { grid-area: contenu; max-width: 820px; width: 100%; }
  .af-onglets {
    grid-area: nav; position: sticky; top: 20px; bottom: auto; margin: 20px 0 0; padding: 10px; height: auto; left: auto; right: auto;
    display: flex; flex-direction: column; gap: 4px; border-radius: 22px;
  }
  .af-onglets button {
    flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 8px 14px;
    font-size: 15px; text-align: left; border-radius: 14px;
  }
  .af-onglets button svg { width: 22px; height: 22px; }
  .af-onglets button:hover:not([aria-selected="true"]) { color: var(--af-encre); background: color-mix(in srgb, var(--af-accent) 12%, transparent); }
  .af-tete-jeu { margin-top: 20px; padding: 12px 16px; }
  .af-tete-jeu .af-qui h1 { font-size: 26px; }
  .af-titre-onglet { font-size: 34px; margin-top: 16px; }
  .af-carte { padding: 22px 24px; }
  .af-modale { max-width: 680px; }
}
