/* styles.css — mobile d'abord (base 360 px), élargi en min-width : 768 px puis 1024 px. */

/* ---------- Jetons ---------- */
:root {
  color-scheme: light;
  --fond: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #efefeb;
  --surface-nav: #ffffff;
  --texte: #16181b;
  --texte-2: #4f5560;
  --bord: #dddcd6;
  --bord-fort: #8a8f98;
  --accent: #c2410c;
  --accent-texte: #ffffff;
  --accent-lien: #b43c0b;
  --accent-doux: #fbe4d8;
  --ok: #146c38;
  --modif: #8a6100;
  --saute: #b42318;
  --sur-saute: #ffffff;
  --saute-fond: #fde8e6;
  --a-venir: #5f6672;
  --ph-reprise: #0f766e;
  --ph-developpement: #1d4ed8;
  --ph-specifique: #7c3aed;
  --ph-affutage: #be185d;
  --rayon: 14px;
  --h-onglets: 60px;
  --bas: calc(var(--h-onglets) + env(safe-area-inset-bottom, 0px));
  --police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root[data-theme="sombre"] {
  color-scheme: dark;
  --fond: #0e1013;
  --surface: #171a1f;
  --surface-2: #21252b;
  --surface-nav: #14171b;
  --texte: #eceef1;
  --texte-2: #a7aeb9;
  --bord: #2c3139;
  --bord-fort: #6b7380;
  --accent: #ff7a45;
  --accent-texte: #1a0b04;
  --accent-lien: #ff8f63;
  --accent-doux: #3b2116;
  --ok: #4ade80;
  --modif: #fbbf24;
  --saute: #f87171;
  --sur-saute: #1a0505;
  --saute-fond: #3a1717;
  --a-venir: #9aa2ae;
  --ph-reprise: #2dd4bf;
  --ph-developpement: #60a5fa;
  --ph-specifique: #a78bfa;
  --ph-affutage: #f472b6;
}

[data-phase="reprise"] { --ph: var(--ph-reprise); }
[data-phase="developpement"] { --ph: var(--ph-developpement); }
[data-phase="specifique"] { --ph: var(--ph-specifique); }
[data-phase="affutage"] { --ph: var(--ph-affutage); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--fond);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  overscroll-behavior: none;
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.2; }
p { margin: 0 0 12px; }
a { color: var(--accent-lien); }
img, svg { max-width: 100%; }
strong { font-weight: 750; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1:focus, h2:focus, main:focus { outline: none; }

button, a, label, summary, [role="button"] { touch-action: manipulation; }
button, .bouton, .onglets a, summary, .choix__option, .jour, .lien {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.num, .val { font-variant-numeric: tabular-nums; }
.val { font-weight: 800; white-space: nowrap; }
.insecable { white-space: nowrap; }
.val--perso { color: var(--accent-lien); }
.val--ajuste { text-decoration: underline 2px; text-underline-offset: 3px; }

.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.visuellement-cache:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

.evitement {
  position: absolute; left: 8px; top: -80px; z-index: 100;
  padding: 12px 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-texte); font-weight: 700;
}
.evitement:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Bande sous la barre d'état de l'iPhone en mode installé (texte de la barre toujours blanc). */
.barre-statut {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: env(safe-area-inset-top, 0px);
  background: #0e1013;
  pointer-events: none;
}

/* ---------- Coquille et navigation ---------- */
.colonne { min-width: 0; padding-top: env(safe-area-inset-top, 0px); }

main {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(var(--bas) + 28px) max(16px, env(safe-area-inset-left, 0px));
}
main.a-barre { padding-bottom: calc(var(--bas) + 112px); }

.onglets {
  position: fixed; z-index: 30;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 8px;
  padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px));
  background: var(--surface-nav);
  border-top: 1px solid var(--bord);
}
.onglets a {
  position: relative;
  min-height: var(--h-onglets);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--texte-2);
  text-decoration: none;
  font-size: 0.75rem; font-weight: 650;
  transition: color 120ms ease-out;
}
.onglets a[aria-current="page"] { color: var(--accent-lien); }
.onglets a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%;
  height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.onglets a:active { color: var(--texte); }
.marque { display: none; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--bord-fort);
  background: var(--surface);
  color: var(--texte);
  font: inherit; font-weight: 700;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.bouton:active { transform: scale(0.97); }
.bouton--principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton--large { width: 100%; min-height: 56px; font-size: 1.0625rem; }
.bouton--discret { min-height: 44px; padding: 8px 4px; border-color: transparent; background: transparent; color: var(--texte-2); text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.bouton--danger { background: var(--saute); border-color: var(--saute); color: var(--sur-saute); }
.bouton--danger-texte { color: var(--saute); }

.bouton-icone {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--bord-fort);
  background: var(--surface);
  color: var(--texte);
  cursor: pointer;
  transition: transform 120ms ease-out;
}
.bouton-icone:active { transform: scale(0.94); }

