/* Classes sportives : feuille de style
   Pensee pour un telephone d'entree de gamme, en plein soleil : grands
   caracteres, fort contraste, cibles tactiles larges. Une seule police,
   Atkinson Hyperlegible, dessinee pour qu'aucun chiffre ne se confonde. */

@font-face {
  font-family: "Atkinson Next";
  src: url(/polices/atkinson-next-latin.woff2) format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                 U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Next";
  src: url(/polices/atkinson-next-latin-ext.woff2) format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+A720-A7FF;
}

:root {
  --fond: #EEF2EE;
  --surface: #FFFFFF;
  --surface-2: #E3E9E4;
  --encre: #122019;
  --encre-2: #3B4D43;
  --encre-3: #5F7068;
  --trait: #CBD5CE;
  --terrain: #1D5A3A;
  --terrain-fonce: #164A2F;
  --terrain-clair: #DCEBE1;
  --sur-terrain: #FFFFFF;
  --ruban: #EDBB26;
  --ruban-trait: #20180A;
  --bleu: #2F5F98;
  --alerte: #A13D17;
  --alerte-clair: #F6E3DA;
  --attente: #7D5A00;
  --attente-clair: #FAEFCC;
  --ombre: 0 1px 0 rgba(18, 32, 25, .06), 0 8px 24px -18px rgba(18, 32, 25, .5);
  --police: "Atkinson Next", "Atkinson Hyperlegible", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0E1612; --surface: #15201B; --surface-2: #1C2A23; --encre: #E5ECE7; --encre-2: #B3C0B8;
    --encre-3: #8A9A92; --trait: #2A3A32; --terrain: #6BC093; --terrain-fonce: #86D1A9; --terrain-clair: #1B3226;
    --sur-terrain: #0E1612; --ruban: #D9AA20; --bleu: #7AA3DA; --alerte: #EC8C66; --alerte-clair: #3A2018;
    --attente: #E6BA4E; --attente-clair: #33290E; --ombre: 0 1px 0 rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0E1612; --surface: #15201B; --surface-2: #1C2A23; --encre: #E5ECE7; --encre-2: #B3C0B8;
  --encre-3: #8A9A92; --trait: #2A3A32; --terrain: #6BC093; --terrain-fonce: #86D1A9; --terrain-clair: #1B3226;
  --sur-terrain: #0E1612; --ruban: #D9AA20; --bleu: #7AA3DA; --alerte: #EC8C66; --alerte-clair: #3A2018;
  --attente: #E6BA4E; --attente-clair: #33290E; --ombre: 0 1px 0 rgba(0, 0, 0, .3); color-scheme: dark;
}

/* Echelle typographique : 13, 15, 17, 20, 25, 32, 44 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font-family: var(--police); font-size: 17px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 32px; font-weight: 800; }
h2 { font-size: 25px; font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
a { color: var(--terrain); }
b, strong { font-weight: 750; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
.muet { color: var(--encre-3); }
.nombre { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- cadre */
.demo {
  background: var(--ruban); color: var(--ruban-trait); font-size: 15px; line-height: 1.35;
  padding: 7px 16px; text-align: center;
}
/* L'en-tete reste colle au bord haut de l'ecran et son fond s'etend sous l'heure et
   la batterie : sur iPhone, rien ne defile dessous, donc rien n'y est floute. */
