/* =====================================================================
   Escuelina — feuille de style (charte : docs/design.md, version 2)
   Univers : le matériel de la classe. Papier et cahier ligné en clair,
   tableau noir et craie en sombre, un trait de surligneur jaune.
   Mise en page : menu latéral (ordinateur), barre d'onglets (téléphone).
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.014c5c931b53.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.3c1a962bec44.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Polices */
  --police-titre: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --police-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Marque : le tableau vert, la craie jaune */
  --marque: #1f6f5c;
  --marque-fonce: #175746;
  --marque-clair: #e4f1ec;
  --marque-texte: #ffffff;
  --craie: #f2b33d;
  --surligneur: #f8d77e;
  /* Papier (neutres légèrement teintés de vert) */
  --fond: #f6f7f3;
  --surface: #ffffff;
  --surface-2: #eff2ee;
  --bord: #e1e6e1;
  --bord-fort: #c9d2cd;
  --bord-champ: #7e8d87;          /* 3,5:1 sur blanc : visible comme un champ */
  --texte: #16201b;
  --texte-2: #45534d;
  --discret: #5e6d67;             /* 5,1:1 sur le papier */
  /* Cahier ligné */
  --ligne-cahier: #cfd8ee;
  --marge-cahier: #e8a29c;
  --pas-cahier: 26px;
  /* Sens */
  --ok: #1a7343; --ok-fond: #e5f4ea;
  --alerte: #9a5a06; --alerte-fond: #fdf2df;
  --danger: #b42318; --danger-fond: #fdecea;
  --info: #2556a8; --info-fond: #e8f0fb;
  --sur-signal: #ffffff;          /* texte posé sur une couleur de sens pleine */
  /* Formes */
  --rayon: 14px;
  --rayon-petit: 9px;
  --ombre-1: 0 1px 2px rgba(16, 32, 26, .05), 0 1px 3px rgba(16, 32, 26, .06);
  --ombre-2: 0 6px 16px rgba(16, 32, 26, .08), 0 2px 4px rgba(16, 32, 26, .05);
  --ombre-3: 0 18px 44px rgba(16, 32, 26, .18);
  --focus: 0 0 0 3px rgba(31, 111, 92, .38);
  /* Espacements (échelle de 4 px) */
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px;
  --hauteur-onglets: 0px;
  /* Compatibilité */
  --principal: var(--marque);
  --principal-fonce: var(--marque-fonce);
  /* Types d'entrées (journal, calendrier) : comme des crayons de couleur */
  --t-interro: #b42318; --t-devoir: #2556a8; --t-lecon: #6d3fc0; --t-sortie: #0f766e;
  --t-activite: #c2410c; --t-sport: #1a7343; --t-natation: #0369a1; --t-materiel: #9a5a06; --t-info: #5e6d67;
  --conge: #eef1ec;
  color-scheme: light;
}

/* Mode sombre : le tableau noir, écrit à la craie */
@media (prefers-color-scheme: dark) {
  :root {
    --marque: #57c7a5;
    --marque-fonce: #7ad6ba;
    --marque-clair: #183129;
    --marque-texte: #0b1411;
    --craie: #f2c25b;
    --surligneur: rgba(242, 194, 91, .42);
    --fond: #0e1714;
    --surface: #15201c;
    --surface-2: #1b2823;
    --bord: #24332d;
    --bord-fort: #33463e;
    --bord-champ: #6a7d75;        /* 3,8:1 */
    --texte: #e9efec;
    --texte-2: #bccac3;
    --discret: #98a8a1;           /* 6,7:1 */
    --ligne-cahier: rgba(233, 239, 236, .075);
    --marge-cahier: rgba(255, 138, 122, .32);
    --ok: #5fd08e; --ok-fond: #15291d;
    --alerte: #f2b33d; --alerte-fond: #2c2312;
    --danger: #ff8a7a; --danger-fond: #331a17;
    --info: #7fb0ff; --info-fond: #172338;
    --sur-signal: #0b1411;
    --ombre-1: 0 1px 2px rgba(0, 0, 0, .45);
    --ombre-2: 0 6px 18px rgba(0, 0, 0, .5);
    --ombre-3: 0 18px 44px rgba(0, 0, 0, .65);
    --focus: 0 0 0 3px rgba(87, 199, 165, .45);
    --t-interro: #ff8a7a; --t-devoir: #7fb0ff; --t-lecon: #b79cff; --t-sortie: #4fd1c5;
    --t-activite: #fb923c; --t-sport: #5fd08e; --t-natation: #56c2f0; --t-materiel: #f2c25b; --t-info: #98a8a1;
    --conge: #18241f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: 15px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--marque); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--marque-fonce); }
h1, h2, h3 { margin: 0; color: var(--texte); text-wrap: balance; }
h1 { font-family: var(--police-titre); font-size: 1.85rem; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
h1 small { font-family: var(--police-texte); font-size: .95rem; font-weight: 500; color: var(--discret); letter-spacing: 0; }
h2 { font-family: var(--police-titre); font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; margin-bottom: var(--e3); }
h3 { font-size: .95rem; font-weight: 650; margin: var(--e4) 0 var(--e1); }
p { margin: 0 0 var(--e3); }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.icone { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke-width: 1.9; }
.discret { color: var(--discret); }
.petit-texte { font-size: .85rem; }
.vide { color: var(--discret); font-style: italic; }
.espace-haut { margin-top: var(--e5); }
.texte-erreur { color: var(--danger); }
.texte-ok { color: var(--ok); }
.nombre { text-align: right !important; font-variant-numeric: tabular-nums; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: var(--e4); top: -60px; z-index: 100; background: var(--marque); color: var(--marque-texte); padding: var(--e2) var(--e4); border-radius: var(--rayon-petit); font-weight: 600; text-decoration: none; }
.lien-evitement:focus { top: var(--e3); color: var(--marque-texte); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Mise en page : une barre en haut, l'accueil en pastilles ---------- */
.logo { display: flex; align-items: center; gap: var(--e2); font-family: var(--police-titre); font-weight: 750; font-size: 1.2rem; color: var(--texte); text-decoration: none; letter-spacing: -.02em; padding: var(--e1) var(--e2) var(--e4); }
.logo-marque { width: 32px; height: 32px; flex: none; display: block; border-radius: 9px; box-shadow: 0 1px 2px rgba(16, 32, 26, .18); }
.logo-marque svg { width: 100%; height: 100%; display: block; }
.barre-haut {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--e2);
  min-height: 60px; padding: var(--e2) max(var(--e5), env(safe-area-inset-right, 0px)) var(--e2) max(var(--e5), env(safe-area-inset-left, 0px));
  padding-top: max(var(--e2), env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--bord);
}
.barre-bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 var(--e3); border: 1px solid transparent; border-radius: 12px;
  background: none; color: var(--texte-2); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.barre-bouton:hover { background: var(--surface-2); color: var(--texte); }
.barre-bouton .icone { width: 22px; height: 22px; }
.bouton-retour { border-color: var(--bord-fort); background: var(--surface); }
.barre-titre { display: inline-flex; align-items: center; gap: var(--e2); min-width: 0; margin-left: var(--e1); color: var(--texte); text-decoration: none; font-family: var(--police-titre); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.barre-titre > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-titre .logo-marque { width: 30px; height: 30px; }
.barre-espace { flex: 1; }
.barre-ecole { color: var(--discret); font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.bouton-recherche-haut kbd { font-size: .75rem; }
.pastille-mini { --p: var(--marque); width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--p); color: #fff; }
.pastille-mini .icone { width: 18px; height: 18px; }

/* Menu du profil */
.profil-menu { position: relative; }
.profil-menu summary { list-style: none; cursor: pointer; border-radius: 50%; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.profil-menu summary::-webkit-details-marker { display: none; }
.profil-panneau { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(300px, calc(100vw - 32px)); padding: var(--e3); background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-3); display: grid; gap: var(--e2); }
.profil { display: flex; align-items: center; gap: var(--e3); padding: var(--e2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--marque-clair); color: var(--marque-fonce); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.profil-texte { min-width: 0; line-height: 1.3; }
.profil-texte strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-texte span { font-size: .78rem; color: var(--discret); }
.profil-ecole { margin: 0; padding: 0 var(--e2); }
.profil-panneau form { margin: 0; }
.profil-panneau .choix-ecole { display: grid; gap: 4px; padding: 0 var(--e2); }
.profil-lien { display: flex; align-items: center; gap: var(--e3); width: 100%; min-height: 44px; padding: 0 var(--e2); border: 0; border-radius: var(--rayon-petit); background: none; color: var(--texte-2); font: inherit; font-size: .92rem; font-weight: 550; text-decoration: none; cursor: pointer; }
.profil-lien:hover { background: var(--surface-2); color: var(--texte); }
.profil-lien .icone { color: var(--discret); }

/* Les pastilles d'applications (accueil et lanceur) */
.pastilles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--e4) var(--e3); }
.pastille-appli { display: grid; justify-items: center; gap: var(--e2); padding: var(--e3) var(--e1); border-radius: var(--rayon); color: var(--texte); text-decoration: none; text-align: center; }
.pastille-appli:hover { background: var(--surface-2); }
.pastille-appli:hover .pastille-icone { transform: translateY(-2px); box-shadow: 0 10px 22px color-mix(in srgb, var(--p) 40%, transparent); }
.pastille-appli.active { background: var(--marque-clair); }
.pastille-icone {
  --p: var(--marque);
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--p) 82%, #fff), var(--p) 55%);
  color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--p) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pastille-icone .icone { width: 32px; height: 32px; stroke-width: 1.8; }
.pastille-nom { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.accueil-pastilles { margin-bottom: var(--e6); }

/* Le lanceur : les pastilles par-dessus la page */
dialog.lanceur { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 80px); margin: 64px auto auto; padding: 0; border: 1px solid var(--bord); border-radius: 22px; background: var(--surface); color: var(--texte); box-shadow: var(--ombre-3); }
dialog.lanceur::backdrop { background: rgba(10, 20, 16, .45); backdrop-filter: blur(3px); }
.lanceur-boite { padding: var(--e4) var(--e5) var(--e5); }
.lanceur-entete { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--e3); }
.lanceur-entete h2 { margin: 0; font-size: 1.15rem; }

.contenu { width: 100%; max-width: 1200px; margin: 0 auto; padding: var(--e6) var(--e6) var(--e7); }

@media (max-width: 760px) {
  .barre-haut { padding-left: max(var(--e3), env(safe-area-inset-left, 0px)); padding-right: max(var(--e3), env(safe-area-inset-right, 0px)); gap: 2px; }
  .barre-libelle, .barre-ecole, .bouton-recherche-haut kbd { display: none; }
  .bouton-retour { padding: 0; border-color: transparent; background: none; }
  .barre-titre { font-size: 1rem; }
  .contenu { padding: var(--e5) var(--e4) var(--e7); }
  .pastilles { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: var(--e3) var(--e2); }
  .pastille-icone { width: 58px; height: 58px; border-radius: 17px; }
  .pastille-icone .icone { width: 28px; height: 28px; }
  .pastille-nom { font-size: .8rem; }
  dialog.lanceur { margin-top: 56px; }
  .lanceur-boite { padding: var(--e3) var(--e3) var(--e4); }
}

/* Ancienne barre (pages sans menu, ex. connexion) */
.barre { display: none; }

/* ---------- En-têtes de page ---------- */
.entete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--e4); flex-wrap: wrap; margin-bottom: var(--e5); }
.entete > div:first-child { min-width: 0; }
.entete h1 + p, .entete .discret { margin: var(--e1) 0 0; }
.entete h2 { margin: 0; }
.sur-titre { display: inline-flex; align-items: center; gap: var(--e2); font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--marque); margin-bottom: var(--e1); }