.lien {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 0;
  border: 0; background: none;
  color: var(--accent-lien);
  font: inherit; font-weight: 650;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions--fin { justify-content: flex-end; }

@media (hover: hover) and (pointer: fine) {
  .bouton:hover { background: var(--surface-2); }
  .bouton--principal:hover { background: var(--accent); filter: brightness(1.06); }
  .bouton--danger:hover { background: var(--saute); filter: brightness(1.06); }
  .bouton--discret:hover { background: transparent; color: var(--texte); }
  .bouton-icone:hover { background: var(--surface-2); }
  .onglets a:hover { color: var(--texte); }
  .jour:hover { background: var(--surface-2); }
  .repliable > summary:hover, .semaine > summary:hover { background: var(--surface-2); }
}

/* ---------- Écran Aujourd'hui ---------- */
.entete { padding: 4px 0 16px; }
.entete__compte {
  margin: 0 0 8px;
  font-size: clamp(3.5rem, 19vw, 5.5rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.entete__semaine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 1.125rem; font-weight: 700; }
.entete__objectif { margin: 6px 0 0; font-size: 1.0625rem; color: var(--texte-2); }
.entete__course { margin: 10px 0 0; color: var(--texte-2); }

.phase {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 10px 1px 8px;
  border: 1.5px solid var(--ph);
  border-radius: 999px;
  color: var(--ph);
  font-size: 0.8125rem; font-weight: 750; line-height: 1.5;
  white-space: nowrap;
}
.phase::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ph); }

.etiquette {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-texte);
  font-size: 0.75rem; font-weight: 750; line-height: 1.5;
  vertical-align: middle;
}

.carte {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}
.carte > h2 { margin: 0 0 12px; font-size: 1.125rem; }
.carte-seance { border-top: 5px solid var(--ph, var(--accent)); }
.carte__sur { margin: 0 0 4px; color: var(--texte-2); font-size: 0.875rem; font-weight: 750; }
.carte__type { text-transform: uppercase; letter-spacing: 0.04em; }
.carte__apercu { margin: 0 0 8px; color: var(--accent-lien); font-weight: 750; }
.carte__titre { margin: 0 0 10px; font-size: 1.5rem; font-weight: 800; }
.carte__allure { margin: 0 0 8px; font-size: 1.125rem; }
.carte__allure .val { font-size: 1.375rem; }
.carte__consigne { margin: 0 0 8px; font-size: 1.0625rem; }
.carte__objectif, .carte__suivante { margin: 0 0 8px; color: var(--texte-2); }
.carte__suivante { color: var(--texte); font-size: 1.125rem; font-weight: 650; }
.carte__etiquette { color: var(--texte-2); font-weight: 750; }
.carte__pied { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 16px; }
.carte__pied .bouton { width: 100%; min-height: 56px; font-size: 1.0625rem; }
.carte-fin .grand-chiffre { font-size: 3rem; }

.rappel {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 650;
}
.rappel__signe {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-texte);
  font-weight: 850; line-height: 1;
}

.discret { margin: 0 0 12px; color: var(--texte-2); font-size: 0.9375rem; }
p.discret { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
details.discret > summary {
  display: flex; align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  text-decoration: underline; text-underline-offset: 3px;
}
details.discret > summary::-webkit-details-marker { display: none; }
details.discret > summary::before { content: "›"; margin-right: 8px; font-weight: 800; transition: transform 150ms ease-out; }
details.discret[open] > summary::before { transform: rotate(90deg); }
details.discret ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
details.discret li a { display: flex; align-items: center; min-height: 44px; color: var(--texte); }

.navjour {
  position: fixed; z-index: 20;
  left: 0; right: 0; bottom: var(--bas);
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--bord);
  background: var(--surface-nav);
}
.navjour__date { display: flex; flex-direction: column; align-items: center; min-width: 0; line-height: 1.25; text-align: center; }
.navjour__date > span { font-weight: 750; }
.navjour__date small { color: var(--texte-2); font-size: 0.8125rem; font-weight: 650; }
.navjour__date .lien { min-height: 36px; padding: 4px 8px; font-size: 0.875rem; }

/* ---------- Détail d'une séance ---------- */
.retour {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; margin: -6px 0 4px -8px; padding: 0 12px 0 2px;
  color: var(--texte-2); font-weight: 650; text-decoration: none;
}
.seance__contexte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; color: var(--texte-2); font-size: 0.9375rem; }
.seance__type { display: block; margin: 0; color: var(--ph, var(--accent-lien)); font-size: 0.875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.seance__titre { margin: 2px 0 8px; font-size: 1.75rem; font-weight: 850; }
.seance__titre .seance__type { margin-bottom: 4px; }
.seance__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--texte-2); font-weight: 650; }
.seance__bloc { padding: 14px 0; border-top: 1px solid var(--bord); }
.seance__bloc h2 { margin: 0 0 6px; color: var(--texte-2); font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.texte { margin: 0; font-size: 1.125rem; line-height: 1.6; }
.repere-ef { margin: 0 0 8px; font-size: 1.0625rem; }
.consigne-volume { font-size: 1.125rem; }

.encadre {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
}
.encadre h2 { margin: 0 0 8px; color: var(--texte-2); font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.encadre p:last-child, .encadre ul:last-child { margin-bottom: 0; }
.encadre--accent { border-left: 4px solid var(--accent); }
.encadre--course { border-left: 4px solid var(--ph-affutage); }
.encadre--saisie { border: 1.5px solid var(--bord); background: var(--surface); }
.encadre .definition { background: var(--surface); }
p.encadre { display: block; }

.liste { margin: 0; padding-left: 20px; }
.liste li { margin: 6px 0; }
.liste-simple { margin: 0; padding: 0; list-style: none; }
.liste-simple li { margin: 6px 0; }
.notes { white-space: pre-line; color: var(--texte-2); overflow-wrap: anywhere; }

/* Abréviations dépliables : zone tactile étendue à 44 × 44 px par un pseudo-élément. */
.abbr {
  position: relative;
  display: inline;
  margin: 0; padding: 0 1px;
  border: 0; background: none;
  color: inherit;
  font: inherit; font-weight: 750;
  text-decoration: underline dotted 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  cursor: help;
}
.abbr::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: 44px;
  transform: translate(-50%, -50%);
}
.abbr[aria-expanded="true"] { border-radius: 4px; background: var(--accent-doux); text-decoration-style: solid; }

.definition {
  display: block;
  margin: 10px 0 4px;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--texte);
  font-size: 1rem; font-weight: 400; line-height: 1.5;
  text-transform: none; letter-spacing: normal;
}
.definition__titre { display: block; margin-bottom: 4px; font-weight: 800; }
.definition__ligne { display: block; margin-top: 6px; }
.definition__perso { color: var(--texte-2); }

