/*
 * La Coloc — feuille de style unique (sous-lot 0.4).
 * Mobile d'abord. Jetons sur :root. Aucun style en ligne (CSP).
 * Réglages de confort portés par <html> : data-taille, data-animations.
 */

/* ------------------------------------------------------------------ police */
@font-face {
  font-family: "Nunito";
  src: url("../polices/nunito-latin-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ jetons */
:root {
  /* Couleurs de l'ambiance (aperçus) : crème, bois, vert profond, terre cuite. */
  --lc-creme: #f8f3ea;
  --lc-creme-fonce: #ece3d3;
  --lc-surface: #fffdf9;
  --lc-bordure: #e6dccb;
  --lc-encre: #123a48;
  --lc-texte: #24302f;
  --lc-texte-doux: #55605e;
  --lc-vert-profond: #154e5b;
  --lc-vert-profond-fonce: #0e3943;
  --lc-vert-clair: #e2efec;
  --lc-bois: #7e5226;
  --lc-terre-cuite: #b4461f;
  --lc-terre-cuite-vif: #e0653a;
  --lc-terre-cuite-clair: #fbe5d9;
  --lc-blanc: #ffffff;
  --lc-ok: #23663d;
  --lc-ko: #a12a1c;
  --lc-alerte: #7a5300;
  --lc-focus: #0b5cad;

  /* Typographie */
  --lc-police: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --lc-police-code: ui-monospace, Consolas, "Liberation Mono", monospace;
  --lc-texte-xs: 0.8125rem;
  --lc-texte-s: 0.9375rem;
  --lc-texte-m: 1rem;
  --lc-texte-l: 1.25rem;
  --lc-texte-xl: 1.625rem;
  --lc-texte-xxl: 2.125rem;

  /* Espacements, rayons, ombres */
  --lc-esp-1: 0.25rem;
  --lc-esp-2: 0.5rem;
  --lc-esp-3: 0.75rem;
  --lc-esp-4: 1rem;
  --lc-esp-5: 1.5rem;
  --lc-esp-6: 2rem;
  --lc-esp-7: 3rem;
  --lc-rayon-s: 0.5rem;
  --lc-rayon: 0.875rem;
  --lc-rayon-l: 1.25rem;
  --lc-ombre: 0 1px 2px rgb(18 58 72 / 0.06), 0 4px 14px rgb(18 58 72 / 0.07);
  --lc-cible: 44px; /* zone tactile minimale (UX-02) */

  /* Mise en page */
  --lc-largeur-texte: 46rem;
  --lc-largeur-jeu: 80rem;
  --lc-barre-onglets: 4.25rem;
  --lc-transition: 160ms ease;

  color-scheme: light;
}

/* Taille du texte : 3 crans (UX-04). */
html { font-size: 100%; }
html[data-taille="grand"] { font-size: 112.5%; }
html[data-taille="tres-grand"] { font-size: 125%; }

/* Réduction des animations : réglage du jeu ou du système. */
html[data-animations="reduites"] *,
html[data-animations="reduites"] *::before,
html[data-animations="reduites"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--lc-police);
  font-size: var(--lc-texte-m);
  line-height: 1.55;
  color: var(--lc-texte);
  background: var(--lc-creme);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
h1, h2, h3 { color: var(--lc-encre); line-height: 1.2; font-weight: 800; }
h1 { font-size: var(--lc-texte-xxl); margin: var(--lc-esp-4) 0; }
h2 { font-size: var(--lc-texte-xl); margin: var(--lc-esp-6) 0 var(--lc-esp-3); }
h3 { font-size: var(--lc-texte-l); margin: var(--lc-esp-5) 0 var(--lc-esp-2); }
p, ul, ol, dl { margin: 0 0 var(--lc-esp-4); }
a { color: var(--lc-vert-profond); text-underline-offset: 0.15em; }
a:hover { color: var(--lc-vert-profond-fonce); }
code { font-family: var(--lc-police-code); font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--lc-focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.lc-visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.lc-evitement {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--lc-surface); padding: var(--lc-esp-2) var(--lc-esp-4); font-weight: 700;
}
.lc-evitement:focus { left: var(--lc-esp-2); top: var(--lc-esp-2); }

/* ------------------------------------------------------------------ bandeaux */
.lc-bandeau-test, .lc-bandeau-maintenance {
  margin: 0; padding: var(--lc-esp-2) var(--lc-esp-4); text-align: center; font-size: var(--lc-texte-xs);
  color: var(--lc-blanc);
}
.lc-bandeau-test { background: var(--lc-terre-cuite); }
.lc-bandeau-maintenance { background: var(--lc-alerte); }

/* ------------------------------------------------------------------ en-tête */
.lc-entete {
  display: flex; align-items: center; gap: var(--lc-esp-3); flex-wrap: wrap;
  padding: var(--lc-esp-3) var(--lc-esp-4);
  background: var(--lc-surface); border-bottom: 1px solid var(--lc-bordure);
}
.lc-marque { margin: 0; line-height: 0; }
.lc-marque a { display: inline-block; padding: var(--lc-esp-1) 0; border-radius: var(--lc-rayon-s); }
.lc-logo { display: block; width: 8.5rem; height: auto; }
.lc-entete__outils { display: flex; align-items: center; gap: var(--lc-esp-2); margin-left: auto; }
.lc-temps-jeu { margin: 0; font-weight: 700; color: var(--lc-encre); }
.lc-joueur { display: flex; align-items: center; gap: var(--lc-esp-2); margin: 0; font-weight: 800; color: var(--lc-encre); }
.lc-joueur__avatar {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--lc-terre-cuite-clair); color: var(--lc-terre-cuite); font-weight: 800;
}

/* Téléphone : logo et outils sur une seule ligne ; le pseudo laisse place à l'avatar. */
@media (max-width: 29.99rem) {
  .lc-page-jeu .lc-entete { flex-wrap: nowrap; gap: var(--lc-esp-2); padding: var(--lc-esp-2) var(--lc-esp-3); }
  .lc-page-jeu .lc-logo { width: 6.75rem; }
  .lc-page-jeu .lc-entete__outils { gap: var(--lc-esp-1); }
  .lc-joueur__nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Indicateur d'enregistrement (UX-05) */
.lc-enregistrement {
  display: inline-flex; align-items: center; gap: var(--lc-esp-1); margin: 0;
  padding: var(--lc-esp-1) var(--lc-esp-3); border-radius: 999px; font-size: var(--lc-texte-xs); font-weight: 700;
  background: var(--lc-vert-clair); color: var(--lc-vert-profond);
}
.lc-enregistrement::before {
  content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor;
}
.lc-enregistrement[data-etat="en-cours"] { background: var(--lc-creme-fonce); color: var(--lc-bois); }
.lc-enregistrement[data-etat="en-cours"]::before { animation: lc-pulsation 900ms ease-in-out infinite alternate; }
.lc-enregistrement[data-etat="hors-ligne"] { background: var(--lc-terre-cuite-clair); color: var(--lc-terre-cuite); }
.lc-enregistrement[data-etat="erreur"] { background: #f9dcd8; color: var(--lc-ko); }
@keyframes lc-pulsation { from { opacity: 1; } to { opacity: 0.25; } }

/* ------------------------------------------------------------------ navigation à 4 onglets */
.lc-onglets-jeu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--lc-surface); border-top: 1px solid var(--lc-bordure);
  padding: var(--lc-esp-1) var(--lc-esp-2) calc(var(--lc-esp-1) + env(safe-area-inset-bottom));
  padding-left: calc(var(--lc-esp-2) + env(safe-area-inset-left));
  padding-right: calc(var(--lc-esp-2) + env(safe-area-inset-right));
}
.lc-onglets-jeu ul {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--lc-esp-1);
  list-style: none; margin: 0 auto; padding: 0; max-width: 36rem;
}
.lc-onglets-jeu a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--lc-barre-onglets); min-width: var(--lc-cible); padding: var(--lc-esp-1);
  border-radius: var(--lc-rayon); text-decoration: none; color: var(--lc-texte); font-size: var(--lc-texte-xs); font-weight: 700;
}
.lc-onglets-jeu a:hover { background: var(--lc-creme); color: var(--lc-encre); }
.lc-onglets-jeu a[aria-current="page"] { background: var(--lc-vert-clair); color: var(--lc-vert-profond); }
.lc-onglets-jeu svg { width: 1.75rem; height: 1.75rem; }
.lc-pastille {
  position: absolute; top: 0.4rem; right: calc(50% - 1.2rem); width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: var(--lc-terre-cuite-vif); border: 2px solid var(--lc-surface);
}
.lc-page-jeu { padding-bottom: calc(var(--lc-barre-onglets) + var(--lc-esp-4) + env(safe-area-inset-bottom)); }
/* Barre d'onglets fixe en bas (téléphone) : un élément atteint au clavier ou par défilement n'est jamais caché dessous (WCAG 2.4.11). */
html:has(.lc-page-jeu) { scroll-padding-bottom: calc(var(--lc-barre-onglets) + var(--lc-esp-3) + env(safe-area-inset-bottom)); }