.entete {
  background: var(--surface); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 5;
  padding-top: env(safe-area-inset-top, 0px);
}
.entete-in {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px;
}
.marque { display: flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; min-width: 0; flex: 1; }
.marque svg { flex: none; }
.marque span { display: flex; flex-direction: column; min-width: 0; }
.marque b { font-size: 17px; line-height: 1.2; }
.marque small { font-size: 13px; color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reseau {
  appearance: none; border: 1px solid var(--trait); background: var(--surface); color: var(--encre);
  font: inherit; font-size: 15px; padding: 6px 12px; border-radius: 999px; display: inline-flex;
  align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; min-height: 40px;
}
.reseau i { width: 10px; height: 10px; border-radius: 50%; background: var(--terrain); flex: none; }
.reseau.hors { background: var(--attente-clair); border-color: var(--attente); color: var(--attente); }
.reseau.hors i { background: var(--attente); }
.reseau.envoi i { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
/* Compte : un bouton rond toujours visible, qui ouvre le menu (mot de passe, deconnexion) */
.profil-menu { position: relative; flex: none; }
.avatar {
  appearance: none; border: none; background: none; font: inherit; color: var(--encre); cursor: pointer;
  display: flex; align-items: center; gap: 10px; padding: 2px; border-radius: 999px; min-height: 44px;
}
.avatar-nom { display: flex; flex-direction: column; text-align: right; font-size: 15px; line-height: 1.25; }
.avatar-nom small { color: var(--encre-3); font-size: 13px; }
.avatar-rond {
  width: 42px; height: 42px; border-radius: 50%; background: var(--terrain); color: #fff; display: grid; place-items: center;
  font-weight: 750; font-size: 16px; box-shadow: 0 0 0 3px var(--terrain-clair);
}
.avatar:hover .avatar-rond, .avatar[aria-expanded="true"] .avatar-rond { background: var(--terrain-fonce); }
.avatar:focus-visible { outline: 3px solid var(--ruban); outline-offset: 2px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 270px; padding: 8px;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: 0 14px 34px -12px rgba(18, 32, 25, .4); display: flex; flex-direction: column;
}
.menu[hidden] { display: none; }
.menu-qui { padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--trait); display: flex; flex-direction: column; gap: 2px; }
.menu-qui span { color: var(--encre-2); font-size: 14px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; border-radius: 8px;
  background: none; border: none; font: inherit; font-size: 16px; font-weight: 650; color: var(--encre);
  text-decoration: none; text-align: left; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--fond); outline: none; }
.menu-item .icone { width: 22px; height: 22px; flex: none; color: var(--encre-2); }
.menu-item.sortie, .menu-item.sortie .icone { color: var(--alerte); }
@media (max-width: 720px) { .avatar-nom { display: none; } }

.lien-bouton {
  appearance: none; border: none; background: none; color: var(--terrain); font: inherit; font-size: 15px;
  text-decoration: underline; cursor: pointer; padding: 8px 4px;
}
.pied { display: none; max-width: 760px; margin: -90px auto 0; padding: 0 16px 40px; font-size: 15px; color: var(--encre-2); }
@media (max-width: 560px) {
  .pied { display: block; }
  .marque b { display: none; }
  .marque small { font-size: 15px; font-weight: 650; color: var(--encre); white-space: normal; line-height: 1.25; }
  .demo .long { display: none; }
}
@media (min-width: 561px) { .demo .court { display: none; } }

.onglets { background: var(--surface); border-bottom: 1px solid var(--trait); }
.onglets-in { max-width: 1180px; margin: 0 auto; padding: 0 8px; display: flex; gap: 4px; overflow-x: auto; }
.nom-famille { text-transform: uppercase; }
.onglets a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 12px 10px; color: var(--encre-2);
  text-decoration: none; font-weight: 650; border-bottom: 3px solid transparent; white-space: nowrap;
}
.onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--terrain); }
.onglets .court { display: none; }
@media (max-width: 560px) {
  .onglets-in { padding: 0 4px; gap: 0; }
  .onglets a { flex: 1 1 auto; justify-content: center; padding: 12px 6px 10px; font-size: 15px; gap: 5px; }
  .onglets .long { display: none; }
  .onglets .court { display: inline; }
  .onglets .pastille { min-width: 20px; padding: 0 5px; font-size: 12px; line-height: 20px; }
}
@media (max-width: 370px) { .onglets a { font-size: 14px; padding: 12px 4px 10px; } }
.pastille {
  display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--alerte);
  color: #fff; font-size: 13px; line-height: 22px; text-align: center; font-weight: 700;
}