.pastille {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 750; line-height: 1.5;
  white-space: nowrap;
}
.pastille--faite { color: var(--ok); }
.pastille--modifiee { color: var(--modif); }
.pastille--sautee { color: var(--saute); }
.pastille--a-faire { color: var(--accent-lien); }
.pastille--a-venir { color: var(--a-venir); }

.barre-action {
  position: fixed; z-index: 20;
  left: 0; right: 0; bottom: var(--bas);
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, transparent, var(--fond) 40%);
  pointer-events: none;
}
.barre-action > * { pointer-events: auto; display: flex; max-width: 688px; margin: 0 auto; }

/* ---------- Saisie ---------- */
.enregistre { margin: 0 0 16px; color: var(--texte-2); font-size: 0.875rem; }
.groupe { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.groupe > legend { margin-bottom: 8px; padding: 0; font-size: 1rem; font-weight: 750; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix__option { position: relative; flex: 1 1 auto; }
.choix__option input {
  position: absolute; inset: 0;
  width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.choix__option span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; height: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--bord-fort);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700; line-height: 1.25; text-align: center;
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}
.choix__option input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-texte); }
.choix__option input:checked + span::before { content: "✓\00a0"; }
.choix__option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choix__option input:active + span { transform: scale(0.97); }
.groupe--statut .choix { display: grid; grid-template-columns: 1fr 1.5fr 1fr; }
.groupe--rpe .choix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.groupe--rpe .choix__option span { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.groupe--verdict .choix { display: grid; grid-template-columns: 1fr; }
.groupe--verdict .choix__option span { justify-content: flex-start; text-align: left; padding: 10px 14px; }
.groupe--objectif .choix, .groupe--theme .choix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0 0 14px; }
.champ > label { font-size: 0.9375rem; font-weight: 650; }
.champ input, .champ textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--bord-fort);
  border-radius: 10px;
  background: var(--surface);
  color: var(--texte);
  font: inherit; font-size: 1.0625rem;
}
.champ input[data-format="chrono"], .champ input[data-format="entier"], #S-propose, #allure-ajustee {
  font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums;
}
.champ input::placeholder, .champ textarea::placeholder { color: var(--a-venir); font-weight: 500; opacity: 1; }
.champ input[aria-invalid="true"] { border-color: var(--saute); }
.champ textarea { min-height: 128px; line-height: 1.45; resize: vertical; }
.champ--court { max-width: 220px; }
/* Ligne de lecture réservée : afficher ou effacer « = 4:45 » ne décale jamais la page sous le doigt. */
.champ__lu { display: block; min-height: 1.3em; overflow: hidden; color: var(--texte-2); font-size: 0.875rem; font-weight: 650; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.champ__aide { margin: 0; color: var(--texte-2); font-size: 0.875rem; }
.grille-champs, .ligne-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 0 12px; }
.grille-champs--serree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pile { display: block; }

.case { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 650; cursor: pointer; }
.case input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }

.pas-date { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.pas-date__valeur { font-size: 1.0625rem; font-weight: 750; text-align: center; }
.pas-date__valeur small { color: var(--texte-2); font-weight: 600; }

.proposition {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}
.proposition h3 { margin: 0 0 8px; font-size: 1rem; }
.proposition p { margin: 0 0 8px; }
.sous-titre { margin: 16px 0 4px; font-size: 1rem; }

.aide { color: var(--texte-2); font-size: 0.9375rem; }
.succes { color: var(--ok); font-weight: 700; }
.erreur { color: var(--saute); font-weight: 650; }
.ok { color: var(--ok); font-weight: 750; }
.ko { color: var(--saute); font-weight: 750; }

.total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 8px 0; font-weight: 650; }
.grand-chiffre { font-size: 2.25rem; font-weight: 850; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 0; }
.grand-chiffre small { font-size: 1rem; font-weight: 650; color: var(--texte-2); }
.comparaison { display: grid; gap: 0; margin: 8px 0 12px; }
.comparaison > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.comparaison dt { color: var(--texte-2); }
.comparaison dd { margin: 0; font-weight: 650; }

.zone-danger { margin: 12px 0; padding: 12px 14px; border: 1.5px solid var(--saute); border-radius: 12px; }
.zone-danger p { margin: 0 0 4px; }

/* ---------- Tableaux ---------- */
.defile {
  margin: 12px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--bord);
  border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.defile--large table { min-width: 680px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: top; }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
tbody th { font-weight: 700; }

/* Tableau des allures : une fiche par repère sur téléphone, vrai tableau à partir de 768 px. */
.defile--fiches { border: 0; overflow: visible; }
.fiches thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fiches, .fiches tbody, .fiches tr, .fiches th, .fiches td { display: block; }
.fiches tr { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); }
.fiches th, .fiches td { padding: 2px 0; border: 0; }
.fiches th { font-size: 1rem; }
.fiches td:nth-child(2) { font-size: 1.0625rem; }
.fiches td:nth-child(3) { color: var(--texte-2); font-size: 0.9375rem; }
.fiches td:nth-child(3)::before { content: attr(data-etiquette) " : "; }