@media (min-width: 60rem) {
  html:has(.lc-page-jeu) { scroll-padding-bottom: 0; }
  .lc-page-jeu .lc-entete { flex-wrap: nowrap; padding: var(--lc-esp-3) var(--lc-esp-5); }
  .lc-onglets-jeu {
    position: static; order: 2; border: 0; padding: 0; background: none; flex: 1 1 auto;
  }
  .lc-onglets-jeu ul { display: flex; gap: var(--lc-esp-2); max-width: none; margin: 0 0 0 var(--lc-esp-4); }
  .lc-onglets-jeu a {
    flex-direction: row; gap: var(--lc-esp-2); min-height: 3rem; padding: var(--lc-esp-2) var(--lc-esp-4);
    font-size: var(--lc-texte-m);
  }
  .lc-onglets-jeu svg { width: 1.6rem; height: 1.6rem; }
  .lc-pastille { top: 0.35rem; right: auto; left: 2.4rem; }
  .lc-entete__outils { order: 3; }
  .lc-page-jeu { padding-bottom: 0; }
  .lc-logo { width: 9.5rem; }
}

/* ------------------------------------------------------------------ contenu */
main { display: block; }
main:focus { outline: none; }
.lc-contenu { max-width: var(--lc-largeur-texte); margin: 0 auto; padding: var(--lc-esp-5) var(--lc-esp-4) var(--lc-esp-7); }
.lc-contenu--jeu { max-width: var(--lc-largeur-jeu); }
.lc-pied {
  text-align: center; font-size: var(--lc-texte-xs); color: var(--lc-texte-doux);
  padding: var(--lc-esp-4); border-top: 1px solid var(--lc-bordure);
}
.lc-pied p { margin: 0; }
.lc-aide, .version, .lc-reference { font-size: var(--lc-texte-s); color: var(--lc-texte-doux); }
.lc-aide { font-weight: 400; }

.lc-grille { display: grid; gap: var(--lc-esp-4); grid-template-columns: minmax(0, 1fr); }
.lc-grille > * { min-width: 0; }
@media (min-width: 48rem) {
  .lc-grille--2 { grid-template-columns: repeat(2, 1fr); }
  .lc-grille--jeu { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); align-items: start; }
}

/* ------------------------------------------------------------------ composants */

/* Boutons */
button, .lc-bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--lc-esp-2);
  min-height: var(--lc-cible); min-width: var(--lc-cible); padding: var(--lc-esp-2) var(--lc-esp-5);
  font: inherit; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: var(--lc-blanc); background: var(--lc-vert-profond);
  border: 2px solid var(--lc-vert-profond); border-radius: var(--lc-rayon);
  transition: background var(--lc-transition), color var(--lc-transition);
}
button:hover, .lc-bouton:hover { background: var(--lc-vert-profond-fonce); border-color: var(--lc-vert-profond-fonce); color: var(--lc-blanc); }
button:disabled, .lc-bouton[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.lc-bouton--large { width: 100%; padding: var(--lc-esp-3) var(--lc-esp-5); font-size: var(--lc-texte-l); }
.lc-bouton-secondaire, .lc-bouton--secondaire { color: var(--lc-vert-profond); background: var(--lc-surface); }
.lc-bouton-secondaire:hover, .lc-bouton--secondaire:hover { background: var(--lc-vert-clair); color: var(--lc-vert-profond-fonce); }
.lc-bouton--discret { color: var(--lc-vert-profond); background: transparent; border-color: transparent; padding-inline: var(--lc-esp-3); }
.lc-bouton--discret:hover { background: var(--lc-vert-clair); color: var(--lc-vert-profond-fonce); border-color: transparent; }
.lc-bouton svg { width: 1.4em; height: 1.4em; flex: none; }
.lc-actions { display: flex; flex-wrap: wrap; gap: var(--lc-esp-3); align-items: center; }

/* Panneau (carte) */
.lc-panneau {
  background: var(--lc-surface); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-l);
  box-shadow: var(--lc-ombre); padding: var(--lc-esp-5) var(--lc-esp-4);
}
.lc-panneau > :first-child { margin-top: 0; }
.lc-panneau > :last-child { margin-bottom: 0; }
.lc-panneau h2, .lc-panneau h3 { margin-top: var(--lc-esp-3); }
.lc-etiquette {
  display: inline-flex; align-items: center; gap: var(--lc-esp-2); margin: 0 0 var(--lc-esp-3);
  padding: var(--lc-esp-1) var(--lc-esp-3); border-radius: 999px; font-weight: 700; font-size: var(--lc-texte-s);
  background: var(--lc-terre-cuite-clair); color: var(--lc-terre-cuite);
}
.lc-etiquette--vert { background: var(--lc-vert-clair); color: var(--lc-vert-profond); }
.lc-etiquette svg { width: 1.2em; height: 1.2em; flex: none; }
.lc-icone { width: 1.25em; height: 1.25em; flex: none; }
.lc-chiffre { font-size: var(--lc-texte-xl); font-weight: 900; color: var(--lc-encre); margin: 0; }