/* ---------- Cartes, tuiles, grilles ---------- */
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre-1); padding: var(--e5); margin-bottom: var(--e4);
}
.carte > h2:first-child { display: flex; align-items: center; gap: var(--e2); }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--e4); align-items: start; margin-bottom: var(--e4); }
.grille > .carte { margin-bottom: 0; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--e4); margin: 0 0 var(--e5); }
.tuile {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--e4) var(--e5); background: var(--surface);
  border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-1);
  text-decoration: none; color: var(--discret); font-size: .88rem; line-height: 1.35;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
a.tuile:hover { border-color: var(--bord-fort); box-shadow: var(--ombre-2); transform: translateY(-1px); color: var(--discret); }
.tuile .chiffre { font-family: var(--police-titre); font-size: 1.9rem; font-weight: 700; color: var(--texte); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tuile.alerte { border-color: color-mix(in srgb, var(--alerte) 35%, var(--bord)); background: linear-gradient(var(--alerte-fond), var(--surface) 70%); }
.tuile.alerte .chiffre { color: var(--alerte); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e2);
  padding: 8px 14px; min-height: 38px;
  border-radius: var(--rayon-petit); border: 1px solid var(--bord-fort);
  background: var(--surface); color: var(--texte); font: inherit; font-weight: 550; font-size: .92rem;
  text-decoration: none; cursor: pointer; max-width: 100%; text-align: center;
  box-shadow: 0 1px 1px rgba(16, 32, 26, .04);
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.bouton:hover { background: var(--surface-2); color: var(--texte); }
.bouton.principal { background: var(--marque); border-color: var(--marque); color: var(--marque-texte); }
.bouton.principal:hover { background: var(--marque-fonce); border-color: var(--marque-fonce); color: var(--marque-texte); }
.bouton.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--bord)); }
.bouton.petit { padding: 4px 10px; min-height: 30px; font-size: .84rem; }
.bouton .icone { width: 1.05em; height: 1.05em; }
button.lien { background: none; border: 0; padding: 0; color: var(--marque); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
button.lien.danger { color: var(--danger); font-size: .88rem; }
.actions { grid-column: 1 / -1; display: flex; gap: var(--e3); align-items: center; flex-wrap: wrap; }
.actions-ligne { display: flex; gap: var(--e3); align-items: center; flex-wrap: wrap; }
.actions-ligne form { margin: 0; }
.actions-collantes { position: sticky; bottom: 0; z-index: 5; display: flex; gap: var(--e4); align-items: center; padding: var(--e3) 0; background: linear-gradient(transparent, var(--fond) 30%); }

/* ---------- Formulaires ---------- */
input, select, textarea {
  font: inherit; font-size: .93rem; color: var(--texte); background: var(--surface);
  padding: 8px 11px; min-height: 40px; width: 100%;
  border: 1px solid var(--bord-champ); border-radius: var(--rayon-petit);
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 72px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--texte-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marque); box-shadow: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; min-height: 0; padding: 0; accent-color: var(--marque); flex: none; }
input[type="file"] { padding: 6px; }
input::placeholder, textarea::placeholder { color: var(--discret); opacity: .8; }
.formulaire { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--e4) var(--e5); }
.champ label { display: block; font-weight: 600; font-size: .86rem; color: var(--texte-2); margin-bottom: 6px; }
.champ.case label { display: flex; gap: var(--e2); align-items: center; font-weight: 500; color: var(--texte); }
.champ small { display: block; margin-top: 5px; font-size: .8rem; line-height: 1.4; }
.champ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.champ ul label { display: flex; gap: var(--e2); align-items: center; font-weight: 500; color: var(--texte); margin: 0; }
.champ.erreur input, .champ.erreur select, .champ.erreur textarea { border-color: var(--danger); }
.champ.erreur label { color: var(--danger); }
.errorlist { list-style: none; padding: var(--e3) var(--e4); margin: 0 0 var(--e3); background: var(--danger-fond); color: var(--danger); border-radius: var(--rayon-petit); grid-column: 1 / -1; }
.filtres { display: flex; gap: var(--e2); flex-wrap: wrap; align-items: center; margin-bottom: var(--e4); }
.filtres input[type="search"] { flex: 1 1 240px; width: auto; }
.filtres select, .filtres input[type="date"], .filtres input[type="email"] { width: auto; }
label.case { display: inline-flex; gap: var(--e2); align-items: center; font-size: .9rem; color: var(--texte-2); }
label.case select, label.case input[type="date"] { width: auto; }
input.invalide { border-color: var(--danger); background: var(--danger-fond); }
input:disabled { opacity: .5; }