/* ---------- Programme ---------- */
.titre-ecran { margin: 4px 0 16px; font-size: 1.75rem; font-weight: 850; }
.semaines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.semaine {
  border: 1px solid var(--bord);
  border-left: 5px solid var(--ph);
  border-radius: 12px;
  background: var(--surface);
}
.semaine > summary, .repliable > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  border-radius: 12px;
}
.semaine > summary::-webkit-details-marker, .repliable > summary::-webkit-details-marker { display: none; }
.semaine > summary { display: grid; gap: 6px; min-height: 44px; padding: 12px 44px 12px 14px; }
.semaine > summary::after, .repliable > summary::after {
  content: "";
  position: absolute; right: 18px; top: 20px;
  width: 9px; height: 9px;
  border-right: 2.5px solid var(--texte-2);
  border-bottom: 2.5px solid var(--texte-2);
  transform: rotate(45deg);
  transition: transform 150ms ease-out;
}
.semaine[open] > summary::after, .repliable[open] > summary::after { transform: rotate(-135deg); top: 25px; }
.semaine__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.semaine__num { font-size: 1.125rem; font-weight: 850; }
.semaine__dates { color: var(--texte-2); font-weight: 650; }
.semaine__objectif { font-weight: 650; }
.semaine__note { margin: 0 14px 8px; color: var(--texte-2); }
.progression { display: flex; align-items: center; gap: 10px; color: var(--texte-2); font-size: 0.875rem; font-weight: 700; }
.progression .barre { flex: 1; }
.barre { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.barre > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.barre--grande { height: 12px; margin: 8px 0 10px; }

.jours { display: grid; gap: 8px; margin: 0; padding: 8px 8px 10px; list-style: none; }
.jour {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--surface);
  color: inherit; text-decoration: none;
}
.jour__date { display: flex; flex-direction: column; font-size: 0.875rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.jour__date small { color: var(--accent-lien); font-size: 0.6875rem; font-weight: 800; white-space: nowrap; }
.jour__corps { display: flex; flex-direction: column; min-width: 0; }
.jour__type { color: var(--texte-2); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.jour__titre { font-weight: 650; overflow-wrap: anywhere; }
.jour--repos { min-height: 44px; border-style: dashed; }
.jour--repos .jour__type { font-weight: 650; text-transform: none; letter-spacing: 0; font-size: 0.9375rem; }
.jour--aujourdhui { box-shadow: inset 4px 0 0 var(--accent); }
.jour--selection { background: var(--accent-doux); }

.repliable { padding: 0; }
.repliable > summary { display: flex; align-items: center; min-height: 52px; padding: 12px 48px 12px 16px; font-weight: 750; }
.repliable__corps { padding: 0 16px 8px; }
.repliable__corps > p:first-child { margin-top: 0; }

/* ---------- Repères ---------- */
.repere-calcule { margin: -4px 0 16px; }

/* ---------- Suivi ---------- */
.graphe-semaines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.graphe-semaines li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem 4.75rem; align-items: center; gap: 8px; font-size: 0.9375rem; }
.graphe-semaines__nom { font-weight: 800; }
.graphe-semaines li .barre > span { background: var(--ph); }
.graphe-semaines__val { font-weight: 700; text-align: right; }
.graphe-semaines__rpe { color: var(--texte-2); text-align: right; }
.graphe-semaines li.a-venir .graphe-semaines__nom, .graphe-semaines li.a-venir .graphe-semaines__val { color: var(--a-venir); }

.graphe-rpe { display: block; width: 100%; height: auto; }
.rpe-barre { fill: var(--ph); }
.rpe-val { fill: var(--texte); font-size: 12px; font-weight: 750; font-family: var(--police); }
.rpe-axe { fill: var(--texte-2); font-size: 11px; font-family: var(--police); }
.rpe-grille { stroke: var(--bord); stroke-width: 1; }

.journal { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.journal a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; color: inherit; text-decoration: none; }
.journal__tete { color: var(--texte-2); font-size: 0.875rem; font-weight: 650; }
.journal__titre { font-weight: 750; }
.journal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.875rem; }

/* ---------- Bandeaux ---------- */
#bandeaux { max-width: 720px; margin: 0 auto; padding: 12px 16px 0; }
#bandeaux:empty { display: none; }
.bandeau { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 0.9375rem; }
.bandeau p { margin: 0; }
.bandeau ul { margin: 4px 0 0; padding-left: 18px; }
.bandeau .actions { margin: 4px 0 0; }
.bandeau--alerte { border-left: 4px solid var(--saute); background: var(--saute-fond); }
.bandeau--maj { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-left: 4px solid var(--accent); font-weight: 700; }
.bandeau--install { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--bord); background: var(--surface); }

/* ---------- Refonte visuelle : tuiles, étapes, stats (inspiration 21st.dev, en CSS pur) ---------- */
:root { --sur-ok: #ffffff; --rayon-grand: 20px; }
:root[data-theme="sombre"] { --sur-ok: #06240f; }

/* Valeurs : demi-gras par défaut, pastille pour les allures, pastille accent pour ce qui dépend de tes repères. */
.val { font-weight: 700; }
.val--allure, .val--perso { display: inline-block; padding: 0 6px; border-radius: 7px; line-height: 1.45; }
.val--allure { background: var(--surface-2); }
.val--perso { background: var(--accent-doux); color: var(--accent-lien); font-weight: 800; }
.encadre .val--allure, .stats .val--allure { background: var(--surface); }

.abbr { padding: 0 4px; border-radius: 6px; background: var(--surface-2); text-decoration-thickness: 1.5px; }
.encadre .abbr, .stats .abbr { background: var(--surface); }

/* Tuiles d'icônes (pictogrammes SVG de icones.js). */
.tuile {
  flex: none;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 1.25rem; line-height: 1;
}
.tuile--grande {
  width: 52px; height: 52px; border-radius: 16px; font-size: 1.625rem;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--ph, var(--accent)) 18%, var(--surface));
}
.tuile--petite { width: 28px; height: 28px; border-radius: 8px; font-size: 0.9375rem; }

