/* Marathon 2027 · le socle commun (pages membre et poste de pilotage).
   Look demandé par Curt : comme ZéroMontage, mais clair. Blanc cassé, gris, noir. Une police. Pas de dégradé, pas de couleur.
   Ne pas réécrire ce fichier depuis membre.css / pilotage.css : ajouter à côté. */
@font-face { font-family: "Geist"; src: url("/polices/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/polices/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/polices/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/polices/geist-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --fond: #f4f2ed;            /* blanc cassé */
  --carte: #fbfaf7;           /* surface posée sur le fond */
  --blanc: #ffffff;
  --creux: #eae7e0;           /* fond d'un champ vide, d'une case vide */
  --encre: #0b0b0b;
  --gris: #5f5e5a;            /* petits textes (AA sur le fond) */
  --gris2: #8b8983;           /* texte discret, grands titres secondaires */
  --gris3: #c9c6be;           /* traits forts, cases vides */
  --trait: rgba(11, 11, 11, .11);
  --jaune: #e6c229;           /* SEULE couleur : le carton jaune */
  --police: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --marge: 20px; --rayon: 20px; --rayon-p: 12px;
  --doux: cubic-bezier(.2, .7, .15, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--fond); color: var(--encre);
  font: 400 16.5px/1.5 var(--police); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(34px, 8.4vw, 64px); }
h2 { font-size: clamp(26px, 5.6vw, 40px); }
h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
b, strong { font-weight: 600; }
a { color: inherit; text-underline-offset: 4px; text-decoration-color: rgba(11, 11, 11, .35); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }
::selection { background: var(--encre); color: var(--fond); }

.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 max(var(--marge), env(safe-area-inset-right)) 0 max(var(--marge), env(safe-area-inset-left)); }
.etroit { max-width: 620px; }
.gris { color: var(--gris); }
.gris2 { color: var(--gris2); }
.petit { font-size: 14px; line-height: 1.45; }
.mini { font-size: 12.5px; line-height: 1.4; }
.chiffre { font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pile { display: flex; flex-direction: column; gap: 14px; }
.ligne { display: flex; align-items: center; gap: 12px; }
.ligne.entre { justify-content: space-between; }
.ligne.coule { flex-wrap: wrap; }
.pousse { margin-left: auto; }

/* l'intertitre : un petit carré noir devant */
.inter { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.2; color: var(--gris); }
.inter::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--encre); border-radius: 2px; }