/* ---------- Commutateurs (segments) et onglets ---------- */
.segments { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--bord); border-radius: 10px; flex-wrap: wrap; }
.segments label, .segments > a { position: relative; margin: 0; }
.segments input { position: absolute; opacity: 0; inset: 0; cursor: pointer; width: 100%; height: 100%; }
.segments span, .segments > a { display: block; padding: 5px 12px; border-radius: 7px; font-size: .87rem; font-weight: 550; color: var(--texte-2); text-decoration: none; white-space: nowrap; }
.segments > a:hover, .segments label:hover span { color: var(--texte); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.segments input:checked + span, .segments > a.choisi { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1); }
.segments input:focus-visible + span { box-shadow: var(--focus); }
.segments .desactive span, .segments input:disabled + span { color: var(--discret); opacity: .55; cursor: not-allowed; }
.onglets { display: flex; width: fit-content; max-width: 100%; margin-bottom: var(--e2); }

/* ---------- Tableaux ---------- */
.defilement { overflow-x: auto; border-radius: var(--rayon); }
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-1); font-size: .92rem; }
.tableau th, .tableau td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tableau th { font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); background: var(--surface-2); white-space: nowrap; }
.tableau thead th:first-child { border-top-left-radius: var(--rayon); }
.tableau thead th:last-child { border-top-right-radius: var(--rayon); }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr { transition: background .1s; }
.tableau tbody tr:hover { background: color-mix(in srgb, var(--marque-clair) 45%, transparent); }
.tableau td a { font-weight: 550; text-decoration: none; }
.tableau td a:hover { text-decoration: underline; }
.tableau th a { color: inherit; text-decoration: none; }
.tableau th a:hover { color: var(--texte); }
.tableau td.vide { text-align: center; padding: var(--e6); }
.pagination { display: flex; gap: var(--e4); justify-content: center; align-items: center; margin-top: var(--e4); }

/* ---------- Pastilles, notes, messages ---------- */
.pastille { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); white-space: nowrap; line-height: 1.5; }
.pastille.ok { background: var(--ok-fond); color: var(--ok); }
.pastille.alerte { background: var(--alerte-fond); color: var(--alerte); }
.pastille.danger { background: var(--danger-fond); color: var(--danger); }
.pastille.info { background: var(--info-fond); color: var(--info); }
.note { display: inline-block; min-width: 3.3rem; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 999px; font-size: .82rem; }
.note.reussi { color: var(--ok); background: var(--ok-fond); }
.note.juste { color: var(--alerte); background: var(--alerte-fond); }
.note.echec { color: var(--danger); background: var(--danger-fond); }
.messages { display: grid; gap: var(--e2); margin-bottom: var(--e5); }
.message { display: flex; gap: var(--e3); align-items: flex-start; padding: var(--e3) var(--e4); border-radius: var(--rayon-petit); background: var(--info-fond); color: var(--texte); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); margin-bottom: var(--e4); }
.messages .message { margin: 0; }
.message { flex-wrap: wrap; }
.message:not(:has(> .icone)) { display: block; }
.message > .icone + div, .message > .icone + span { flex: 1; min-width: 0; }
.message .icone { margin-top: 2px; color: var(--info); }
.message.success { background: var(--ok-fond); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.message.success .icone { color: var(--ok); }
.message.warning { background: var(--alerte-fond); border-color: color-mix(in srgb, var(--alerte) 30%, transparent); }
.message.warning .icone { color: var(--alerte); }
.message.error { background: var(--danger-fond); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--texte); }
.message.error .icone { color: var(--danger); }
.etat-vide { text-align: center; padding: var(--e7) var(--e5); color: var(--discret); }
.etat-vide .icone { width: 40px; height: 40px; color: var(--bord-fort); margin-bottom: var(--e3); }
.etat-vide strong { display: block; color: var(--texte); font-size: 1rem; margin-bottom: var(--e1); }

/* ---------- Listes ---------- */
dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--e2) var(--e5); margin: 0; font-size: .93rem; }
dt { color: var(--discret); }
dd { margin: 0; }
.a-venir { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.a-venir li { display: flex; gap: var(--e3); align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--bord); }
.a-venir li:last-child { border-bottom: 0; }
.date-courte { flex: none; width: 4.8rem; color: var(--discret); font-size: .82rem; font-variant-numeric: tabular-nums; }
.liste-compacte { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.liste-compacte li { margin: 3px 0; }
.liste-matieres { list-style: none; padding: 0; margin: 0; }
.liste-matieres li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.liste-matieres form { margin: 0; }
.responsable { padding: var(--e3) 0; border-bottom: 1px solid var(--bord); }
.responsable:last-of-type { border-bottom: 0; }
.evenement-famille { padding: var(--e3) 0; border-bottom: 1px solid var(--bord); }
.evenement-famille:last-child { border-bottom: 0; }

/* ---------- Connexion : un tableau noir, et une page du journal posée dessus ---------- */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.connexion-visuel {
  --tableau: #1c463b;
  position: relative; overflow: hidden; color: #eef3f0;
  padding: var(--e7) clamp(var(--e6), 5vw, 72px);
  display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--e6);
  background:
    radial-gradient(120% 80% at 15% 10%, rgba(255, 255, 255, .07), transparent 60%),
    radial-gradient(90% 70% at 90% 100%, rgba(0, 0, 0, .28), transparent 70%),
    var(--tableau);
}
.connexion-visuel::before {   /* poussière de craie */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.2px);
  background-size: 7px 7px;
}
.connexion-visuel > * { position: relative; }
.connexion-visuel .logo, .connexion-visuel .logo:hover { color: #fff; padding: 0; }
.connexion-message h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; max-width: 17ch; margin: 0 0 var(--e4); }
.connexion-message p { color: rgba(238, 243, 240, .86); max-width: 44ch; font-size: 1.02rem; }
.apercu-cahier { margin: 0; align-self: center; justify-self: center; width: min(360px, 100%); transform: rotate(-2.2deg); filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .35)); }
.apercu-cahier .jour { min-height: 0; color: #16201b; --ligne-cahier: #cfd8ee; --marge-cahier: #e8a29c; --craie: #f2b33d; background-color: #fff; --surface: #fff; --texte: #16201b; --texte-2: #45534d; --discret: #5e6d67; --bord: #e1e6e1; --alerte: #9a5a06; }
.apercu-cahier .entree { --t-interro: #b42318; --t-sortie: #0f766e; --t-natation: #0369a1; }
.connexion-pied { color: rgba(238, 243, 240, .8); margin: 0; }
.connexion-formulaire { display: grid; place-items: center; padding: var(--e6) var(--e4); }
.connexion { width: 100%; max-width: 380px; }
.connexion h1 { font-size: 2.2rem; margin-bottom: var(--e2); }
.connexion form { display: grid; gap: var(--e4); margin-top: var(--e5); }
.connexion label { display: grid; gap: 6px; font-weight: 600; font-size: .86rem; color: var(--texte-2); }
.connexion .bouton { width: 100%; min-height: 46px; font-size: 1rem; }
.connexion-aide { margin-top: var(--e5); }
.connexion-logo-mobile { display: none; padding: 0 0 var(--e5); }
@media (max-width: 900px) {
  .page-connexion { grid-template-columns: 1fr; }
  .connexion-visuel { display: none; }
  .connexion-logo-mobile { display: flex; }
  .connexion-formulaire { align-items: start; padding-top: 12vh; }
}

/* ---------- Présences ---------- */
.appel-outils { display: flex; gap: var(--e4); align-items: center; margin-bottom: var(--e3); }
.appel-liste { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-1); overflow: hidden; }
.appel-ligne { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1.2fr); gap: var(--e3); align-items: center; padding: 10px var(--e4); border-bottom: 1px solid var(--bord); box-shadow: inset 4px 0 0 transparent; }
.appel-ligne:last-child { border-bottom: 0; }
.appel-ligne.statut-absent { box-shadow: inset 4px 0 0 var(--danger); background: color-mix(in srgb, var(--danger-fond) 50%, transparent); }
.appel-ligne.statut-retard { box-shadow: inset 4px 0 0 var(--alerte); background: color-mix(in srgb, var(--alerte-fond) 50%, transparent); }
.appel-ligne .segments input:checked + span { background: var(--ok); color: var(--sur-signal); }
.appel-ligne.statut-absent .segments input:checked + span { background: var(--danger); color: var(--sur-signal); }
.appel-ligne.statut-retard .segments input:checked + span { background: var(--alerte); color: var(--sur-signal); }
.appel-details { display: flex; gap: var(--e2); }
.appel-details .minutes { width: 5.5rem; flex: none; display: none; }
.appel-ligne.statut-retard .minutes { display: block; }
.appel-valider { position: sticky; bottom: 0; padding: var(--e4) 0; background: linear-gradient(transparent, var(--fond) 35%); }
@media (max-width: 760px) {
  .appel-ligne { grid-template-columns: 1fr; gap: var(--e2); }
  .appel-ligne .segments { display: flex; }
  .appel-ligne .segments label { flex: 1; text-align: center; }
}