/* Pastilles d'information. */
.puces { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.9375rem; font-weight: 700; line-height: 1.25;
}
.puce--accent { background: var(--accent-doux); color: var(--accent-lien); }
.puces .phase, .puces .pastille { min-height: 32px; padding: 3px 12px; }
.encadre .puce { background: var(--surface); }

/* Signes de statut (✓ ◐ ✕ ● ○), toujours doublés d'un libellé ou d'une légende. */
.signe {
  flex: none;
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border: 2px solid currentColor; border-radius: 50%;
  background: var(--surface);
  font-size: 0.75rem; font-weight: 900; line-height: 1;
}
.signe--faite { border-color: var(--ok); background: var(--ok); color: var(--sur-ok); }
.signe--modifiee { color: var(--modif); }
.signe--sautee { color: var(--saute); }
.signe--a-faire { color: var(--accent-lien); }
.signe--a-venir { color: var(--a-venir); }

/* ---------- Aujourd'hui ---------- */
.entete {
  position: relative;
  margin: 0 0 14px; padding: 20px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--bord); border-radius: var(--rayon-grand);
  background: var(--surface);
}
.entete::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--ph, var(--accent)); }
.entete__haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entete__texte { min-width: 0; }
.entete__compte { margin: 0 0 4px; font-size: clamp(3.25rem, 17vw, 4.75rem); }
.entete__sous { margin: 0; color: var(--texte-2); font-weight: 650; }
.entete__semaine { margin: 14px 0 0; font-size: 1rem; }
.entete__objectif { margin: 4px 0 0; color: var(--texte); font-size: 1rem; font-weight: 600; }
.entete__course { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--bord); color: var(--texte-2); font-weight: 600; }

.anneau { position: relative; flex: none; width: 80px; height: 80px; }
.anneau svg { display: block; }
.anneau__fond { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.anneau__plein { fill: none; stroke: var(--ph, var(--accent)); stroke-width: 8; stroke-linecap: round; }
.anneau__centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; font-variant-numeric: tabular-nums; }
.anneau__centre b { font-size: 1.375rem; font-weight: 850; }
.anneau__centre small { color: var(--texte-2); font-size: 0.6875rem; font-weight: 750; }

.bande { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.bande__jour {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-height: 78px; padding: 8px 2px 6px;
  border: 1.5px solid var(--bord); border-radius: 14px;
  background: var(--surface); color: var(--texte);
  font: inherit; cursor: pointer;
  transition: transform 120ms ease-out, border-color 120ms ease-out;
}
.bande__jour:active { transform: scale(0.96); }
.bande__nom { color: var(--texte-2); font-size: 0.75rem; font-weight: 750; }
.bande__num { font-size: 1.125rem; font-weight: 850; }
.bande__jour--auj .bande__nom { color: var(--accent-lien); }
.bande__jour--actif { border-color: var(--accent); background: var(--accent-doux); }

.rappel { align-items: center; border-left-width: 0; background: var(--accent-doux); }
.rappel__signe { width: auto; height: auto; background: none; }

.carte-seance, .carte-repos, .carte-fin { border-radius: var(--rayon-grand); }
.carte-seance { border-top: 1px solid var(--bord); }
.carte-seance__tete { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.carte-seance__titres { flex: 1; min-width: 0; }
.carte__sur { margin: 0; font-size: 0.8125rem; letter-spacing: 0.01em; }
.carte__titre { margin: 2px 0 0; font-size: 1.375rem; line-height: 1.2; }
.carte__objectif { color: var(--texte-2); }
.carte__actions { display: grid; gap: 8px; margin-top: 14px; }
.carte__actions .bouton { width: 100%; min-height: 52px; }
.suivante { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--bord); }
.suivante__ligne { display: flex; align-items: center; gap: 12px; }
.suivante__titre { display: block; margin: 0; font-size: 1.0625rem; font-weight: 750; }

.guide h2 { margin-bottom: 14px; }
.frise { display: grid; margin: 0 0 4px; padding: 0; list-style: none; }
.frise li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.frise li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; border-left: 2px dashed var(--bord-fort); }
.frise__num { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-texte); font-weight: 850; }
.frise strong { display: block; }
.frise span { color: var(--texte-2); font-size: 0.9375rem; }

/* ---------- Séance ---------- */
.seance__entete { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.seance__entete .seance__contexte { margin: 2px 0 0; }
.seance__titre { font-size: 1.625rem; }
.seance__bloc {
  margin: 0 0 12px; padding: 14px 16px;
  border: 1px solid var(--bord); border-radius: 16px;
  background: var(--surface);
}
.seance__bloc h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px;
  color: var(--texte); font-size: 1rem; font-weight: 800; text-transform: none; letter-spacing: 0;
}
.seance .texte::first-letter, .circuit__intro::first-letter, .etape__texte::first-letter { text-transform: uppercase; }
.seance__bloc .texte { font-size: 1.0625rem; }
.seance__bloc--compact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.seance__bloc--compact h2 { margin: 0; }
.seance__bloc--compact .texte { font-weight: 700; }
.seance__bloc > * + .texte, .seance__bloc > .texte + .circuit, .seance__bloc > .circuit + .circuit { margin-top: 10px; }