/* Liste d'actions */
.lc-liste { list-style: none; margin: 0 0 var(--lc-esp-4); padding: 0; display: grid; gap: var(--lc-esp-2); }
.lc-liste a, .lc-liste button {
  display: flex; align-items: center; gap: var(--lc-esp-3); width: 100%; min-height: 3.25rem;
  padding: var(--lc-esp-2) var(--lc-esp-4); text-align: left; text-decoration: none; font-weight: 700;
  color: var(--lc-texte); background: var(--lc-surface); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon);
}
.lc-liste a:hover, .lc-liste button:hover { background: var(--lc-vert-clair); color: var(--lc-encre); border-color: var(--lc-bordure); }
.lc-liste a::after, .lc-liste button::after { content: "›"; margin-left: auto; font-size: 1.5rem; line-height: 1; color: var(--lc-vert-profond); }

/* Onglets de contenu (ARIA) */
.lc-onglets [role="tablist"] {
  display: flex; gap: var(--lc-esp-1); overflow-x: auto; border-bottom: 2px solid var(--lc-bordure); margin-bottom: var(--lc-esp-4);
}
.lc-onglets [role="tab"] {
  color: var(--lc-texte); background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: var(--lc-rayon-s) var(--lc-rayon-s) 0 0;
  padding: var(--lc-esp-2) var(--lc-esp-4); font-weight: 700;
}
.lc-onglets [role="tab"]:hover { background: var(--lc-vert-clair); color: var(--lc-encre); }
.lc-onglets [role="tab"][aria-selected="true"] { color: var(--lc-vert-profond); border-bottom-color: var(--lc-vert-profond); }