.vue { max-width: 1180px; margin: 0 auto; padding: 22px 16px 120px; outline: none; }
.vue.etroite { max-width: 760px; }
.vue[aria-busy="true"] { opacity: .55; transition: opacity .2s .15s; }
.titre { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.titre p { color: var(--encre-2); max-width: 64ch; }
.section { margin-top: 34px; }
.section > h2 { margin-bottom: 6px; }
.section > .aide { margin-bottom: 14px; }
.aide { color: var(--encre-2); font-size: 15px; max-width: 70ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.retour { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; margin-bottom: 12px; min-height: 36px; }
.retour::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

/* ---------------------------------------------------------------- boutons, champs */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 20px; border-radius: 8px; border: 2px solid var(--terrain);
  background: var(--terrain); color: var(--sur-terrain); font: inherit; font-weight: 700; font-size: 17px;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--terrain-fonce); border-color: var(--terrain-fonce); }
.btn.sec { background: transparent; color: var(--terrain); }
.btn.sec:hover { background: var(--terrain-clair); }
.btn.petit { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.btn.danger { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn .icone { width: 20px; height: 20px; flex: none; }
.rapport-actions { align-items: center; margin: -6px 0 18px; }
.rapport-actions .aide { font-size: 14px; }

.formulaire { display: flex; flex-direction: column; gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 15px; color: var(--encre-2); }
input, select, textarea {
  font: inherit; font-size: 18px; color: var(--encre); background: var(--surface);
  border: 2px solid var(--trait); border-radius: 8px; padding: 10px 12px; min-height: 50px; width: 100%;
}
textarea { min-height: 70px; resize: vertical; font-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--terrain); outline: none; box-shadow: 0 0 0 3px var(--terrain-clair); }
input[aria-invalid="true"] { border-color: var(--alerte); }
.avec-unite { display: flex; align-items: stretch; }
.avec-unite input { border-top-right-radius: 0; border-bottom-right-radius: 0; font-size: 22px; font-weight: 650; }
.avec-unite span {
  display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 2px solid var(--trait);
  border-left: none; border-radius: 0 8px 8px 0; font-size: 15px; color: var(--encre-2); min-width: 64px; justify-content: center;
}
.note { font-size: 15px; font-weight: 500; }
.note.avert { color: var(--attente); }
.note.faux { color: var(--alerte); }
.erreur { color: var(--alerte); font-weight: 650; }
fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-size: 20px; font-weight: 750; color: var(--encre); padding: 0; margin-bottom: 12px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix { display: flex; gap: 10px; flex-wrap: wrap; }
.choix label {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--trait);
  border-radius: 8px; background: var(--surface); font-weight: 650; color: var(--encre); min-height: 50px; cursor: pointer;
}
.choix input { width: auto; min-height: 0; accent-color: var(--terrain); }
.coche { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; color: var(--encre); }
.coche input { width: 24px; height: 24px; min-height: 0; margin-top: 2px; accent-color: var(--terrain); flex: none; }