/* ---------- Journal de classe ---------- */
.type-interro { --t: var(--t-interro); } .type-devoir { --t: var(--t-devoir); } .type-lecon { --t: var(--t-lecon); }
.type-sortie { --t: var(--t-sortie); } .type-activite { --t: var(--t-activite); } .type-sport { --t: var(--t-sport); }
.type-natation { --t: var(--t-natation); } .type-materiel { --t: var(--t-materiel); } .type-info { --t: var(--t-info); }
.nav-semaine { display: flex; gap: var(--e2); align-items: center; flex-wrap: wrap; }
.nav-semaine strong { font-weight: 650; }
.semaine { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--e3); margin-bottom: var(--e4); }

/* Signature : une page de cahier ligné, avec sa marge rouge */
.cahier {
  --entete-cahier: 58px;
  position: relative;
  background-color: var(--surface);
  background-image:
    linear-gradient(90deg, transparent 27px, var(--marge-cahier) 27px, var(--marge-cahier) 28.5px, transparent 28.5px),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--pas-cahier) - 1px), var(--ligne-cahier) calc(var(--pas-cahier) - 1px), var(--ligne-cahier) var(--pas-cahier));
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, 100% 100%;
  background-position: 0 0, 0 var(--entete-cahier);
}
.jour {
  border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-1);
  padding: var(--e3) var(--e3) var(--e4) 38px; min-width: 0; min-height: 240px;
  display: flex; flex-direction: column; gap: var(--e2);
}
.jour header { display: flex; gap: 6px; align-items: flex-start; min-height: calc(var(--entete-cahier) - var(--e3) - var(--e2)); }
.jour-nom { display: grid; line-height: 1.25; min-width: 0; }
.jour-nom strong { font-family: var(--police-titre); font-size: 1.05rem; text-transform: capitalize; letter-spacing: -.01em; }
.jour-nom .discret { font-size: .82rem; }
.jour.aujourdhui { border-color: color-mix(in srgb, var(--craie) 65%, var(--bord)); }
/* Le marque-page du jour */
.jour.aujourdhui::after {
  content: ""; position: absolute; top: -1px; right: 18px; width: 16px; height: 30px;
  background: var(--craie); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
  box-shadow: var(--ombre-1);
}
.marque-jour { font-size: .75rem; font-weight: 650; color: var(--alerte); letter-spacing: .01em; }
.ajout-jour { margin-left: auto; text-decoration: none; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--discret); }
.jour.aujourdhui .ajout-jour { margin-right: 22px; }
.ajout-jour:hover { background: var(--marque-clair); color: var(--marque); }
.entree {
  border-left: 3px solid var(--t, var(--bord)); padding: 6px 10px;
  background: var(--surface); border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 0 var(--bord), 0 1px 3px rgba(16, 32, 26, .06);
  font-size: .88rem; overflow-wrap: anywhere; line-height: 1.4;
}
.entree p { margin: 4px 0 0; color: var(--texte-2); }
.entree strong a { color: var(--texte); text-decoration: none; }
.entree strong a:hover { text-decoration: underline; }
.entree-tete { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.etiquette-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 750; color: var(--t, var(--discret)); }
.jour .vide { line-height: var(--pas-cahier); margin: 0; }
@media (max-width: 1000px) { .semaine { grid-template-columns: 1fr; } }

/* ---------- Calendrier ---------- */
.titre-mois { font-size: 1.15rem; min-width: 11rem; text-align: center; text-transform: capitalize; }
.calendrier { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-1); overflow: hidden; }
.calendrier th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); padding: var(--e2); border-bottom: 1px solid var(--bord); background: var(--surface-2); }
.calendrier th.we { width: 9%; }
.calendrier td { vertical-align: top; height: 7rem; padding: 6px; border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); font-size: .8rem; overflow: hidden; }
.calendrier td:last-child { border-right: 0; }
.calendrier tr:last-child td { border-bottom: 0; }
.calendrier td.we { background: var(--surface-2); }
.calendrier td.conge { background: repeating-linear-gradient(135deg, var(--conge), var(--conge) 6px, transparent 6px, transparent 12px); }
.calendrier td.hors-mois { background-color: var(--surface-2); }
.calendrier td.hors-mois .cal-num { color: var(--discret); font-weight: 500; }
.calendrier td.aujourdhui .cal-num { background: var(--marque); color: var(--marque-texte); }
.cal-jour { display: flex; align-items: center; margin-bottom: 3px; }
.cal-num { font-weight: 650; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: .8rem; }
.cal-conge { color: var(--discret); font-style: italic; font-size: .75rem; }
.cal-ev { display: block; margin-top: 3px; padding: 2px 6px; border-radius: 5px; text-decoration: none; color: var(--texte); background: color-mix(in srgb, var(--ev, var(--marque)) 14%, var(--surface)); border-left: 3px solid var(--ev, var(--marque)); line-height: 1.3; overflow-wrap: anywhere; font-weight: 500; }
a.cal-ev:hover { background: color-mix(in srgb, var(--ev, var(--marque)) 24%, var(--surface)); color: var(--texte); }
.cal-heure { font-weight: 700; margin-right: 2px; font-variant-numeric: tabular-nums; }
.cal-avancement { float: right; font-size: .75rem; color: var(--texte-2); }
.ev-fete { --ev: #c0267a; } .ev-reunion, .ev-reunion_parents { --ev: var(--t-info); } .ev-sortie { --ev: var(--t-sortie); }
.ev-activite { --ev: var(--t-activite); } .ev-journee_pedagogique { --ev: var(--t-lecon); } .ev-autre { --ev: var(--discret); }
.cal-surv { margin-top: 2px; font-size: .75rem; color: var(--discret); border-left: 2px solid var(--bord-fort); padding-left: 5px; line-height: 1.35; }
.cal-surv.moi { color: var(--texte); border-left-color: var(--marque); font-weight: 600; }
.cal-surv.manque { border-left-color: var(--danger); }
.barre-avancement { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin: var(--e2) 0 var(--e3); }
.barre-avancement span { display: block; height: 100%; background: linear-gradient(90deg, var(--marque), var(--ok)); border-radius: 5px; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e4); }
.colonne { background: var(--surface-2); border-radius: var(--rayon); padding: var(--e3); display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.colonne h3 { margin: 0 0 var(--e1); font-size: .9rem; display: flex; align-items: center; gap: var(--e2); }
.colonne h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--discret); }
.statut-en_cours h3::before { background: var(--info); }
.statut-fait h3::before { background: var(--ok); }
.statut-fait .tache { background: var(--surface-2); box-shadow: none; }
.statut-fait .tache strong { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--texte) 45%, transparent); }
.tache { background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; box-shadow: var(--ombre-1); overflow-wrap: anywhere; }
.tache a { color: var(--texte); text-decoration: none; }
.tache a:hover { text-decoration: underline; }
.tache.en-retard { border-color: color-mix(in srgb, var(--danger) 50%, var(--bord)); box-shadow: inset 3px 0 0 var(--danger), var(--ombre-1); }
.tache p { margin: 5px 0 0; }
.deplacer { display: flex; gap: 5px; flex-wrap: wrap; margin-top: var(--e2); }
.surv { border: 1px solid var(--bord); border-radius: 10px; padding: var(--e2) 10px; display: grid; gap: 4px; font-size: .86rem; }
.surv.moi { border-color: var(--marque); box-shadow: inset 3px 0 0 var(--marque); background: color-mix(in srgb, var(--marque-clair) 40%, var(--surface)); }
.surv.manque { border-color: color-mix(in srgb, var(--danger) 50%, var(--bord)); }
.surv .pastille { margin: 1px 0; }
@media (max-width: 760px) { .kanban { grid-template-columns: 1fr; } }