/* Fenêtre (dialog) */
.lc-fenetre {
  width: min(32rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0;
  border: 0; border-radius: var(--lc-rayon-l); background: var(--lc-surface); color: var(--lc-texte); box-shadow: 0 10px 40px rgb(0 0 0 / 0.25);
}
.lc-fenetre::backdrop { background: rgb(18 58 72 / 0.45); }
.lc-fenetre__corps { padding: var(--lc-esp-5); }
.lc-fenetre__titre { margin-top: 0; }
.lc-fenetre__fermer { position: absolute; top: var(--lc-esp-2); right: var(--lc-esp-2); }

/* Formulaires */
.lc-formulaire label, .lc-champ > label, .lc-champ > legend { display: block; font-weight: 700; margin-bottom: var(--lc-esp-1); color: var(--lc-encre); }
.lc-formulaire input[type="email"], .lc-formulaire input[type="password"], .lc-formulaire input[type="text"],
.lc-formulaire input[type="number"], .lc-formulaire select, .lc-formulaire textarea {
  width: 100%; max-width: 28rem; min-height: var(--lc-cible); font: inherit; padding: var(--lc-esp-2) var(--lc-esp-3);
  color: var(--lc-texte); background: var(--lc-blanc); border: 2px solid var(--lc-bois); border-radius: var(--lc-rayon-s);
}
.lc-formulaire [aria-invalid="true"] { border-color: var(--lc-ko); }
.lc-champ { margin: 0 0 var(--lc-esp-4); padding: 0; border: 0; }
.lc-choix { display: flex; flex-wrap: wrap; gap: var(--lc-esp-2); }
.lc-choix label {
  display: inline-flex; align-items: center; gap: var(--lc-esp-2); min-height: var(--lc-cible); padding: var(--lc-esp-2) var(--lc-esp-4);
  background: var(--lc-surface); border: 2px solid var(--lc-bordure); border-radius: var(--lc-rayon); font-weight: 700; cursor: pointer;
}
.lc-choix input { width: 1.25rem; height: 1.25rem; accent-color: var(--lc-vert-profond); }
.lc-choix label:has(input:checked) { border-color: var(--lc-vert-profond); background: var(--lc-vert-clair); }

/* Messages d'état */
.lc-message {
  border-left: 6px solid var(--lc-vert-profond); padding: var(--lc-esp-3) var(--lc-esp-4); margin: var(--lc-esp-4) 0;
  background: var(--lc-surface); border-radius: var(--lc-rayon-s);
}
.lc-message p, .lc-message ul { margin: var(--lc-esp-1) 0; }
.lc-message--succes { border-color: var(--lc-ok); }
.lc-message--erreur { border-color: var(--lc-ko); }
.lc-message--avertissement { border-color: var(--lc-alerte); }
.lc-ok { color: var(--lc-ok); font-weight: 700; }
.lc-ko { color: var(--lc-ko); font-weight: 700; }
.lc-alerte { color: var(--lc-alerte); font-weight: 700; }
.lc-ok::before { content: "✔ "; }
.lc-ko::before { content: "✖ "; }
.lc-alerte::before { content: "! "; }

/* Lecture audio (A-13) */
.lc-lecture { margin-left: var(--lc-esp-2); vertical-align: middle; }
.lc-lecture[aria-pressed="true"] { background: var(--lc-terre-cuite-clair); color: var(--lc-terre-cuite); }

/* Tableaux */
.lc-tableau-defilant { overflow-x: auto; margin: var(--lc-esp-4) 0; border-radius: var(--lc-rayon-s); }
.lc-tableau { border-collapse: collapse; width: 100%; background: var(--lc-surface); font-size: var(--lc-texte-s); }
.lc-tableau caption { text-align: left; font-weight: 700; padding: var(--lc-esp-2) 0; }
.lc-tableau th, .lc-tableau td { text-align: left; padding: var(--lc-esp-2); border-bottom: 1px solid var(--lc-bordure); vertical-align: top; }
.lc-tableau td:nth-child(2) { white-space: nowrap; }
.lc-liste-definitions { display: grid; grid-template-columns: auto 1fr; gap: var(--lc-esp-1) var(--lc-esp-4); }
.lc-liste-definitions dt { font-weight: 700; }
.lc-liste-definitions dd { margin: 0; }

/* Installation */
.lc-code {
  width: 100%; font-family: var(--lc-police-code); font-size: var(--lc-texte-xs); padding: var(--lc-esp-3);
  border: 2px solid var(--lc-bois); border-radius: var(--lc-rayon-s); background: var(--lc-blanc); color: var(--lc-texte);
}
.lc-cle-totp code {
  display: inline-block; font-size: var(--lc-texte-l); letter-spacing: 0.08em; padding: var(--lc-esp-2) var(--lc-esp-3);
  background: var(--lc-blanc); border: 2px dashed var(--lc-bois); border-radius: var(--lc-rayon-s);
}
.lc-coupe { word-break: break-all; }
details { margin: var(--lc-esp-4) 0; }
summary { cursor: pointer; font-weight: 700; min-height: var(--lc-cible); display: flex; align-items: center; }

/* ------------------------------------------------------------------ scène de l'appartement (2.2) */
.lc-panneau--scene { padding: 0; overflow: hidden; }
.lc-scene {
  position: relative; width: 100%; height: min(60vh, 34rem); min-height: 16rem;
  background: #f1e9db; touch-action: none; overflow: hidden; border-radius: var(--lc-rayon-l) var(--lc-rayon-l) 0 0;
  user-select: none; -webkit-user-select: none;
}
@media (min-width: 48rem) { .lc-scene { height: min(72vh, 44rem); } }
.lc-scene__toile { position: absolute; inset: 0; }
/* La toile est dessinée en pixels physiques (largeur × densité) et affichée à la taille CSS du conteneur. */
.lc-scene__toile canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; outline: none; }
.lc-scene__superposition { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lc-repere, .lc-bulle { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 50% 100%; will-change: transform; }
.lc-repere--icone {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--lc-vert-profond); color: var(--lc-blanc); border: 3px solid var(--lc-blanc); box-shadow: var(--lc-ombre);
}
.lc-repere--icone svg { width: 1.4rem; height: 1.4rem; }
.lc-repere--minuteur, .lc-bulle {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 999px; white-space: nowrap;
  background: var(--lc-surface); border: 1px solid var(--lc-bordure); box-shadow: var(--lc-ombre); font-weight: 800; font-size: var(--lc-texte-s);
}
.lc-repere--minuteur { color: var(--lc-terre-cuite); }
.lc-repere--minuteur svg { width: 1.25rem; height: 1.25rem; }
.lc-bulle { padding: 0.2rem 0.75rem 0.2rem 0.25rem; color: var(--lc-encre); font-size: var(--lc-texte-l); line-height: 1; }
.lc-bulle::after {
  content: ""; position: absolute; left: 50%; bottom: -0.45rem; width: 0.8rem; height: 0.8rem; margin-left: -0.4rem;
  background: var(--lc-surface); border-right: 1px solid var(--lc-bordure); border-bottom: 1px solid var(--lc-bordure); transform: rotate(45deg);
}
.lc-bulle__portrait { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; object-position: top; background: var(--lc-creme-fonce); }
.lc-scene__commandes { position: absolute; left: var(--lc-esp-3); bottom: var(--lc-esp-3); display: flex; gap: var(--lc-esp-2); }
.lc-scene__commandes .lc-bouton { padding-inline: var(--lc-esp-3); box-shadow: var(--lc-ombre); background: var(--lc-surface); }
.lc-scene__zoom { width: var(--lc-cible); padding: 0; font-size: 1.5rem; line-height: 1; }
.lc-scene__chargement {
  position: absolute; left: 0; right: 0; top: 45%; margin: 0; text-align: center; font-weight: 700; color: var(--lc-texte-doux);
}
.lc-scene[data-etat="erreur"] .lc-scene__chargement { color: var(--lc-ko); padding: 0 var(--lc-esp-4); }
.lc-scene[data-etat="erreur"] .lc-scene__commandes { display: none; }
.lc-scene__mesure { position: absolute; right: var(--lc-esp-2); top: var(--lc-esp-2); margin: 0; padding: 2px 8px; border-radius: var(--lc-rayon-s); background: rgb(0 0 0 / 0.7); color: #fff; font: 700 var(--lc-texte-xs)/1.4 monospace; pointer-events: none; }
.lc-scene-statut { min-height: 1.6em; margin: 0; padding: var(--lc-esp-3) var(--lc-esp-4); font-size: var(--lc-texte-s); color: var(--lc-texte-doux); }
.lc-scene-liste { list-style: none; margin: 0 0 var(--lc-esp-4); padding: 0; display: grid; gap: var(--lc-esp-3); }
.lc-scene-liste__item { padding: var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-creme); }
.lc-scene-liste__objet { margin: 0 0 var(--lc-esp-2); }
.lc-scene-liste__etat { color: var(--lc-texte-doux); font-weight: 400; }
.lc-scene-liste .lc-actions { gap: var(--lc-esp-2); }
.lc-scene-liste .lc-bouton { flex: 1 1 auto; padding-inline: var(--lc-esp-4); font-size: var(--lc-texte-s); }
.lc-scene-avatar { margin-top: var(--lc-esp-4); }
@media (min-width: 48rem) {
  .lc-grille--coloc { grid-template-columns: minmax(0, 7fr) minmax(18rem, 3fr); }
}

/* Afficher / masquer le mot de passe (0.2.1). */
.lc-afficher-mdp { margin-top: var(--lc-esp-1); }