/* ---------------------------------------------------------------- accueil et connexion */
/* L'accueil tient sur un ecran de telephone : bandeau, six tuiles, rien a faire defiler */
.vue:has(> .accueil) { padding-top: 0; padding-bottom: 20px; }
.accueil { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
.accueil-tete { background: var(--terrain); color: #fff; margin: 0 -16px; padding: calc(26px + env(safe-area-inset-top, 0px)) 20px 20px; display: flex; align-items: center; gap: 16px; }
.accueil-tete .logo { flex: none; border-radius: 15px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .28); }
.accueil-tete h1 { color: #fff; font-size: 40px; line-height: 1; letter-spacing: -.025em; }
.accueil-tete p { color: #CFE3D6; font-size: 16px; line-height: 1.35; margin-top: 6px; }
/* Le metre ruban de la marque, gradue */
.accueil-regle {
  height: 12px; margin: 0 -16px;
  background:
    repeating-linear-gradient(90deg, var(--ruban-trait) 0 2px, transparent 2px 60px) 0 0 / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--ruban-trait) 0 1.5px, transparent 1.5px 12px) 0 0 / 100% 5px no-repeat,
    var(--ruban);
}
.accueil-corps { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }
.comptes { display: flex; flex-direction: column; }
.comptes h2 { font-size: 20px; }
.comptes > p { font-size: 14.5px; color: var(--encre-2); margin: 2px 0 12px; }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compte-demo {
  appearance: none; text-align: left; font: inherit; color: var(--encre); cursor: pointer;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre);
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; align-content: center;
  padding: 10px 10px; min-height: 74px; transition: border-color .15s, transform .1s;
}
.compte-demo .icone { grid-row: 1 / span 2; width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--terrain-clair); color: var(--terrain); }
.compte-demo b { font-size: 15px; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; hyphens: auto; }
.compte-demo span { font-size: 13px; line-height: 1.3; color: var(--encre-2); }
.compte-demo:hover { border-color: var(--terrain); }
.compte-demo:active { transform: scale(.98); }
.compte-demo:focus-visible { outline: 3px solid var(--ruban); outline-offset: 2px; }
.comptes .erreur { margin-top: 12px; }
.autre-compte { border-top: 1px solid var(--trait); }
.autre-compte summary { cursor: pointer; color: var(--encre-2); font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.autre-compte .formulaire { margin-top: 6px; }
.autre-compte .aide { margin-top: 12px; }
@media (min-width: 561px) {
  .accueil { margin-top: 5vh; }
  .accueil-tete, .accueil-regle { margin: 0; }
  .accueil-tete { border-radius: 16px 16px 0 0; padding: 30px 28px 24px; }
}
/* Petits ecrans (iPhone SE) : tout reste visible sans defiler */
@media (max-height: 700px) and (max-width: 560px) {
  .accueil-tete { padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px; gap: 12px; }
  .accueil-tete .logo { width: 46px; height: 46px; border-radius: 11px; }
  .accueil-tete h1 { font-size: 30px; }
  .accueil-tete p { font-size: 14px; margin-top: 3px; }
  .accueil-regle { height: 9px; }
  .accueil-corps { gap: 10px; padding-top: 12px; }
  .inst-ligne { min-height: 46px; padding-block: 4px; }
  .comptes h2 { font-size: 18px; }
  .comptes > p { font-size: 13.5px; margin: 0 0 8px; }
  .tuiles { gap: 8px; }
  .compte-demo { min-height: 62px; padding: 7px 9px; }
  .compte-demo .icone { width: 32px; height: 32px; padding: 6px; }
  .autre-compte summary { min-height: 40px; }
}
@media (max-width: 360px) {
  .accueil-tete h1 { font-size: 30px; }
  .compte-demo { grid-template-columns: minmax(0, 1fr); }
  .compte-demo .icone { display: none; }
}

/* ---------------------------------------------------------------- installation sur l'ecran d'accueil */
.installation { background: var(--terrain-clair); border-radius: 12px; }
.installation[hidden] { display: none; }
.inst-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; min-height: 56px; }
.inst-texte { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.3; }
.inst-texte .icone { width: 24px; height: 24px; color: var(--terrain); flex: none; }
.inst-details summary { list-style: none; cursor: pointer; }
.inst-details summary::-webkit-details-marker { display: none; }
.inst-comment { color: var(--terrain); font-weight: 700; font-size: 15px; text-decoration: underline; white-space: nowrap; padding: 8px 4px; }
.inst-details[open] .inst-comment { text-decoration: none; }
.inst-details ol { margin: 0; padding: 0 16px 14px 38px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.glyphe { width: 18px; height: 18px; vertical-align: -3px; margin-right: 3px; color: var(--bleu); }
.pied .installation { margin-top: 16px; }

/* ---------------------------------------------------------------- campagne, jauges */
.campagne { display: flex; flex-direction: column; gap: 4px; }
.campagne p { color: var(--encre-2); }
.jauge { display: block; position: relative; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: visible; }
.jauge > i { position: absolute; inset: 0 auto 0 0; background: var(--terrain); border-radius: 999px; }
.jauge > s {
  position: absolute; top: -5px; bottom: -5px; width: 3px; background: var(--encre); border-radius: 2px;
  text-decoration: none;
}
.jauge.fine { height: 8px; }

.classes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.classe { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre); }
.classe > a { display: grid; gap: 8px; padding: 18px 18px 16px; color: var(--encre); text-decoration: none; }
.classe-nom { font-size: 25px; font-weight: 800; }
.classe-lieu, .classe-compte { color: var(--encre-2); font-size: 15px; }
.classe .lien-signal {
  display: block; border-top: 1px solid var(--trait); padding: 12px 18px; font-weight: 650; color: var(--alerte);
}