/* ---------- Évaluations ---------- */
.saisie-notes td { vertical-align: middle; }
.cellule-points { white-space: nowrap; }
.cellule-points input.points { width: 5.2rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cellule-points small { display: block; }
.total-bulletin { display: grid; justify-items: end; gap: 4px; }
.total-bulletin .note { font-size: 1.4rem; padding: 4px 14px; }

/* ---------- Droits ---------- */
.grille-droits { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--e4); }
.module-droits { border: 1px solid var(--bord); border-radius: 10px; padding: var(--e2) var(--e4) var(--e3); margin: 0; min-width: 0; background: var(--surface); }
.module-droits legend { font-weight: 650; padding: 0 6px; font-size: .9rem; }
.ligne-droit { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .9rem; }
.ligne-droit input[type="checkbox"] { margin-top: 3px; }
.ligne-droit.membre { justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--bord); }
.ligne-droit.membre:last-child { border-bottom: 0; }
.ligne-droit .etat-droit { width: auto; flex: none; font-size: .82rem; min-height: 32px; padding: 4px 8px; }
.onglets-famille { margin-top: var(--e1); }

/* ---------- Impression ---------- */
@media print {
  .barre-haut, .actions-collantes, .bouton, .filtres, .no-print { display: none !important; }
  body { background: #fff; }
  .contenu { padding: 0; max-width: none; }
  .carte, .tableau { box-shadow: none; }
}

/* ---------- Tableau de bord et cartes ---------- */
.tuile { position: relative; }
.tuile-icone { position: absolute; top: var(--e4); right: var(--e4); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--marque-clair); color: var(--marque); }
.tuile.alerte .tuile-icone { background: var(--alerte-fond); color: var(--alerte); }
.tuile-icone .icone { width: 18px; height: 18px; }
.tuile .chiffre { margin-top: var(--e1); }
.tableau-de-bord { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: var(--e4); align-items: start; }
.colonne-principale, .colonne-laterale { min-width: 0; }
.tableau-de-bord .carte { margin-bottom: var(--e4); }
@media (max-width: 1000px) { .tableau-de-bord { grid-template-columns: minmax(0, 1fr); } }
.carte-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); margin-bottom: var(--e3); }
.carte-entete h2 { margin: 0; display: flex; align-items: center; gap: var(--e2); }
.carte-entete h2 .icone { color: var(--marque); }
.carte-entete > a { font-size: .86rem; font-weight: 550; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.carte-entete > a:hover { text-decoration: underline; }
.liste-evenements { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--e3); }
.liste-evenements li { display: flex; gap: var(--e3); align-items: center; }
.liste-evenements li > span:last-child { display: grid; min-width: 0; }
.liste-evenements a { font-weight: 600; text-decoration: none; color: var(--texte); }
.liste-evenements a:hover { color: var(--marque); }
.pastille-date { flex: none; width: 46px; height: 50px; border-radius: 10px; background: var(--marque-clair); color: var(--marque-fonce); display: grid; place-items: center; align-content: center; font-size: .75rem; text-transform: uppercase; font-weight: 650; line-height: 1.1; }
.pastille-date b { font-size: 1.2rem; font-weight: 750; }
.calendrier td .ajout-jour { opacity: 0; transition: opacity .12s; }
.calendrier td:hover .ajout-jour, .calendrier td .ajout-jour:focus-visible { opacity: 1; }
@media (hover: none) { .calendrier td .ajout-jour { opacity: .6; } }
.etape { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--marque); color: var(--marque-texte); font-size: .82rem; margin-right: var(--e2); }
details > summary.bouton { list-style: none; width: fit-content; }
details > summary.bouton::-webkit-details-marker { display: none; }
.sur-titre a { color: inherit; text-decoration: none; }
.sur-titre a:hover { text-decoration: underline; }
fieldset.champ.multiple { border: 0; padding: 0; margin: 0; min-width: 0; grid-column: 1 / -1; }
fieldset.champ.multiple legend { font-weight: 600; font-size: .86rem; color: var(--texte-2); margin-bottom: 8px; padding: 0; }
fieldset.champ.multiple > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; padding: var(--e3); background: var(--surface-2); border-radius: var(--rayon-petit); }
fieldset.champ.multiple > div label { display: flex; gap: var(--e2); align-items: center; font-size: .9rem; margin: 0; }

/* ---------- Repas et garderie ---------- */
.centre { text-align: center !important; }
.grille-pointage td, .grille-pointage th { padding: 9px 12px; }
.lien-colonne { background: none; border: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; text-decoration: underline dotted; }
.case-pointage { display: inline-grid; place-items: center; width: 40px; height: 34px; border-radius: 8px; cursor: pointer; }
.case-pointage:hover { background: var(--marque-clair); }
.case-pointage input { width: 20px; height: 20px; }
.pastille .icone { width: .95em; height: .95em; }