/* Mini-économie (sous-lot 2.3) : argent, offres, achats, message des commandes. */
.lc-argent { margin: 0 0 var(--lc-esp-4); }
.lc-argent__chiffres { display: grid; gap: var(--lc-esp-2); margin: 0 0 var(--lc-esp-2); }
.lc-argent__chiffres div { display: flex; justify-content: space-between; gap: var(--lc-esp-3); padding: var(--lc-esp-2) var(--lc-esp-3); border-radius: var(--lc-rayon-s); background: var(--lc-creme); }
.lc-argent__chiffres dt { color: var(--lc-texte-doux); }
.lc-argent__chiffres dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-argent__disponible { background: var(--lc-vert-clair) !important; }
.lc-argent__disponible dt { color: var(--lc-texte); font-weight: 700; }
.lc-consigne { padding: var(--lc-esp-3); border-left: 4px solid var(--lc-vert-profond); background: var(--lc-creme); }
.lc-offres { list-style: none; margin: var(--lc-esp-4) 0; padding: 0; display: grid; gap: var(--lc-esp-3); }
.lc-offre article { height: 100%; padding: var(--lc-esp-4); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-offre h3 { margin: 0 0 var(--lc-esp-1); font-size: var(--lc-texte-l); }
.lc-offre__vendeur { margin: 0 0 var(--lc-esp-2); color: var(--lc-texte-doux); font-size: var(--lc-texte-s); }
.lc-offre__prix { margin: 0 0 var(--lc-esp-2); font-size: var(--lc-texte-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.lc-offre__caracteristiques { gap: var(--lc-esp-1); }
.lc-offre .lc-bouton { width: 100%; }
.lc-partie-message { min-height: 1.6em; margin: var(--lc-esp-3) 0; font-weight: 700; }
.lc-partie-message:empty { margin: 0; }
.lc-achats-liste { margin: 0 0 var(--lc-esp-4); padding-left: var(--lc-esp-4); display: grid; gap: var(--lc-esp-2); }
.lc-montant { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-montant--debit { color: var(--lc-terre-cuite); }
.lc-criteres { margin: var(--lc-esp-4) 0; padding: var(--lc-esp-4); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-creme); }
.lc-criteres h2 { margin-top: 0; }
.lc-criteres select { width: 100%; }
.lc-criteres-choisis { margin: 0 0 var(--lc-esp-3); font-weight: 700; }
.lc-page-suivi .lc-contenu { max-width: 76rem; }
.lc-preuves { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--lc-esp-1); }
.lc-preuve { padding-left: 1.4em; position: relative; white-space: nowrap; }
.lc-preuve::before { position: absolute; left: 0; font-weight: 800; }
.lc-preuve--ok::before { content: "✓"; color: var(--lc-ok); }
.lc-preuve--ko::before { content: "✗"; color: var(--lc-ko); }
.lc-preuve--aucune::before { content: "–"; color: var(--lc-texte-doux); }
@media (min-width: 40rem) {
  .lc-offres { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

/* ------------------------------------------------------------------ comptes enseignants (3.1) */
.lc-page-espace .lc-contenu { max-width: 64rem; }
.lc-barre-espace {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lc-esp-3);
  margin: 0 0 var(--lc-esp-5); padding: var(--lc-esp-2) var(--lc-esp-3); background: var(--lc-surface);
  border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon);
}
.lc-barre-espace ul { display: flex; flex-wrap: wrap; gap: var(--lc-esp-1) var(--lc-esp-4); list-style: none; margin: 0; padding: 0; }
.lc-barre-espace a { display: inline-flex; align-items: center; min-height: var(--lc-cible); font-weight: 700; }
.lc-barre-espace a[aria-current="page"] { color: var(--lc-terre-cuite); text-decoration-thickness: 3px; }
.lc-barre-espace__compte { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lc-esp-3); margin: 0; color: var(--lc-texte-doux); }
.lc-barre-espace__compte form { margin: 0; }
.lc-aide--champ { display: block; margin: 0 0 var(--lc-esp-1); }
.lc-form-action { display: inline-block; margin: 0; }
.lc-etapes { padding-left: var(--lc-esp-5); }
.lc-etapes > li { margin-bottom: var(--lc-esp-3); }
.lc-qr-cadre { margin: var(--lc-esp-3) 0; }
.lc-qr { display: block; width: 12.5rem; height: 12.5rem; max-width: 100%; border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); background: #fff; }
.lc-codes-secours { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--lc-esp-2) var(--lc-esp-5); padding-left: var(--lc-esp-5); }
.lc-codes-secours code { font-size: var(--lc-texte-l); letter-spacing: 0.06em; }
.lc-passkey__ou { margin: var(--lc-esp-3) 0 0; color: var(--lc-texte-doux); font-weight: 700; }
.lc-passkey__message:empty { display: none; }
.lc-passkeys { list-style: none; margin: 0 0 var(--lc-esp-4); padding: 0; display: grid; gap: var(--lc-esp-2); }
.lc-passkey-cle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lc-esp-2);
  padding: var(--lc-esp-2) var(--lc-esp-3); background: var(--lc-surface); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); }
.lc-secours { border-top: 1px solid var(--lc-bordure); padding-top: var(--lc-esp-2); }

/* ------------------------------------------------------------------ classes et sessions (3.3) */
.lc-fil { margin: 0 0 var(--lc-esp-2); font-size: var(--lc-texte-s); color: var(--lc-texte-doux); }
.lc-etat { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: var(--lc-texte-xs); font-weight: 800;
  border: 1px solid currentColor; vertical-align: middle; white-space: nowrap; }
.lc-etat--brouillon { color: var(--lc-texte-doux); }
.lc-etat--ouverte { color: var(--lc-ok); }
.lc-etat--suspendue { color: var(--lc-alerte); }
.lc-etat--cloturee { color: var(--lc-vert-profond); }
.lc-etat--archivee, .lc-etat--supprimee { color: var(--lc-texte-doux); border-style: dashed; }
.lc-choix--colonne { flex-direction: column; align-items: stretch; }
.lc-liste-actions { list-style: none; margin: 0 0 var(--lc-esp-4); padding: 0; display: grid; gap: var(--lc-esp-2); }
.lc-ligne-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lc-esp-2);
  padding: var(--lc-esp-2) var(--lc-esp-3); background: var(--lc-surface); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); }
