/* Charte Kayé (cf. cahier-journal/assets/cahier-journal-v2.css du site) :
   fond crème, titres Geologica bleu nuit, texte Inter brun, cartes blanches
   bordées de sable, dégradé pêche réservé à la navigation (comme le menu du site). */

@font-face { font-family: "Geologica"; font-weight: 600; font-display: swap; src: url("polices/geologica-semibold-latin.woff2") format("woff2"); }
@font-face { font-family: "Geologica"; font-weight: 900; font-display: swap; src: url("polices/geologica-black-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("polices/inter-regular-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("polices/inter-medium-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("polices/inter-semibold-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("polices/inter-bold-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --peche: #F0774F;
  --peche-profond: #C85A38;
  --peche-clair: #FF9777;
  --brou: #3D2B26;
  --brou-doux: #6B5147;
  --secondaire: #A85F53;
  --creme: #FBF6F0;
  --carte: #FFFFFF;
  --sable: #E9DED2;
  --sable-doux: #F3EBE1;
  --nuit: #000F44;
  --titre: "Geologica", "Segoe UI", sans-serif;
  --corps: "Inter", "Segoe UI", system-ui, sans-serif;
  --colonne: 4.75rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--brou);
  font: 400 1rem/1.5 var(--corps);
}

button { font: inherit; color: inherit; }
a { color: var(--peche-profond); }

:focus-visible { outline: 3px solid var(--peche); outline-offset: 2px; }

[hidden] { display: none !important; }

/* ---------- En-tête ---------- */

.tete {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: env(safe-area-inset-top);
  background: var(--creme);
  border-bottom: 1px solid var(--sable);
  color: var(--brou);
}

.barre-semaine {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
}

/* Comme le site : burger et retour à gauche, titre aligné à gauche, actions à droite. */
.burger { order: 0; }
.retour { order: 1; }
.semaine {
  order: 2;
  flex: 1;
  min-width: 0;
  margin: 0 0 0 0.25rem;
  text-align: left;
  font: 900 1.25rem/1.2 var(--titre);
  letter-spacing: -0.015em;
  color: var(--brou);
}
.barre-semaine > .icone:not(.burger):not(.retour) { order: 3; }
.semaine small {
  display: block;
  margin-top: 0.125rem;
  font: 500 0.8125rem/1.2 var(--corps);
  letter-spacing: 0;
  color: var(--brou-doux);
}

.icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.625rem;
  height: 2.625rem;
  padding: 0;
  border: 1px solid var(--sable);
  border-radius: 10px;
  background: transparent;
  color: var(--brou-doux);
  cursor: pointer;
}
.icone:disabled { opacity: 0.35; cursor: default; }
.icone svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.actualiser.tourne svg { animation: tourner 1s linear infinite; }

@keyframes tourner { to { transform: rotate(360deg); } }

/* Jours, niveaux et onglets de vue : pastille pêche pour le choix courant. */

.jours { display: flex; gap: 0.25rem; padding: 0 0.75rem 0.625rem; }

.jour {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.25rem 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--brou);
  cursor: pointer;
  line-height: 1.15;
}
.jour span {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brou-doux);
}
.jour strong { font: 900 1.25rem/1.15 var(--titre); }
.jour.vide { opacity: 0.45; }
.jour.aujourdhui strong { color: var(--peche-profond); }
.jour.choisi {
  background: var(--peche);
  color: #fff;
  box-shadow: 0 2px 6px rgba(240, 119, 79, 0.35);
}
.jour.choisi span,
.jour.choisi strong { color: #fff; }

.colonnes { flex-wrap: wrap; }
.colonnes .jour { flex: 1 0 2.5rem; min-height: 2.5rem; }
.colonnes .jour strong { font: 600 0.9375rem/1.2 var(--corps); }

.alerte {
  padding: 0.625rem 1rem;
  background: var(--sable-doux);
  border-bottom: 1px solid var(--sable);
  font-size: 0.9375rem;
}

/* ---------- Contenu ---------- */

.feuille {
  min-height: 70vh;
  padding: 0.75rem 1rem 1.5rem;
}

.date {
  margin: 0.5rem 0 0.875rem;
  font: 900 1.625rem/1.2 var(--titre);
  letter-spacing: -0.015em;
  color: var(--brou);
}

.rien { margin: 1rem 0; color: var(--brou-doux); }

/* Événements du jour en haut du cahier journal, couleurs des badges du site. */
.evenements-jour {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: -0.375rem 0 0.875rem;
}
.evenement-jour {
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
  background: #C9EAE0;
  color: #000000;
}
.evenement-jour.ferie { background: #E0E0E0; color: #555555; }
.evenement-jour.anniversaire { background: #FCE8B0; color: #6B4E00; }
.evenement-jour.ferie,
.evenement-jour.vacances {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cartes : séances, créneaux, élèves, lignes de liste. */

.seance {
  position: relative;
  margin-bottom: 0.625rem;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--sable);
  border-radius: 11px;
  background: var(--carte);
  box-shadow: 0 1px 2px rgba(61, 43, 38, 0.06);
}
.seance:has(> .horaire),
.seance:has(> summary > .horaire) { padding-left: var(--colonne); }

.seance > summary { list-style: none; cursor: pointer; }
.seance > summary::-webkit-details-marker { display: none; }

/* Colonne de gauche : heure, date ou niveau, en pavé sable comme les dates du Planner. */
.horaire {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  width: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.375rem 0.125rem;
  border-radius: 8px;
  background: var(--sable-doux);
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.debut { font: 900 0.9375rem/1.2 var(--titre); color: var(--brou); overflow-wrap: anywhere; }
.fin { font-size: 0.75rem; color: var(--brou-doux); }

.resume { position: relative; padding-right: 1.5rem; }

summary .resume::after {
  content: "";
  position: absolute;
  top: 0.375rem;
  right: 0.125rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--peche);
  border-bottom: 2px solid var(--peche);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
details[open] > summary .resume::after { transform: translateY(0.25rem) rotate(225deg); }

.pastille {
  display: inline-block;
  margin: 0 0.25rem 0.125rem 0;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.resume h2 {
  margin: 0.125rem 0 0;
  font: 600 1.0625rem/1.3 var(--titre);
  color: var(--brou);
}

.faite { display: block; margin-top: 0.125rem; font-size: 0.8125rem; color: var(--secondaire); font-weight: 500; }

/* Pauses : simple ligne, sans carte. */
.seance.pause {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  color: var(--brou-doux);
}
.pause .horaire { top: 0.25rem; background: transparent; }
.pause .debut { font: 500 0.875rem/1.2 var(--corps); color: var(--brou-doux); }
.pause .fin { display: none; }
.titre-pause { margin: 0; font-size: 0.9375rem; }

.detail { padding-top: 0.5rem; }

.bloc { margin-top: 0.875rem; }
.bloc h3 {
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--peche-profond);
}

.atelier { padding: 0.5rem 0; border-top: 1px solid var(--sable-doux); }
.atelier h4 { margin: 0; font: 600 1rem/1.3 var(--titre); color: var(--brou); }
.encadrement { margin: 0; font-size: 0.875rem; color: var(--brou-doux); }

.liste { margin: 0; padding-left: 1.125rem; }

.competences { margin: 0; padding: 0; list-style: none; }
.competences li { margin-bottom: 0.5rem; }
.competences span:last-child { display: block; font-size: 0.9375rem; }

.texte-simple { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.riche { overflow-wrap: anywhere; }
.riche > :first-child { margin-top: 0; }
.riche > :last-child { margin-bottom: 0; }
.riche p { margin: 0 0 0.5rem; }
.riche ul, .riche ol { margin: 0 0 0.5rem; padding-left: 1.125rem; }
.riche img { max-width: 100%; height: auto; }
.riche table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.riche td, .riche th { min-width: 6rem; padding: 0.25rem 0.5rem; border: 1px solid var(--sable); vertical-align: top; overflow-wrap: normal; }

/* ---------- Pied et lien ---------- */

.pied {
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  color: var(--brou-doux);
}
.pied p { margin: 0 0 0.25rem; }

.lien {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Appairage ---------- */

.appairage {
  max-width: 30rem;
  margin: 0 auto;
  padding: calc(3rem + env(safe-area-inset-top)) 1.25rem 2rem;
}
.appairage h1 { margin: 0 0 1.5rem; }
.logo { display: block; width: 5rem; height: 5rem; border-radius: 18px; box-shadow: 0 3px 10px rgba(90, 40, 20, 0.22); }
.appairage p { margin: 0 0 1.25rem; }

.action {
  width: 100%;
  min-height: 3.25rem;
  border: 0;
  border-radius: 10px;
  background: var(--peche-clair);
  box-shadow: 0 2px 6px rgba(240, 119, 79, 0.35);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.action:active { background: var(--peche-profond); }
.action:disabled { opacity: 0.5; }

.viseur { margin-bottom: 1.25rem; overflow: hidden; border-radius: 16px; background: var(--brou); }
.viseur video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

.consigne-erreur { margin-top: 1rem; color: #B3261E; }

/* ---------- Emploi du temps ---------- */

.repartition { margin: 0.25rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--brou-doux); }

/* ---------- Calendrier ---------- */

.mois {
  width: 100%;
  margin: 0.25rem 0 0.75rem;
  padding: 0.375rem;
  border: 1.5px solid var(--sable);
  border-radius: 16px;
  background: var(--carte);
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.mois th { padding: 0.25rem 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; color: var(--brou-doux); }
.mois td { position: relative; height: 2.5rem; padding: 0; }
.numero { display: inline-block; width: 2rem; line-height: 2rem; border-radius: 50%; color: var(--brou); font-weight: 500; }
.mois .vacances .numero { background: var(--sable-doux); }
.mois .ferie .numero { background: var(--peche); color: #fff; font-weight: 700; }
.mois .aujourdhui .numero { outline: 2px solid var(--peche-profond); outline-offset: -2px; font-weight: 700; }
.points {
  position: absolute;
  right: 0;
  bottom: 0.0625rem;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 0.125rem;
}
.point { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--peche); }

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--brou-doux);
}
.legende span { display: inline-flex; align-items: center; gap: 0.3125rem; }
.legende i { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.marque-ferie { background: var(--peche); }
.marque-vacances { background: var(--sable); }
.legende .marque-evenement { width: 0.375rem; height: 0.375rem; background: var(--peche); }

/* ---------- Ma classe ---------- */

.liste-classe { padding-top: 1rem; }
.personnes { margin: 0; padding: 0; list-style: none; }
.personne { padding: 0.375rem 0; border-top: 1px solid var(--sable-doux); overflow-wrap: anywhere; }
.personne:first-child { border-top: 0; }
.personne p { margin: 0; }
.personne a { display: block; min-height: 2rem; line-height: 2rem; }
.liste-champs { margin: 0; padding: 0; list-style: none; }

/* ---------- Listes, filtres, programmations ---------- */

.ligne { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.titre-section { margin: 0 0 0.625rem; font: 900 1.125rem/1.2 var(--titre); color: var(--brou); }
.bloc-liste { margin-bottom: 1.5rem; }
.sous-date { margin: -0.5rem 0 1rem; font-size: 0.875rem; color: var(--secondaire); font-weight: 500; }

.filtres { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1.25rem; }
.filtre { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; font-size: 0.8125rem; font-weight: 600; color: var(--nuit); }
.filtre select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.375rem;
  border: 1px solid var(--sable);
  border-radius: 8px;
  background: var(--carte);
  color: var(--nuit);
  font: 600 0.9375rem var(--corps);
}

.case-prog {
  margin-bottom: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1.5px solid var(--sable);
  border-left: 4px solid var(--sable);
  border-radius: 11px;
  background: var(--carte);
}
.competences-case { margin-top: 0.375rem; font-size: 0.875rem; color: var(--brou-doux); }
.competences-case summary { min-height: 2rem; line-height: 2rem; cursor: pointer; color: var(--peche-profond); font-weight: 600; }

/* ---------- Planner ---------- */

.bilan-planner { margin-bottom: 1.25rem; }
.bilan-texte { margin: 0; font-weight: 600; color: var(--secondaire); }
.jauge { height: 0.5rem; margin-top: 0.375rem; border-radius: 999px; background: var(--sable-doux); overflow: hidden; }
.jauge-remplie { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--peche-clair), var(--peche-profond)); }
.categorie-planner .debut { font-size: 0.875rem; }
.evenements-planner { margin: 0.625rem 0 0; padding: 0; list-style: none; }
.evenement-planner { padding: 0.5rem 0; border-top: 1px solid var(--sable-doux); }
.evenement-planner p { margin: 0; }
.evenement-planner .quand { font-size: 0.8125rem; color: var(--secondaire); font-weight: 500; }
.evenement-planner .quoi { font-weight: 600; color: var(--brou); }

/* ---------- Évaluations ---------- */

.notes { margin: 0; padding: 0; list-style: none; }
.notes li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3125rem 0; border-top: 1px solid var(--sable-doux); }
.notes li:first-child { border-top: 0; }
.notes strong { flex: none; color: var(--brou); }
.perimetre { margin: 0 0 0.5rem; font: 600 1rem/1.35 var(--titre); color: var(--brou); }
.rien-groupe { margin: 0; color: var(--brou-doux); }
.feuille > .bloc {
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--sable);
  border-radius: 11px;
  background: var(--carte);
}

/* ---------- Registre d'appel ---------- */

.compteurs { margin: 0 0 0.375rem; font-size: 0.9375rem; color: var(--secondaire); font-weight: 500; }
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.tuile { display: flex; flex-direction: column; padding: 0.625rem 0.75rem; border: 1.5px solid var(--sable); border-radius: 11px; background: var(--carte); }
.tuile span { font-size: 0.8125rem; color: var(--brou-doux); }
.tuile strong { font: 900 1.375rem/1.2 var(--titre); color: var(--brou); }

/* ---------- Menu burger : panneau au dégradé du menu du site ---------- */

.burger {
  background: var(--carte);
  color: var(--nuit);
  box-shadow: 0 1px 3px rgba(61, 43, 38, 0.12);
}

body.menu-ouvert { overflow: hidden; }

.menu-fond {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(61, 43, 38, 0.4);
}

.menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: min(18rem, 84vw);
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.75rem calc(1rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: linear-gradient(165deg, var(--peche-clair) 0%, var(--peche) 62%, var(--peche-profond) 100%);
  box-shadow: 4px 0 24px rgba(90, 40, 20, 0.28);
  animation: entree-menu 0.18s ease-out;
}

@keyframes entree-menu { from { transform: translateX(-100%); } }

.menu-tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.menu-logo { width: 9.5rem; height: auto; margin: 0.25rem 0 0 0.375rem; }
.menu-fermer { border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.menu-lien {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #fff;
  font: 500 1rem/1.2 var(--corps);
  text-align: left;
  cursor: pointer;
}
.menu-lien.choisi {
  background: rgba(255, 255, 255, 0.94);
  color: var(--peche-profond);
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(90, 40, 20, 0.22);
}
.menu-lien svg,
.menu-fermer svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Cartes reprises du site ---------- */

/* Séance du cahier journal : bandeau de couleur d'étiquette en haut. */
.seance.carte-bandeau { padding: 0; overflow: hidden; }
.bandeau { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; font-weight: 700; }
.bandeau.vide { height: 0.375rem; padding: 0; background: var(--sable-doux); }
.carte-bandeau .resume { padding: 0.625rem 2.25rem 0.75rem 0.875rem; }
.carte-bandeau summary .resume::after { top: 1rem; right: 0.875rem; }
.carte-bandeau > .detail { padding: 0 0.875rem 0.875rem; }
.heures { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--secondaire); font-variant-numeric: tabular-nums; }
.heures .duree { font-weight: 500; }

/* Séance faite : grisée comme sur le site (seance-realisee), détail ouvert lisible. */
.carte-bandeau.realisee > .bandeau,
.carte-bandeau.realisee > .resume,
.carte-bandeau.realisee > summary {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* Créneau d'emploi du temps : bloc plein à la couleur de la matière. */
.seance.creneau-couleur { border-color: transparent; padding: 0.625rem 0.875rem; }
.creneau-couleur h2 { margin: 0; font: 700 1rem/1.3 var(--corps); color: inherit; }
.creneau-couleur .heures { margin: 0.125rem 0 0; color: inherit; opacity: 0.8; font-weight: 500; }
.creneau-couleur .repartition { color: inherit; opacity: 0.8; }

/* Créneau du registre d'appel : en-tête dégradé, compteurs, lignes teintées. */
.carte-creneau { margin-bottom: 0.875rem; overflow: hidden; border: 1.5px solid var(--sable); border-radius: 16px; background: var(--carte); }
.carte-creneau h3 {
  margin: 0;
  padding: 0.75rem 0.875rem 0.5rem;
  background: linear-gradient(180deg, var(--sable-doux) 0%, transparent 100%);
  font: 900 1.125rem/1.2 var(--titre);
  color: var(--brou);
}
.corps-creneau { padding: 0 0.875rem 0.875rem; }
.tuiles-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 0.75rem; }
.eleves-appel { margin: 0; padding: 0; list-style: none; }
.eleve-appel {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--sable);
  border-radius: 10px;
  font-size: 0.9375rem;
}
.eleve-appel strong { flex: none; font-weight: 600; text-align: right; }
.eleve-appel.absent { background: #FDECEA; border-color: #F4C7BF; }
.eleve-appel.retard { background: #FFF4E0; border-color: #F3D9A8; }
.eleve-appel.exclu { background: var(--sable-doux); }

/* Événement du Planner : carré de date à la couleur de la catégorie. */
.evenement-planner { display: flex; gap: 0.75rem; align-items: flex-start; }
.carre-date {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  min-height: 3.25rem;
  border-radius: 10px;
  background: var(--sable-doux);
  color: var(--brou);
  line-height: 1.1;
}
.carre-date strong { font: 900 1.125rem/1.1 var(--titre); }
.carre-date span { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; }
.texte-evenement { min-width: 0; }

/* Réglages : filet au-dessus dans le menu, bouton de déliaison en rouge. */
.menu-reglages { margin-top: 0.5rem; position: relative; }
.menu-reglages::before {
  content: "";
  position: absolute;
  top: -0.375rem;
  right: 0.5rem;
  left: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}
.reglage-texte { margin: 0 0 0.75rem; }
.action-danger { background: #B3261E; box-shadow: 0 2px 6px rgba(179, 38, 30, 0.3); }
.action-danger:active { background: #8C1D17; }

/* Badge de niveau de Ma classe : même palette que le site (admin/assets/admin.css). */
.badge-niveau {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.125rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.badge-niveau-0 { background: #E4EEFA; color: #2A78D6; }
.badge-niveau-1 { background: #E0F3E0; color: #008300; }
.badge-niveau-2 { background: #FBE9F0; color: #C94D80; }
.badge-niveau-3 { background: #FCF0DA; color: #9A7300; }
.badge-niveau-4 { background: #E0F5EC; color: #14875F; }
.badge-niveau-5 { background: #FBE7DE; color: #C9532A; }

/* Statistiques d'appel : les 9 colonnes du cahier d'appel, mêmes teintes que le site. */
.section-stats { margin-bottom: 1.75rem; }
.filtre input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.375rem;
  border: 1px solid var(--sable);
  border-radius: 8px;
  background: var(--carte);
  color: var(--nuit);
  font: 600 0.9375rem var(--corps);
}
.officielles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.officielle { position: relative; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.625rem 0.75rem 0.75rem; border-radius: 11px; }
.officielle strong { font: 900 1.5rem/1.1 var(--titre); color: var(--brou); }
.numero-officiel { position: absolute; top: 0.5rem; right: 0.625rem; font-size: 0.75rem; font-weight: 700; color: var(--brou-doux); }
.libelle-officiel { font-size: 0.8125rem; line-height: 1.3; color: var(--brou); }
.officielle-1 { background: #F9D8D6; }
.officielle-2 { background: #FCE6C9; }
.officielle-3 { background: #FBF3C4; }
.officielle-4 { background: #DCF0CE; }
.officielle-5 { background: #C9EAE0; }
.officielle-6 { background: #C7E6F2; }
.officielle-7 { background: #D6DFF7; }
.officielle-8 { background: #E3D6F2; }
.officielle-9 { background: #F3D6EA; grid-column: 1 / -1; }

/* Petits écrans : quatre boutons dans l'en-tête, on leur reprend un peu de place. */
@media (max-width: 380px) {
  .barre-semaine { gap: 0.25rem; padding: 0.5rem; }
  .icone { width: 2.25rem; height: 2.25rem; }
  .icone svg { width: 1.125rem; height: 1.125rem; }
  .semaine { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .actualiser.tourne svg { animation: none; }
  summary .resume::after { transition: none; }
  .menu { animation: none; }
}

/* Bilans LSU : mini-badges (mêmes couleurs que la saisie des notes sur le PC) */
.lsu-resume { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.375rem; }
.lsu-mini, .lsu-badge { display: inline-block; padding: 0.0625rem 0.4375rem; border-radius: 6px; font-size: 0.75rem; font-weight: 700; color: #FFFFFF; background: #8A9491; white-space: nowrap; }
.lsu-na { background: #D9534F; }
.lsu-pa { background: #E8933A; }
.lsu-a { background: #7CC576; }
.lsu-d { background: #2E7D46; }
.lsu-ne { background: #E5EAE9; color: #5F6B68; }
.lsu-synthese { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.lsu-matiere { border-left-width: 5px; }
.lsu-sd h3 { margin: 0.75rem 0 0.25rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brou); opacity: 0.75; }
.lsu-elements { list-style: none; margin: 0; padding: 0; }
.lsu-elements li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.375rem 0; border-bottom: 1px solid var(--sable); font-size: 0.875rem; }
.lsu-elements li:last-child { border-bottom: none; }
.lsu-elements .lsu-badge { min-width: 2.25rem; text-align: center; }
.lsu-non-evalue span { opacity: 0.55; }

/* Boîte à outils : cartes des outils (ouvrent la télécommande servie par le PC) */
.outils-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin-bottom: 0.875rem; }
.outil-carte { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin: 0; color: var(--brou); text-decoration: none; }
.outil-carte svg { width: 1.75rem; height: 1.75rem; color: var(--peche-profond); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.outil-carte .resume h2 { font-size: 1rem; }

/* Surveillances (Planner > Surveillances du PC) : un jour à la fois. */
.bandeau-surveillances {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-radius: 11px;
  background: #FFE3D6;
  border-left: 4px solid var(--peche);
}
.bandeau-surveillances span { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brou-doux); }
.bandeau-surveillances strong { font-size: 1.0625rem; color: var(--peche-profond); }
.bandeau-surveillances.libre { background: var(--sable-doux); border-left-color: var(--sable); }
.creneau-surveillance ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.creneau-surveillance li { display: flex; align-items: center; gap: 0.625rem; padding: 0.125rem 0.25rem; border-radius: 8px; }
.creneau-surveillance .poste {
  flex: none;
  min-width: 5.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
}
.creneau-surveillance .nom { font-size: 1.0625rem; font-weight: 600; color: var(--brou); margin: 0; }
.creneau-surveillance li.moi { background: #FFE3D6; box-shadow: inset 0 0 0 2px var(--peche); }
.creneau-surveillance li.moi .nom { color: var(--peche-profond); font-weight: 800; }
.bande-surveillances {
  margin: 0.25rem 0 0.875rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brou-doux);
}

/* Cahier journal : badge discret des surveillances du jour */
.badge-surveillances {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--sable);
  border-radius: 999px;
  background: var(--sable-doux);
  color: var(--brou-doux);
  font: 600 0.8125rem/1.4 var(--corps);
  cursor: pointer;
}
.badge-surveillances span { display: inline-flex; align-items: center; gap: 0.3125rem; white-space: nowrap; }
.badges-journal { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; }
.badges-journal .badge-surveillances { margin: 0; }
.pastille-surveillance { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--peche); }

/* AESH (Planner > AESH du PC) : un jour à la fois */
.creneau-aesh { border-left-width: 5px; }
.creneau-aesh .aesh-nom { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--brou); }
.creneau-aesh .aesh-eleve { margin: 0.125rem 0 0; color: var(--brou-doux); }