/* ---------------------------------------------------------------- liste d'eleves */
.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.filtres button {
  appearance: none; font: inherit; font-size: 15px; font-weight: 650; padding: 8px 14px; min-height: 40px;
  border-radius: 999px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); cursor: pointer;
}
.filtres button[aria-pressed="true"] { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.eleves { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; }
.eleves li + li { border-top: 1px solid var(--trait); }
.eleves a, .eleves .ligne {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nom statut" "info statut";
  column-gap: 12px; padding: 12px 16px; color: var(--encre); text-decoration: none; min-height: 64px; align-items: center;
}
.eleves a:hover { background: var(--terrain-clair); }
.eleve-nom { grid-area: nom; font-size: 18px; }
.eleve-info { grid-area: info; font-size: 15px; color: var(--encre-3); }
.statut {
  grid-area: statut; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.st-a-evaluer .statut { border-color: var(--trait); color: var(--encre-2); }
.st-evalue .statut { background: var(--terrain-clair); color: var(--terrain); }
.st-incomplet .statut, .st-verifier .statut { background: var(--alerte-clair); color: var(--alerte); }
.st-attente .statut { background: var(--attente-clair); color: var(--attente); }
.sans-consentement { color: var(--alerte); }

/* ---------------------------------------------------------------- saisie */
.saisie-tete { margin-bottom: 20px; }
.saisie-tete h1 { font-size: 32px; }
.saisie-tete p { color: var(--encre-2); margin-top: 6px; }
.saisie { display: flex; flex-direction: column; gap: 28px; }
.test-nom { display: flex; flex-direction: column; color: var(--encre); font-size: 17px; font-weight: 700; }
.test-nom small { font-weight: 500; font-size: 13px; color: var(--encre-3); }
.imc { font-size: 15px; color: var(--encre-2); }
.barre-action {
  position: sticky; bottom: 0; background: linear-gradient(to top, var(--fond) 70%, transparent);
  padding: 18px 0 14px; display: flex; flex-wrap: wrap; gap: 10px;
}
.barre-action .btn { flex: 1 1 200px; }
.etat-envoi { font-size: 20px; font-weight: 750; display: flex; gap: 10px; align-items: center; }
.etat-envoi::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--terrain); flex: none; }
.etat-envoi.attente::before { background: var(--attente); }
.etat-envoi.refus::before { background: var(--alerte); }
.encadre { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 18px; }
.navette { background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: 24px; text-align: center; }
.navette-palier { display: flex; flex-direction: column; align-items: center; margin: 0; }
.navette-palier span { font-size: 18px; font-weight: 650; color: var(--encre-2); }
.navette-palier b { font-size: 120px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums slashed-zero; }
.navette-detail { font-size: 20px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.navette-noter { font-size: 18px; margin: 16px 0; min-height: 28px; }
.navette-noter b { font-size: 28px; }
.navette .actions { justify-content: center; }
.outils { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
.outils .champ { flex: 1 1 220px; }
.outils select, .outils input { width: 100%; }
.mdp-provisoire { font-family: 'Atkinson Hyperlegible Next', sans-serif; font-size: 32px; font-weight: 750; letter-spacing: .08em; margin: 8px 0; font-variant-numeric: slashed-zero; }
.actions-ligne { white-space: nowrap; }
.date-journal { white-space: nowrap; font-variant-numeric: tabular-nums; }
.actions-ligne .lien-bouton + .lien-bouton { margin-left: 12px; }
tr.inactif th, tr.inactif td { color: var(--encre-3); }
.choix-liste { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); }
.choix-liste li + li { border-top: 1px solid var(--trait); }
.choix-liste label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-weight: 500; cursor: pointer; }
.choix-liste input { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 2px 0 0; accent-color: var(--terrain); }
@media (max-width: 560px) { .cache-tel { display: none; } .barre-cellule { min-width: 110px; } }
.choix-liste .aide { font-size: 14px; }
.encadre.alerte { background: var(--alerte-clair); border-color: transparent; }
.encadre.attente { background: var(--attente-clair); border-color: transparent; }