/* ---------- Facturation ---------- */
.etapes-facturation { display: flex; gap: var(--e4); align-items: center; flex-wrap: wrap; }
.etapes-facturation .etape { margin-right: 0; }
.etapes-facturation input[type="month"] { width: auto; }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.document-facture { padding: var(--e6); }
.facture-tete { display: flex; justify-content: space-between; gap: var(--e5); flex-wrap: wrap; padding-bottom: var(--e4); border-bottom: 2px solid var(--marque); margin-bottom: var(--e4); }
.facture-ecole { font-size: 1.1rem; }
.facture-meta h2 { margin-bottom: var(--e2); }
.facture-meta dl { font-size: .88rem; }
.facture-destinataire { margin-bottom: var(--e4); }
.tableau-facture { box-shadow: none; margin-bottom: var(--e3); }
.tableau-facture .sous-total td { font-weight: 650; background: var(--surface-2); }
.facture-total { margin-left: auto; max-width: 320px; display: grid; gap: 6px; padding: var(--e3) 0; }
.facture-total > div { display: flex; justify-content: space-between; gap: var(--e4); font-variant-numeric: tabular-nums; }
.facture-total .reste { border-top: 1px solid var(--bord); padding-top: 6px; font-size: 1.1rem; }
.facture-paiement { display: flex; gap: var(--e5); align-items: center; flex-wrap: wrap; background: var(--marque-clair); border-radius: var(--rayon); padding: var(--e4) var(--e5); margin-top: var(--e3); }
.qr { display: grid; justify-items: center; gap: 4px; }
.qr svg { width: 168px; height: 168px; background: #fff; border-radius: 10px; display: block; }
.communication { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.05rem; letter-spacing: .02em; }
.decompte { break-inside: avoid; }
@media print { .decompte, .document-facture { page-break-after: always; border: 0; } .tableau-de-bord { display: block; } }
.tuile .chiffre { padding-right: 44px; font-size: clamp(1.3rem, 1.9vw, 1.9rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Annonces ---------- */
.annonce header { margin-bottom: var(--e3); }
.annonce h3 { margin: 0 0 4px; font-size: 1.05rem; }
.annonce p { white-space: normal; color: var(--texte-2); }
.carte:has(.annonce.epinglee) { border-color: color-mix(in srgb, var(--craie) 60%, var(--bord)); box-shadow: inset 4px 0 0 var(--craie), var(--ombre-1); }
.carte:has(.annonce.nouvelle) { box-shadow: inset 4px 0 0 var(--info), var(--ombre-1); }
.formulaire-colonne { grid-template-columns: 1fr; }
.epingle { color: var(--craie); fill: var(--craie); }
.detail-mobile { display: none; }
@media (max-width: 640px) {
  .col-secondaire { display: none; }
  .detail-mobile { display: inline; }
  .document-facture { padding: var(--e4); }
  .tableau-facture th, .tableau-facture td { padding: 8px 10px; }
  .facture-paiement { padding: var(--e4); }
}


/* ---------- Surligneur : le seul mouvement de l'interface ---------- */
.surligne {
  background-image: linear-gradient(100deg, transparent 0 1%, var(--surligneur) 2% 97%, transparent 98%);
  background-repeat: no-repeat; background-size: 100% 42%; background-position: 0 88%;
  padding: 0 .12em; margin: 0 -.12em; border-radius: 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (prefers-reduced-motion: no-preference) {
  .surligne { animation: surligner .9s cubic-bezier(.2, .7, .2, 1) .25s both; }
  @keyframes surligner { from { background-size: 0% 42%; } to { background-size: 100% 42%; } }
}

/* ---------- Gommettes : la pastille de couleur d'un élève ---------- */
.gommette {
  --g-fond: #dff2e7; --g-texte: #17603a;
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--g-fond); color: var(--g-texte);
  font-size: .75rem; font-weight: 750; letter-spacing: .02em; line-height: 1;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--g-texte) 18%, transparent);
}
.gommette.grande { width: 52px; height: 52px; font-size: 1rem; font-family: var(--police-titre); }
.g1 { --g-fond: #e1ebfb; --g-texte: #1f4f9a; } .g2 { --g-fond: #ece4fb; --g-texte: #5b34a8; }
.g3 { --g-fond: #fbe3ee; --g-texte: #9d2457; } .g4 { --g-fond: #fde8d7; --g-texte: #9a4110; }
.g5 { --g-fond: #f8eecb; --g-texte: #7a5a05; } .g6 { --g-fond: #d9f1ef; --g-texte: #0d6660; }
.g7 { --g-fond: #fbe2df; --g-texte: #9f2a1d; }
@media (prefers-color-scheme: dark) {
  .gommette { --g-fond: #173a28; --g-texte: #8fe0b2; }
  .g1 { --g-fond: #1a2c4b; --g-texte: #a9c7ff; } .g2 { --g-fond: #2c2148; --g-texte: #cdb8ff; }
  .g3 { --g-fond: #3d1a2b; --g-texte: #ffb1d1; } .g4 { --g-fond: #3d2615; --g-texte: #ffc193; }
  .g5 { --g-fond: #362c0f; --g-texte: #f5d77c; } .g6 { --g-fond: #12322f; --g-texte: #86e2d9; }
  .g7 { --g-fond: #3d1c18; --g-texte: #ffb0a5; }
}
.eleve-ligne { display: inline-flex; align-items: center; gap: var(--e3); min-width: 0; }
.eleve-ligne > span:last-child { min-width: 0; }

.entete-eleve { display: flex; align-items: center; gap: var(--e4); min-width: 0; }
.entete-eleve h1 + p { margin: var(--e1) 0 0; }

/* ---------- En-têtes de cartes ---------- */
.carte-entete h2 .icone { color: var(--marque); }
.carte-entete .pastille .icone { width: .95em; height: .95em; }

/* ---------- Recherche rapide ---------- */
.bouton-recherche {
  display: flex; align-items: center; gap: var(--e2); width: calc(100% - 2 * var(--e1)); margin: 0 var(--e1) var(--e4);
  padding: 8px var(--e3); min-height: 40px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  background: var(--fond); color: var(--discret); font: inherit; font-size: .9rem; cursor: pointer; text-align: left;
}
.bouton-recherche:hover { border-color: var(--bord-champ); color: var(--texte-2); }
.bouton-recherche span { flex: 1; }
kbd { font-family: var(--police-texte); font-size: .75rem; font-weight: 600; color: var(--discret); background: var(--surface); border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
dialog.recherche {
  width: min(620px, calc(100% - 2 * var(--e4))); max-height: min(70vh, 560px); margin: 12vh auto auto;
  padding: 0; border: 1px solid var(--bord); border-radius: 16px; background: var(--surface); color: var(--texte);
  box-shadow: var(--ombre-3); overflow: hidden;
}
dialog.recherche::backdrop { background: rgba(10, 20, 16, .45); backdrop-filter: blur(2px); }
.recherche-boite { display: flex; flex-direction: column; max-height: inherit; }
.recherche-champ { display: flex; align-items: center; gap: var(--e3); padding: var(--e3) var(--e4); border-bottom: 1px solid var(--bord); }
.recherche-champ > .icone { color: var(--discret); width: 20px; height: 20px; }
.recherche-champ input { border: 0; padding: 6px 0; font-size: 1.05rem; min-height: 0; box-shadow: none !important; background: transparent; }
.recherche-champ input:focus { outline: none; }
.recherche-resultats { list-style: none; margin: 0; padding: var(--e2); overflow-y: auto; }
.recherche-resultats a { display: flex; align-items: center; gap: var(--e3); padding: 9px var(--e3); border-radius: var(--rayon-petit); text-decoration: none; color: var(--texte); }
.recherche-resultats a > span:last-child { display: grid; line-height: 1.3; }
.recherche-resultats [aria-selected="true"] a, .recherche-resultats a:hover { background: var(--marque-clair); }
.recherche-icone { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--marque); flex: none; }
.recherche-vide { padding: var(--e4); }
.recherche-aide { padding: 0 var(--e4) var(--e4); margin: var(--e2) 0 0; }

/* ---------- Téléphone ---------- */
@media (max-width: 960px) {
  .contenu { padding-bottom: calc(var(--e7) + env(safe-area-inset-bottom, 0px)); }
  /* Sur téléphone, la barre d'enregistrement devient une vraie barre d'outils, en bas de l'écran */
  .actions-collantes, .appel-valider {
    bottom: 0; padding-bottom: calc(var(--e3) + env(safe-area-inset-bottom, 0px));
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3);
    margin-inline: calc(-1 * var(--e4)); padding-top: var(--e3); padding-left: var(--e4); padding-right: var(--e4);
    background: color-mix(in srgb, var(--fond) 90%, transparent);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--bord);
  }
  .actions-collantes .bouton.principal, .appel-valider .bouton.principal { flex: 1 1 auto; justify-content: center; }
  /* Cibles tactiles confortables (44 px) pour l'appel et les commutateurs */
  .appel-ligne .segments span { padding: 11px 8px; }
  .segments span, .segments > a { padding: 8px 12px; }
  .case-pointage { width: 44px; height: 44px; }
}
@media print { .barre-haut, .lien-evitement, dialog.recherche, dialog.lanceur, dialog.guide { display: none !important; } }

/* ---------- Bulletin : un document ---------- */
.bulletin { padding: 0; overflow: hidden; }
.bulletin-tete { display: flex; justify-content: space-between; align-items: center; gap: var(--e5); flex-wrap: wrap; padding: var(--e5) var(--e6); border-bottom: 1px solid var(--bord); background: linear-gradient(180deg, var(--marque-clair), var(--surface)); }
.bulletin-titre { font-size: 1.5rem; margin: 2px 0 2px; }
.bulletin-tete p { margin: 0; }
.anneau {
  --couleur: var(--ok); --pct: 0;
  width: 112px; height: 112px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--couleur) calc(var(--pct) * 1%), var(--surface-2) 0);
}
.anneau.juste { --couleur: var(--alerte); } .anneau.echec { --couleur: var(--danger); }
.anneau > span { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; line-height: 1.1; text-align: center; }
.anneau b { font-family: var(--police-titre); font-size: 1.85rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.anneau b small { font-size: .9rem; margin-left: 1px; }
.anneau > span > span { font-size: .75rem; color: var(--discret); font-variant-numeric: tabular-nums; }
.matieres { padding: var(--e2) var(--e6) var(--e4); }
.matiere { padding: var(--e4) 0; border-bottom: 1px solid var(--bord); break-inside: avoid; }
.matiere:last-child { border-bottom: 0; }
.matiere-tete { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; }
.matiere-tete h3 { margin: 0; font-family: var(--police-titre); font-size: 1.05rem; flex: 1; min-width: 12rem; }
.barre-note { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); margin: var(--e2) 0 var(--e3); }
.barre-note > span { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.barre-note.juste > span { background: var(--alerte); } .barre-note.echec > span { background: var(--danger); }
.barre-note > i { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--texte-2); opacity: .35; border-radius: 1px; }
.evaluations-matiere { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.evaluations-matiere li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 2px var(--e3); align-items: baseline; }
.evaluations-matiere .resultat { font-variant-numeric: tabular-nums; color: var(--texte-2); }
.evaluations-matiere .resultat b { color: var(--texte); }
.evaluations-matiere .commentaire { grid-column: 2 / -1; color: var(--marque); font-style: italic; }
.bulletin-pied { padding: 0 var(--e6) var(--e5); margin: 0; }
@media (max-width: 640px) {
  .bulletin-tete, .matieres { padding-left: var(--e4); padding-right: var(--e4); }
  .bulletin-pied { padding: 0 var(--e4) var(--e4); }
}
.carte.cahier { padding-left: 46px; --entete-cahier: 64px; }
.carte.cahier .entree { margin-bottom: var(--e2); }
.facture-paiement dl { min-width: 0; }
.communication { overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .facture-paiement { flex-direction: column; align-items: stretch; }
  .facture-paiement dl { grid-template-columns: 1fr; gap: 2px; }
  .facture-paiement dd { margin-bottom: var(--e2); }
  .communication { font-size: .98rem; }
}

/* ---------- Feuilles d'exercices ---------- */
.feuille-carte { display: grid; gap: var(--e2); align-content: start; }
.feuille-carte h2 { margin: 0; font-size: 1.05rem; }
.feuille-carte h2 a { color: var(--texte); text-decoration: none; }
.feuille-carte h2 a:hover { color: var(--marque); }
.feuille-carte p { margin: 0; }
.feuille-carte-tete { display: flex; gap: var(--e2); flex-wrap: wrap; }
.feuille-carte .pastille .icone { width: .95em; height: .95em; }
.segments > a .icone { width: 1em; height: 1em; vertical-align: -2px; }
.exercices-edition { margin: 0 0 var(--e4); padding-left: 1.6em; display: grid; gap: var(--e3); }
.exercice-ligne { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--e2); align-items: start; }
.exercice-ligne .champ { margin: 0; }
.exercice-ligne textarea { min-height: 40px; resize: vertical; }
.exercices-lecture li { padding: 4px 0; }
@media (max-width: 600px) { .exercice-ligne { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Correction des interros (essai) ---------- */
.corrige-edition { margin: 0 0 var(--e4); padding-left: 1.6em; display: grid; gap: var(--e3); }
.corrige-ligne { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, 1fr); gap: var(--e2); align-items: end; }
.corrige-ligne .champ { margin: 0; }
.corrige-ligne .champ > span { font-size: .78rem; color: var(--discret); font-weight: 600; }
.corrige-ligne + .corrige-ligne .champ > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.proposition input.points { width: 4.5em; min-height: 34px; text-align: right; }
.proposition td.nombre, .proposition th.nombre { white-space: nowrap; }
.photo-copie { width: 100%; border-radius: var(--rayon-petit); border: 1px solid var(--bord); display: block; }
.liste-simple { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.liste-simple li { display: flex; justify-content: space-between; gap: var(--e2); align-items: center; }
@media (max-width: 700px) { .corrige-ligne { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .corrige-ligne .champ > span { position: static; width: auto; height: auto; clip: auto; } }

/* ---------- Portail : modules d'une école ---------- */
.liste-modules { list-style: none; margin: 0 0 var(--e4); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--e2) var(--e4); }
.case-module { display: flex; gap: var(--e3); align-items: flex-start; padding: var(--e3); border: 1px solid var(--bord); border-radius: var(--rayon-petit); cursor: pointer; }
.case-module:has(input:checked) { border-color: color-mix(in srgb, var(--marque) 45%, var(--bord)); background: var(--marque-clair); }
.case-module input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--marque); }
.case-module strong, .case-module .petit-texte { display: block; }
.module-droits.inactif { padding: var(--e3) var(--e4); border: 1px dashed var(--bord-fort); border-radius: var(--rayon-petit); color: var(--texte-2); }
.etape-prealable { max-width: 560px; margin: var(--e6) auto; }
.etape-prealable .bouton { margin-top: var(--e4); }

/* ---------- Accueil : uniquement les applications ---------- */
.accueil { max-width: 980px; margin: 0 auto; }
.accueil-salut { text-align: center; margin: var(--e4) 0 var(--e6); }
.accueil-salut h1 { margin: 0; }
.accueil-salut .discret { margin: var(--e1) 0 0; }
.accueil .pastilles { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--e5) var(--e3); }
@media (max-width: 760px) { .accueil-salut { margin: var(--e2) 0 var(--e5); } .accueil .pastilles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--e4) var(--e2); } }

/* ---------- Guide de première visite ---------- */
dialog.guide { width: min(460px, calc(100vw - 32px)); margin: auto; padding: 0; border: 1px solid var(--bord); border-radius: 22px; background: var(--surface); color: var(--texte); box-shadow: var(--ombre-3); }
dialog.guide::backdrop { background: rgba(10, 20, 16, .45); backdrop-filter: blur(3px); }
.guide-boite { padding: var(--e5); display: grid; gap: var(--e4); }
.guide-entete { display: flex; gap: var(--e3); align-items: center; }
.guide-entete .pastille-mini { width: 44px; height: 44px; border-radius: 13px; }
.guide-entete .pastille-mini .icone { width: 22px; height: 22px; }
.guide-entete h2 { margin: 0; font-size: 1.2rem; }
.guide-entete .sur-titre { margin: 0 0 2px; }
.guide-logo { background: var(--surface-2); }
.guide-etape { min-height: 7.5em; }
.guide-etape h3 { display: flex; gap: var(--e2); align-items: center; margin: 0 0 var(--e2); font-size: 1rem; }
.guide-etape p { margin: 0; color: var(--texte-2); line-height: 1.55; }
.guide-numero { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--marque); color: var(--marque-texte); font-size: .8rem; font-weight: 700; }
.guide-pied { display: flex; gap: var(--e2); align-items: center; flex-wrap: wrap; }
.guide-points { display: flex; gap: 6px; }
.guide-points span { width: 7px; height: 7px; border-radius: 50%; background: var(--bord-fort); transition: width .2s, background .2s; }
.guide-points span.actif { width: 20px; border-radius: 4px; background: var(--marque); }
@media (prefers-reduced-motion: reduce) { .guide-points span { transition: none; } }
.guide-pied [hidden] { display: none; }
.guide-pied [data-guide-passer] { border-color: transparent; background: none; box-shadow: none; color: var(--texte-2); }
.guide-pied { justify-content: flex-end; }
.guide-points { flex-basis: 100%; justify-content: center; margin-bottom: var(--e1); }
.guide-pied [data-guide-passer] { margin-right: auto; }
.etat-vide .bouton .icone { width: 1.05em; height: 1.05em; margin: 0; color: inherit; opacity: 1; }
.etape-prealable .actions-ligne { justify-content: center; margin-top: var(--e4); }
.etape-prealable .actions-ligne .bouton { margin-top: 0; }
.absents-du-jour { margin-bottom: var(--e4); }
.absents-du-jour h2 { font-size: 1rem; margin: 0 0 var(--e3); }
.absents-du-jour li { flex-wrap: wrap; justify-content: flex-start; column-gap: var(--e3); }
.accueil-reglage { text-align: center; margin: 0; }
.accueil-reglage a { display: inline-flex; align-items: center; gap: var(--e2); color: var(--texte-2); font-size: .9rem; padding: 10px 12px; min-height: 44px; }
.accueil-reglage .icone { width: 1em; height: 1em; }
.accueil-vide { text-align: center; }
.mes-pastilles { max-width: 560px; margin: 0 auto; }
.mes-pastilles fieldset { border: 0; margin: 0 0 var(--e4); padding: 0; }
.choix-pastilles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.choix-pastilles label { display: flex; align-items: center; gap: var(--e3); min-height: 48px; padding: 4px var(--e2); border-radius: var(--rayon-petit); cursor: pointer; font-weight: 550; }
.choix-pastilles label:hover { background: var(--surface-2); }
.choix-pastilles input { width: 20px; height: 20px; }

/* ---------- Import des élèves ---------- */
.import-eleves { max-width: 680px; }
.formulaire-import { display: grid; gap: var(--e4); margin-bottom: var(--e5); }
.aide-import h2 { display: flex; align-items: center; gap: var(--e2); font-size: 1rem; margin: 0 0 var(--e3); }
.aide-import h2 .icone { color: var(--marque); }
.aide-import ul { margin: 0 0 var(--e4); padding-left: 1.2em; color: var(--texte-2); line-height: 1.55; }
.colonnes-import { margin-bottom: var(--e4); }
.colonnes-import summary { cursor: pointer; font-weight: 600; }
.colonnes-import ul { margin-top: var(--e3); }
.ligne-erreur td { background: color-mix(in srgb, var(--danger-fond) 55%, transparent); }
.detail-import { display: block; margin-top: 2px; white-space: normal; }
.actions-collantes .bouton { flex: none; white-space: nowrap; }
@media (max-width: 640px) {
  .col-secondaire { display: none; }
  .entete .actions-ligne { width: 100%; }
}
.actions-cellule { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .texte-large { display: none; }
  .actions-cellule .bouton.petit { min-width: 44px; min-height: 44px; padding: 0; }
}

/* Le nombre de nouveautés sur une pastille (annonces non lues) */
.pastille-icone { position: relative; }
.pastille-badge {
  position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: grid; place-items: center; background: #d92d20; color: #fff; font-size: .78rem; font-weight: 700; line-height: 1;
  border: 2px solid var(--fond); font-variant-numeric: tabular-nums;
}
dialog.lanceur .pastille-badge { border-color: var(--surface); }
.pastille-badge[hidden] { display: none; }
.bouton-lanceur { position: relative; }
.point-nouveautes { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #d92d20; border: 2px solid var(--surface); }
.point-nouveautes[hidden] { display: none; }

/* ---------- Photos des annonces ---------- */
.annonce-photos { display: grid; gap: 6px; margin-top: var(--e3); grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.annonce-photos-1 { grid-template-columns: 1fr; max-width: 560px; }
.annonce-photos-2 { grid-template-columns: 1fr 1fr; }
.annonce-photos a { display: block; border-radius: var(--rayon-petit); overflow: hidden; background: var(--surface-2); }
.annonce-photos img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: cover; aspect-ratio: auto; }
.annonce-photos:not(.annonce-photos-1) img { aspect-ratio: 4 / 3; }
.destinataires { font-weight: 600; color: var(--texte-2); }
.formulaire-annonce fieldset.champ ul { gap: 4px; }
.carte > .actions-ligne { margin-top: var(--e3); }
button.lien.danger { min-height: 28px; padding: 4px 0; }

/* ---------- Pages de compte (activation, mot de passe oublié) ---------- */
.page-compte { min-height: 100vh; display: grid; place-items: center; padding: var(--e5) 16px; background: var(--fond); }
.carte-compte { background: var(--surface); border: 1px solid var(--bord); border-radius: 20px; padding: var(--e6) var(--e5); box-shadow: var(--ombre-2, 0 4px 18px rgba(0,0,0,.06)); max-width: 440px; }
.carte-compte .logo { display: inline-flex; align-items: center; gap: var(--e2); font-weight: 700; margin-bottom: var(--e5); }
.carte-compte h1 { font-size: 1.7rem; }
.carte-compte p .bouton { width: 100%; }

/* ---------- Accès des familles ---------- */
.tuiles-filtres { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tuiles-filtres .tuile { text-decoration: none; color: var(--texte-2); }
.tuiles-filtres .tuile:hover { border-color: var(--bord-fort); }
.tuiles-filtres .tuile.choisie { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); }
.appel-invitation { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); flex-wrap: wrap; margin-bottom: var(--e4); }
.appel-invitation > div { display: grid; gap: 2px; }
.champ-email-ligne { min-width: 220px; min-height: 36px; padding: 6px 10px; }
.tableau-familles td:first-child, .tableau-familles th:first-child { width: 44px; }
.tableau-familles input[type="checkbox"] { width: 20px; height: 20px; }
.profil-option { display: flex; align-items: center; gap: var(--e2); cursor: pointer; font-size: .88rem; }
.profil-option input { width: 18px; height: 18px; flex: none; }

/* ---------- Bandeau de plateforme (test / officielle) ---------- */
.bandeau-plateforme { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px var(--e4); padding: 6px 16px; font-size: .84rem; text-align: center; }
.bandeau-plateforme.test { background: #ffd8a8; color: #5c2b00; }
.bandeau-plateforme.officielle { background: var(--marque-clair); color: var(--texte); }
.bandeau-plateforme a { color: inherit; font-weight: 700; text-underline-offset: 2px; }
@media print { .bandeau-plateforme { display: none; } }
.plateformes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--e4); margin-bottom: var(--e5); }
.plateforme-carte h2, .mise-a-jour h2 { display: flex; align-items: center; gap: var(--e2); font-size: 1.05rem; margin: 0 0 var(--e1); }
.plateforme-carte.ici { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); }
.liste-nouveautes { margin: 0 0 var(--e4); padding-left: 1.2em; display: grid; gap: 4px; }
.formulaire-mise-a-jour { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e3); margin: var(--e3) 0; }
.formulaire-mise-a-jour label { display: grid; gap: 4px; font-weight: 600; font-size: .86rem; }

