/* QG Lahouari Transport : système de design.
   Palette relevée sur le site de Lahouari ; contrastes vérifiés (spec, annexe A). */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --fond: #ffffff;
  --surface: #f5f8fd;
  --surface-2: #edf2fa;
  --trait: #e3e8f0;
  --trait-fort: #c9d1dd;
  --encre: #0c0d10;
  --encre-2: #3d4350;
  --encre-3: #5b6270;
  --bleu: #0054f6;
  --bleu-fonce: #0043c4;
  --bleu-pale: #e8f0fe;
  --rouge: #fd0c4a;
  --rouge-texte: #d10a3a;
  --rouge-pale: #fde8ee;
  --vert: #0f7b4b;
  --vert-pale: #e6f4ed;
  --ambre-texte: #9a5b00;
  --ambre-pale: #fdf3e1;
  --rayon: 12px;
  --rayon-l: 20px;
  --rayon-s: 8px;
  --ombre: 0 1px 2px rgba(12, 13, 16, 0.05), 0 12px 32px -18px rgba(12, 22, 48, 0.18);
  --ombre-haute: 0 2px 4px rgba(12, 13, 16, 0.06), 0 24px 48px -20px rgba(12, 22, 48, 0.28);
  --police: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --courbe: cubic-bezier(0.16, 1, 0.3, 1);
  --barre-basse: 64px;
  --haut-sur: env(safe-area-inset-top, 0px);
  --bas-sur: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