.lc-liste-simple { padding-left: var(--lc-esp-5); }
.lc-liste-simple li { margin-bottom: var(--lc-esp-2); }
.lc-confirmation { margin: var(--lc-esp-4) 0; padding: var(--lc-esp-4); border: 2px solid var(--lc-alerte); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-confirmation h3 { margin-top: 0; }
.lc-danger summary { color: var(--lc-ko); }
.lc-bouton--danger { background: var(--lc-ko); border-color: var(--lc-ko); color: var(--lc-blanc); }
.lc-bouton--danger:hover { background: #7f1f14; }

/* ------------------------------------------------------------------ élèves (3.4) */
.lc-notes { margin: var(--lc-esp-1) 0 0; padding-left: var(--lc-esp-4); font-size: var(--lc-texte-s); }
.lc-actions-eleve { margin: 0; }
.lc-actions-eleve summary { min-height: var(--lc-cible); font-weight: 700; }
.lc-actions-eleve .lc-form-action, .lc-actions-eleve form { margin: var(--lc-esp-2) 0; }
.lc-invitation { margin: var(--lc-esp-4) 0; padding: var(--lc-esp-4); border: 2px dashed var(--lc-vert-profond); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-invitation .lc-qr { width: 15rem; height: 15rem; }
.lc-fiches { list-style: none; margin: 0 0 var(--lc-esp-5); padding: 0; display: grid; gap: var(--lc-esp-3); grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.lc-fiche { padding: var(--lc-esp-3) var(--lc-esp-4); border: 2px dashed var(--lc-bois); border-radius: var(--lc-rayon-s); background: var(--lc-blanc); break-inside: avoid; }
.lc-fiche__nom { margin: 0 0 var(--lc-esp-2); font-weight: 800; font-size: var(--lc-texte-l); }
.lc-fiche dl { display: grid; grid-template-columns: auto 1fr; gap: var(--lc-esp-1) var(--lc-esp-3); margin: 0; }
.lc-fiche dt { font-weight: 700; }
.lc-fiche dd { margin: 0; overflow-wrap: anywhere; }
.lc-fiche code { font-size: var(--lc-texte-l); letter-spacing: 0.06em; }
.lc-fiche__aide { margin: var(--lc-esp-2) 0 0; font-size: var(--lc-texte-xs); color: var(--lc-texte-doux); }
.lc-page-eleve .lc-contenu { max-width: 40rem; }

/* ------------------------------------------------------------------ console d'administration (3.5) */
.lc-page-console .lc-contenu { max-width: 76rem; }
.lc-console-nav ul { gap: var(--lc-esp-1) var(--lc-esp-3); }
.lc-fiche-compte { margin: var(--lc-esp-4) 0; padding: var(--lc-esp-4); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-fiche-compte h3 { margin-top: 0; overflow-wrap: anywhere; }
.lc-tableau td.lc-actions { display: table-cell; }
.lc-tableau td.lc-actions .lc-form-action { margin: 0 var(--lc-esp-1) var(--lc-esp-1) 0; }
@media (min-width: 48rem) {
  .lc-filtres { display: flex; flex-wrap: wrap; gap: 0 var(--lc-esp-4); align-items: flex-end; }
  .lc-filtres p { margin: 0 0 var(--lc-esp-3); }
}

/* ------------------------------------------------------------------ 4.4 : jeu de l'élève (missions, budget) */
.lc-grille--missions .lc-mission h1 { margin-top: var(--lc-esp-1); }
.lc-situation { font-size: var(--lc-texte-l); line-height: 1.5; }
.lc-message--info { border-color: var(--lc-focus); }
.lc-bandeau-bail form { display: inline-block; margin: var(--lc-esp-2) 0; }
.lc-pas-liste { margin: var(--lc-esp-4) 0; }
.lc-pas-liste summary { cursor: pointer; font-weight: 700; min-height: var(--lc-cible); display: flex; align-items: center; }
.lc-pas-ol { margin: var(--lc-esp-2) 0 0; padding-left: var(--lc-esp-5); display: grid; gap: var(--lc-esp-2); }
.lc-pas__etat { color: var(--lc-texte-doux); font-size: var(--lc-texte-s); white-space: nowrap; }
.lc-pas--faite .lc-pas__texte { color: var(--lc-texte-doux); }
.lc-pas--courante { font-weight: 700; }
.lc-pas--courante::marker { color: var(--lc-terre-cuite); }
.lc-retour { margin: var(--lc-esp-4) 0; }
.lc-retour .lc-form-action { margin-top: var(--lc-esp-2); }
.lc-etape { margin-top: var(--lc-esp-5); padding-top: var(--lc-esp-4); border-top: 1px solid var(--lc-bordure); scroll-margin-top: var(--lc-esp-6); }
.lc-etape h2 { margin-top: 0; }
.lc-documents h3 { margin-bottom: var(--lc-esp-2); }
.lc-document { margin: 0 0 var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); background: var(--lc-surface); }
.lc-document > summary { cursor: pointer; padding: var(--lc-esp-3) var(--lc-esp-4); font-weight: 700; min-height: var(--lc-cible); }
.lc-document__corps { padding: 0 var(--lc-esp-4) var(--lc-esp-3); }
.lc-document__corps h4 { margin: var(--lc-esp-3) 0 var(--lc-esp-1); font-size: var(--lc-texte-m); }
.lc-clauses { padding-left: var(--lc-esp-4); display: grid; gap: var(--lc-esp-2); }
.lc-tableau tfoot th, .lc-tableau tfoot td { font-weight: 700; border-top: 2px solid var(--lc-bordure); }
.lc-tableau--saisie select, .lc-tableau--saisie input[type="text"] { min-height: var(--lc-cible); max-width: 100%; }
.lc-tableau--saisie td:nth-child(2), .lc-tableau--libre td:nth-child(2) { white-space: normal; }
.lc-formulaire fieldset { min-inline-size: 0; }
.lc-saisie-euros { white-space: nowrap; }
.lc-formulaire .lc-saisie-euros input[type="text"] { width: 6.5rem; max-width: none; text-align: right; }
.lc-classement { margin: 0 0 var(--lc-esp-3); padding: var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); }
.lc-classement legend { font-weight: 700; padding: 0 var(--lc-esp-1); }
.lc-classement .lc-choix { display: inline-flex; margin: var(--lc-esp-1) var(--lc-esp-2) var(--lc-esp-1) 0; }
.lc-offres--choix .lc-offre { display: flex; gap: var(--lc-esp-3); align-items: flex-start; padding: var(--lc-esp-3); border: 2px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-offres--choix .lc-offre:has(input:checked) { border-color: var(--lc-vert-profond); background: var(--lc-vert-clair); }
.lc-offres--choix input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--lc-vert-profond); }
.lc-argent-rappel { padding: var(--lc-esp-2) var(--lc-esp-3); border-radius: var(--lc-rayon-s); background: var(--lc-vert-clair); }
.lc-brouillon-etat { min-height: 1.4em; margin: var(--lc-esp-1) 0 0; }
.lc-aides { margin: var(--lc-esp-5) 0 0; padding: var(--lc-esp-3) var(--lc-esp-4); border-radius: var(--lc-rayon-s); background: var(--lc-creme); }
.lc-aides > summary { cursor: pointer; font-weight: 700; min-height: var(--lc-cible); display: flex; align-items: center; }
.lc-aides__boutons { display: flex; flex-wrap: wrap; gap: var(--lc-esp-2); margin: var(--lc-esp-2) 0; }
.lc-aide-recue { padding: var(--lc-esp-2) var(--lc-esp-3); border-left: 4px solid var(--lc-bois); background: var(--lc-surface); }
.lc-missions { list-style: none; margin: 0 0 var(--lc-esp-5); padding: 0; display: grid; gap: var(--lc-esp-2); }
.lc-missions__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lc-esp-2); padding: var(--lc-esp-2) var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); }
.lc-missions__item > span:first-child { flex: 1 1 10rem; }
.lc-missions__item--courante { border-color: var(--lc-vert-profond); background: var(--lc-vert-clair); }
.lc-missions__item .lc-form-action { margin: 0; }
.lc-statut { display: inline-block; padding: 0 var(--lc-esp-2); border-radius: 999px; font-size: var(--lc-texte-xs); font-weight: 700; background: var(--lc-creme-fonce); }
.lc-statut--terminee { background: var(--lc-vert-clair); color: var(--lc-ok); }
.lc-statut--a_reprendre { background: var(--lc-terre-cuite-clair); color: var(--lc-ko); }
.lc-statut--verrouillee { color: var(--lc-texte-doux); }
.lc-journal { list-style: none; margin: 0 0 var(--lc-esp-3); padding: 0; display: grid; gap: var(--lc-esp-2); }
.lc-journal__item { padding: var(--lc-esp-2) var(--lc-esp-3); border-radius: var(--lc-rayon-s); background: var(--lc-creme); font-size: var(--lc-texte-s); }
.lc-journal__item--message { background: var(--lc-surface); border: 1px solid var(--lc-bordure); }
.lc-calendrier__ligne--fait td { color: var(--lc-texte-doux); }
.lc-calendrier__ligne--aujourdhui td:first-child { font-weight: 800; color: var(--lc-terre-cuite); }
/* Mutualisation (J1.4) : pastilles des assurés, répartition des cotisations. */
.lc-mutu { margin: var(--lc-esp-3) 0; }
.lc-mutu__svg { display: block; width: 100%; max-width: 30rem; height: auto; }
.lc-mutu__assure { fill: var(--lc-vert-profond); opacity: 0.8; }
.lc-mutu__assure--sinistre { fill: var(--lc-terre-cuite-vif); opacity: 1; animation: lc-mutu-pulse 1.6s ease-in-out 3; }
.lc-mutu__part--1 { fill: var(--lc-terre-cuite-vif); }
.lc-mutu__part--2 { fill: var(--lc-bois); }
.lc-mutu__part--3 { fill: var(--lc-vert-profond); }
.lc-mutu__part { animation: lc-mutu-apparition 1.2s ease-out both; }
.lc-mutu__part--2 { animation-delay: 0.6s; }
.lc-mutu__part--3 { animation-delay: 1.2s; }
.lc-mutu__legende { padding-left: var(--lc-esp-4); display: grid; gap: var(--lc-esp-1); font-size: var(--lc-texte-s); }
.lc-mutu__cle { display: inline-block; width: 0.9em; height: 0.9em; margin-right: var(--lc-esp-1); border-radius: 2px; vertical-align: -0.1em; }
.lc-mutu__cle--sinistre { background: var(--lc-terre-cuite-vif); border-radius: 50%; }
.lc-mutu__cle--2 { background: var(--lc-bois); }
.lc-mutu__cle--3 { background: var(--lc-vert-profond); }
@keyframes lc-mutu-apparition { from { opacity: 0; } to { opacity: 1; } }
@keyframes lc-mutu-pulse { 50% { opacity: 0.35; } }
/* Preuves (enseignant) */
.lc-niveau { display: inline-block; padding: 0 var(--lc-esp-2); border-radius: 999px; font-size: var(--lc-texte-xs); font-weight: 700; background: var(--lc-creme-fonce); white-space: nowrap; }
.lc-niveau--en-cours { background: var(--lc-creme); color: var(--lc-alerte); }
.lc-niveau--maitrise, .lc-niveau--consolide { background: var(--lc-vert-clair); color: var(--lc-ok); }
.lc-niveau--a-construire { background: var(--lc-terre-cuite-clair); color: var(--lc-ko); }
.lc-niveau--non-observe { color: var(--lc-texte-doux); }
.lc-justification { margin: var(--lc-esp-1) 0 0; padding: var(--lc-esp-2); border-left: 3px solid var(--lc-bois); background: var(--lc-creme); white-space: pre-wrap; }
.lc-examen { margin-top: var(--lc-esp-2); }
.lc-examen select, .lc-examen input { min-height: var(--lc-cible); }