/* ---------- Démarches absentéisme (décret 2024) ---------- */
.demarches h2 { font-size: 1.05rem; margin: 0 0 var(--e3); }
.paliers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e3); }
.palier { border-left: 4px solid var(--bord-fort); padding: var(--e2) var(--e3); border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0; background: var(--surface-2); }
.palier.a-faire { border-left-color: var(--danger); }
.palier.fait { border-left-color: var(--ok); }
.palier-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); }
.palier-seuil { font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700; color: var(--texte-2); }
.palier p { margin: var(--e1) 0; }
.formulaire-demarche { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e2); }
.formulaire-demarche label { display: grid; gap: 2px; font-size: .82rem; font-weight: 600; }
.formulaire-demarche input[type="text"] { min-width: 220px; }
.tuile .chiffre small { font-size: .55em; color: var(--discret); }
.bandeau-plateforme.voir-comme { background: #d0bfff; color: #2b1a66; margin: 0; }
.bandeau-plateforme.voir-comme .lien { color: inherit; font-weight: 700; font-size: inherit; }

/* ---------- Sécurité du compte (double authentification) ---------- */
.securite-compte { max-width: 640px; }
.securite-compte h2 { display: flex; align-items: center; gap: var(--e2); font-size: 1.05rem; margin: 0 0 var(--e2); }
.securite-compte .carte { margin-bottom: var(--e4); }
.etapes-securite { padding-left: 1.3em; display: grid; gap: var(--e4); }
.qr-securite { margin: var(--e3) 0 var(--e1); }
.qr-securite svg { width: 190px; height: 190px; border-radius: 10px; background: #fff; }
.formulaire-securite { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e3); margin-top: var(--e2); }
.formulaire-securite label { display: grid; gap: 4px; font-weight: 600; font-size: .86rem; }
.formulaire-securite input { max-width: 180px; }
.codes-secours { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--e2); }
.codes-secours code { font-size: 1.05rem; letter-spacing: .08em; }