/* boutons : des pilules. Une seule action noire par écran. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border: 1px solid rgba(11, 11, 11, .18); border-radius: 999px; background: var(--blanc); color: var(--encre);
  font: 500 16px/1.1 var(--police); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .2s, background .2s, transform .15s var(--doux), opacity .2s; }
.btn:hover { border-color: rgba(11, 11, 11, .5); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.noir { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.btn.noir:hover { background: #2a2a2a; }
.btn.petit { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn.large { width: 100%; }
.btn.nu { border-color: transparent; background: none; }
.btn.nu:hover { background: rgba(11, 11, 11, .06); }
.lien { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--encre);
  font: 500 15px/1.2 var(--police); text-decoration: underline; text-decoration-color: rgba(11, 11, 11, .3); text-underline-offset: 5px; cursor: pointer; }
.lien:hover { text-decoration-color: var(--encre); }

/* cartes */
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; }
.carte.blanche { background: var(--blanc); }
.carte.noire { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.carte.noire .gris, .carte.noire .inter { color: #a9a7a1; }
.carte.noire .inter::before { background: var(--fond); }
.carte.plate { background: none; }
.trait { height: 1px; background: var(--trait); border: 0; margin: 0; }

/* champs */
.champ { display: flex; flex-direction: column; gap: 8px; }
.champ > label, .etiquette { font-size: 14px; color: var(--gris); }
.champ input, .champ textarea, .champ select, .saisie {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid rgba(11, 11, 11, .16); border-radius: var(--rayon-p);
  background: var(--blanc); font: 400 17px/1.4 var(--police); outline: none; transition: border-color .2s; appearance: none; -webkit-appearance: none; }
.champ textarea, textarea.saisie { min-height: 150px; resize: vertical; }
.champ input:focus, .champ textarea:focus, .champ select:focus, .saisie:focus { border-color: var(--encre); }
.champ input::placeholder, .champ textarea::placeholder, .saisie::placeholder { color: var(--gris2); }
.erreur { font-size: 14.5px; color: var(--encre); background: var(--creux); border-left: 3px solid var(--encre); padding: 10px 14px; border-radius: 6px; }
.erreur:empty { display: none; }

/* choix en pilules (heures libres, oui/non) */
.choix { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid rgba(11, 11, 11, .18);
  border-radius: 999px; background: var(--blanc); font: 500 15px/1 var(--police); cursor: pointer; user-select: none; transition: background .15s, color .15s, border-color .15s; }
.choix[aria-pressed="true"], .choix.actif { background: var(--encre); border-color: var(--encre); color: var(--fond); }

/* pastilles et signes */
.pastille { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border: 1px solid rgba(11, 11, 11, .2); border-radius: 999px;
  font: 500 12.5px/1 var(--police); white-space: nowrap; }
.pastille.pleine { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.pastille.creuse { background: var(--creux); border-color: transparent; color: var(--gris); }
.point-nouveau { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--encre); flex: none; }
.carton { display: inline-block; width: 13px; height: 18px; border-radius: 3px; background: var(--jaune); border: 1px solid rgba(11, 11, 11, .25); flex: none; vertical-align: -3px; }

/* la barre d'avancée */
.barre { height: 4px; border-radius: 999px; background: var(--gris3); overflow: hidden; }
.barre > i { display: block; height: 100%; width: 0; background: var(--encre); border-radius: 999px; transition: width .5s var(--doux); }

/* un visage : rond, avec des initiales si pas de photo */
.visage { --t: 44px; flex: none; width: var(--t); height: var(--t); border-radius: 50%; background: var(--creux); color: var(--gris);
  display: inline-flex; align-items: center; justify-content: center; font: 500 calc(var(--t) * .36)/1 var(--police); letter-spacing: -.02em; overflow: hidden; object-fit: cover; }
.visage img { width: 100%; height: 100%; object-fit: cover; }
.visage.g { --t: 72px; } .visage.xg { --t: 112px; } .visage.p { --t: 32px; }

/* les 5 cases : vide, attente (contour), validée (pleine), joker (hachurée), manquée (barrée) */
.cases { display: inline-flex; gap: 5px; }
.cases > i { width: 16px; height: 16px; border-radius: 4px; background: var(--creux); border: 1px solid transparent; flex: none; }
.cases > i.attente { background: none; border-color: var(--encre); }
.cases > i.validee { background: var(--encre); }
.cases > i.joker { background: repeating-linear-gradient(45deg, var(--encre) 0 2px, transparent 2px 5px); border-color: var(--encre); }
.cases > i.manquee { background: none; border-color: var(--gris3); position: relative; }
.cases > i.manquee::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1px; background: var(--gris2); }
.cases.g > i { width: 26px; height: 26px; border-radius: 7px; }

/* le compte à rebours : de gros chiffres */
.rebours { display: flex; gap: 14px; align-items: baseline; font-variant-numeric: tabular-nums; }
.rebours b { font-size: clamp(36px, 9vw, 56px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.rebours span { font-size: 13px; color: var(--gris); margin-left: 3px; }

/* un message qui passe en bas de l'écran */
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 80; max-width: calc(100vw - 32px);
  padding: 13px 20px; border-radius: 999px; background: var(--encre); color: var(--fond); font: 500 15px/1.3 var(--police); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--doux); }
.toast.vu { opacity: 1; transform: translate(-50%, 0); }

@keyframes apparait { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
.entre { animation: apparait .45s var(--doux) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
