/* Club Pulse — Design System v1.0 (figé, docs/design/DESIGN_SYSTEM.md) : fond gris clair, cartes blanches, deux aplats
   (rouge = action collective, slate = zone privée), langage de confiance vérifié / manquant. Le rouge n'est jamais décoratif :
   marque, manquant, critique, Retirer — jamais sur un refus. Les anciens noms de variables sont conservés (les gabarits les
   utilisent) et pointent sur les tokens. Clair seulement : les planches n'ont pas de mode sombre (la planche gagne). */
@import url("tokens.css");
:root {
  --papier: var(--bg); --surface: var(--card); --surface-2: var(--card-sub); --encre: var(--ink); --encre-2: var(--ink-2);
  --encre-3: var(--secondary); --ligne: var(--hairline); --ligne-forte: var(--border-btn); --rouge: var(--brand);
  --rouge-pale: var(--brand-tint); --vert: var(--green-deep); --vert-pale: var(--green-tint);
  --ambre: var(--secondary); --ambre-pale: var(--chip-neutral);          /* l'ambre n'est qu'une pastille (§ 1.1) */
  --focus: var(--brand); --rayon: var(--r-card); --rayon-s: var(--r-tile-s);
  --police: var(--font-ui); --ombre: var(--sh-card);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 500 16px/1.5 var(--police); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }   /* cibles tactiles ≥ 44 px (§ 6, R-04) */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
code, kbd, samp, .mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0; }
p { margin: 0; }

/* ---------------------------------------------------------------- marque et badges */
.marque { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; letter-spacing: -0.015em; }
.pouls-point { width: 30px; height: 30px; flex: none; background: var(--logo-tile) center / contain no-repeat; }   /* la tuile-sigle */
.puce { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--chip-neutral); border: 1px solid transparent; color: var(--secondary); white-space: nowrap; }
.puce.rouge { background: var(--brand-tint); color: var(--brand); }
.puce.vert { background: var(--green-tint); color: var(--green-deep); }
.puce.ambre { background: var(--chip-neutral); color: var(--secondary); }
.puce.ambre::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }
.puce.fictif { background: transparent; border: 1.5px dashed var(--border-btn); color: var(--secondary); }
.actions .puce, .bloc .puce { white-space: normal; }
.surtitre { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 800; color: var(--secondary); }
.note { font-size: 12.5px; font-weight: 500; color: var(--secondary); }
.ia { font-size: 12px; font-weight: 600; color: var(--secondary); display: inline-flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- boutons : pilules ; un seul plein rouge par zone */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-pill); border: 1.5px solid var(--border-btn); background: var(--card); color: var(--ink); font-size: 14px;
  font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--hover); }
.btn.plein { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 800; }
.btn.rouge { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-weight: 800; box-shadow: var(--sh-cta); }
.btn.discret { background: var(--card); border-color: var(--border-btn); color: var(--secondary); }
.btn.petit { min-height: 44px; padding: 6px 14px; font-size: 13px; }   /* cibles ≥ 44 px (§ 6, R-04) */
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- cartes */
.carte { background: var(--card); border: 0; border-radius: var(--r-card); padding: 16px 20px; box-shadow: var(--sh-card); }
.carte + .carte { margin-top: 12px; }
.carte.cliquable { cursor: pointer; text-align: left; width: 100%; display: block; }
.carte.cliquable:hover { background: var(--hover); }
.bloc { margin-top: 18px; }
.bloc > .surtitre { display: block; margin-bottom: 6px; }
.liste-num { margin: 0; padding-left: 20px; }
.liste-num li { margin: 5px 0; }
.faits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.fait { background: var(--card-sub); border: 1px solid var(--hairline); border-radius: var(--r-tile); padding: 10px 12px; }
.fait b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
@media (max-width: 480px) { .fait b { font-size: 17px; } .fait { padding: 8px; } }
.fait span { font-size: 11px; font-weight: 600; color: var(--secondary); }
.encadre { border: 1px solid var(--hairline); border-left: 3px solid var(--amber); background: var(--card-sub); padding: 10px 14px; border-radius: var(--r-tile); }
.encadre.vert { border-color: transparent; border-left-color: var(--green); background: var(--green-tint); }
.encadre.rouge { border: 1px dashed var(--brand-dash); border-left: 3px solid var(--brand); background: var(--brand-tint-2); }   /* zone manquante */
.chrono { list-style: none; margin: 0; padding: 0; }
.chrono li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 6px 0; }
.chrono li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--disabled); margin-top: 8px; }
.chrono li.fort::before { background: var(--rouge); }
.chrono li.ok::before { background: var(--green); }
.etapes-act { list-style: none; margin: 0; padding: 0; }
.etapes-act li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.champ { display: grid; gap: 6px; margin-top: 12px; }
.champ label { font-size: 12.5px; font-weight: 700; color: var(--secondary); }
.champ input, .champ textarea, .champ select { width: 100%; border: 1.5px solid var(--border-btn); border-radius: var(--r-tile); padding: 11px 14px;
  background: var(--card); font-size: 16px; }
.champ input::placeholder, .champ textarea::placeholder { color: var(--tertiary); }
.choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choix button { border: 1.5px solid var(--border-btn); background: var(--card); border-radius: var(--r-pill); padding: 8px 14px; min-height: 44px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--ink); }
.choix button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #FFFFFF; font-weight: 800; }
.bascule { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.bascule input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--ink); }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 50; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #FFFFFF; padding: 12px 16px; border-radius: var(--r-tile); font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-card-over); }
.toast.erreur { background: var(--brand); color: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) {
  .apparait { animation: apparait .35s ease-out both; }
  @keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