.icone { flex: none; }
.temps-bloc { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.aide-bloc { display: block; margin-bottom: 14px; }
.aide-bloc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--bleu-fonce); min-height: 32px; }
.aide-bloc > summary::-webkit-details-marker { display: none; }
a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; font-weight: 650; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); letter-spacing: -0.03em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 0.75rem; }
.nombre, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.secondaire { color: var(--encre-3); font-size: 0.9rem; }
.encre-2 { color: var(--encre-2); }
.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;
}
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }
.lien-evitement {
  position: absolute; left: 12px; top: -48px; background: var(--encre); color: #fff;
  padding: 10px 14px; border-radius: var(--rayon-s); z-index: 100; text-decoration: none;
}
.lien-evitement:focus { top: 12px; color: #fff; }

/* Étiquette en petites capitales, précédée du point rouge de la marque */
.surtitre {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--encre-2);
}
.surtitre::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rouge); }
.surtitre.bleu { color: var(--bleu); }
.surtitre.bleu::before { background: var(--bleu); }
.souligne-marque { background: linear-gradient(var(--rouge), var(--rouge)) 0 100% / 100% 2px no-repeat; padding-bottom: 2px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--rayon); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.98rem; line-height: 1; text-decoration: none;
  cursor: pointer; transition: transform 0.18s var(--courbe), background 0.18s, border-color 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent; user-select: none; white-space: nowrap;
}
.bouton:active { transform: scale(0.98); }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.bouton-noir { background: var(--encre); color: #fff; }
.bouton-noir:hover { background: #23262e; color: #fff; }
.bouton-bleu { background: var(--bleu); color: #fff; }
.bouton-bleu:hover { background: var(--bleu-fonce); color: #fff; }
.bouton-contour { background: var(--fond); color: var(--encre); border-color: var(--trait-fort); }
.bouton-contour:hover { border-color: var(--encre-3); color: var(--encre); }
.bouton-discret { background: transparent; color: var(--encre-2); padding: 0 12px; }
.bouton-discret:hover { background: var(--surface); color: var(--encre); }
.bouton-danger { background: var(--rouge-texte); color: #fff; }
.bouton-danger:hover { background: #b00830; color: #fff; }
.bouton-large { width: 100%; }
.bouton-petit { min-height: 40px; padding: 0 14px; font-size: 0.9rem; border-radius: 10px; }
.bouton .fleche { transition: transform 0.2s var(--courbe); }
.bouton:hover .fleche { transform: translateX(3px); }
.bouton-whatsapp { background: #1f7a4d; color: #fff; }
.bouton-whatsapp:hover { background: #17633e; color: #fff; }

/* ---------- Champs ---------- */
.champ { display: grid; gap: 6px; margin-bottom: 18px; }
.champ > label, .champ .libelle { font-weight: 600; font-size: 0.95rem; color: var(--encre); }
.champ .aide { font-size: 0.86rem; color: var(--encre-3); margin: -2px 0 2px; }
.champ .erreur-champ { font-size: 0.88rem; color: var(--rouge-texte); font-weight: 500; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"],
input[type="date"], input[type="number"], input[type="datetime-local"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--trait-fort);
  border-radius: var(--rayon-s); background: #fff; color: var(--encre); font: inherit; font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6270' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--encre-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(0, 84, 246, 0.16); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rouge-texte); }
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] {
  background: var(--surface); color: var(--encre-2); cursor: default;
}
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 96px; }
.champ-mdp .afficher {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px;
  border: 0; background: transparent; color: var(--bleu); font: inherit; font-weight: 600; font-size: 0.88rem;
  padding: 0 10px; cursor: pointer; border-radius: 6px;
}
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.case input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--bleu); }

/* ---------- Alertes et messages ---------- */
.alerte {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--rayon);
  border: 1px solid var(--trait); background: var(--surface); color: var(--encre); font-size: 0.95rem; margin-bottom: 18px;
}
.alerte svg { flex: none; margin-top: 2px; }
.alerte-erreur { background: var(--rouge-pale); border-color: #f6c3d0; }
.alerte-erreur svg { color: var(--rouge-texte); }
.alerte-succes { background: var(--vert-pale); border-color: #bfe2cf; }
.alerte-succes svg { color: var(--vert); }
.alerte-info { background: var(--bleu-pale); border-color: #c9dafc; }
.alerte-info svg { color: var(--bleu); }
.alerte-attention { background: var(--ambre-pale); border-color: #f3dcae; }
.alerte-attention svg { color: var(--ambre-texte); }

/* ---------- Badges d'état ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; line-height: 1.3; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-a_venir { background: var(--surface); color: var(--encre-3); border-color: var(--trait); }
.badge-ouverte, .badge-en_cours { background: var(--bleu-pale); color: var(--bleu-fonce); }
.badge-rendue { background: #eef1f6; color: var(--encre-2); }
.badge-a_corriger, .badge-rattrapage { background: var(--ambre-pale); color: var(--ambre-texte); }
.badge-validee { background: var(--vert-pale); color: var(--vert); }
.badge-facultatif { background: var(--fond-carte, #F5F8FD); color: var(--encre-2); display: inline-block; }
.badge-en_retard { background: var(--rouge-pale); color: var(--rouge-texte); }
.badge-en_retard_doux { background: var(--surface); color: var(--encre-2); border-color: var(--trait); }
.badge-pause { background: var(--surface); color: var(--encre-2); border-color: var(--trait-fort); }
.badge-bloque { background: var(--rouge-pale); color: var(--rouge-texte); }
.badge-demo { background: #f1eefc; color: #4b3aa8; }

/* ---------- Cartes et sections ---------- */
.carte { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon-l); padding: 22px; box-shadow: var(--ombre); }
.carte-plate { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-l); padding: 20px; }
.pile > * + * { margin-top: 16px; }
.pile-l > * + * { margin-top: 28px; }
.rangee { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vide {
  text-align: left; padding: 28px 24px; border: 1px dashed var(--trait-fort); border-radius: var(--rayon-l);
  background: var(--surface); color: var(--encre-2);
}
.vide h3 { margin-bottom: 6px; color: var(--encre); }

/* ---------- Pages publiques (connexion, invitation) ---------- */
.public { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--fond); }
.public-marque {
  display: none; position: relative; overflow: hidden; background: var(--surface);
  padding: 48px; border-right: 1px solid var(--trait);
}
.public-marque .accroche { font-size: clamp(2.2rem, 1.2rem + 2.4vw, 3.4rem); font-weight: 680; letter-spacing: -0.045em; line-height: 1.02; margin: 28px 0 18px; }
.public-marque .accroche em { font-style: normal; color: var(--bleu); }
.public-marque .coin { position: absolute; right: 40px; top: 40px; width: 14px; height: 14px; background: var(--rouge); border-radius: 3px; transform: rotate(8deg); }
.public-formulaire { display: flex; flex-direction: column; justify-content: center; padding: calc(32px + var(--haut-sur)) 20px calc(32px + var(--bas-sur)); }
.public-formulaire .boite { width: 100%; max-width: 420px; margin: 0 auto; }
.public-formulaire h1 { margin: 18px 0 8px; }
.public-formulaire .intro { color: var(--encre-2); margin-bottom: 26px; }
@media (min-width: 960px) {
  .public { grid-template-columns: 1.05fr 1fr; }
  .public-marque { display: flex; flex-direction: column; justify-content: space-between; }
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.logo img, .logo svg { width: auto; height: 30px; }
.logo-complet { display: block; height: auto; max-width: 100%; }
.avatar-coach { border-radius: 50%; object-fit: cover; flex: none; background: var(--encre); }
.signe-coach { display: flex; align-items: center; gap: 12px; }
.signe-coach p { margin: 0; }
.logo .mot { display: grid; line-height: 1.05; }
.logo .mot strong { font-size: 0.86rem; letter-spacing: 0.06em; font-weight: 700; }
.logo .mot span { font-size: 0.62rem; letter-spacing: 0.32em; color: var(--encre-3); font-weight: 500; }

/* ---------- Coquille élève ---------- */
.entete {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait); padding-top: var(--haut-sur);
}
.entete-interieur { max-width: 1280px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entete .qg { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; color: var(--bleu); border: 1px solid #c9dafc; background: var(--bleu-pale); border-radius: 999px; padding: 4px 10px; }
.nav-haut { display: none; gap: 4px; }
.nav-haut a { text-decoration: none; color: var(--encre-2); font-weight: 550; font-size: 0.94rem; padding: 10px 12px; border-radius: 10px; }
.nav-haut a:hover { background: var(--surface); color: var(--encre); }
.nav-haut a[aria-current="page"] { color: var(--encre); background: var(--surface); }
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px calc(var(--barre-basse) + 40px + var(--bas-sur)); }
.page-large { max-width: 1280px; }
.nav-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--trait);
  padding-bottom: var(--bas-sur);
}
.nav-bas ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 560px; }
.nav-bas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--barre-basse);
  color: var(--encre-3); text-decoration: none; font-size: 0.72rem; font-weight: 600;
}
.nav-bas a[aria-current="page"] { color: var(--encre); }
.nav-bas a[aria-current="page"] svg { color: var(--bleu); }
@media (min-width: 960px) {
  .nav-haut { display: flex; }
  .nav-bas { display: none; }
  .page { padding-bottom: 64px; }
}
.menu-plus { list-style: none; padding: 0; margin: 0; border: 1px solid var(--trait); border-radius: var(--rayon-l); overflow: hidden; }
.menu-plus li + li { border-top: 1px solid var(--trait); }
.menu-plus a, .menu-plus button {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 18px; text-decoration: none;
  color: var(--encre); font: inherit; font-weight: 550; background: #fff; border: 0; cursor: pointer; text-align: left;
}
.menu-plus a:hover, .menu-plus button:hover { background: var(--surface); }
.menu-plus .fleche { margin-left: auto; color: var(--encre-3); }

/* ---------- Le prochain pas (carte d'accueil) ---------- */
.prochain-pas { position: relative; padding: 24px; border-radius: 24px; border: 1px solid var(--trait); background: #fff; box-shadow: var(--ombre-haute); overflow: hidden; }
.prochain-pas::after { content: ""; position: absolute; right: 20px; top: 20px; width: 10px; height: 10px; background: var(--rouge); border-radius: 2px; transform: rotate(10deg); }
.prochain-pas .semaine-n { font-size: 0.86rem; font-weight: 600; color: var(--encre-3); font-variant-numeric: tabular-nums; margin-right: 22px; }
.prochain-pas h1 { margin: 10px 0 6px; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
.prochain-pas .mission { margin: 18px 0 20px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--trait); }
.prochain-pas .mission .surtitre { font-size: 0.68rem; }
.prochain-pas .mission p { margin: 6px 0 0; font-weight: 600; font-size: 1.05rem; }
.rebours { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--encre-2); margin-top: 14px; }
.rebours.urgent { color: var(--encre); font-weight: 600; }
.rebours.urgent svg { color: var(--rouge); }

/* Barre des 12 semaines */
.barre-semaines { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.barre-semaines a, .barre-semaines span {
  display: grid; place-items: center; height: 36px; border-radius: 10px; font-family: var(--mono); font-size: 0.78rem;
  font-weight: 600; text-decoration: none; border: 1px solid var(--trait); color: var(--encre-3); background: #fff;
}
.barre-semaines .etat-validee { background: var(--encre); color: #fff; border-color: var(--encre); }
.barre-semaines .etat-rendue { background: var(--surface-2); color: var(--encre); border-color: var(--trait-fort); }
.barre-semaines .etat-a_corriger, .barre-semaines .etat-rattrapage { background: var(--ambre-pale); color: var(--ambre-texte); border-color: #f3dcae; }
.barre-semaines .courante { border: 2px solid var(--bleu); color: var(--bleu); background: var(--bleu-pale); }
.barre-semaines .etat-hors_parcours { border-style: dashed; color: var(--encre-3); background: transparent; text-decoration: line-through; }
@media (max-width: 420px) { .barre-semaines { grid-template-columns: repeat(6, 1fr); } }

/* ---------- Page semaine ---------- */
.entete-semaine {
  position: sticky; top: calc(61px + var(--haut-sur)); z-index: 15; background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait);
  margin: 0 -16px 18px; padding: 9px 16px; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; min-height: 40px;
}
.consigne-repliable { margin-bottom: 16px; }
.consigne-repliable > summary { list-style: none; cursor: pointer; }
.consigne-repliable > summary::-webkit-details-marker { display: none; }
.consigne-repliable > summary .consigne { display: inline; margin: 0; }
.consigne-repliable .lire-suite { color: var(--bleu); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.consigne-repliable[open] > summary { display: none; }
.etat-enregistrement { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--encre-3); }
.etat-enregistrement[data-etat="erreur"] { color: var(--rouge-texte); font-weight: 600; }
.etat-enregistrement[data-etat="encours"] { color: var(--encre-2); }
.section-semaine { border: 1px solid var(--trait); border-radius: var(--rayon-l); background: #fff; margin-bottom: 14px; overflow: clip; }
.section-semaine > summary {
  list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 18px; cursor: pointer; min-height: 64px;
}
.section-semaine > summary::-webkit-details-marker { display: none; }
.section-semaine > summary .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); font-family: var(--mono); font-size: 0.8rem; font-weight: 700; flex: none; }
.section-semaine > summary h2 { font-size: 1.05rem; }
.section-semaine > summary .resume { margin-left: auto; font-size: 0.84rem; color: var(--encre-3); text-align: right; }
.section-semaine > summary .chevron { transition: transform 0.2s var(--courbe); color: var(--encre-3); flex: none; }
.section-semaine[open] > summary .chevron { transform: rotate(180deg); }
.section-semaine .corps { padding: 0 18px 20px; }
.video { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--trait); }
.video .code { font-family: var(--mono); font-size: 0.78rem; color: var(--encre-3); }
.video .titre { font-weight: 600; }
.page-lecon { border: 1px solid var(--trait); border-radius: 10px; margin-bottom: 12px; background: #fff; width: 100%; height: auto; cursor: zoom-in; }

/* Blocs d'exercice */
.bloc { border-top: 1px solid var(--trait); padding-top: 22px; margin-top: 22px; }
.bloc:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }
.bloc h3 { margin-bottom: 6px; }
.bloc .consigne { color: var(--encre-2); font-size: 0.95rem; margin-bottom: 16px; white-space: pre-line; }
.bloc .a-revoir { margin-bottom: 14px; }
.question { margin-bottom: 20px; }
.question label { display: block; font-weight: 600; margin-bottom: 8px; }
.question .num-q { font-family: var(--mono); color: var(--bleu); margin-right: 6px; }
.donnees { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 14px; }
.donnees th, .donnees td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.donnees th { font-weight: 600; color: var(--encre-2); background: var(--surface); }
.fiches { display: grid; gap: 10px; }
.ajout-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.fiche [data-supprimer-ligne] { margin-top: 6px; }
.depot { display: grid; gap: 8px; margin-top: 12px; }
.depot input[type="file"] { font-size: 16px; max-width: 100%; }
.depot-recu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; overflow-wrap: anywhere; }
.fiche { border: 1px solid var(--trait); border-radius: 14px; background: #fff; }
.fiche > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; min-height: 56px; }
.fiche > summary::-webkit-details-marker { display: none; }
.fiche > summary .rang { font-family: var(--mono); font-size: 0.8rem; color: var(--encre-3); width: 22px; flex: none; }
.fiche > summary .nom { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche > summary .nom.vide-nom { color: var(--encre-3); font-weight: 500; }
.pastilles { display: inline-flex; gap: 3px; flex: none; }
.pastilles i { width: 7px; height: 7px; border-radius: 50%; background: var(--trait-fort); }
.pastilles i.pleine { background: var(--bleu); }
.fiche .corps-fiche { padding: 4px 16px 16px; display: grid; gap: 4px; }
.fiche .suivante { justify-self: end; }
.ligne-check { border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; background: #fff; margin-bottom: 10px; }
.ligne-check .titre-check { font-weight: 600; margin-bottom: 10px; }
.ligne-check .grille { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ligne-check .grille { grid-template-columns: 180px 170px 1fr; } }
.barre-bloc {
  position: sticky; bottom: calc(var(--barre-basse) + var(--bas-sur) + 8px); z-index: 10; margin-top: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--encre); color: #fff; border-radius: 14px; font-size: 0.86rem; box-shadow: var(--ombre-haute);
}
@media (min-width: 960px) { .barre-bloc { bottom: 16px; } }

/* Calculateur */
.famille { border: 1px solid var(--trait); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fff; }
.famille h4 { font-size: 0.95rem; margin-bottom: 10px; display: flex; justify-content: space-between; }
.ligne-charge { display: grid; grid-template-columns: 1fr 112px; gap: 8px; margin-bottom: 8px; }
.charges { display: grid; gap: 8px; }
.charge {
  display: grid; gap: 6px 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 12px; background: #fff;
  grid-template-columns: 26px 1fr 1fr; grid-template-areas: "num lib lib" ". mont fam";
}
.charge .num-charge { grid-area: num; color: var(--encre-3); font-size: 0.82rem; }
.charge .c-libelle { grid-area: lib; } .charge .c-montant { grid-area: mont; } .charge .c-famille { grid-area: fam; }
.charge .erreur-champ:empty { display: none; }
.charge-entete { display: none; }
@media (min-width: 720px) {
  .charge { grid-template-columns: 26px 1fr 150px 120px; grid-template-areas: "num lib mont fam"; padding: 6px 10px; }
  .charge-entete { display: grid; border: 0; background: transparent; padding: 0 10px; font-size: 0.78rem; color: var(--encre-3); font-weight: 600; }
  .charge-entete span:nth-child(1) { grid-area: num; } .charge-entete span:nth-child(2) { grid-area: lib; }
  .charge-entete span:nth-child(3) { grid-area: mont; } .charge-entete span:nth-child(4) { grid-area: fam; }
}
.resultats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
@media (min-width: 720px) { .resultats { grid-template-columns: repeat(3, 1fr); } }
.resultat { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; }
.resultat .valeur { font-family: var(--mono); font-size: 1.15rem; font-weight: 650; margin-top: 2px; }
.resultat .valeur.negatif { color: var(--rouge-texte); }
.resultat .valeur.positif { color: var(--vert); }
.resultat .lib { font-size: 0.8rem; color: var(--encre-3); }
.tableau-scenarios { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tableau-scenarios th, .tableau-scenarios td { padding: 9px 8px; border-bottom: 1px solid var(--trait); text-align: right; font-family: var(--mono); }
.tableau-scenarios th:first-child, .tableau-scenarios td:first-child { text-align: left; font-family: var(--police); }
.defile-x { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }   /* garde dedans les étiquettes cachées des cellules */

/* ---------- Coach ---------- */
.coach-grille { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.barre-laterale { display: none; }
.coach-contenu > .entete { display: block; }
.coach-mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--trait); }
.coach-mobile-nav a { flex: none; text-decoration: none; color: var(--encre-2); font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--trait); }
.coach-mobile-nav a[aria-current="page"] { background: var(--encre); color: #fff; border-color: var(--encre); }
/* Ordinateur : le menu latéral suffit, ni barre d’onglets ni second logo en haut. */
@media (min-width: 960px) {
  .coach-contenu > .entete { display: none; }
  .coach-grille { grid-template-columns: 248px 1fr; }
  .barre-laterale { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh; padding: 22px 16px; border-right: 1px solid var(--trait); background: var(--surface); }
  .barre-laterale nav { display: grid; gap: 2px; }
  .barre-laterale nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--encre-2); text-decoration: none; font-weight: 550; }
  .barre-laterale nav a:hover { background: #fff; color: var(--encre); }
  .barre-laterale nav a[aria-current="page"] { background: #fff; color: var(--encre); box-shadow: var(--ombre); }
  .barre-laterale nav .compte { margin-left: auto; font-family: var(--mono); font-size: 0.76rem; background: var(--encre); color: #fff; border-radius: 999px; padding: 1px 8px; }
  .coach-mobile-nav { display: none; }
}
.coach-contenu { min-width: 0; }
.coach-page { max-width: 1280px; margin: 0 auto; padding: 28px 20px 64px; }
.compteurs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 26px; }
.compteur { display: block; text-decoration: none; color: var(--encre); padding: 16px; border-radius: 16px; border: 1px solid var(--trait); background: #fff; }
.compteur:hover { border-color: var(--trait-fort); color: var(--encre); }
.compteur .n { font-family: var(--mono); font-size: 1.9rem; font-weight: 650; line-height: 1; }
.compteur .l { font-size: 0.84rem; color: var(--encre-3); margin-top: 6px; }
.compteur.alerte-rouge .n { color: var(--rouge-texte); }
.liste-eleves { width: 100%; border-collapse: collapse; }
.liste-eleves th { text-align: left; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--trait); }
.liste-eleves td { padding: 14px 12px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.liste-eleves tr:hover td { background: var(--surface); }
.liste-eleves a.nom { font-weight: 650; color: var(--encre); text-decoration: none; }
.liste-eleves tr[data-lien] { cursor: pointer; }
.liste-eleves tr[data-lien]:hover .nom { text-decoration: underline; text-underline-offset: 3px; }
.liste-eleves .sous { font-size: 0.84rem; color: var(--encre-3); }
.cartes-eleves { display: none; }
@media (max-width: 719px) {
  .liste-eleves { display: none; }
  .cartes-eleves { display: grid; gap: 10px; }
}
.carte-eleve { display: block; text-decoration: none; color: var(--encre); border: 1px solid var(--trait); border-radius: 16px; padding: 14px 16px; background: #fff; }
.drapeaux { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.deux-colonnes { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .deux-colonnes { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; } .collant { position: sticky; top: 24px; } }
.frise { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 719px) { .frise { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.frise a, .frise span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: grid; gap: 2px; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--trait); text-decoration: none; color: var(--encre-2); font-size: 0.72rem; text-align: center; background: #fff; }
.frise b { font-family: var(--mono); font-size: 0.86rem; color: var(--encre); }
.frise .etat-validee { background: var(--vert-pale); border-color: #bfe2cf; }
.frise .etat-a_corriger, .frise .etat-rattrapage { background: var(--ambre-pale); border-color: #f3dcae; }
.frise .etat-en_retard { background: var(--rouge-pale); border-color: #f6c3d0; }
.frise .etat-rendue { background: var(--bleu-pale); border-color: #c9dafc; }
.frise .actuelle { outline: 2px solid var(--encre); outline-offset: 1px; }
.frise .etat-hors_parcours { background: var(--surface); border-style: dashed; color: var(--encre-3); }
.frise .etat-hors_parcours b { color: var(--encre-3); }
.choix-semaines { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 719px) { .choix-semaines { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.choix-semaines label { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px dashed var(--trait-fort); border-radius: 10px; background: var(--surface); color: var(--encre-3); font-family: var(--mono); font-size: 0.86rem; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.choix-semaines label:has(input:checked) { border-style: solid; border-color: var(--bleu); background: var(--bleu-pale); color: var(--encre); }
.choix-semaines label:has(input:focus-visible) { outline: 2px solid var(--bleu); outline-offset: 2px; }
.choix-semaines input { width: 18px; height: 18px; margin: 0; accent-color: var(--bleu); }
.reponse-lue { padding: 12px 14px; background: var(--surface); border-radius: 10px; white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; }
.reponse-lue.vide-rep { color: var(--encre-3); font-style: italic; }
.decision-choix { display: grid; gap: 8px; margin-bottom: 18px; }
.decision-choix label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--trait-fort); border-radius: 12px; cursor: pointer; font-weight: 600; }
.decision-choix input { accent-color: var(--bleu); width: 18px; height: 18px; }
.decision-choix label:has(input:checked) { border-color: var(--bleu); background: var(--bleu-pale); }
.lien-copie { display: flex; gap: 8px; }
.lien-copie input { font-family: var(--mono); font-size: 0.86rem; }

/* ---------- Fenêtre de confirmation et notifications ---------- */
dialog.fenetre { border: 0; border-radius: 22px; padding: 0; width: min(92vw, 460px); box-shadow: 0 30px 80px -20px rgba(12, 13, 16, 0.45); }
dialog.fenetre::backdrop { background: rgba(12, 13, 16, 0.45); backdrop-filter: blur(2px); }
dialog.fenetre .corps-fenetre { padding: 24px; }
dialog.fenetre .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 0 24px 24px; }
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--barre-basse) + var(--bas-sur) + 16px); display: grid; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { background: var(--encre); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 0.92rem; box-shadow: var(--ombre-haute); animation: monte 0.35s var(--courbe); }
.toast.erreur { background: var(--rouge-texte); }
@keyframes monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.squelette { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: brille 1.4s infinite linear; border-radius: 10px; }
@keyframes brille { to { background-position: -200% 0; } }
.apparait { animation: monte 0.5s var(--courbe) both; animation-delay: calc(var(--i, 0) * 60ms); }

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

/* ---------- Pages d'erreur ---------- */
.erreur-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.erreur-page .boite { max-width: 480px; }
.erreur-page .code { font-family: var(--mono); color: var(--encre-3); }

@media print {
  .nav-bas, .entete, .barre-laterale, .coach-mobile-nav, .barre-bloc, .toasts { display: none !important; }
}

/* ---------- Suivi commercial ---------- */
.onglets-suivi { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--trait); border-radius: 999px; }
.onglets-suivi a { padding: 10px 18px; border-radius: 999px; text-decoration: none; color: var(--encre-2); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.onglets-suivi a[aria-current="page"] { background: #fff; color: var(--encre); box-shadow: 0 1px 2px rgba(12, 13, 16, 0.08); }
/* Sur téléphone, les 4 onglets (avec « Outils de prix ») passent sur deux lignes au lieu de déborder de l'écran. */
@media (max-width: 559px) {
  .onglets-suivi { display: flex; flex-wrap: wrap; border-radius: 18px; }
  .onglets-suivi a { flex: 1 1 auto; justify-content: center; padding: 10px 14px; white-space: nowrap; }
}
.compteurs-suivi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .compteurs-suivi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.compteurs-suivi > div { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.compteurs-suivi b { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; color: var(--bleu); font-variant-numeric: tabular-nums; }
.compteurs-suivi span { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-3); font-weight: 600; }
.compteurs-suivi .a-traiter b { color: var(--rouge-texte); }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--trait-fort); color: var(--encre-2); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.puce.active { background: var(--encre); border-color: var(--encre); color: #fff; }
.liste-suivi { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-suivi a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border: 1px solid var(--trait); border-radius: 14px; background: #fff; color: var(--encre); text-decoration: none; }
.liste-suivi a:hover { border-color: var(--trait-fort); }
.liste-suivi .nom-suivi { font-weight: 650; overflow-wrap: anywhere; }
.liste-suivi .badge { grid-column: 2; grid-row: 1; justify-self: end; }
.liste-suivi .detail-suivi, .liste-suivi .action-suivi { grid-column: 1 / -1; font-size: 0.92rem; overflow-wrap: anywhere; }
.alerte-suivi.alerte-retard { background: var(--rouge-pale); color: var(--rouge-texte); }
.alerte-suivi.alerte-jour { background: var(--ambre-pale); color: var(--ambre-texte); }
.alerte-suivi.alerte-planifier { background: var(--surface); color: var(--encre-2); border-color: var(--trait-fort); }
.alerte-suivi.alerte-planifie { background: var(--bleu-pale); color: var(--bleu-fonce); }
.alerte-suivi.alerte-clos { background: #eef1f6; color: var(--encre-3); }
.fiche-suivi fieldset { margin: 0; min-width: 0; }
.fiche-suivi legend { padding: 0; margin-bottom: 14px; float: left; width: 100%; }
.fiche-suivi legend + * { clear: both; }
.barre-fiche-suivi { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; gap: 10px; flex-wrap: wrap; padding: 12px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre); }
@media (min-width: 960px) { .barre-fiche-suivi { bottom: 16px; } }
.tableau-suivi { border-collapse: collapse; font-size: 0.86rem; min-width: 1400px; }
.tableau-suivi th, .tableau-suivi td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau-suivi th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--encre-3); white-space: nowrap; }
.tableau-suivi .cellule-texte { display: block; max-width: 28ch; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Succès ---------- */
.succes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.succes li { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--trait); background: #fff; }
.succes li > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.succes li strong { font-size: 0.82rem; line-height: 1.25; }
.succes li .secondaire { display: none; font-size: 0.84rem; }
.succes .medaille { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.succes .obtenu .medaille { background: var(--bleu); color: #fff; }
.succes .a-obtenir { background: var(--surface); }
.succes .a-obtenir .medaille { background: #fff; color: var(--encre-3); border: 1px dashed var(--trait-fort); }
.succes .a-obtenir strong { color: var(--encre-2); }
@media (min-width: 720px) {
  .succes { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
  .succes li { display: flex; text-align: left; align-items: flex-start; gap: 12px; padding: 14px; }
  .succes li strong { font-size: 1rem; }
  .succes li .secondaire { display: block; }
}

/* ---------- Fiche élève : suivi détaillé ---------- */
.texte-rouge, .liste-eleves .sous.texte-rouge { color: var(--rouge-texte); }
.faits-eleve { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 14px; }
@media (min-width: 720px) { .faits-eleve { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.faits-eleve > div { border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.faits-eleve dt { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--encre-3); font-weight: 600; }
.faits-eleve dd { margin: 6px 0 0; font-weight: 650; line-height: 1.3; }
.faits-eleve dd span { display: block; font-weight: 450; font-size: 0.86rem; color: var(--encre-3); margin-top: 2px; }
.ecart-ok { color: var(--vert); }
.ecart-retard { color: var(--rouge-texte); }
.a-traiter ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.a-traiter li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ambre-pale); color: var(--ambre-texte); }
.a-traiter li strong { color: var(--encre); font-weight: 600; display: block; }
.a-traiter li .secondaire { font-size: 0.84rem; }
.a-traiter li.alerte-bloque, .a-traiter li.alerte-en_retard { background: var(--rouge-pale); color: var(--rouge-texte); }
.a-traiter li.alerte-a_corriger { background: var(--bleu-pale); color: var(--bleu-fonce); }
.exercices { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--trait); }
.exercices li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "etat titre compte" "etat quand quand"; gap: 2px 10px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--trait); }
.exercices .etat-ex { grid-area: etat; align-self: center; box-sizing: border-box; width: 20px; height: 20px; max-height: 20px; border-radius: 999px; border: 1.5px solid var(--trait-fort); display: inline-flex; align-items: center; justify-content: center; }
.exercices .titre-ex { grid-area: titre; min-width: 0; }
.exercices .titre-ex a { color: var(--encre); font-weight: 600; text-decoration: none; }
.exercices .titre-ex a:hover { text-decoration: underline; }
.exercices .titre-ex .badge { vertical-align: 2px; margin-left: 6px; }
.exercices .compte { grid-area: compte; font-size: 0.86rem; color: var(--encre-2); }
.exercices .quand { grid-area: quand; font-size: 0.84rem; }
.exercices .ex-fini .etat-ex { background: var(--vert); border-color: var(--vert); color: #fff; }
.exercices .ex-en_cours .etat-ex, .exercices .ex-commence .etat-ex { border-color: var(--bleu); background: linear-gradient(90deg, var(--bleu-pale) 50%, #fff 50%); }
.exercices .ex-ici { background: var(--bleu-pale); border-radius: 12px; border-bottom-color: transparent; padding-left: 10px; padding-right: 10px; }
.faits-semaine { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; color: var(--encre-2); font-size: 0.92rem; }
.faits-semaine li { display: flex; gap: 8px; align-items: flex-start; }
.faits-semaine li svg { flex: none; margin-top: 2px; color: var(--encre-3); }
.volet-infos > summary, #coachings details > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; list-style: none; }
.volet-infos > summary::-webkit-details-marker, #coachings details > summary::-webkit-details-marker { display: none; }
.volet-infos > summary::after, #coachings details.carte-plate > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--encre-3); border-bottom: 2px solid var(--encre-3); transform: rotate(45deg); transition: transform 0.2s; }
.volet-infos[open] > summary::after, #coachings details.carte-plate[open] > summary::after { transform: rotate(-135deg); }
@media (max-width: 719px) {
  .a-traiter li { grid-template-columns: 20px minmax(0, 1fr); }
  .a-traiter li > form, .a-traiter li > a { grid-column: 2; justify-self: start; }
}

/* ---------- Guide coach ---------- */
.guide { max-width: 860px; }
.semaine-coach { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.semaine-coach li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 14px 0; border-top: 1px solid var(--trait); }
@media (min-width: 720px) { .semaine-coach li { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; } }
.semaine-coach .jour { font-weight: 700; color: var(--bleu-fonce); }
.etapes { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.etapes li { padding-left: 4px; line-height: 1.55; }
.capture-guide { margin: 6px 0 0; }
.capture-guide img { display: block; width: 100%; height: auto; border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre); }
.capture-guide figcaption { font-size: 0.84rem; color: var(--encre-3); margin-top: 8px; }

/* Appels du vendredi (tableau de bord du coach) */
.appels-semaine { margin-bottom: 20px; }
.liste-appels { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.liste-appels .heure-appel { font-variant-numeric: tabular-nums; color: var(--encre-2); margin-right: 6px; }

/* Calculateurs de prix (semaine 2) */
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 18px; }
.titre-charges { font-size: 1rem; margin: 22px 0 8px; }
.ligne-charge { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "lib lib" "mont mois" "per type"; gap: 6px 10px; padding: 12px 0; border-top: 1px solid var(--trait); }
.ligne-charge .lc-lib { grid-area: lib; } .ligne-charge .lc-montant { grid-area: mont; } .ligne-charge .lc-per { grid-area: per; }
.ligne-charge .lc-type { grid-area: type; } .ligne-charge .lc-mois { grid-area: mois; align-self: center; text-align: right; font-weight: 600; }
.ligne-charge .aide { font-size: 0.82rem; color: var(--encre-3); margin: 2px 0 0; }
.ligne-charge.ligne-auto { grid-template-areas: "lib mois"; }
@media (min-width: 900px) {
  .ligne-charge { grid-template-columns: minmax(220px, 2.2fr) 1fr 1.4fr 0.9fr 1fr; grid-template-areas: "lib mont per type mois"; align-items: start; }
  .ligne-charge.ligne-auto { grid-template-columns: minmax(220px, 2.2fr) 1fr; }
}
.total-charges { text-align: right; font-weight: 650; padding: 10px 0 4px; border-top: 2px solid var(--trait); margin: 0; }
.tableau-scenarios tr.total th, .tableau-scenarios tr.total td { font-weight: 700; border-top: 2px solid var(--trait); }
.tableau-saisie td { min-width: 110px; }
.tableau-saisie td:first-child { min-width: 170px; }
.tableau-saisie input, .tableau-saisie select { min-height: 40px; }
[data-resultat].negatif, .valeur .negatif { color: var(--rouge-texte); }
.ligne-charge.ligne-b2b { grid-template-areas: "lib lib" "mont mois" "per per"; }
@media (min-width: 900px) {
  .ligne-charge.ligne-b2b { grid-template-columns: minmax(220px, 2.2fr) 1fr 1.4fr 1fr; grid-template-areas: "lib mont per mois"; }
}
.mission > summary { list-style: none; } .mission > summary::-webkit-details-marker { display: none; }
.tableau-saisie th:first-child { min-width: 210px; }
.section-grille { margin-top: 14px; }
.phrase-fixe { font-size: 0.9rem; color: var(--encre-2); background: var(--surface); border-left: 3px solid var(--trait); padding: 8px 10px; margin: 8px 0; }
.interrupteur { background: var(--surface); padding: 10px 12px; border-radius: 10px; }
.reperes { margin-top: 8px; }
.message-calcul:empty { display: none; }

/* Réglages : mails depuis le Gmail du coach */
.etapes-gmail { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.etapes-gmail strong { color: var(--encre); font-weight: 600; }