.circuit__intro { margin: 0 0 6px; color: var(--texte-2); font-weight: 650; }
.circuit__groupe--bloc { position: relative; margin-top: 8px; padding: 6px 12px 6px 40px; border: 1.5px dashed var(--bord-fort); border-radius: 14px; }
.circuit__num { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: 0.75rem; font-weight: 850; }
.etapes { margin: 0; padding: 0; list-style: none; }
.etape { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 5px 0; }
.etape + .etape::before { content: ""; position: absolute; left: 19px; top: -6px; height: 12px; border-left: 2px solid var(--bord-fort); }
.etape__texte { display: block; font-size: 1.0625rem; font-weight: 650; line-height: 1.35; }
.consigne-ligne { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; padding: 4px 0; }
.consigne-ligne .etape__texte { font-weight: 600; }

.encadre { border-radius: 16px; }
.encadre h2 { display: flex; align-items: center; gap: 10px; color: var(--texte); font-size: 1rem; font-weight: 800; text-transform: none; letter-spacing: 0; }
.encadre--saisie { border: 1.5px solid var(--bord); }
.liste-icones { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.liste-icones li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 10px; }
.ligne-info { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.repere-ef { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 10px; }
.lien-carte { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border: 1px solid var(--bord); border-radius: 16px; background: var(--surface); color: inherit; text-decoration: none; }
.lien-carte > span:last-child { display: flex; flex-direction: column; }

/* Lignes de stats : libellé à gauche, valeur à droite. */
.stats { display: grid; gap: 8px; margin: 0 0 4px; }
.stats > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 44px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.stats dt { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--texte-2); font-weight: 650; }
.stats dd { margin: 0 0 0 auto; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.stats .tuile { background: var(--surface); }
.encadre .stats > div { background: var(--surface); }
.encadre .stats .tuile { background: var(--surface-2); }
.notes { margin: 10px 0 0; }

/* ---------- Saisie ---------- */
.saisie > .carte { padding: 14px 16px; }
.saisie .groupe:last-child, .groupe--dernier, .champ--dernier { margin-bottom: 0; }
.saisie__realisee > .carte .groupe:last-child { margin-bottom: 0; }
.enregistre { display: flex; align-items: center; gap: 6px; }
.choix__option--rpe1 span { box-shadow: inset 0 -4px 0 #4ade80; }
.choix__option--rpe2 span { box-shadow: inset 0 -4px 0 #facc15; }
.choix__option--rpe3 span { box-shadow: inset 0 -4px 0 #fb923c; }
.choix__option--rpe4 span { box-shadow: inset 0 -4px 0 #f87171; }
.choix__option--rpe1 input:checked + span { border-color: #22c55e; background: #4ade80; color: #08210f; box-shadow: none; }
.choix__option--rpe2 input:checked + span { border-color: #eab308; background: #facc15; color: #241c00; box-shadow: none; }
.choix__option--rpe3 input:checked + span { border-color: #f97316; background: #fb923c; color: #2a1200; box-shadow: none; }
.choix__option--rpe4 input:checked + span { border-color: #ef4444; background: #f87171; color: #2a0606; box-shadow: none; }
.echelle-rpe { display: flex; justify-content: space-between; margin: -12px 0 14px; color: var(--texte-2); font-size: 0.8125rem; font-weight: 650; }

/* ---------- Programme ---------- */
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; color: var(--texte-2); font-size: 0.8125rem; font-weight: 650; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende .signe { width: 18px; height: 18px; font-size: 0.5625rem; border-width: 1.5px; }
.semaine { border-radius: 16px; }
.semaine__points { display: flex; align-items: center; gap: 6px; }
.point { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); }
.point--faite { background: var(--ok); }
.point--modifiee { background: var(--modif); }
.point--sautee { background: var(--saute); }
.point--a-faire { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.semaine__compte { flex: none; margin-left: 4px; color: var(--texte-2); font-size: 0.875rem; font-weight: 750; }
.jour { grid-template-columns: 28px minmax(0, 1fr) auto; border-radius: 12px; }
.jour__date { display: block; color: var(--texte-2); font-size: 0.8125rem; font-weight: 700; }
.jour__date .etiquette { margin-left: 4px; }
.jour__titre { font-size: 1rem; }
.jour--repos { background: transparent; }
.jour--repos .jour__date { font-size: 0.875rem; }

/* ---------- Suivi ---------- */
.suivi-tete { display: flex; align-items: center; gap: 16px; }
.suivi-tete__texte { min-width: 0; }
.suivi-tete h2 { margin: 0 0 2px; }
.suivi-tete .aide { margin: 0; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 0; color: var(--texte-2); font-size: 0.875rem; font-weight: 650; }
.mini-stats span { display: inline-flex; align-items: center; gap: 6px; }
.mini-stats .signe { width: 18px; height: 18px; font-size: 0.5625rem; border-width: 1.5px; }
.carte > h2 { display: flex; align-items: center; gap: 10px; }
.graphe-colonnes { display: block; width: 100%; height: auto; }
.col-fond { fill: var(--surface-2); }
.col-barre { fill: var(--ph, var(--accent)); }
.col-val { fill: var(--texte); font: 700 11px var(--police); }
.col-axe { fill: var(--texte-2); font: 650 11px var(--police); }
.journal a { flex-direction: row; align-items: flex-start; gap: 12px; }
.journal__corps { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- Repères ---------- */
.repliable > summary { gap: 10px; }

@media (min-width: 420px) {
  .carte__actions { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* ---------- Version plus conviviale (02/10) : police sport, pictogrammes SVG teintés, retours visuels ---------- */
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("./polices/barlow-condensed-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("./polices/barlow-condensed-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --police-titre: "Barlow Condensed", var(--police);
  --t-orange: #c2410c; --t-vert: #0f766e; --t-bleu: #1d4ed8; --t-violet: #6d28d9;
  --t-rose: #be123c; --t-ambre: #a16207; --t-nuit: #4338ca;
  --ressort: cubic-bezier(0.2, 0.9, 0.3, 1.15);
  --sortie: cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="sombre"] {
  --t-orange: #ff8a50; --t-vert: #2dd4bf; --t-bleu: #60a5fa; --t-violet: #a78bfa;
  --t-rose: #fb7185; --t-ambre: #fbbf24; --t-nuit: #a5b4fc;
}
[data-teinte="orange"] { --t: var(--t-orange); }
[data-teinte="vert"] { --t: var(--t-vert); }
[data-teinte="bleu"] { --t: var(--t-bleu); }
[data-teinte="violet"] { --t: var(--t-violet); }
[data-teinte="rose"] { --t: var(--t-rose); }
[data-teinte="ambre"] { --t: var(--t-ambre); }
[data-teinte="nuit"] { --t: var(--t-nuit); }
[data-teinte="neutre"] { --t: var(--texte-2); }

/* Titres et grands chiffres en condensé, façon dossard. */
h1, .titre-ecran, .seance__titre, .carte__titre, .entete__compte, .anneau__centre b, .bande__num, .grand-chiffre, .semaine__num, .suivante__titre {
  font-family: var(--police-titre);
  letter-spacing: 0.005em;
}
.titre-ecran, main > h1:not(.seance__titre):not(.visuellement-cache) { font-size: 2.25rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; }
.entete__compte { font-size: clamp(4.25rem, 23vw, 6rem); font-weight: 800; letter-spacing: 0; line-height: 0.92; }
.anneau__centre b { font-size: 1.625rem; font-weight: 800; }
.carte__titre { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.seance__titre { font-size: 2.125rem; font-weight: 800; line-height: 1.08; }
.suivante__titre { font-size: 1.3125rem; font-weight: 800; }
.grand-chiffre, .carte-fin .grand-chiffre { font-weight: 800; }
.semaine__num { font-weight: 800; }

/* Tuiles : pictogramme teinté sur fond légèrement coloré. */
.tuile { position: relative; color: var(--t, var(--texte-2)); background: color-mix(in srgb, var(--t, var(--texte-2)) 13%, var(--surface)); }
.tuile svg { width: 56%; height: 56%; }
.tuile--grande { --t: var(--ph, var(--accent)); color: var(--t); background: color-mix(in srgb, var(--t) 16%, var(--surface)); }
.tuile--grande svg { width: 52%; height: 52%; stroke-width: 2.2; }
.stats .tuile, .encadre .stats .tuile { background: color-mix(in srgb, var(--t, var(--texte-2)) 14%, var(--surface)); }
.picto { display: inline-flex; flex: none; color: var(--t, currentColor); }
.picto svg { width: 18px; height: 18px; }
.entete__course { display: flex; align-items: center; gap: 8px; }
.carte__objectif { display: flex; align-items: flex-start; gap: 8px; }
.carte__objectif .picto { margin-top: 3px; }
.enregistre .picto { color: var(--texte-2); }
.puce__icone { display: inline-flex; color: var(--t, currentColor); }
.puce__icone svg { width: 17px; height: 17px; }
.puce__icones { display: inline-flex; gap: 3px; color: var(--t-ambre); }
.puce__icones svg { width: 17px; height: 17px; }
.rappel__signe { display: inline-flex; color: var(--accent-lien); }
.rappel__signe svg { width: 22px; height: 22px; }

/* Carte du jour : coche verte sur la tuile quand la séance est faite. */
.carte-seance[data-statut="faite"] .tuile--grande::after, .carte-seance[data-statut="modifiee"] .tuile--grande::after {
  content: "✓";
  position: absolute; right: -6px; bottom: -6px;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border: 2.5px solid var(--surface); border-radius: 50%;
  background: var(--ok); color: var(--sur-ok);
  font: 900 0.75rem/1 var(--police);
}
.carte-seance[data-statut="modifiee"] .tuile--grande::after { background: var(--modif); content: "◐"; }

/* Navigation entre les jours : sous l'en-tête, plus de barre fixe empilée sur les onglets. */
.navjour {
  position: static;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  margin: 0 0 12px; padding: 0;
  border: 0; background: none;
}
.navjour .bouton-icone { width: 44px; height: 44px; border-color: var(--bord); }
.navjour__date > span { font-size: 1.0625rem; }

/* Bande de la semaine : le statut prend la place du pictogramme, sans déborder de la case. */
.bande__jour { gap: 3px; min-height: 84px; padding: 9px 2px 8px; }
.bande__num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.bande__icone { display: grid; place-items: center; height: 24px; color: var(--t); }
.bande__icone svg { width: 20px; height: 20px; }
.bande__jour .signe { position: static; width: 24px; height: 24px; font-size: 0.75rem; }
.bande__jour[data-statut="faite"] { border-color: color-mix(in srgb, var(--ok) 55%, var(--bord)); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.bande__jour[data-statut="sautee"] .bande__num { color: var(--texte-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.bande__jour[data-statut="a-faire"]:not(.bande__jour--actif) { border-color: color-mix(in srgb, var(--accent) 60%, var(--bord)); border-style: dashed; }
.bande__jour--actif, .bande__jour--actif[data-statut] { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 1.5px var(--accent); }

/* Bandeau d'installation : une ligne, mode d'emploi dépliable. */
.bandeau--install { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; }
.bandeau__picto { display: inline-flex; color: var(--accent-lien); }
.bandeau__picto svg { width: 20px; height: 20px; }
.bandeau__texte { flex: 1; min-width: 0; }
.bandeau__texte > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; }
.bandeau__texte > summary::-webkit-details-marker { display: none; }
.bandeau__texte > summary::after { content: "›"; color: var(--texte-2); font-weight: 800; transition: transform 150ms var(--sortie); }
.bandeau__texte[open] > summary::after { transform: rotate(90deg); }
.bandeau__texte ul { margin: 0 0 8px; }
.bouton--petit { min-height: 44px; padding: 6px 14px; }
.bouton-icone--discret { flex: none; width: 44px; height: 44px; border-color: transparent; background: transparent; color: var(--texte-2); }

/* Saisie en plein écran sur téléphone : les onglets s'effacent, « Terminé » reste sous le pouce. */
@media (max-width: 1023.98px) {
  body[data-ecran="saisie"] { --bas: env(safe-area-inset-bottom, 0px); }
  body[data-ecran="saisie"] .onglets { display: none; }
}

/* Message flottant après « Terminé ». */
.toast {
  position: fixed; z-index: 70;
  left: 50%; bottom: calc(var(--bas) + 16px);
  display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100% - 32px);
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: var(--texte); color: var(--fond);
  font-weight: 750; line-height: 1.3;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.28);
  opacity: 0; transform: translate(-50%, 18px) scale(0.96);
  pointer-events: none;
  transition: opacity 180ms var(--sortie), transform 320ms var(--ressort);
}
.toast--visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast__picto { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ok); color: var(--sur-ok); }
.toast__picto svg { stroke-width: 3; }
.toast[data-ton="neutre"] .toast__picto { background: var(--texte-2); color: var(--fond); }
.toast--visible .toast__picto svg { animation: coche 380ms 90ms var(--ressort) both; }
@keyframes coche { from { opacity: 0; transform: scale(0.3) rotate(-20deg); } to { opacity: 1; transform: none; } }

/* Arrivée sur un écran (fondu) et passage d'un jour à l'autre (glissé). */
main.entree { animation: entree 200ms var(--sortie); }
@keyframes entree { from { opacity: 0; } }
.glisse-suivant { animation: glisse-suivant 240ms var(--sortie); }
.glisse-precedent { animation: glisse-precedent 240ms var(--sortie); }
@keyframes glisse-suivant { from { opacity: 0; transform: translateX(24px); } }
@keyframes glisse-precedent { from { opacity: 0; transform: translateX(-24px); } }

/* Retour tactile homogène sur les cartes cliquables. */
.lien-carte, .jour, .journal a { transition: transform 120ms ease-out, background-color 120ms ease-out; }
.lien-carte:active, .jour:active, .journal a:active { transform: scale(0.985); }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tablette : contenu centré, 720 px maximum ---------- */
@media (min-width: 768px) {
  main { padding-top: 24px; }
  .navjour {
    padding-left: max(16px, calc((100% - 688px) / 2));
    padding-right: max(16px, calc((100% - 688px) / 2));
  }
  .onglets a { flex-direction: row; gap: 8px; font-size: 0.875rem; }
  .grille-champs--serree { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .defile--fiches { border: 1px solid var(--bord); overflow-x: auto; }
  .fiches { display: table; }
  .fiches thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .fiches tbody { display: table-row-group; }
  .fiches tr { display: table-row; margin: 0; padding: 0; border: 0; background: none; }
  .fiches th, .fiches td { display: table-cell; padding: 8px 10px; border-bottom: 1px solid var(--bord); }
  .fiches tr:last-child > th, .fiches tr:last-child > td { border-bottom: 0; }
  .fiches th { font-size: inherit; }
  .fiches td:nth-child(2), .fiches td:nth-child(3) { font-size: inherit; color: inherit; }
  .fiches td:nth-child(3)::before { content: none; }
}

/* ---------- Ordinateur : navigation latérale, liste et détail côte à côte ---------- */
.split--detail > .split__liste, .split--liste > .split__detail { display: none; }

@media (min-width: 1024px) {
  .coquille { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
  .onglets {
    position: sticky; top: 0;
    display: flex; flex-direction: column; gap: 8px;
    height: 100dvh;
    padding: 24px 12px;
    border-top: 0; border-right: 1px solid var(--bord);
  }
  .onglets a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: 1rem; }
  .onglets a[aria-current="page"] { background: var(--accent-doux); }
  .onglets a[aria-current="page"]::before { top: 10px; bottom: 10px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .marque { display: flex; flex-direction: column; margin: 0 14px 20px; font-size: 1.125rem; font-weight: 850; }
  .marque small { color: var(--texte-2); font-size: 0.8125rem; font-weight: 650; }

  main, main.a-barre { padding: 32px 32px 48px; }
  main[data-ecran="programme"], main[data-ecran="seance"], main[data-ecran="saisie"] { max-width: 1180px; }
  #bandeaux { padding: 20px 32px 0; }

  .split { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); align-items: start; gap: 32px; }
  .split > .split__liste, .split > .split__detail { display: block; }
  .split__liste {
    position: sticky; top: 16px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 6px 16px 0;
  }
  .split__detail { min-width: 0; max-width: 720px; }

  .barre-action { position: sticky; }
  .barre-action { bottom: 0; padding: 24px 0 16px; }
  .barre-action > * { max-width: none; }
}