/* Absences signalées par les parents */
.formulaire-etroit { max-width: 40rem; }
.signalements-famille li { padding: 10px 14px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); flex-wrap: wrap; }
.signalement { display: grid; gap: var(--e2); }
.signalement > * { min-width: 0; }
.signalement-tete { display: flex; justify-content: space-between; align-items: center; gap: var(--e3); flex-wrap: wrap; }
.signalement-actions { display: flex; flex-wrap: wrap; gap: var(--e2); align-items: center; }
.signalement-actions select { flex: 0 1 18rem; min-width: 0; max-width: 100%; }
.signalement-message { margin: 0; padding: 8px 12px; border-left: 3px solid var(--marque); background: var(--surface-2); white-space: pre-line; }
.prevenu { font-size: .78rem; }

[hidden] { display: none !important; }

/* Talons-réponses */
.talon { margin-top: var(--e3); padding-top: var(--e3); border-top: 1px solid var(--bord); display: grid; gap: var(--e3); }
.talon h4 { margin: 0; display: flex; align-items: center; gap: var(--e2); flex-wrap: wrap; }
.talon fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--e2); min-width: 0; }
.talon legend { padding: 0; margin-bottom: var(--e2); }
.talon-choix { flex-wrap: wrap; }
.talon-enfant .bouton { justify-self: start; }
.talon-resume { margin: var(--e2) 0 0; }
.talon-resume a { display: inline-flex; align-items: center; gap: 6px; }
.grille-compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--e3); }
.compteur { display: grid; gap: 2px; margin: 0; }
.compteur strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.compteur span { color: var(--discret); font-size: .9rem; }
.compteur.attente strong { color: var(--alerte); }
.talon-limite { margin: calc(-1 * var(--e2)) 0 0; }

/* Accueil : les applications retirées restent accessibles */
.accueil-autres { margin-top: var(--e5); }
.accueil-autres summary { cursor: pointer; color: var(--discret); font-weight: 550; margin-bottom: var(--e3); }
.bouton-lanceur[aria-current="page"] { background: var(--surface-2); }