/* Lot 5 — introduction guidée (5.1) : guide, personnages, gestes, historique. */
.lc-guide { margin: 0 0 var(--lc-esp-3); padding: var(--lc-esp-2) var(--lc-esp-3); border: 2px solid var(--lc-vert-profond); border-radius: var(--lc-rayon); background: var(--lc-vert-clair); }
.lc-guide > summary { font-weight: 800; color: var(--lc-vert-profond); cursor: pointer; min-height: var(--lc-cible); display: flex; align-items: center; }
.lc-guide p { margin: var(--lc-esp-1) 0; }
.lc-guide__geste { font-weight: 700; }
.lc-guide--onglet { margin-bottom: var(--lc-esp-4); }
.lc-onglet-guide { outline: 3px solid var(--lc-terre-cuite-vif); outline-offset: 2px; border-radius: var(--lc-rayon-s); }
.lc-avatars { min-inline-size: 0; }
.lc-avatars__grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: var(--lc-esp-2); }
.lc-avatar { position: relative; }
.lc-avatar__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc-avatar__carte { display: flex; flex-direction: column; align-items: center; gap: var(--lc-esp-1); min-height: var(--lc-cible); padding: var(--lc-esp-1); border: 2px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); cursor: pointer; }
.lc-avatar__portrait { display: block; width: auto; height: 64px; }
.lc-avatar__radio:checked + .lc-avatar__carte { border-color: var(--lc-vert-profond); background: var(--lc-vert-clair); box-shadow: 0 0 0 2px var(--lc-vert-profond); }
.lc-avatar__radio:focus-visible + .lc-avatar__carte { outline: 3px solid var(--lc-focus); outline-offset: 2px; }
.lc-avatar__pied { display: none; width: 64px; height: 88px; background-repeat: no-repeat; background-position: 0 0; background-size: 700% 200%; }
.lc-pied--a03, .lc-pied--a06 { background-size: 700% 300%; }
.lc-avatar__radio:checked + .lc-avatar__carte .lc-avatar__pied { display: block; }
.lc-pied--a01 { background-image: url("../scene/personnages/a01.webp"); }
.lc-pied--a02 { background-image: url("../scene/personnages/a02.webp"); }
.lc-pied--a03 { background-image: url("../scene/personnages/a03.webp"); }
.lc-pied--a04 { background-image: url("../scene/personnages/a04.webp"); }
.lc-pied--a05 { background-image: url("../scene/personnages/a05.webp"); }
.lc-pied--a06 { background-image: url("../scene/personnages/a06.webp"); }
.lc-pied--a07 { background-image: url("../scene/personnages/a07.webp"); }
.lc-pied--a08 { background-image: url("../scene/personnages/a08.webp"); }
.lc-pied--a09 { background-image: url("../scene/personnages/a09.webp"); }
.lc-pied--a10 { background-image: url("../scene/personnages/a10.webp"); }
.lc-pied--a11 { background-image: url("../scene/personnages/a11.webp"); }
.lc-pied--a12 { background-image: url("../scene/personnages/a12.webp"); }
.lc-gestes { padding-left: var(--lc-esp-4); display: grid; gap: var(--lc-esp-2); }
.lc-geste--fait { color: var(--lc-texte-doux); }
.lc-geste__ok { font-weight: 800; color: var(--lc-ok); }
.lc-decisions { padding-left: var(--lc-esp-4); display: grid; gap: var(--lc-esp-3); }
.lc-decision p { margin: 0; }
.lc-decision__reponse { color: var(--lc-texte-doux); font-size: var(--lc-texte-s); }
.lc-liens-jeu { margin-top: var(--lc-esp-3); }
.lc-facultatives { margin-top: var(--lc-esp-3); }
.lc-facultatives > summary { font-weight: 700; cursor: pointer; min-height: var(--lc-cible); display: flex; align-items: center; }
.lc-dossier-essai { padding: var(--lc-esp-2) var(--lc-esp-3); border: 2px dashed var(--lc-bois); border-radius: var(--lc-rayon); background: var(--lc-creme); }
.lc-mention-legale { padding: var(--lc-esp-2); border: 1px solid var(--lc-encre); }
.lc-etiquette-produit dd { overflow-wrap: anywhere; }