/* ---------------------------------------------------------------- le ruban
   La position d'un eleve se lit comme sur un metre ruban : le zero est ce
   qu'on attend a son age exact et a son developpement, chaque graduation
   un demi ecart-type. */
.rubans { display: flex; flex-direction: column; gap: 18px; }
.ruban-legende {
  display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 13px; color: var(--encre-3);
}
.ruban-legende span:nth-child(2) { text-align: center; }
.ruban-legende span:nth-child(3) { text-align: right; }
.ruban-tete { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 12px; margin-bottom: 6px; }
.ruban-tete span { font-weight: 700; grid-column: 1 / -1; }
.ruban-tete b { font-size: 20px; }
.ruban-tete em { font-style: normal; font-size: 15px; color: var(--encre-2); justify-self: end; text-align: right; grid-column: 2; }
.ruban-tete em.haut { color: var(--terrain); font-weight: 700; }
.ruban-tete em.bas { color: var(--encre-3); }
.ruban {
  position: relative; height: 30px; border-radius: 3px; background-color: var(--ruban);
  background-image:
    linear-gradient(90deg, var(--ruban-trait) 2px, transparent 2px),
    linear-gradient(90deg, var(--ruban-trait) 1px, transparent 1px);
  background-size: calc(100% / 6) 12px, calc(100% / 12) 7px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18);
}
.ruban-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--ruban-trait); }
.ruban-curseur {
  position: absolute; top: -7px; bottom: -7px; width: 0; transform: translateX(-50%);
}
.ruban-curseur::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; background: var(--terrain);
  border-radius: 2px; box-shadow: 0 0 0 2px var(--surface);
}
.ruban-curseur::after {
  content: ""; position: absolute; bottom: -9px; left: -8px; border: 8px solid transparent; border-bottom: 9px solid var(--terrain);
  border-top: none;
}
.ruban.vide { background-image: none; background-color: var(--surface-2); }