/* Rangement des courses (5.2) : glisser-déposer, la liste de choix reste disponible. */
.lc-rangement__produits, .lc-rangement__zones, .lc-rangement__contenu { list-style: none; margin: 0; padding: 0; }
.lc-rangement__produits { display: grid; gap: var(--lc-esp-2); margin-bottom: var(--lc-esp-3); }
.lc-rangement__produit { display: grid; gap: var(--lc-esp-1); padding: var(--lc-esp-2); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon-s); background: var(--lc-surface); touch-action: none; cursor: grab; }
.lc-rangement__produit select { width: 100%; min-height: var(--lc-cible); }
.lc-rangement__produit--deplace { position: relative; z-index: 5; box-shadow: var(--lc-ombre); cursor: grabbing; opacity: 0.92; }
.lc-rangement__produit--range { background: var(--lc-vert-clair); }
.lc-rangement__zones { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lc-esp-1); padding: var(--lc-esp-1) 0; margin-bottom: var(--lc-esp-2); background: var(--lc-surface); }
.lc-rangement__zone { min-height: 4rem; padding: var(--lc-esp-1); border: 2px dashed var(--lc-bois); border-radius: var(--lc-rayon); background: var(--lc-creme); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: var(--lc-texte-s); }
.lc-rangement__nombre { font-weight: 800; font-size: var(--lc-texte-l); }
.lc-rangement__lieu { display: block; font-size: var(--lc-texte-s); color: var(--lc-vert-profond); font-weight: 700; }
.lc-rangement__zone--congelateur { border-color: var(--lc-encre); }
.lc-rangement__zone--refrigerateur { border-color: var(--lc-vert-profond); }
.lc-rangement__titre { font-weight: 800; overflow-wrap: anywhere; }
.lc-etiquette-ouvert { font-size: var(--lc-texte-xs); font-weight: 700; color: var(--lc-terre-cuite); text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .lc-rangement__produit--deplace { box-shadow: none; } }

/* J3–J4 (5.3, 5.4) : comparateur, déclaration, fin de l'histoire, rattrapage conseillé. */
.lc-comparateur, .lc-declaration { margin: var(--lc-esp-3) 0; padding: var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-comparateur table td { text-align: right; }
.lc-fin-histoire { margin: 0 0 var(--lc-esp-4); padding: var(--lc-esp-3); border: 2px solid var(--lc-bois); border-radius: var(--lc-rayon); background: var(--lc-creme); }
.lc-fin-histoire > summary { font-weight: 800; font-size: var(--lc-texte-l); cursor: pointer; min-height: var(--lc-cible); display: flex; align-items: center; }
.lc-conseille { display: inline-block; padding: 0 var(--lc-esp-2); border-radius: 999px; font-size: var(--lc-texte-xs); font-weight: 700; background: var(--lc-terre-cuite-clair); color: var(--lc-ko); }
.lc-suivi-colis { font-weight: 700; color: var(--lc-vert-profond); }

/* Conclusion (5.5) : stratégies, aménagement, fiche de synthèse, bilan. */
.lc-strategies, .lc-journal-decisions, .lc-amenagement { margin: var(--lc-esp-3) 0; padding: var(--lc-esp-3); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); }
.lc-strategies__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--lc-esp-3); }
.lc-synthese { display: grid; gap: var(--lc-esp-5); }
.lc-synthese__fiche { padding: var(--lc-esp-4); border: 1px solid var(--lc-bordure); border-radius: var(--lc-rayon); background: var(--lc-surface); max-width: var(--lc-largeur-texte); }
.lc-synthese__section h3 { margin-top: var(--lc-esp-3); color: var(--lc-vert-profond); }
.lc-synthese__pied { margin-top: var(--lc-esp-4); font-size: var(--lc-texte-s); color: var(--lc-texte-doux); }

/* Impression : pas de navigation ni de bandeau de démonstration interactif. */
@media print {
  .lc-onglets-jeu, .lc-entete__outils, .lc-evitement, .lc-barre-espace, .lc-sans-impression, .lc-fil { display: none !important; }
  .lc-page-fiches .lc-contenu { max-width: none; padding: 0; }
  .lc-page-fiches h1 { display: none; }
  .lc-fiches { grid-template-columns: 1fr 1fr; }
  body { background: #fff; }
  .lc-onglets-jeu, .lc-entete, .lc-pied, [data-imprimer] { display: none !important; }
  .lc-synthese__fiche { border: 0; padding: 0; max-width: none; break-after: page; font-size: 10.5pt; }
  .lc-synthese__fiche:last-child { break-after: auto; }
  .lc-synthese__fiche details > summary { list-style: none; font-weight: 700; }
  .lc-page-synthese h1 { display: none; }
  .lc-bilan { border: 0; }
}