/* ---------------------------------------------------------------- fiche */
.fiche-tete { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.fiche-tete h1 { font-size: 32px; }
.identifiant { font-size: 15px; color: var(--encre-3); }
.faits { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--encre-2); font-size: 15px; }
.tableau { overflow-x: auto; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--trait); vertical-align: top; }
thead th { font-size: 13px; color: var(--encre-3); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody th { font-weight: 650; min-width: 9em; }
td.n, th.n { text-align: right; white-space: nowrap; }
.douteux { color: var(--alerte); font-weight: 700; }
.corrige { color: var(--bleu); }
.parcours { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.parcours li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.parcours li b { font-size: 15px; }
.parcours li span { color: var(--encre-2); font-size: 15px; }
.courbe { max-width: 720px; }
.courbe svg { width: 100%; height: auto; display: block; }
.courbe .axe { stroke: var(--trait); }
.courbe .zero { stroke: var(--encre-3); stroke-dasharray: 4 4; }
.courbe .trace { stroke: var(--terrain); stroke-width: 3; fill: none; }
.courbe .point { fill: var(--surface); stroke: var(--terrain); stroke-width: 3; }
.courbe text { fill: var(--encre-3); font-size: 13px; font-family: var(--police); }

/* ---------------------------------------------------------------- signalements */
.signaux { display: flex; flex-direction: column; gap: 12px; }
.signal { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.signal header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.signal header a { font-size: 20px; color: var(--encre); }
.signal header span { color: var(--encre-3); font-size: 15px; }
.motif { font-weight: 650; }
.motif b { color: var(--terrain); }
.signal-date { font-size: 15px; color: var(--encre-2); }
.retard { color: var(--alerte); font-weight: 650; }
.decision { font-size: 15px; background: var(--surface-2); padding: 8px 12px; border-radius: 8px; }
.signal form { display: flex; flex-direction: column; gap: 10px; }

/* ---------------------------------------------------------------- pilotage */
.avancement { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 20px; box-shadow: var(--ombre); }
.avancement-chiffre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.avancement-chiffre b { font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.avancement-chiffre span { color: var(--encre-2); max-width: 52ch; }
.avancement .jauge { height: 18px; }
.avancement .legende { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--encre-3); margin-top: 10px; }
.indicateurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.indicateur { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: 1px 0 0 var(--trait), 0 1px 0 var(--trait); }
.indicateur .code { font-size: 13px; color: var(--encre-3); font-weight: 650; }
.indicateur .valeur { font-size: 32px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.indicateur .valeur small { font-size: 20px; font-weight: 700; margin-left: 2px; }
.indicateur .libelle { font-weight: 650; }
.indicateur .detail { font-size: 15px; color: var(--encre-2); }
.indicateur .source { font-size: 13px; color: var(--encre-3); margin-top: 6px; }
.barre-cellule { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.barre-cellule .jauge { flex: 1; height: 8px; }
.barre-cellule span { width: 52px; text-align: right; }
.equite { display: flex; flex-direction: column; gap: 16px; }
.equite-ligne { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
.equite-ligne > span { font-size: 15px; font-weight: 650; }
.equite-barres { position: relative; display: flex; flex-direction: column; gap: 4px; }
.equite-barres div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--encre-2); }
.equite-barres i { display: block; height: 14px; border-radius: 0 3px 3px 0; }
.equite-barres .ord i { background: var(--ruban); }
.equite-barres .cor i { background: var(--bleu); }
.equite-un { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--encre); }
.equite-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--encre-2); }
.equite-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 560px) { .equite-ligne { grid-template-columns: 1fr; gap: 6px; } }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- divers */
.annonce {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; max-width: min(92vw, 520px);
  background: var(--encre); color: var(--fond); padding: 12px 18px; border-radius: 10px; font-size: 15px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.annonce.visible { opacity: 1; }
.vide-etat { padding: 28px 18px; text-align: center; color: var(--encre-2); background: var(--surface); border: 1px dashed var(--trait); border-radius: 12px; }
.bloc-erreur { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 24px 0; }
.anomalies { margin-bottom: 18px; }
.anomalies ul { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }

@media (max-width: 560px) {
  h1 { font-size: 28px; }
  .actions > .btn { flex: 1 1 100%; }
  .connexion h1 { font-size: 36px; }
  .saisie-tete h1 { font-size: 28px; }
  .deux { grid-template-columns: 1fr 1fr; }
  th, td { padding: 9px 10px; }
  .indicateur .valeur { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- feuille de seance */
.feuille { background: #fff; color: #111; border: 1px solid var(--trait); border-radius: 12px; padding: 18px; overflow-x: auto; }
.feuille-tete { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 6px 18px; font-size: 14px; margin-bottom: 12px; }
.feuille table { font-size: 12px; min-width: 980px; }
.feuille th, .feuille td { border: 1px solid #9aa59e; padding: 4px 6px; height: 30px; vertical-align: middle; }
.feuille thead th { background: #eef2ee; color: #111; font-size: 11px; white-space: normal; line-height: 1.2; vertical-align: bottom; }
.feuille tbody th { font-weight: 500; white-space: nowrap; min-width: 0; }
.feuille tbody th b { font-weight: 750; }
.feuille-pied { font-size: 11px; margin-top: 8px; color: #333; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .demo, .entete, .onglets, .pied, .annonce, .ecran-seul { display: none !important; }
  .vue { max-width: none; padding: 0; }
  .feuille { border: none; padding: 0; border-radius: 0; overflow: visible; }
  .feuille table { min-width: 0; width: 100%; table-layout: fixed; }
  .feuille thead th:nth-child(1) { width: 8mm; }
  .feuille thead th:nth-child(2) { width: 50mm; }
  .feuille thead th:nth-child(3) { width: 10mm; }
  .feuille thead th:nth-child(4) { width: 13mm; }
  .feuille thead th:nth-child(5), .feuille thead th:nth-child(6) { width: 17mm; }
  .feuille tbody th { overflow: hidden; text-overflow: ellipsis; }
  .feuille th, .feuille td { height: 7.2mm; }
  .feuille tr { break-inside: avoid; }
}

/* ---------------------------------------------------------------- licences */
.licences li { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.licence-ligne { grid-template-columns: 34px 1fr auto !important; grid-template-areas: "case nom statut" "case info statut" !important; cursor: pointer; }
.licence-ligne input, .licence-ligne .case-vide { grid-area: case; width: 22px; height: 22px; min-height: 0; accent-color: var(--terrain); }
.photo-bouton { padding-right: 14px; white-space: nowrap; }
@media (max-width: 560px) {
  .licences li { grid-template-columns: 1fr; }
  .licences .photo-bouton { justify-self: start; padding: 0 16px 12px 66px; min-height: 36px; }
}
.constats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.constats li { font-size: 15px; padding: 7px 10px; border-radius: 6px; border-left: 4px solid; }
.constats .bloquant { background: var(--alerte-clair); border-color: var(--alerte); color: var(--alerte); font-weight: 650; }
.constats .a-verifier { background: var(--attente-clair); border-color: var(--attente); }
.constats .info { background: var(--surface-2); border-color: var(--trait); color: var(--encre-2); }
.initiales { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: #e6ebe7; color: #56645c; font-weight: 800; font-size: 20px; letter-spacing: .04em; }

/* La carte : format ID-1, celui d'une carte bancaire, dix par feuille A4 */
.planche { display: grid; grid-template-columns: repeat(auto-fill, 85.6mm); gap: 6mm; }
.carte-licence { position: relative; width: 85.6mm; height: 54mm; background: #fff; color: #111; border: .3mm solid #9aa59e;
  border-radius: 3mm; overflow: hidden; display: flex; flex-direction: column; font-size: 8pt; line-height: 1.25; break-inside: avoid; }
.carte-licence header { display: flex; justify-content: space-between; align-items: center; padding: 1.6mm 3mm;
  background: #1D5A3A; color: #fff; font-size: 7.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.carte-licence header b { letter-spacing: .02em; }
.carte-corps { flex: 1; display: grid; grid-template-columns: 19mm 1fr 22mm; gap: 2.2mm; padding: 2.2mm 2.6mm 1mm; align-items: start; }
.carte-photo { width: 19mm; height: 25mm; border-radius: 1mm; overflow: hidden; background: #e6ebe7; }
.carte-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carte-info p { margin: 0 0 .8mm; }
.carte-nom { font-size: 9.5pt; line-height: 1.15; margin-bottom: 1.2mm !important; }
.carte-qr svg { width: 22mm; height: 22mm; display: block; }
.carte-licence footer { display: flex; justify-content: space-between; padding: 1mm 3mm 1.6mm; font-size: 7pt; color: #333;
  border-top: .2mm solid #d0d6d2; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.specimen { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 22pt; font-weight: 800;
  color: rgba(161, 61, 23, .22); letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }

/* Le verdict du controle : lisible a trois metres, en plein soleil */
.verdict { border-radius: 14px; padding: 18px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; border: 3px solid; }
.verdict.valide { background: var(--terrain-clair); border-color: var(--terrain); }
.verdict.non_valide, .verdict.inconnue { background: var(--alerte-clair); border-color: var(--alerte); }
.verdict-titre { font-size: 32px; font-weight: 800; line-height: 1.05; }
.verdict.valide .verdict-titre { color: var(--terrain); }
.verdict.non_valide .verdict-titre, .verdict.inconnue .verdict-titre { color: var(--alerte); }
.verdict-corps { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.carte-photo.grande { width: 120px; height: 160px; border-radius: 8px; }
.carte-photo.grande .initiales { font-size: 36px; }
.verdict-nom { font-size: 22px; line-height: 1.2; margin-bottom: 4px !important; }
.scan { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 16px; color: #fff; }
.scan video { width: min(90vw, 480px); aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 3px solid var(--ruban); }

@media print {
  /* A4 paysage, marges de 10 mm : trois colonnes et trois rangees, soit neuf cartes par feuille */
  .planche { gap: 4mm 6mm; grid-template-columns: repeat(3, 85.6mm); justify-content: center; }
  .carte-licence { border-color: #777; }
}
