/* =====================================================================
   MON CAHIER DE GROUPE — Chantier 1 : Design tokens & typographie
   Refonte visuelle sans impact fonctionnel.
   Typo : Oswald (display, sportif) + Inter (corps, académique)
   ===================================================================== */
/* Polices servies par le site, plus depuis Internet (18/09/2026) :
   au bord d'un terrain, une connexion faible empêchait le chargement et
   l'application pouvait s'afficher sans mise en forme. */
@import url('vendor/polices.css');

/* ---------- 1. Design tokens ---------- */
:root{
    /* Marque (accent d'interaction — constant partout) */
    --brand:         #F77F00;
    --brand-dark:    #D96B00;
    --brand-soft:    #FFF3E4;
    --secondary:     #119D6B;
    --secondary-soft:#E4F5EE;

    /* Neutres */
    --ink:      #0F1B2D;   /* texte principal */
    --ink-2:    #334155;   /* texte secondaire */
    --muted:    #64748B;   /* meta / labels */
    --line:     #E5E9F0;   /* bordure fine */
    --line-2:   #F1F4F8;   /* bordure très pâle */
    --surface:  #FFFFFF;   /* fond carte */
    --surface-alt:#FAFBFC; /* fond zone secondaire */

    /* Statuts */
    --success:#16A34A; --success-soft:#F0FDF4; --success-line:#BBF7D0;
    --warning:#F59E0B; --warning-soft:#FFFBEB; --warning-line:#FDE68A;
    --danger: #EF4444; --danger-soft: #FEF2F2; --danger-line: #FECACA;
    --info:   #0284C7; --info-soft:   #F0F9FF; --info-line:   #BAE6FD;

    /* Lignes F/G — très subtiles + barre latérale colorée */
    --row-f:      rgba(236, 72, 153, .05);
    --row-f-bar:  #EC4899;
    --row-g:      rgba(59, 130, 246, .05);
    --row-g-bar:  #3B82F6;

    /* Verre (topbar uniquement — la seule surface premium) */
    --glass:         rgba(255,255,255,.72);
    --glass-border:  rgba(255,255,255,.55);

    /* Layout */
    --rail-w:       64px;
    --rail-w-open:  236px;

    /* Ombres calibrées */
    --shadow-1: 0 1px 2px rgba(15,27,45,.04), 0 1px 3px rgba(15,27,45,.06);
    --shadow-2: 0 2px 4px rgba(15,27,45,.04), 0 8px 24px rgba(15,27,45,.07);
    --shadow-3: 0 12px 32px rgba(15,27,45,.14);

    /* Rayons */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 12px;
    --r-xl: 14px;   /* 16 et 20 avant le 08/10/2026 : les grands blocs faisaient « bulle » */

    /* Échelle typographique */
    --fs-xxs: .72rem;
    --fs-xs:  .82rem;
    --fs-sm:  .9rem;
    --fs-md:  1rem;
    --fs-lg:  1.15rem;
    --fs-xl:  1.35rem;
    --fs-2xl: 1.75rem;
    --fs-3xl: clamp(2rem, 4.5vw, 2.75rem);

    /* --accent = couleur d'humeur de la page (pages_meta),
       utilisée UNIQUEMENT pour le halo de fond et la pastille du titre.
       Les commandes (boutons, actifs, focus) restent sur --brand. */
    --accent: var(--brand);

    /* Texte posé sur un fond orange plein (boutons, pastilles, compteurs) : bleu nuit, 6,6:1.
       Le blanc sur l'orange ne faisait que 2,6:1, illisible au soleil (choix A de Jems, 25/10/2026). */
    --on-brand: var(--ink);
}

/* ---------- 2. Base ---------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
    margin:0;
    font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--fs-sm);
    color: var(--ink);
    line-height: 1.5;
    min-height:100vh;
    overflow-x:hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hiérarchie typographique */
h1, .h1{ font-family:'Oswald', sans-serif; font-size: var(--fs-2xl); font-weight:600; letter-spacing:.02em; margin:0; }
h2, .h2{ font-family:'Oswald', sans-serif; font-size: var(--fs-xl);  font-weight:600; letter-spacing:.02em; margin:0; }
h3, .h3{ font-family:'Oswald', sans-serif; font-size: var(--fs-lg);  font-weight:600; letter-spacing:.03em; margin:0; }
h4, .h4{ font-family:'Oswald', sans-serif; font-size: var(--fs-md);  font-weight:600; letter-spacing:.03em; margin:0; }
h5, .h5{ font-family:'Oswald', sans-serif; font-size: var(--fs-sm);  font-weight:600; letter-spacing:.04em; margin:0; }
h6, .h6{ font-family:'Oswald', sans-serif; font-size: var(--fs-xs);  font-weight:600; letter-spacing:.06em; text-transform:uppercase; color: var(--ink-2); margin:0; }
.text-muted{ color: var(--muted) !important; }

/* ---------- 3. Fonds atmosphériques ---------- */
.bg-sky{
    position:fixed; inset:0; z-index:-3;
    background:linear-gradient(165deg, var(--sky-1) 0%, var(--sky-2) 52%, var(--sky-3) 100%);
    transition:background .8s ease;
}
.bg-veil{
    position:fixed; inset:0; z-index:-2;
    background:radial-gradient(1200px 700px at 18% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%);
}
.bg-athlete{
    position:fixed; right:-12px; bottom:-14px; z-index:-1;
    width:min(44vw,540px); color: var(--brand);
    opacity:.10; pointer-events:none;
    filter:drop-shadow(0 10px 30px rgba(0,0,0,.15));
}
.bg-athlete svg{ width:100%; height:auto; display:block; }

/* ---------- 4. Layout / Stage ---------- */
.stage{
    margin-left: var(--rail-w);
    margin-right: var(--rail-w);
    padding: 22px clamp(14px,3vw,40px) 60px;
    max-width: 1180px;
    transition: margin .35s ease;
}
@media(max-width:992px){ .stage{ margin-left:14px; margin-right:14px; } }
/* Grand écran (08/10/2026) : le contenu est centré, au lieu de rester collé à
   gauche avec la moitié de l'écran vide. 1308px = 1180 + les deux barres. */
@media(min-width:1309px){ .stage{ margin-left:auto; margin-right:auto; } }
/* Le menu de gauche ouvert passe PAR-DESSUS la page, il ne la pousse pas
   (08/10/2026). Un essai où il la poussait a été retiré le jour même : sur
   ordinateur, toute la page se resserrait et se réarrangeait à chaque passage
   de la souris sur la barre (retour de Jems). Ne pas le rétablir. */
/* ---------- 5. Topbar (seule surface verre premium) ---------- */
.topbar{
    display:flex; align-items:center; justify-content:space-between;
    gap:22px; flex-wrap:wrap;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(15,27,45,.08);
    border-radius: var(--r-xl);
    padding: 18px 26px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-2);
    animation: rise .5s ease both;
}
.topbar-identity{
    display:flex; flex-direction:column; gap:5px;
    min-width:0; flex:1 1 auto;
}
.brand-row{ display:flex; align-items:center; gap:12px; }
.topbar-identity .brand-logo{ height:34px; }
.brand{
    font-family:'Oswald', sans-serif; font-weight:700;
    letter-spacing:.06em; text-transform:uppercase;
    line-height:1; font-size:clamp(1.1rem, 2.4vw, 1.55rem);
    color: var(--ink); margin:0;
}
.brand .accent{ color: var(--brand); }
.brand-etab{
    font-size: var(--fs-xxs); letter-spacing:.16em;
    text-transform:uppercase; color: var(--muted);
    font-weight:600; padding-left:2px;
}
.brand-welcome{
    font-size: var(--fs-sm);
    color: var(--ink-2); padding-left:2px;
}
.brand-welcome b{ color: var(--brand); font-weight:700; }

/* Colonne contexte (Niveau / Classe / Groupe) */
.topbar-context{
    display:flex; flex-direction:column; align-items:stretch;
    gap:8px; flex:0 0 auto; margin-left:auto; width:200px;
    padding-left:22px; border-left:1px solid rgba(15,27,45,.10);
}
.ctx-row{ display:flex; align-items:center; gap:8px; justify-content:space-between; }
.ctx-label{
    font-size: var(--fs-xxs); color: var(--muted);
    font-weight:700; text-transform:uppercase;
    letter-spacing:.06em; text-align:left;
}
.ctx-row .form-select{ width:auto; flex:1 1 auto; min-width:0; font-size: var(--fs-xs); }
.ctx-dot{
    width:10px; height:10px; border-radius:50%;
    flex:0 0 auto; box-shadow: 0 0 0 2px rgba(255,255,255,.7);
}
@media(max-width:768px){
    .topbar{ flex-direction:column; align-items:stretch; }
    .topbar-context{
        width:auto; margin-left:0; padding-left:0; border-left:none;
        padding-top:12px; border-top:1px solid rgba(15,27,45,.10);
    }
}

/* ---------- 6. Bandeau titre de page ---------- */
.page-strip{
    display:flex; align-items:center; justify-content:space-between;
    padding: 4px 6px 18px; margin-top:-2px;
    flex-wrap:wrap; gap:8px;
}
.page-title{
    font-family:'Oswald', sans-serif; font-weight:600;
    text-transform:uppercase; letter-spacing:.06em;
    font-size: var(--fs-md); color: var(--ink);
    margin:0; display:flex; align-items:center; gap:12px;
}
.page-title::before{
    content:""; display:inline-block;
    width:5px; height:22px; border-radius:3px;
    background: var(--accent);
}
.page-time{
    font-size: var(--fs-xs); color: var(--muted);
    font-style:italic;
}

/* ---------- 7. Rails (nav + légende) ---------- */
.rail{
    position:fixed; top:0; bottom:0; z-index:30;
    display:flex; flex-direction:column;
    background: rgba(255,255,255,.62);
    border-right: 1px solid rgba(255,255,255,.55);
    transition: transform .35s cubic-bezier(.4,0,.2,1), width .3s ease, background .3s;
    overflow: hidden;
}
.rail.left{ left:0; width: var(--rail-w); }
.rail.right{
    right:0; left:auto; width: var(--rail-w);
    border-right:none; border-left: 1px solid rgba(255,255,255,.55);
}
.rail.left:hover, .rail.left:focus-within{
    width: var(--rail-w-open);
    background: #fff;   /* plein : la page ne se lit plus au travers du menu ouvert */
    box-shadow: 6px 0 24px rgba(15,27,45,.08);
}
.rail.right:hover, .rail.right:focus-within{
    width: 300px;
    background: #fff;
    box-shadow: -6px 0 24px rgba(15,27,45,.08);
}
.rail.left.tuck{  transform: translateX(calc(-1 * var(--rail-w) + 8px)); }
.rail.right.tuck{ transform: translateX(calc(var(--rail-w) - 8px)); }
.rail.tuck::after{
    content:""; position:absolute; top:50%;
    width:4px; height:54px; border-radius:4px;
    background: var(--brand); opacity:.85;
    transform: translateY(-50%);
}
.rail.left.tuck::after{  right:2px; }
.rail.right.tuck::after{ left:2px; }
.rail.left.tuck:hover, .rail.right.tuck:hover{ transform: translateX(0); }

/* Ordinateur : les barres gardent TOUJOURS leur largeur ouverte et sont
   glissées hors de l'écran, sauf une bande de --rail-w. Au survol, la barre
   glisse vers l'intérieur pendant que son contenu glisse d'autant en sens
   inverse : les icônes restent immobiles, les libellés se découvrent. Plus
   aucune largeur animée, donc plus de mise en page recalculée à chaque image
   (mesuré le 28/09 : 11 images en retard par ouverture, voir HISTORY).
   Même principe que le menu mobile, corrigé juste avant. */
@media (min-width:993px){
    .rail{ will-change: transform; transition: transform .3s cubic-bezier(.4,0,.2,1), background-color .3s, box-shadow .3s; }
    .rail.left, .rail.left:hover, .rail.left:focus-within{ width: var(--rail-w-open); }
    .rail.right, .rail.right:hover, .rail.right:focus-within{ width: 300px; }
    .rail.left{ transform: translateX(calc(var(--rail-w) - var(--rail-w-open))); }
    .rail.right{ transform: translateX(calc(300px - var(--rail-w))); }
    .rail.left > :not(.rail-sport):not(.rail-watermark){
        transform: translateX(calc(var(--rail-w-open) - var(--rail-w)));
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .rail.right > *{
        transform: translateX(calc(var(--rail-w) - 300px));
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .rail.left:hover, .rail.left:focus-within,
    .rail.right:hover, .rail.right:focus-within{ transform: translateX(0); }
    .rail.left:hover > :not(.rail-sport):not(.rail-watermark),
    .rail.left:focus-within > :not(.rail-sport):not(.rail-watermark),
    .rail.right:hover > *, .rail.right:focus-within > *{ transform: none; }
    /* Rangées après inactivité : seule une bande de 8px dépasse. */
    .rail.left.tuck{ transform: translateX(calc(8px - var(--rail-w-open))); }
    .rail.right.tuck{ transform: translateX(calc(300px - 8px)); }
    .rail.left.tuck:hover, .rail.right.tuck:hover{ transform: translateX(0); }
    /* Le logo reste au-dessus des icônes, au lieu d'être centré sur la
       largeur ouverte (il serait hors de la bande visible). */
    .rail.left .rail-head-solo{ justify-content: flex-start; padding-left: calc((var(--rail-w) - 34px) / 2); }
    /* Le filigrane garde sa place : centré sur la bande repliée, puis sur la
       barre ouverte, comme avant. */
    .rail.left .rail-watermark{
        transform: translateX(calc(-50% + (var(--rail-w-open) - var(--rail-w)) / 2));
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .rail.left:hover .rail-watermark, .rail.left:focus-within .rail-watermark{ transform: translateX(-50%); }
    /* Un court délai à l'ouverture par la souris (08/10/2026) : la barre ne
       s'ouvre plus quand on la frôle pour atteindre le bord de la page. Au
       clavier (focus) et à la fermeture, aucun délai. */
    .rail:hover:not(:focus-within), .rail:hover:not(:focus-within) > *{ transition-delay: .18s; }
}
@media (min-width:993px) and (prefers-reduced-motion: reduce){
    .rail, .rail > *, .rail .rail-watermark{ transition:none !important; }
}

.rail-head{
    height:64px; display:flex; align-items:center; gap:10px; padding:0 18px;
    font-family:'Oswald', sans-serif; font-weight:600;
    letter-spacing:.08em; text-transform:uppercase;
    font-size: var(--fs-xxs); color: var(--ink-2); white-space:nowrap;
}
.rail-head .ico{ font-size:1.4rem; }
.rail-head .rail-logo{ height:34px; width:34px; object-fit:contain; flex:0 0 auto; display:block; }

.nav-list{ list-style:none; margin:0; padding:8px; display:flex; flex-direction:column; gap:2px; }
.nav-list a{
    position:relative;
    display:flex; align-items:center; gap:14px;
    padding: 11px 12px 11px 16px; border-radius: 11px;
    color: var(--ink-2); text-decoration:none;
    white-space:nowrap; font-weight:500; font-size: var(--fs-sm);
    transition: background .18s, color .18s, transform .18s;
}
.nav-list a .ico{
    font-size:1.25rem; width:26px; text-align:center;
    transition: transform .25s;
}
.nav-list a:hover{ background: rgba(15,27,45,.05); color: var(--ink); }
.nav-list a.active{
    background: var(--brand-soft);
    color: var(--brand); font-weight:600;
}
.nav-list a.active::before{
    content:""; position:absolute;
    left:4px; top:9px; bottom:9px;
    width:3px; border-radius:2px;
    background: var(--brand);
}
.nav-list a.active .ico{ transform: scale(1.08); }
.nav-label{ opacity:0; transition: opacity .2s; }
.rail.left:hover .nav-label,
.rail.left:focus-within .nav-label{ opacity:1; }

.logout-link{ font-size: var(--fs-sm); }

.legend-body{
    padding: 6px 16px 20px; overflow-y:auto;
    opacity:0; transition: opacity .2s;
    /* En colonne : la légende de la page en haut, l'aide poussée en bas (15/10/2026). */
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
}
.legend-body > .rail-bas{ margin-top:auto; padding-top:12px; }
/* Légende de la page en plus petit (15/10/2026) ; le bloc Aide du bas garde sa taille. */
.legend-body .leg{ font-size:.74rem; margin:4px 0; gap:8px; white-space:normal; line-height:1.3; }
.legend-body .leg .pill{ width:26px; font-size:.66rem; }
.legend-body .leg .f-badge, .legend-body .leg .r-badge, .legend-body .leg .badge,
.legend-body .leg .sexe-badge{ transform:scale(.85); transform-origin:left center; flex:0 0 auto; }
.legend-body .tip{ white-space:normal; font-size:.72rem; line-height:1.45; padding:7px 10px; margin:6px 0 2px; }

.legend-body .f-badge{ cursor:default; pointer-events:none; flex:0 0 auto; }
.legend-body .r-badge{ pointer-events:none; flex:0 0 auto; }
.rail.right:hover .legend-body,
.rail.right:focus-within .legend-body{ opacity:1; }
.legend-body h3{
    font-family:'Oswald', sans-serif; text-transform:uppercase;
    letter-spacing:.08em; font-size: var(--fs-xxs);
    color: var(--muted); margin: 18px 0 8px; font-weight:600;
}
.leg{
    display:flex; align-items:center; gap:10px;
    font-size: var(--fs-xs); margin:6px 0;
    white-space:nowrap; color: var(--ink-2);
}
.leg .pill{
    width:30px; text-align:center; font-weight:700;
    border-radius:6px; padding:2px 0;
    font-family:'Oswald', sans-serif; font-size: var(--fs-xxs);
}
.leg .pulse{
    width:10px; height:10px; border-radius:50%;
}
.tip{
    font-size: var(--fs-xs); line-height:1.55; color: var(--ink-2);
    background: var(--brand-soft);
    border-left: 3px solid var(--brand);
    border-radius: var(--r-sm);
    padding: 10px 12px; margin-top: 6px;
}

.rail-toggle{ display:none; }
@media(max-width:992px){
    /* Le menu a sa largeur finale dès le départ et ne fait QUE glisser.
       Avant le 28/09, il s'élargissait en même temps qu'il glissait : la mise
       en page du menu était recalculée à chaque image, d'où un à-coup de 100
       à 230 ms à l'ouverture sur téléphone lent (mesuré : 7 images en retard
       sur 265, contre 1 sur 276 ainsi). Les règles :hover/:focus-within sont
       reprises ici parce qu'un toucher laisse le survol « collé » sur mobile,
       et leur largeur d'ordinateur relançait le même recalcul. */
    /* .rail.left et .rail.right, et non .rail seul : la largeur d'ordinateur
       est posée sur .rail.left, plus précis, qui l'emporterait. */
    .rail.left, .rail.right, .rail.left:hover, .rail.left:focus-within,
    .rail.right:hover, .rail.right:focus-within{
        width: min(82vw, 300px);
        background: rgba(255,255,255,.96);
    }
    .rail{
        transform: translateX(-110%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        will-change: transform;
    }
    .rail.right{ transform: translateX(110%); }
    .rail.show{ transform: translateX(0) !important; }
    .rail .nav-label, .rail .legend-body{ opacity:1; }
    /* Les deux boutons ronds en bleu nuit, icône blanche (V2-A, choix de Jems du
       26/10/2026) : l'orange reste au seul bouton « Enregistrer ». Pendant que la
       page défile, ils passent à 30 % (classe posée par assets/app.js) et
       redeviennent pleins une demi-seconde après l'arrêt ; ils restent touchables. */
    .rail-toggle{
        display:flex; position:fixed; z-index:40; bottom:18px;
        width:54px; height:54px; border:none; border-radius:50%;
        align-items:center; justify-content:center;
        font-size:1.4rem; color:#fff;
        background: var(--ink); box-shadow: var(--shadow-3);
        cursor:pointer;
        transition: opacity .25s ease, box-shadow .25s ease;
    }
    .rail-toggle.left{ left:16px; }
    .rail-toggle.right{ right:16px; }
    .rail-toggle.en-defilement{ opacity:.3; box-shadow:none; }
}
@media (max-width:992px) and (prefers-reduced-motion: reduce){
    .rail-toggle{ transition:none; }
}

/* ---------- 8. Cards (surfaces opaques, hiérarchie de matière) ---------- */
.card{
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-2) !important;
    backdrop-filter: none !important;
    animation: rise .5s ease both;
}
.card .card-body{ padding: 20px 22px; }
.card h2, .card .h6{
    text-transform:uppercase; letter-spacing:.06em;
    color: var(--ink-2); font-weight:600;
    font-size: var(--fs-xs); margin-bottom: .85rem;
}

/* ---------- 9. Cartes KPI ---------- */
.card-stat{ text-align:center; }
.card-stat .card-body{ padding: 18px 16px; }
.card-stat .text-muted.small{
    font-size: var(--fs-xxs) !important;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--muted) !important;
}
.card-stat .display-6{
    font-family:'Oswald', sans-serif; font-weight:700;
    color: var(--brand);
    font-size: var(--fs-3xl);
    line-height: 1;
    margin: .35em 0 .2em;
}

/* ---------- 10. Boutons ---------- */
.btn{
    font-weight:600;
    letter-spacing:.01em;
    border-radius: var(--r-md);
    padding: .55rem 1rem;
    font-size: var(--fs-sm);
    transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn-sm{ padding: .35rem .7rem; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-primary{
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
    --bs-btn-color: var(--on-brand); --bs-btn-hover-color: var(--on-brand);
    box-shadow: 0 1px 2px rgba(215,110,0,.20), 0 6px 16px rgba(215,110,0,.16);
}
.btn-primary:hover, .btn-primary:focus{
    background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand);
    box-shadow: 0 2px 6px rgba(215,110,0,.24), 0 10px 22px rgba(215,110,0,.22);
}
.btn-outline-primary{
    color: var(--brand);
    border: 1.5px solid var(--brand);
    background: transparent;
}
.btn-outline-primary:hover, .btn-outline-primary:focus{
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
}
.btn-outline-secondary{
    color: var(--ink-2);
    border: 1px solid var(--line);
    background: var(--surface);
}
.btn-outline-secondary:hover{
    background: var(--surface-alt); border-color: var(--muted); color: var(--ink);
}
.btn-outline-danger{
    color: var(--danger);
    border: 1px solid var(--danger-line);
    background: transparent;
}
.btn-outline-danger:hover{
    background: var(--danger); border-color: var(--danger); color:#fff;
}
.btn-link{ text-decoration:none; }
.btn-link:hover{ text-decoration: underline; }

/* ---------- 11. Tables ---------- */
.table{
    --bs-table-bg: transparent;
    font-size: var(--fs-sm);
    color: var(--ink);
    margin-bottom: 0;
}
.table thead th{
    font-family:'Oswald', sans-serif; text-transform:uppercase;
    letter-spacing:.08em; font-size: var(--fs-xxs);
    color: var(--muted); font-weight:600;
    border-bottom: 1px solid var(--line);
    padding: .7rem .5rem;
    background: transparent;
}
.table td, .table th{
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
}
.table.bg-white{ background: transparent !important; }
.table.table-bordered{ border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.table.table-bordered td, .table.table-bordered th{ border-color: var(--line-2); }

/* Bandes F/G : très pâles + barre latérale colorée */
tr.row-f{
    background: var(--row-f) !important;
    box-shadow: inset 3px 0 0 var(--row-f-bar);
}
tr.row-g{
    background: var(--row-g) !important;
    box-shadow: inset 3px 0 0 var(--row-g-bar);
}
/* Ligne sur laquelle on revient après une action (fourniture cochée, élève
   déplacé…). L'ancre y ramène l'écran, ce halo dit laquelle c'est, puis
   s'efface : sur une classe de 54 noms, retrouver sa ligne prend sinon
   plusieurs secondes à chaque clic.
   On passe par « outline » et non « box-shadow » : celui-ci porte déjà la
   barre latérale filles/garçons, et l'écraser la ferait disparaître. */
tr.ligne-revenue{
    outline: 2px solid var(--accent, #F77F00);
    outline-offset: -2px;
    animation: mcg-revenue 2.6s ease-out 1 forwards;
}
@keyframes mcg-revenue{
    0%, 60% { outline-color: var(--accent, #F77F00); }
    100%    { outline-color: transparent; }
}
@media (prefers-reduced-motion: reduce){
    tr.ligne-revenue{ animation: none; }
}
.num-cell{
    font-family:'Oswald', sans-serif; font-weight:600;
    text-align:center; width:40px; color: var(--ink-2);
}

/* Grilles à colonnes figées (appel, récapitulatif des notes), depuis le 30/09.
   N° et nom restent à gauche, seules les dates et les notes défilent : sans
   cela, chaque séance ajoutée prenait sa largeur à la colonne des noms.
   - overflow : .table-bordered coupe avec « hidden », ce qui fait du tableau
     lui-même le conteneur de défilement et annule sticky. « clip » coupe sans
     cet effet ; « visible » d'abord pour les navigateurs qui l'ignorent.
   - Les cellules figées doivent être opaques, sinon les dates passent à
     travers : fond blanc + teinte F/G par-dessus, et la barre F/G est portée
     par la cellule N°, qui recouvre celle de la ligne.
   - En tableau à bordures fusionnées, une cellule figée perd ses bordures :
     le filet de droite est donc une ombre. */
.grille-carte{
    background: var(--surface);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-1);
    margin-bottom: 1rem;
}
.grille-fixe > .table.table-bordered{ overflow: visible; overflow: clip; }
/* Bordures séparées et non fusionnées : en mode fusionné, le navigateur peint
   les filets des cellules qui défilent par-dessus le bord des cellules figées
   (traits parasites vus à gauche du N° le 30/09). Chaque cellule porte donc
   son filet droit et bas, sans doublon. */
.grille-fixe > .table{ border-collapse: separate; border-spacing: 0; }
/* Pas de filet gauche : le N° commence ainsi à 0 et le nom à 40 px, pile là
   où ils se figent, donc rien ne saute au premier défilement. */
.grille-fixe > .table.table-bordered{ border-width: 1px 0 0 0; }
.grille-fixe > .table-bordered > :not(caption) > * > *{ border-width: 0 1px 1px 0; }
.grille-fixe .col-fixe{
    position: sticky; z-index: 2;
    background: var(--surface);
}
.grille-fixe thead .col-fixe{ z-index: 3; }
/* L'ombre pleine à gauche du N° bouche la demi-bordure du tableau (mesurée à
   0,5 px) : sans elle, les dates qui défilent affleuraient à gauche du N°. */
.grille-fixe .col-num{ left: 0; width: 40px; min-width: 40px; max-width: 40px; box-shadow: -6px 0 0 var(--surface); }
/* 40 px : place naturelle mesurée du nom (40,5 px), il ne saute donc pas au
   premier défilement ; le N° finissant à 40 px, aucun jour entre les deux. */
.grille-fixe .col-nom{
    left: 40px;
    min-width: 11rem; max-width: 15rem;
    box-shadow: inset -1px 0 0 var(--line), 6px 0 8px -6px rgba(15,27,45,.22);
}
.grille-fixe tr.row-f .col-fixe{ background: linear-gradient(var(--row-f), var(--row-f)), var(--surface); }
.grille-fixe tr.row-g .col-fixe{ background: linear-gradient(var(--row-g), var(--row-g)), var(--surface); }
.grille-fixe tr.row-f .col-num{ box-shadow: inset 3px 0 0 var(--row-f-bar), -6px 0 0 var(--surface); }
.grille-fixe tr.row-g .col-num{ box-shadow: inset 3px 0 0 var(--row-g-bar), -6px 0 0 var(--surface); }
.grille-fixe tbody tr:hover .col-fixe{ background: linear-gradient(rgba(247,127,0,.06), rgba(247,127,0,.06)), var(--surface); }
@media (max-width: 576px){
    /* Téléphone : le nom tient en 2 lignes sans manger les dates (2 séances
       visibles sur un écran de 412 px). */
    .grille-fixe .col-nom{
        min-width: 8.75rem; max-width: 8.75rem;
        font-size: .84rem; line-height: 1.25;
    }
    .grille-fixe thead .col-nom{ font-size: var(--fs-xxs); }
}

/* Badges sexe (Élèves / Liste de classe) */
.sexe-f{
    background:#FDF2F8; color:#BE185D;
    border:1px solid #FBCFE8; border-radius:6px;
    padding: 2px 7px; font-weight:600; font-size: var(--fs-xxs);
}
.sexe-g{
    background:#EFF6FF; color:#1D4ED8;
    border:1px solid #BFDBFE; border-radius:6px;
    padding: 2px 7px; font-weight:600; font-size: var(--fs-xxs);
}

/* Tableaux compacts */
.table-sm td, .table-sm th{ padding: 0.4rem 0.5rem; }
.table-sm .form-control-sm{ font-size: var(--fs-xs); padding: 0.2rem 0.5rem; }
.table-sm select.form-select-sm,
select.form-select-sm.color-select{
    font-size: var(--fs-xs);
    padding: 0.25rem 1.85rem 0.25rem 0.55rem;
    background-position: right 0.6rem center;
}

/* ---------- 12. Navigation onglets & pilules ---------- */
.nav-tabs{
    border-bottom: 1px solid var(--line);
    gap: .25rem;
}
.nav-tabs .nav-item{ margin-bottom: -1px; }
.nav-tabs .nav-link{
    font-family:'Oswald', sans-serif; text-transform:uppercase;
    letter-spacing:.05em; font-size: var(--fs-xs); font-weight:600;
    color: var(--muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: .7rem 1.1rem;
    border-radius: 0;
    transition: color .15s, border-color .15s;
}
.nav-tabs .nav-link:hover:not(.active){
    color: var(--ink);
    border-bottom-color: var(--line);
}
.nav-tabs .nav-link.active{
    color: var(--brand);
    background: transparent;
    border-color: transparent transparent var(--brand) transparent;
    border-bottom-width: 2px;
}

.nav-pills{ gap: .35rem; }
.nav-pills .nav-link{
    font-family:'Oswald', sans-serif; text-transform:uppercase;
    letter-spacing:.05em; font-size: var(--fs-xs); font-weight:600;
    color: var(--ink);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    padding: .45rem 1rem;
    border-radius: 999px;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-pills .nav-link:hover:not(.active){
    background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand);
}
.nav-pills .nav-link.active{
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
}

/* ---------- 13. Formulaires ---------- */
.form-control, .form-select{
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    padding: .5rem .75rem;
    color: var(--ink);
    background-color: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder{ color:#9AA5B5; }
.form-control:focus, .form-select:focus{
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(247,127,0,.15);
    outline: none;
}
.form-control-sm, .form-select-sm{
    font-size: var(--fs-xs);
    padding: .3rem .55rem;
    border-radius: var(--r-sm);
}
/* Un menu déroulant garde la place de sa flèche (26/10/2026, capture de Jems) : la marge de .form-select
   ci-dessus écrasait celle de Bootstrap, et un choix long (« Aucune (note saisie à la main) ») passait sous
   la flèche sur téléphone. Les petits menus des tableaux (-sm) gardent leur marge serrée. */
.form-select:not(.form-select-sm){ padding-right: 2.25rem; text-overflow: ellipsis; }
.form-label{
    font-size: var(--fs-xxs);
    color: var(--muted);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .35rem;
}
.form-label.small{ font-size: var(--fs-xxs); }
.input-group .btn{ border-radius: 0 var(--r-md) var(--r-md) 0; }

/* Halo champ obligatoire */
@keyframes reqPulse{
    0%   { box-shadow: 0 0 0 0 rgba(247,127,0,.55), 0 0 0 0 rgba(247,127,0,.25); border-color: var(--brand); }
    70%  { box-shadow: 0 0 0 6px rgba(247,127,0,0),  0 0 14px 2px rgba(247,127,0,.45); border-color: var(--brand); }
    100% { box-shadow: 0 0 0 0 rgba(247,127,0,0),    0 0 0 0 rgba(247,127,0,0); border-color: var(--brand); }
}
.req-glow{ animation: reqPulse 1.8s ease-out 3; border:1.5px solid var(--brand) !important; }
.req-label::after{ content:" *"; color: var(--danger); font-weight:700; }
@keyframes shakeX{
    0%,100%{ transform: translateX(0); }
    20%{ transform: translateX(-6px); }
    40%{ transform: translateX(6px); }
    60%{ transform: translateX(-4px); }
    80%{ transform: translateX(4px); }
}
.shake{ animation: shakeX .4s ease; }

/* ---------- 14. Alertes (guides, confirmations, erreurs) ---------- */
.alert{
    border-radius: var(--r-md);
    border: 1px solid transparent;
    padding: .8rem 1rem;
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.alert .alert-heading{
    font-family:'Oswald', sans-serif; font-weight:600;
    font-size: var(--fs-md); margin-bottom: .35rem;
    letter-spacing: .02em;
}
.alert ul, .alert ol{ margin-bottom: 0; padding-left: 1.1rem; }
.alert-info{
    background: var(--info-soft);
    border-color: var(--info-line);
    border-left: 3px solid var(--info);
    color: #0C4A6E;
}
.alert-success{
    background: var(--success-soft);
    border-color: var(--success-line);
    border-left: 3px solid var(--success);
    color: #14532D;
}
.alert-warning{
    background: var(--warning-soft);
    border-color: var(--warning-line);
    border-left: 3px solid var(--warning);
    color: #78350F;
}
.alert-danger{
    background: var(--danger-soft);
    border-color: var(--danger-line);
    border-left: 3px solid var(--danger);
    color: #7F1D1D;
}
.alert-light{
    background: var(--surface-alt);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

/* ---------- 15. Badges ---------- */
.badge{
    font-family:'Oswald', sans-serif; font-weight:600;
    letter-spacing: .05em; font-size: var(--fs-xxs);
    padding: .35em .6em; border-radius: 6px;
}

/* ---------- 16. Toasts flash ---------- */
.flash-toast{
    position:fixed; top:18px; right:18px; z-index:2000;
    max-width: min(92vw, 380px);
    animation: toastIn .35s ease, toastOut .4s ease 3.4s forwards;
}
.flash-toast .alert{
    margin:0; box-shadow: var(--shadow-3);
    border-radius: var(--r-md); font-size: var(--fs-sm);
}
@keyframes toastIn{  from{ opacity:0; transform: translateY(-14px); } to{ opacity:1; transform: translateY(0); } }
@keyframes toastOut{ from{ opacity:1; } to{ opacity:0; transform: translateY(-10px); visibility:hidden; } }
@media(max-width:768px){
    .flash-toast{ left:14px; right:14px; top:12px; max-width:none; }
}

/* Ancre P/R/G : soulignement doux de la section revenue */
[id^="sec-"]{ scroll-margin-top: 96px; }
[id^="sec-"].flash-target{ animation: sectionPulse 1.8s ease; }
@keyframes sectionPulse{
    0%   { box-shadow: 0 0 0 0 rgba(247,127,0,.30); }
    35%  { box-shadow: 0 0 0 6px rgba(247,127,0,.10); }
    100% { box-shadow: 0 0 0 0 rgba(247,127,0,0); }
}

/* ---------- 17. Route bar (progression navigation) ---------- */
#routebar{
    position:fixed; top:0; left:0; height:3px; width:0; z-index:10000;
    background: linear-gradient(90deg, var(--brand), var(--secondary));
    box-shadow: 0 0 8px rgba(247,127,0,.5);
    opacity:0;
    transition: width .2s ease, opacity .3s ease;
    border-radius: 0 3px 3px 0;
}
#routebar.go{ opacity:1; }

/* ---------- 18. Auth (login + onboarding) ---------- */
.auth-logo{
    display:block; margin: 0 auto 2px;
    height:96px; width:auto;
    filter: drop-shadow(0 6px 14px rgba(15,27,45,.15));
    animation: logoIn .6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes logoIn{ from{ opacity:0; transform: translateY(-8px) scale(.94); } to{ opacity:1; transform:none; } }

.brand-card{ position:relative; overflow:hidden; }
.brand-card > .card-body{ position:relative; z-index:1; }
.brand-card::before{
    content:""; position:absolute; inset:-10% -6% auto -6%;
    height:130%;
    background: url('logo.png') center top/contain no-repeat;
    opacity:.05;
    z-index:0; pointer-events:none;
}
@keyframes wmFloat{ 0%,100%{ transform: translateY(0) scale(1.03); } 50%{ transform: translateY(-12px) scale(1.07); } }
.brand-logo{ height:30px; width:auto; vertical-align:middle; }

.app-credit{
    position:fixed; left:0; right:0; bottom:0; z-index:5;
    pointer-events:none; text-align:center;
    font-size: var(--fs-xxs); letter-spacing:.06em;
    padding: .3rem 0;
    background: transparent; color:#fff;
    opacity:.55; text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.app-credit strong{ font-weight:700; }

/* ---------- 19. Onboarding (assistant 1er lancement) ---------- */
.ob-wrap{
    min-height:100vh; display:flex;
    align-items:center; justify-content:center; padding:18px;
}
.ob-card{
    max-width:460px; width:94%;
    border:none; border-radius: var(--r-xl);
    overflow:hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
}
.ob-step{ display:none; animation: obIn .45s cubic-bezier(.2,.8,.2,1); }
.ob-step.active{ display:block; }
@keyframes obIn{ from{ opacity:0; transform: translateY(14px) scale(.99); } to{ opacity:1; transform:none; } }
.ob-dots{ display:flex; gap:8px; justify-content:center; margin-bottom:6px; }
.ob-dot{
    width:9px; height:9px; border-radius:50%;
    background:#D9DEE6; transition:.3s;
}
.ob-dot.on{ background: var(--brand); transform: scale(1.25); }
.ob-emoji{ font-size:2.4rem; line-height:1; }
.cls-chip{
    display:inline-flex; align-items:center; gap:.4rem;
    background: var(--surface-alt);
    border:1px solid var(--line);
    border-radius:999px;
    padding:.25rem .6rem; margin:.2rem;
    font-size: var(--fs-xs);
}

/* ---------- 20. Utilitaires ---------- */
.swatch{
    display:inline-block; width:20px; height:20px;
    border-radius:6px; border:1px solid rgba(0,0,0,.3);
    flex:0 0 auto; box-shadow:0 1px 2px rgba(0,0,0,.12);
}
.color-select option{ font-weight:600; }
.color-select{ width:118px; min-width:118px; }

/* Redoublant — pastille R */
.r-badge{
    display:inline-flex; align-items:center; justify-content:center;
    width:20px; height:20px; margin-left:4px; padding:0;
    border-radius:6px; border:1px solid rgba(15,27,45,.18);
    background:transparent; color: var(--muted);
    font-family:'Oswald', sans-serif; font-weight:700;
    font-size: var(--fs-xxs); line-height:1;
    vertical-align:middle; cursor:pointer;
    transition: all .15s ease;
}
.r-badge:hover{ border-color: var(--brand); color: var(--brand); }
.r-badge-on{
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
}
.r-badge-on:hover{
    background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand);
}
.r-badge-mini{ width:16px; height:16px; font-size:.62rem; border-radius:5px; margin-left:2px; }

/* ---------- Navigation rapide des Paramètres ----------
   Dix entrées sur une ligne unique ne se lisaient pas. Elles sont groupées
   par usage, chaque groupe porte son intitulé, et la section visible à
   l'écran est mise en évidence pendant le défilement. Sur téléphone, la
   barre défile horizontalement plutôt que de se casser en trois rangées. */
.nav-quick{
    display:flex; flex-wrap:wrap; align-items:stretch; gap:10px 18px;
    padding:12px 16px; margin-top:12px;
    background:#fff; border:1px solid rgba(15,27,45,.08);
    border-radius:16px; box-shadow:0 6px 18px rgba(15,27,45,.06);
}
.nq-group{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.nq-group + .nq-group{
    padding-left:18px; border-left:1px solid rgba(15,27,45,.09);
}
.nq-label{
    font-family:'Oswald', sans-serif; font-weight:600;
    font-size:.68rem; letter-spacing:.09em; text-transform:uppercase;
    color:var(--muted);
}
.nq-items{ display:flex; flex-wrap:wrap; gap:6px; }

.nav-quick .q-chip{
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 12px; border-radius:999px;
    background:rgba(15,27,45,.04); border:1px solid transparent;
    color:var(--ink, #0F1B2D); font-size:var(--fs-xs, .84rem); font-weight:600;
    text-decoration:none; white-space:nowrap;
    transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-quick .q-chip:hover{
    background:rgba(247,127,0,.12); border-color:rgba(247,127,0,.35); color:var(--brand, #F77F00);
}
/* Section actuellement à l'écran : le repère qui manquait le plus. */
.nav-quick .q-chip.is-current{
    background:var(--brand, #F77F00); border-color:var(--brand, #F77F00); color: var(--on-brand);
}
.nav-quick .q-chip.quick-danger{ color:#b42318; background:rgba(180,35,24,.07); }
.nav-quick .q-chip.quick-danger:hover{ background:rgba(180,35,24,.14); border-color:rgba(180,35,24,.35); color:#b42318; }
.nav-quick .q-chip.quick-danger.is-current{ background:#b42318; border-color:#b42318; color:#fff; }

@media (max-width: 640px){
    /* Une rangée par groupe, chacune défilant seule. La version à une seule
       ligne laissait les groupes rétrécir (min-width:0) : ils se comprimaient
       l'un sur l'autre et les pastilles se superposaient, illisibles. */
    .nav-quick{ flex-direction:column; flex-wrap:nowrap; gap:8px; padding:10px 12px; }
    .nq-group{ flex-direction:row; align-items:center; gap:10px; }
    .nq-group + .nq-group{
        padding-left:0; border-left:0;
        padding-top:8px; border-top:1px solid rgba(15,27,45,.09);
    }
    .nq-label{ flex:0 0 58px; font-size:.6rem; line-height:1.15; white-space:normal; }
    .nq-items{
        flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
        scrollbar-width:none; min-width:0; flex:1 1 auto;
        /* Dégradé à droite : signale qu'il reste des pastilles à faire défiler. */
        -webkit-mask-image:linear-gradient(to right, #000 85%, transparent);
                mask-image:linear-gradient(to right, #000 85%, transparent);
        padding-right:24px;
    }
    .nq-items::-webkit-scrollbar{ display:none; }
    .nav-quick .q-chip{ flex:0 0 auto; padding:5px 10px; }
    /* La barre collée en haut est plus haute sur deux rangées : les titres de
       section doivent s'arrêter en dessous, pas dessous. */
    .section-anchor{ scroll-margin-top:130px; }
}

/* Pastilles de fournitures (liste_classe.php) : BC, TS, MAN.
   Une seule colonne pour trois articles, plutôt que trois colonnes avec
   chacune une case et une date : la ligne reste tenable sur téléphone. */
.f-cell{ white-space:nowrap; }
.f-badge{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:26px; height:20px; margin:1px; padding:0 4px;
    border-radius:6px; border:1px solid rgba(15,27,45,.18);
    background:transparent; color: var(--muted);
    font-family:'Oswald', sans-serif; font-weight:700;
    font-size: var(--fs-xxs); line-height:1;
    vertical-align:middle; cursor:pointer;
    transition: all .15s ease;
}
.f-badge:hover{ border-color: var(--brand); color: var(--brand); }
.f-badge-on{ background: var(--ok, #119D6B); border-color: var(--ok, #119D6B); color:#fff; }
.f-badge-on:hover{ filter: brightness(.92); color:#fff; }
.f-badge:disabled{ opacity:.55; cursor:progress; }

/* ================= Abonnement (offre.php) =================
   Trois formules cote a cote sur ordinateur, empilees sur telephone.
   L'annuel est mis en avant : c'est celui qui leve la limite de classes et
   ouvre l'Etat-major, donc celui qui repond au besoin reel. */
.abo-statut{
    display:flex; gap:10px; align-items:flex-start;
    padding:12px 14px; border-radius:var(--r-md, 10px);
    border:1px solid var(--line); margin-bottom:14px;
}
.abo-statut-offert{ background:var(--brand-soft);     border-color:rgba(247,127,0,.35); color:var(--ink); }
.abo-statut-actif { background:var(--success-soft);   border-color:var(--success-line); color:var(--ink); }
.abo-statut-expire{ background:var(--warning-soft);   border-color:var(--warning-line); color:var(--ink); }

.abo-promo-bandeau{
    display:flex; gap:8px; align-items:center; justify-content:center;
    padding:9px 14px; margin-bottom:14px; border-radius:999px;
    background:linear-gradient(90deg, var(--brand), #FFA53D);
    color:#fff; font-size:.9rem; text-align:center;
}

.abo-grille{
    display:grid; gap:14px; margin-bottom:18px;
    grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
    align-items:stretch;
}
.abo-carte{
    position:relative; display:flex; flex-direction:column;
    background:var(--surface); border:1px solid var(--line);
    border-radius:var(--r-lg, 14px); padding:18px 16px 16px;
    box-shadow:var(--shadow-1, 0 1px 3px rgba(15,27,45,.06));
    transition:transform .18s ease, box-shadow .18s ease;
}
.abo-carte:hover{ box-shadow:0 10px 26px rgba(15,27,45,.10); }
.abo-carte-vedette{
    border:2px solid var(--brand);
    box-shadow:0 10px 30px rgba(247,127,0,.16);
    padding-top:26px;
}
.abo-carte-sienne{ border-color:var(--success); }
.abo-ruban{
    position:absolute; top:-1px; left:50%; transform:translate(-50%, -50%);
    display:inline-flex; align-items:center; gap:5px; white-space:nowrap;
    background:var(--brand); color: var(--on-brand); border-radius:999px;
    padding:4px 12px; font-size:.72rem; font-weight:700;
    letter-spacing:.03em; text-transform:uppercase;
}
.abo-carte-nom{
    font-family:'Oswald', sans-serif; font-weight:700;
    font-size:1.12rem; text-transform:uppercase; letter-spacing:.02em;
    color:var(--ink);
}
.abo-carte-duree{ font-size:.82rem; color:var(--muted); margin-bottom:12px; }

.abo-prix{ margin-bottom:14px; }
.abo-prix-plein{
    font-size:.92rem; color:var(--muted);
    text-decoration:line-through; text-decoration-thickness:2px;
}
.abo-prix-paye{
    font-family:'Oswald', sans-serif; font-weight:700; line-height:1;
    font-size:2.2rem; color:var(--ink);
}
.abo-prix-paye span{ font-size:.86rem; font-weight:600; color:var(--muted); margin-left:5px; }
.abo-carte-vedette .abo-prix-paye{ color:var(--brand); }
.abo-par-an{ margin-top:5px; font-size:.82rem; color:var(--muted); }
.abo-remise{
    display:inline-block; margin-top:6px; padding:2px 9px; border-radius:999px;
    background:var(--success-soft); border:1px solid var(--success-line);
    color:var(--success); font-size:.76rem; font-weight:700;
}

.abo-atouts{ list-style:none; padding:0; margin:0 0 16px; flex-grow:1; }
.abo-atouts li{
    display:flex; gap:7px; align-items:flex-start;
    font-size:.86rem; line-height:1.35; margin-bottom:7px; color:var(--ink-2);
}
.abo-atouts li svg{ flex:0 0 auto; margin-top:2px; color:var(--ink-2); }   /* coche neutre, plus de liste de coches vertes (08/10/2026) */
.abo-atout-absent{ color:var(--muted); }
.abo-atout-absent svg{ color:var(--muted); }

.abo-bouton{
    display:block; text-align:center; text-decoration:none;
    padding:10px 14px; border-radius:var(--r-md, 10px);
    border:1px solid var(--brand); color:var(--brand);
    font-weight:600; font-size:.92rem; transition:all .15s ease;
}
.abo-bouton:hover{ background:var(--brand-soft); color:var(--brand-dark); }
.abo-bouton-vedette{ background:var(--brand); color: var(--on-brand); }
.abo-bouton-vedette:hover{ background:var(--brand-dark); color: var(--on-brand); }
.abo-carte-pied{
    text-align:center; padding:10px; border-radius:var(--r-md, 10px);
    font-size:.88rem; font-weight:600;
}
.abo-carte-pied-actif{ background:var(--success-soft); color:var(--success); }

.abo-etapes{ display:flex; flex-direction:column; gap:14px; }
.abo-etape{ display:flex; gap:12px; align-items:flex-start; }
.abo-etape-num{
    flex:0 0 auto; width:28px; height:28px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:var(--brand-soft); color:var(--brand);
    font-family:'Oswald', sans-serif; font-weight:700; font-size:.95rem;
}
.abo-wave{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:5px 0; }
.abo-wave-num{
    font-family:'Oswald', sans-serif; font-size:1.3rem; font-weight:700;
    letter-spacing:.06em; color:var(--ink);
    background:var(--surface-alt); border:1px dashed var(--line);
    border-radius:8px; padding:4px 12px;
}

/* Ecran de l'Etat-major quand la formule ne l'ouvre pas. Une porte fermee
   doit expliquer pourquoi et ou aller, jamais renvoyer un 403 nu. */
.abo-verrou{
    text-align:center; padding:34px 20px;
    background:var(--brand-soft); border:1px solid rgba(247,127,0,.30);
    border-radius:var(--r-lg, 14px);
}
.abo-verrou svg{ color:var(--brand); }
.abo-verrou h2{ font-family:'Oswald', sans-serif; margin:12px 0 8px; }

/* Notes venues d'une note de groupe (cahier.php, recapitulatif).
   Une fois posee, une note de groupe est une note comme une autre : sans
   repere visuel, impossible de savoir ce qui vient du groupe et ce qu'on a
   corrige ensuite pour un eleve seul. */
input.note-groupe{
    background: rgba(47,128,237,.10) !important;
    border-color: rgba(47,128,237,.45) !important;
    font-weight: 600;
}
input.note-groupe-mod{
    background: rgba(247,127,0,.12) !important;
    border-color: rgba(247,127,0,.55) !important;
    font-weight: 600;
}
.legende-note{
    display:inline-block; width:12px; height:12px; border-radius:3px;
    vertical-align:-1px; margin-right:4px;
}
.legende-note.g{  background: rgba(47,128,237,.25); border:1px solid rgba(47,128,237,.55); }
.legende-note.gm{ background: rgba(247,127,0,.25);  border:1px solid rgba(247,127,0,.65); }

/* Nombre de groupes en direct pendant la saisie (liste_classe.php). */
.groupes-direct{
    padding: 7px 10px; border-radius: 8px;
    background: var(--surface-2, #f4f6fa); border: 1px solid var(--line, rgba(15,27,45,.08));
    color: var(--ink-2, #475569);
}
.groupes-direct.is-hausse{ background: rgba(17,157,107,.08); border-color: rgba(17,157,107,.35); color: #0b6b49; }
.groupes-direct-avis{ display: block; margin-top: 4px; color: #9a5b00; }

/* Recherche par nom (liste_classe.php).
   Collante en haut de la carte : sur une classe de 54 élèves, il ne faut pas
   avoir à remonter la page pour changer de nom recherché. */
.recherche-bar{
    position: sticky; top: 0; z-index: 6;
    margin: -4px -4px 10px; padding: 8px 4px;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--line, rgba(15,27,45,.08));
}
.recherche-bar .input-group{ max-width: 460px; }
.recherche-compte{ white-space: nowrap; }
#rechercheClear{ display: none; }
.recherche-active #rechercheClear{ display: inline-flex; }
.recherche-active .recherche-compte{ color: var(--brand); font-weight: 600; }
tr.eleve-masque{ display: none; }
/* Barre de recherche d'un tableau de notes (09/10/2026) : posée au-dessus du
   tableau, pas collante (le tableau a déjà son en-tête et ses colonnes figées).
   Pendant une recherche, un élève trouvé se voit même si son groupe est replié. */
.recherche-tableau{ position: static; margin: 0 0 10px; padding: 0 0 8px; background: transparent; }
.recherche-effacer{ display: none; }
.recherche-active .recherche-effacer{ display: inline-flex; }
/* !important : Bootstrap cache [hidden] avec !important. */
table.recherche-en-cours tbody tr[hidden]:not(.eleve-masque){ display: table-row !important; }
/* Saisie groupée : case modifiée entourée d'orange, ligne marquée à gauche,
   barre d'enregistrement en bas. Les boutons OK de ligne deviennent inutiles
   (Entrée enregistre tout le lot). */
.lot-modifie{ outline:2px solid #F77F00 !important; outline-offset:-1px; }
/* Fond crème pour les champs seulement : sur les badges (R, fournitures) il
   effacerait leur couleur, et leur texte blanc deviendrait invisible. */
input.lot-modifie, select.lot-modifie{ background-color:#fff8ec !important; }
.f-badge.lot-modifie, .r-badge.lot-modifie{ outline-offset:2px; }
tr.lot-ligne > td:first-child{ box-shadow: inset 3px 0 0 #F77F00; }
.lot-actif .ligne-eleve > .btn{ display:none; }
#file-remise tr.lot-remis td{ opacity:.55; }
#file-remise tr.lot-remis .bf-classe{ text-decoration: line-through; }
#file-remise tr.lot-remis td:last-child{ opacity:1; }
.lot-barre{
    position:fixed; left:50%; bottom:16px; transform:translateX(-50%); z-index:60;
    display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center;
    width:min(560px, calc(100% - 24px)); padding:10px 14px;
    background:#0F1B2D; color:#fff; border-radius:14px;
    box-shadow:0 10px 30px rgba(15,27,45,.35);
}
.lot-barre[hidden]{ display:none; }
.lot-compte{ flex:1 1 auto; font-weight:600; font-size:.9rem; }
/* Le style général des boutons impose un fond blanc : on le reprend ici,
   sinon « Annuler » serait du blanc sur blanc. */
.lot-barre .lot-annuler{ background:transparent !important; color:#fff !important; border-color:rgba(255,255,255,.5) !important; }
.lot-barre .lot-annuler:hover{ background:rgba(255,255,255,.12) !important; }
@media (max-width:992px){ .lot-barre{ bottom:84px; } }   /* au-dessus des boutons ronds du menu */
@media (max-width:640px){
    .lot-compte{ flex:1 1 100%; text-align:center; font-size:.85rem; }
    .lot-barre .btn{ flex:1 1 0; }
}

/* Recherche de la file de remise : même barre, sans le collant (elle vit dans
   un volet repliable), et un masquage qui l'emporte sur l'affichage en grille
   des lignes sur téléphone. */
.fr-recherche{ position: static; margin: 0 0 10px; padding: 0 0 8px; background: transparent; }
#rechercheFileClear{ display: none; }
.recherche-active #rechercheFileClear{ display: inline-flex; }
.fr-table tr.fr-masque{ display: none !important; }
.fr-count.fr-count-filtre{ background: var(--brand, #F77F00); color: var(--on-brand); }

/* Champ date de naissance (pas de "jj/mm/aaaa" au repos) */
input.js-dob.dob-empty{ color: transparent; }
input.js-dob.dob-empty:focus{ color: inherit; }
.dob-wrap{ position:relative; }

/* Ligne d'élève de la Liste de classe. Sur téléphone, le nom partageait sa
   ligne avec R, le sexe, la naissance et OK : c'est lui qui rétrécissait, au
   point de n'afficher que 4 lettres. Il passe seul sur la première ligne, en
   pleine largeur, les réglages en dessous. */
@media (max-width: 640px){
    .ligne-eleve{ flex-wrap:wrap; row-gap:4px; min-width:250px; }
    .ligne-eleve .ligne-eleve-nom{
        flex:1 1 100%; min-width:0;
        font-weight:600; font-size:.9rem;
        /* Reste visiblement modifiable : un trait discret sous le nom. */
        border:0; border-bottom:1px dashed rgba(15,27,45,.25); border-radius:0;
        background:transparent; padding-left:.25rem;
    }
    .ligne-eleve .ligne-eleve-nom:focus{ border-color:var(--brand, #F77F00); background:#fff; }
    .ligne-eleve input[type="date"]{ flex:1 1 96px; }
}

/* Liste d'attente d'ajout d'élèves */
#stagingList{ max-height: 260px; overflow-y: auto; }

/* ---------- 21. Animations globales ---------- */
.page-enter{ animation: pageIn .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pageIn{ from{ opacity:0; transform: translateY(12px); } to{ opacity:1; transform:none; } }
@keyframes floaty{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-14px); } }
@keyframes rise{  from{ opacity:0; transform: translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes fade{  from{ opacity:0; } to{ opacity:1; } }
@keyframes pulse{ 0%,100%{ transform: scale(1); opacity:1; } 50%{ transform: scale(1.5); opacity:.55; } }
@keyframes run{   0%,100%{ transform: translateX(0); } 50%{ transform: translateX(5px); } }

/* Réduction des animations si demandée par l'OS */
@media (prefers-reduced-motion: reduce){
    *{ animation:none !important; transition:none !important; }
    .page-enter{ animation: fade .3s ease both; }
    #routebar{ display:none; }
    .req-glow{ animation:none; }
    .shake{ animation:none; }
    .auth-logo, .brand-card::before{ animation:none; }
}

/* ---------- 22. Icônes SVG (Chantier 2) ---------- */
.ico-svg{
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}
.nav-list a .ico,
.rail-head .ico,
.page-title{
    display: inline-flex;
    align-items: center;
}
.nav-list a .ico{
    justify-content: center;
    width: 26px;
    font-size: 1rem;
}
.rail-toggle .ico-svg{ stroke-width: 2; }
.page-title .ico-svg{ color: var(--accent); }

/* ---------- 23. Icônes dans les boutons (Chantier 2b) ---------- */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
}
.btn .ico-svg{ margin-top: -1px; }
.alert .ico-svg{ vertical-align: -3px; margin-right: .25em; }

/* ---------- 24. Tableau de bord (Chantier 3) ---------- */
.hero{
    background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 100%);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    margin-bottom: 18px;
    animation: rise .5s ease both;
}
.hero-body{
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; flex-wrap: wrap;
    padding: 18px 22px;
}
.hero-context{ flex: 1 1 320px; min-width: 0; }
.hero-title{
    font-family: 'Oswald', sans-serif; font-weight: 600;
    font-size: var(--fs-xl); color: var(--ink);
    margin: 0 0 6px; letter-spacing: .01em;
    display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.hero-meta{
    font-size: var(--fs-xs); color: var(--muted);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 600;
}
.hero-summary{
    font-size: var(--fs-sm); color: var(--ink-2);
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.hero-summary .dot-sep{ color: var(--muted); opacity: .6; }
.hero-summary b{ color: var(--ink); }
.hero-next{
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
    flex: 0 0 auto;
}
.hero-hint{
    font-size: var(--fs-xxs); color: var(--muted);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.hero-hint-ok{
    color: var(--success);
    display: inline-flex; align-items: center; gap: 4px;
}
@media(max-width:640px){
    .hero-body{ flex-direction: column; align-items: stretch; }
    /* En colonne, la réserve de 320px de .hero-context devenait une HAUTEUR :
       la carte faisait 320px de haut, presque vide (corrigé le 08/10/2026). */
    .hero-context{ flex: 0 0 auto; }
    .hero-next{ align-items: stretch; }
    .hero-next .btn{ width: 100%; }
    .hero-hint{ text-align: center; }
}

/* KPI cards */
.kpi-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
@media(max-width:768px){ .kpi-grid{ grid-template-columns: repeat(2, 1fr); } }
.kpi{
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 18px 20px;
    animation: rise .5s ease both;
}
.kpi-label{
    font-size: var(--fs-xxs); color: var(--muted);
    text-transform: uppercase; letter-spacing: .08em;
    font-weight: 700;
}
.kpi-value{
    font-family: 'Oswald', sans-serif; font-weight: 700;
    color: var(--brand);
    font-size: var(--fs-3xl);
    line-height: 1;
    margin: 10px 0 6px;
    display: flex; align-items: baseline; gap: 4px;
}
.kpi-unit{
    font-size: var(--fs-md); color: var(--ink-2);
    font-weight: 500;
}
.kpi-meta{
    font-size: var(--fs-xs); color: var(--muted);
}

/* Détail présences */
.stat-badges{
    display: flex; flex-wrap: wrap; gap: 10px 14px;
    align-items: center; margin-bottom: 12px;
}
.stat-item{ display: inline-flex; align-items: center; gap: 4px; }
.stat-count{ color: var(--muted); font-size: var(--fs-xs); }
.stat-legend{
    font-size: var(--fs-xs); color: var(--muted);
    margin: 0; line-height: 1.7;
    padding-top: 4px; border-top: 1px solid var(--line-2);
}
.stat-legend b{ color: var(--ink-2); font-weight: 600; }

/* Aide repliable */
.help-panel{
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-top: 18px;
    overflow: hidden;
}
.help-panel > summary{
    list-style: none;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .06em; font-size: var(--fs-xs);
    color: var(--ink-2); font-weight: 600;
    transition: background .15s, color .15s;
}
.help-panel > summary::-webkit-details-marker{ display: none; }
.help-panel > summary:hover{
    background: var(--brand-soft);
    color: var(--brand);
}
.help-panel > summary > span{ flex: 1; }
.help-panel > summary .ico-svg:last-child{
    transition: transform .2s;
    color: var(--muted);
}
.help-panel[open] > summary .ico-svg:last-child{ transform: rotate(180deg); }
.help-body{
    padding: 8px 22px 18px;
    border-top: 1px solid var(--line-2);
    background: var(--surface);
}
.help-steps{
    padding-left: 1.3rem;
    margin: 12px 0;
    font-size: var(--fs-sm);
    color: var(--ink-2);
    line-height: 1.75;
}
.help-steps li{ margin-bottom: 4px; }
.help-steps b{
    color: var(--brand);
    font-family: 'Oswald', sans-serif;
    letter-spacing: .02em;
}

/* ---------- 25. Bilan de classe (Chantier Option B) ---------- */

/* Histogramme */
.histo{
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    align-items: end;
    margin-top: 6px;
}
.histo-col{
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.histo-bar-track{
    position: relative;
    width: 100%;
    height: 140px;
    background: var(--line-2);
    border-radius: var(--r-sm);
    display: flex; align-items: flex-end;
    overflow: hidden;
}
.histo-bar{
    width: 100%;
    min-height: 4px;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    display: flex; align-items: flex-start;
    justify-content: center; padding-top: 4px;
    transition: height .6s cubic-bezier(.2,.8,.2,1);
    animation: histoRise .8s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes histoRise{ from{ height:0; } }
.histo-bad{
    background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%);
}
.histo-warn{
    background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
}
.histo-ok{
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.histo-count{
    font-family: 'Oswald', sans-serif;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.histo-label{
    font-family: 'Oswald', sans-serif;
    font-size: var(--fs-xxs);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    font-weight: 600;
}

/* Comparaison filles / garçons */
.fg-compare{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-top: 4px;
}
.fg-side{
    text-align: center;
    padding: 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
}
.fg-f{ background: rgba(236, 72, 153, .04); border-left: 3px solid var(--row-f-bar); }
.fg-g{ background: rgba(59, 130, 246, .04); border-left: 3px solid var(--row-g-bar); }
.fg-label{
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: var(--fs-xxs);
    font-weight: 700;
    color: var(--muted);
}
.fg-value{
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: var(--fs-3xl);
    line-height: 1;
    margin: 8px 0 4px;
    color: var(--ink);
    display: flex; align-items: baseline;
    justify-content: center; gap: 4px;
}
.fg-f .fg-value{ color: var(--row-f-bar); }
.fg-g .fg-value{ color: var(--row-g-bar); }
.fg-meta{
    font-size: var(--fs-xs);
    color: var(--muted);
}
.fg-vs{
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    color: var(--muted);
    font-size: var(--fs-md);
    text-transform: uppercase;
    letter-spacing: .1em;
}
@media(max-width:640px){
    .fg-compare{ grid-template-columns: 1fr; }
    .fg-vs{ text-align: center; }
}

/* Badges couleur de groupe : lisibilité renforcée */
.badge[style*="background"]{
    padding: .25em .6em;
    letter-spacing: .04em;
    border: 1px solid rgba(0,0,0,.08);
}

/* ===== Sidebar : logo seul + filigrane discret ===== */
.rail-head-solo{ justify-content: center; }
.rail-watermark{
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 160px;
    background: url('logo.png') center / contain no-repeat;
    opacity: .045;
    filter: grayscale(30%);
    pointer-events: none;
    user-select: none;
}

/* ===== Sidebar : fond sportif animé, à peine perceptible =====
   Pictogrammes au trait (ballon, chrono, sifflet, haltère, basket, podium)
   qui montent très lentement. Une seule animation, sur transform : le calque
   est déplacé par la carte graphique sans jamais être redessiné, ce qu'un
   téléphone modeste tient sans à-coups malgré le flou de la barre. Le calque
   dépasse d'une hauteur de motif (480px) et remonte d'exactement cette
   hauteur : la boucle est invisible. Rien n'est lié aux clics ni aux
   changements de page, donc rien ne peut être coupé par un chargement.
   Un premier essai animé au clic avait été retiré le 28/09 pour cette raison. */
.rail-sport{
    position:absolute; left:0; right:0; top:0; z-index:-1;
    height: calc(100% + 480px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='480' fill='none' stroke='%230F1B2D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(32 44)'%3E%3Ccircle r='13'/%3E%3Cpath d='M0-5 4.8-1.5 3 4H-3L-4.8-1.5Z M0-5V-13 M4.8-1.5 12.4-4 M3 4 7.6 10.5 M-3 4-7.6 10.5 M-4.8-1.5-12.4-4'/%3E%3C/g%3E%3Cg transform='translate(86 124)'%3E%3Ccircle cy='2' r='12'/%3E%3Cpath d='M0 2V-4 M0 2 5 5 M-3-14H3 M0-14V-10 M9-8 11-10'/%3E%3C/g%3E%3Cg transform='translate(28 208)'%3E%3Ccircle r='8'/%3E%3Ccircle r='2.5'/%3E%3Cpath d='M4-7H22V-1H8'/%3E%3C/g%3E%3Cg transform='translate(84 292)'%3E%3Cpath d='M-14 0H14 M-14-7V7 M-10-9V9 M10-9V9 M14-7V7'/%3E%3C/g%3E%3Cg transform='translate(34 372)'%3E%3Ccircle r='12'/%3E%3Cpath d='M-12 0H12 M0-12V12 M-8.5-8.5C-4-4-4 4-8.5 8.5 M8.5-8.5C4-4 4 4 8.5 8.5'/%3E%3C/g%3E%3Cg transform='translate(88 444)'%3E%3Cpath d='M-15 8H15 M-15 8V0H-5V8 M-5 8V-6H5V8 M5 8V2H15V8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 480px repeat;
    opacity:.07;
    pointer-events:none;
}
@keyframes railSport{ from{ transform: translateY(0); } to{ transform: translateY(-480px); } }
/* En pause quand la barre est rangée : repliée sur ordinateur, fermée sur téléphone. */
.rail.left.tuck .rail-sport{ animation-play-state: paused; }
@media (max-width:992px){ .rail.left:not(.show) .rail-sport{ animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce){ .rail-sport{ animation:none; } }

/* ===== Topbar : ligne de contexte discrète au centre ===== */
.topbar-mid{
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding: 0 1rem;
}
.mid-line{
    font-size: .8rem;
    color: #5b6b7c;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(15,27,45,.07);
    padding: .42rem 1.1rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: .02em;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
@media (max-width: 1180px){
    .topbar-mid{ display: none; }
}

/* ===== Bandeau de rappel de sauvegarde (7 jours) ===== */
.backup-reminder{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
    margin: 10px 14px 0;
    padding: .65rem 1rem;
    background: #fff8ec;
    border: 1px solid #f2d9a6;
    border-left: 4px solid #F77F00;
    border-radius: 10px;
    font-size: .875rem;
    color: #6b5322;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.backup-reminder .br-ico{ color: #F77F00; display: inline-flex; }
.backup-reminder .br-text{ flex: 1 1 auto; min-width: 220px; line-height: 1.35; }
.backup-reminder .br-actions{ display: inline-flex; gap: .5rem; }
@media (max-width: 640px){
    .backup-reminder{ margin: 8px 8px 0; }
    .backup-reminder .br-actions{ width: 100%; }
    .backup-reminder .br-actions .btn{ flex: 1; }
}

/* ===== Bandeau d'abonnement : essai, sursis, lecture seule ===== */
.abo-bandeau{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 10px 14px 0;
    padding: .5rem .9rem;
    background: #eef8f6;
    border: 1px solid #bfe3dc;
    border-left: 4px solid #1B998B;
    border-radius: 10px;
    font-size: .85rem;
    color: #134e48;
}
.abo-bandeau > svg{ flex: 0 0 auto; color: #1B998B; }
.abo-bandeau > span{ flex: 1 1 200px; line-height: 1.35; }
.abo-bandeau-lien{ font-weight: 600; white-space: nowrap; color: inherit; }
.abo-bandeau-alerte{ background: #fff8ec; border-color: #f2d9a6; border-left-color: #F77F00; color: #6b5322; }
.abo-bandeau-alerte > svg{ color: #F77F00; }
.abo-bandeau-danger{ background: #fdecec; border-color: #f3c2c2; border-left-color: #D62828; color: #7a1b1b; }
.abo-bandeau-danger > svg{ color: #D62828; }
@media (max-width: 640px){
    .abo-bandeau{ margin: 8px 8px 0; }
}
.abo-popup-promo{
    margin: 0;
    padding: .6rem .8rem;
    background: #fff8ec;
    border: 1px solid #f2d9a6;
    border-radius: 8px;
    font-size: .9rem;
}
/* Lecture seule : formulaires d'enregistrement grisés (le verrou est côté serveur) */
.abo-form-verrouille{ opacity: .6; }

/* ---------- Bouton Aide du rail droit ---------- */
.rail-help-btn{
    display:flex; align-items:center; gap:10px;
    margin-top:4px; padding:10px 12px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--brand-soft), #fff);
    border: 1px solid rgba(247,127,0,.30);
    color: var(--ink); text-decoration:none;
    transition: transform .15s, box-shadow .2s, border-color .2s;
}
.rail-help-btn:hover{
    border-color: var(--brand);
    box-shadow: 0 6px 16px rgba(247,127,0,.18);
    color: var(--ink);
}
.rail-help-btn.is-active{
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
}
.rail-help-btn .rhb-ico{
    flex:0 0 auto; display:inline-flex;
    width:34px; height:34px; border-radius:50%;
    align-items:center; justify-content:center;
    background: var(--brand); color: var(--on-brand);
}
.rail-help-btn .rhb-txt{ display:flex; flex-direction:column; line-height:1.2; min-width:0; }
.rail-help-btn .rhb-txt b{ font-size: var(--fs-xs); font-weight:700; white-space:nowrap; }
.rail-help-btn .rhb-txt small{ font-size: var(--fs-xxs); color: var(--muted); white-space:nowrap; }

/* Liens légaux sous le bloc Aide (padding : cible assez haute pour le doigt) */
.rail-legal{
    display:flex; flex-wrap:wrap; align-items:center; gap:0 6px;
    margin-top:16px; font-size:.64rem; color: var(--muted);
}
.rail-legal a{ color: var(--muted); padding:10px 0; text-decoration:underline; text-underline-offset:2px; }
.rail-legal a:hover{ color: var(--brand); }

/* ============================================================
   MOUVEMENT & VIE — transitions de pages, micro-interactions,
   bandeaux harmonisés. 100 % CSS (zéro JS), léger pour ngrok.
   ============================================================ */

/* ---- 1a. Transitions de page natives (navigateurs récents) ----
   Chaque navigation coulisse : l'ancienne page part en fondu vers la
   gauche, la nouvelle arrive de la droite. Ignoré (sans casse) par
   les navigateurs qui ne connaissent pas les View Transitions. */
@view-transition { navigation: auto; }
::view-transition-old(root){
    animation: mcgLeaveLeft .28s cubic-bezier(.4,0,.7,.2) both;
}
::view-transition-new(root){
    animation: mcgEnterRight .34s cubic-bezier(.22,.8,.36,1) both;
}
@keyframes mcgLeaveLeft{
    to{ opacity:0; transform: translateX(-24px); }
}
@keyframes mcgEnterRight{
    from{ opacity:0; transform: translateX(28px); }
    to  { opacity:1; transform: none; }
}

/* ---- 1b. Entrée de page (repli universel, tous navigateurs) ----
   Glissement doux droite → gauche + fondu. Se termine en
   transform:none pour ne jamais piéger les éléments position:fixed
   (modales, overlays). */
.page.page-enter{
    animation: mcgPageIn .38s cubic-bezier(.22,.8,.36,1) both;
}
@keyframes mcgPageIn{
    from{ opacity:0; transform: translateX(18px); }
    to  { opacity:1; transform: none; }
}
/* Les cartes de la page arrivent en léger escalier (3 premières) */
.page-enter .card{ animation: mcgCardIn .45s cubic-bezier(.22,.8,.36,1) both; }
.page-enter .card:nth-of-type(1){ animation-delay:.05s; }
.page-enter .card:nth-of-type(2){ animation-delay:.11s; }
.page-enter .card:nth-of-type(3){ animation-delay:.17s; }
@keyframes mcgCardIn{
    from{ opacity:0; transform: translateY(10px); }
    to  { opacity:1; transform: none; }
}

/* ---- 2. Micro-interactions ------------------------------------ */
/* Boutons : soulèvement au survol, pression au clic */
.btn{
    transition: transform .16s ease, box-shadow .2s ease,
                background-color .18s ease, border-color .18s ease,
                color .18s ease;
}
.btn:hover{ box-shadow: 0 4px 10px rgba(15,27,45,.12); }
.btn:active{ transform: translateY(0) scale(.965); box-shadow: 0 2px 6px rgba(15,27,45,.14); }

/* Lignes de tableau : réaction fluide au survol + filet accent */
.table tbody tr{
    transition: background-color .18s ease, box-shadow .18s ease;
}
.table tbody tr:hover{
    background-color: rgba(247,127,0,.06);
    box-shadow: inset 3px 0 0 var(--brand, #F77F00);
}

/* Menu de gauche : les liens glissent légèrement vers la droite */
.rail.left .nav-list a{
    transition: background-color .18s ease, color .18s ease,
                transform .18s ease, box-shadow .2s ease;
}
.rail.left .nav-list a:active{ transform: translateX(4px) scale(.97); }

/* Cartes : élévation douce au survol (desktop) */
@media (hover:hover){
    /* Une carte ne se soulève plus au passage de la souris (08/10/2026) :
       ce sont des zones de travail, pas des boutons. */
}

/* Champs : halo lumineux au focus */
.form-control, .form-select{
    transition: border-color .18s ease, box-shadow .18s ease;
}
.form-control:focus, .form-select:focus{
    border-color: var(--brand, #F77F00);
    box-shadow: 0 0 0 .2rem rgba(247,127,0,.18);
}

/* Badges & pastilles : petit pop au survol */
.badge{ transition: transform .15s ease; }

/* Mobile : retour tactile net, sans halo gris du navigateur */
*{ -webkit-tap-highlight-color: transparent; }
@media (hover:none){
    .btn:active, .nav-quick .nav-link:active, .rail-help-btn:active{ transform: scale(.96); }
}

/* ---- 3. Bandeaux harmonisés (toutes pages) --------------------- */
.topbar{
    border-radius: var(--r-xl);
    padding: 14px 20px;
    gap: 16px;
    background: rgba(255,255,255,.96);   /* plus de flou d'arrière-plan (08/10/2026) */
    border: 1px solid rgba(15,27,45,.08);
    box-shadow: 0 8px 24px rgba(15,27,45,.08);
}
.page-strip{
    border-radius: var(--r-md);
    padding: 10px 18px;
    margin-top: 10px;
    /* Fond clair plein (08/10/2026) : le titre, en encre sombre, était illisible
       sur le ciel du soir, que l'ancien fond presque transparent laissait voir. */
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(15,27,45,.08);
}
.page-strip .page-title{
    font-weight: 700; letter-spacing: .04em;
    display: inline-flex; align-items: center; gap: .5rem;
}
.topbar-context .ctx-row .form-select{
    border-radius: 999px;
    padding-top: .28rem; padding-bottom: .28rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .15s ease;
}

/* ---- 4. Accessibilité : respiration coupée si demandé ---------- */
@media (prefers-reduced-motion: reduce){
    ::view-transition-old(root), ::view-transition-new(root),
    .page.page-enter, .page-enter .card{ animation: none !important; }
    .btn, .card, .table tbody tr, .rail.left .nav-list a,
    .badge, .form-control, .form-select{ transition: none !important; }
}

/* ---- 5. Menu latéral : icônes « vivantes », sobres au repos ---------
   Au repos : trait gris ardoise, aucun aplat de couleur, pour garder un menu
   calme. Chaque lien porte l'accent de sa page (--nav-accent, défini dans
   pages_meta) qui n'apparaît qu'au survol et sur la page active : pastille
   teintée derrière l'icône, aplat « duo » intensifié, barre d'accent. */
.rail.left .nav-list a,
.rail.left .logout-link{
    --nav-accent: var(--brand, #F77F00);
    position:relative;
    display:flex; align-items:center; gap:12px;
    /* 8 (liste) + 6 + 18 = 32 : la pastille est centrée dans le menu replié à 64px. */
    padding: 8px 12px 8px 6px; border-radius: 12px;
    color: var(--ink-2); text-decoration:none; white-space:nowrap;
    font-weight:500; font-size: var(--fs-sm);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
/* La pastille qui porte l'icône : c'est elle qui « vit ». */
.rail.left .nav-list a .ico,
.rail.left .logout-link .ico{
    flex:0 0 auto; width:36px; height:36px; border-radius:10px;
    display:inline-flex; align-items:center; justify-content:center;
    color: #5B6B82;
    background: transparent;
    box-shadow: inset 0 0 0 1px transparent;
    transition: background-color .22s ease, color .22s ease,
                box-shadow .22s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
}
.rail.left .nav-list .ico-svg .duo,
.rail.left .logout-link .ico-svg .duo{ opacity:.10; transition: opacity .22s ease; }

/* Survol : l'accent de la page se révèle, l'icône se soulève d'un rien. */
.rail.left .nav-list a:hover,
.rail.left .nav-list a:focus-visible{
    background: rgba(15,27,45,.04); color: var(--ink);
}
.rail.left .nav-list a:hover .ico,
.rail.left .nav-list a:focus-visible .ico{
    color: var(--nav-accent);
    background: color-mix(in srgb, var(--nav-accent) 10%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent) 22%, transparent);
}
.rail.left .nav-list a:hover .duo,
.rail.left .nav-list a:focus-visible .duo{ opacity:.22; }

/* Page active : pastille pleine en teinte douce, barre d'accent à gauche. */
.rail.left .nav-list a.active{
    background: color-mix(in srgb, var(--nav-accent) 8%, transparent);
    color: var(--ink); font-weight:600;
}
.rail.left .nav-list a.active .ico{
    color: var(--nav-accent);
    background: color-mix(in srgb, var(--nav-accent) 15%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent) 30%, transparent),
                0 4px 12px color-mix(in srgb, var(--nav-accent) 22%, transparent);
    transform: none;
}
.rail.left .nav-list a.active .duo{ opacity:.30; }
.rail.left .nav-list a::before{
    content:""; position:absolute; left:0; top:12px; bottom:12px;
    width:3px; border-radius:0 3px 3px 0;
    background: var(--nav-accent);
    transform: scaleY(0); transform-origin:center;
    transition: transform .25s ease;
}
.rail.left .nav-list a.active::before{ transform: scaleY(1); left:0; top:12px; bottom:12px; }

/* Déconnexion : séparée du reste par un filet, accent rouge au survol. */
.rail.left .logout-link{
    --nav-accent: #C2410C;
    margin: 6px 8px 0; padding-top: 12px;
    border-top: 1px solid rgba(15,27,45,.08); border-radius: 0 0 12px 12px;
}
.rail.left .logout-link:hover,
.rail.left .logout-link:focus-visible{ color: var(--nav-accent); }
.rail.left .logout-link:hover .ico,
.rail.left .logout-link:focus-visible .ico{
    color: var(--nav-accent);
    background: color-mix(in srgb, var(--nav-accent) 9%, #fff);
}
.rail.left .logout-link:hover .duo{ opacity:.22; }
/* La flèche glisse vers la sortie. */
.rail.left .logout-link .ico-svg path:last-child,
.rail.left .logout-link .ico-svg path:nth-last-child(2){ transition: transform .25s ease; }
.rail.left .logout-link:hover .ico-svg path:last-child,
.rail.left .logout-link:hover .ico-svg path:nth-last-child(2){ transform: translateX(1.5px); }

/* Repli des navigateurs sans color-mix : une teinte neutre plutôt que rien. */
@supports not (background: color-mix(in srgb, red 10%, white)){
    .rail.left .nav-list a:hover .ico,
    .rail.left .nav-list a.active .ico,
    .rail.left .logout-link:hover .ico{ background: rgba(15,27,45,.06); }
    .rail.left .nav-list a.active{ background: rgba(15,27,45,.04); }
}
@media (prefers-reduced-motion: reduce){
    .rail.left .nav-list a, .rail.left .nav-list a .ico, .rail.left .logout-link,
    .rail.left .logout-link .ico, .rail.left .nav-list a::before,
    .rail.left .ico-svg .duo, .rail.left .logout-link .ico-svg path{ transition:none !important; }
    .rail.left .nav-list a:hover, .rail.left .nav-list a:hover .ico{ transform:none; }
}

/* ---- 6. Bilan des fournitures (liste_classe.php) -----------------------
   Tableau de bord sobre : la période couverte en clair, un indicateur par
   article, puis la situation par classe et l'historique des encaissements.
   Chiffres en chasse fixe et alignés à droite, pour se lire en colonne ;
   un zéro est estompé plutôt que remplacé par un point à peine visible. */
.bf{ --bf-accent: var(--brand, #F77F00); --bf-line: rgba(15,27,45,.08); }
.bf-pill{
    display:inline-block; margin-left:.5rem; padding:.1rem .55rem;
    border-radius:999px; font-family:'Inter', sans-serif; text-transform:none;
    letter-spacing:0; font-size:.72rem; font-weight:600;
    color:#8a4b00; background:rgba(247,127,0,.12); vertical-align:middle;
}
.bf-periode{
    display:flex; align-items:flex-start; gap:.5rem;
    margin:0 0 14px; padding:8px 12px; border-radius:10px;
    font-size:var(--fs-xs); color:var(--ink-2);
    background:rgba(15,27,45,.035); border:1px solid var(--bf-line);
}
.bf-periode .ico-svg{ color:var(--muted); flex:0 0 auto; margin-top:2px; }

.bf-kpis{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:12px; margin-bottom:22px; }
.bf-kpi{
    padding:14px 16px; border-radius:14px; background:#fff;
    border:1px solid var(--bf-line); box-shadow:0 2px 8px rgba(15,27,45,.04);
}
.bf-kpi-head{ display:flex; align-items:center; gap:8px; min-width:0; }
.bf-kpi-nom{ font-size:var(--fs-xs); color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bf-kpi-val{
    margin:8px 0 8px; font-family:'Oswald', sans-serif; font-weight:600;
    font-size:1.7rem; line-height:1; color:var(--ink); font-variant-numeric:tabular-nums;
}
.bf-kpi-val span{ font-size:.95rem; font-weight:500; color:var(--muted); }
.bf-kpi-foot{ margin-top:8px; font-size:var(--fs-xxs, .72rem); color:var(--muted); }
.bf-kpi-foot b{ color:var(--ink); }

.bf-bar{ height:6px; border-radius:999px; background:rgba(15,27,45,.07); overflow:hidden; }
.bf-bar i{
    display:block; height:100%; border-radius:inherit;
    background:linear-gradient(90deg, color-mix(in srgb, var(--bf-accent) 75%, #fff), var(--bf-accent));
    transition:width .6s cubic-bezier(.4,0,.2,1);
}
.bf-bar-sm{ height:4px; margin-top:5px; }

.bf-titre{
    margin:4px 0 8px; font-family:'Oswald', sans-serif; font-weight:600;
    font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);
}
/* Titre d'un tableau replié du bilan : de l'air au-dessus, et de quoi savoir ce qu'il contient. */
.bf .bf-titre{ margin-top:16px; }
.bf-titre-n{ font-family:'Inter', sans-serif; font-weight:400; letter-spacing:0; text-transform:none; font-size:.72rem; }
details.pli + .bf-note{ margin-top:14px; }   /* la note de fin ne colle pas au dernier bouton */
.bf-table{ margin-bottom:22px; font-variant-numeric:tabular-nums; }
.bf-table > thead th{
    font-size:.7rem; letter-spacing:.06em; color:var(--muted);
    border-bottom:1px solid var(--bf-line); white-space:nowrap; vertical-align:bottom;
}
.bf-th-sub{
    display:block; font-family:'Inter', sans-serif; text-transform:none; letter-spacing:0;
    font-weight:400; font-size:.68rem; color:var(--muted); opacity:.8;
    max-width:150px; overflow:hidden; text-overflow:ellipsis;
}
.bf-table td{ border-color:var(--bf-line); padding-top:.55rem; padding-bottom:.55rem; }
/* Le survol global des tableaux (filet orange) est trop appuyé ici. */
.bf-table tbody tr:hover{ box-shadow:none; background-color:rgba(15,27,45,.025); }
.bf-num{ text-align:right; white-space:nowrap; }
.bf-col{ min-width:130px; }
.bf-classe{ font-weight:600; color:var(--ink); white-space:nowrap; }
.bf-cell{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.bf-frac{ color:var(--muted); font-size:var(--fs-xs); }
.bf-frac b{ color:var(--ink); font-size:var(--fs-sm); }
.bf-pct{ font-size:var(--fs-xs); font-weight:600; color:var(--ink-2); }
.bf-zero, .bf-zero .bf-frac b, .bf-zero .bf-pct{ color:rgba(15,27,45,.35) !important; font-weight:400; }
.bf-table tfoot td{
    font-weight:600; color:var(--ink); background:rgba(15,27,45,.035);
    border-top:1px solid rgba(15,27,45,.14); border-bottom:0;
}

.bf-jours .bf-jour td{ border-top:1px solid rgba(15,27,45,.12); }
.bf-date{ font-weight:600; color:var(--ink); white-space:nowrap; }
.bf-sub{ font-size:var(--fs-xxs, .72rem); color:var(--muted); }
.bf-total{ font-weight:700; color:var(--ink); }
/* « dont N remis » sous un encaissement : discret, sur sa propre ligne. */
.bf-remis{ display:block; font-size:var(--fs-xxs, .72rem); font-weight:400; color:var(--muted); white-space:nowrap; }
/* Situation par classe : sous chaque barre, les achats notés cette semaine (bleu, comme le
   point bleu des pastilles) et la semaine précédente (gris). La légende les explique. */
.bf-wk{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.bf-wk-c, .bf-wk-p{
    display:inline-block; padding:1px 7px; border-radius:999px; font-size:.7rem; font-weight:600;
    line-height:1.5; white-space:nowrap; font-variant-numeric:tabular-nums;
}
.bf-wk-c{ background:rgba(47,128,237,.12); color:#1D5FBF; }
.bf-wk-p{ background:rgba(15,27,45,.07); color:var(--ink-2); }
.bf-wk b{ font-weight:700; }
.bf-wk-nul{ opacity:.55; }
.bf-wk-nul b{ font-weight:500; }
.bf-wk-legende{ display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center; margin:0 0 6px; }
.bf-wk-legende .bf-wk-c, .bf-wk-legende .bf-wk-p{ font-size:.75rem; }
.bf-wk-dates{ color:var(--muted); font-size:.75rem; }
/* Les chiffres restent alignes en haut : ceux qui portent un « dont N remis » sont plus hauts que les autres. */
.bf-jours td{ vertical-align:top; }
/* Sur téléphone « dont » saute : « 2 remis » tient dans la colonne d'un chiffre, le tableau ne déborde pas. */
@media (max-width: 575.98px){ .bf-remis .bf-dont{ display:none; } }
.bf-jour .bf-num{ font-weight:600; color:var(--ink); }
.bf-jour .bf-num.bf-zero{ font-weight:400; }
.bf-detail td{ font-size:var(--fs-xs); color:var(--ink-2); border-top:0; padding-top:.3rem; padding-bottom:.3rem; }
.bf-detail td:first-child{ padding-left:1.4rem; }
.bf-tag{
    display:inline-block; padding:.05rem .5rem; border-radius:6px;
    background:rgba(15,27,45,.05); color:var(--ink-2); font-weight:500;
}
/* Aujourd'hui : un filet d'accent et une teinte légère, pas un aplat jaune. */
.bf-today td{ background:rgba(247,127,0,.045); }
.bf-today td:first-child{ box-shadow:inset 3px 0 0 var(--bf-accent); }

.bf-note{ display:flex; gap:.4rem; margin:0; font-size:var(--fs-xxs, .72rem); color:var(--muted); line-height:1.5; }
.bf-note .ico-svg{ flex:0 0 auto; margin-top:1px; }
/* Point par semaine : les ventes de la semaine en avant, le cumul en retrait. */
.bf-sem-plus{ font-weight:700; color:var(--ink); }
.bf-sem-plus.bf-sem-nul{ font-weight:400; color:rgba(15,27,45,.35); }
.bf-sem-cumul{ margin-left:.3rem; font-size:.78em; color:var(--muted); }
.bf-sem-cours td{ background:rgba(245,158,11,.06); }
.bf-sem .bf-pill{ margin-left:.35rem; }
.bf-sem-dates{ margin-left:.35rem; color:var(--ink-2); font-weight:400; white-space:nowrap; }
@media (max-width:640px){
    .bf-sem td, .bf-sem th{ padding-left:.3rem; padding-right:.3rem; }
    .bf-sem-cumul{ display:block; margin-left:0; }
    .bf-sem-dates{ display:block; margin-left:0; font-size:.72rem; color:var(--muted); }
    .bf-sem .bf-pill{ display:inline-block; margin:2px 0 0; font-size:.65rem; }
}

@supports not (background: color-mix(in srgb, red 10%, white)){
    .bf-bar i{ background:var(--bf-accent); }
}
@media (prefers-reduced-motion: reduce){ .bf-bar i{ transition:none; } }
@media (max-width: 640px){
    /* Trois indicateurs côte à côte, compacts : empilés, ils prenaient
       la hauteur d'un écran avant le premier tableau. */
    .bf-kpis{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; }
    .bf-kpi{ padding:10px; border-radius:12px; }
    .bf-kpi-nom, .bf-kpi-reste{ display:none; }
    .bf-kpi-remise{ flex-direction:column; gap:1px; }
    .bf-kpi-val{ font-size:1.25rem; margin:6px 0; }
    .bf-kpi-val span{ font-size:.72rem; }
    .bf-col{ min-width:110px; }
    .bf-th-sub{ display:none; }

    /* Situation par classe en fiches : en tableau, la colonne MAN sortait
       de l'écran à droite. Chaque classe tient sur deux lignes : son nom et
       son effectif, puis un article par colonne, l'en-tête masqué étant
       remplacé par l'étiquette portée par chaque cellule. */
    .bf-sit-wrap{ overflow:visible; }
    .bf-sit, .bf-sit tbody, .bf-sit tfoot{ display:block; width:100%; }
    .bf-sit thead{ display:none; }
    .bf-sit tr{
        display:grid; grid-template-columns:repeat(3, minmax(0, 1fr));
        column-gap:10px; row-gap:6px; align-items:end;
        padding:10px 2px; border-bottom:1px solid rgba(15,27,45,.10);
    }
    .bf-sit td{ display:block; padding:0 !important; border:0 !important; min-width:0; }
    .bf-sit td:nth-child(1){ grid-column:1 / 3; }
    .bf-sit td:nth-child(2){ grid-column:3; color:var(--muted); font-size:var(--fs-xs); }
    .bf-sit td:nth-child(2)::after{ content:" élèves"; }
    .bf-sit .bf-col::before{
        content:attr(data-art); display:block; margin-bottom:1px;
        font-family:'Oswald', sans-serif; font-weight:600; font-size:.66rem;
        letter-spacing:.06em; color:var(--muted);
    }
    .bf-sit .bf-cell{ gap:4px; }
    .bf-sit tfoot tr{ background:rgba(15,27,45,.035); border-radius:8px; border-bottom:0; padding:10px 8px; }
    .bf-sit tfoot td{ background:transparent; border-top:0; }
}

/* ---- 7. Fournitures : trois états, menu de pastille, file de remise ------
   Non payé = contour ; réservé (payé, à remettre) = orange ; remis = vert.
   Le point en coin marque un paiement de la semaine scolaire en cours. */
.f-badge{ position:relative; cursor:pointer; }
.f-badge-reserve{ background:#F59E0B; border-color:#F59E0B; color:#fff; }
.f-badge-reserve:hover{ filter:brightness(.93); color:#fff; border-color:#F59E0B; }
.f-badge-semaine::after{
    content:""; position:absolute; top:-3px; right:-3px;
    width:7px; height:7px; border-radius:50%;
    background:#2F80ED; box-shadow:0 0 0 1.5px #fff;
}
.f-badge[aria-expanded="true"]{ outline:2px solid rgba(47,128,237,.55); outline-offset:1px; }

/* Légende des fournitures, en bas du tableau, sur une seule ligne. */
.f-legende{
    display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between; gap:10px;
    margin:12px 0 0; padding-top:10px; border-top:1px solid rgba(15,27,45,.08);
    font-size:var(--fs-xxs, .72rem); color:var(--ink-2); white-space:nowrap;
    overflow-x:auto; scrollbar-width:none;
}
.f-legende::-webkit-scrollbar{ display:none; }
.f-legende > span{ display:inline-flex; align-items:center; gap:4px; }
.f-legende .f-badge{ cursor:default; pointer-events:none; transform:scale(.85); margin:0 -2px; }
.f-aide{ margin:6px 0 0; font-size:var(--fs-xxs, .72rem); line-height:1.45; color:var(--ink-3, #94a3b8); }

/* Titre du filtre et bouton « Replier la liste » (15/10/2026). */
.f-restant-legende{
    margin:10px 0 4px; font-family:'Oswald', sans-serif; text-transform:uppercase;
    letter-spacing:.08em; font-size:.68rem; font-weight:600; color:var(--muted, #64748b);
}
.liste-plier{ display:inline-flex; align-items:center; gap:4px; font-size:.75rem; padding:3px 10px; }
.liste-plier .ico-svg{ transition:transform .2s; }
.liste-plier[aria-expanded="true"] .ico-svg{ transform:rotate(180deg); }

/* Filtre « Tous / Sans BC / Sans TS / Sans MAN » (15/10/2026) : un sélecteur
   segmenté sur une seule ligne, qui défile de côté sur un petit écran. */
.f-restant{
    display:flex; gap:4px; margin:0 0 10px; padding:3px;
    border-radius:10px; background:rgba(15,27,45,.05);
    overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.f-restant::-webkit-scrollbar{ display:none; }
.f-restant-btn{
    flex:1 1 0; min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:5px;
    min-height:32px; padding:4px 6px; border:0; border-radius:8px;
    background:transparent; color:var(--ink-2, #475569);
    font-size:.8rem; font-weight:600; line-height:1; white-space:nowrap; cursor:pointer;
}
/* Sur téléphone, « Sans » disparaît pour que les quatre tiennent sur la ligne ;
   le compteur sous la recherche dit alors « 17 sans BC sur 77 ». */
@media (max-width:480px){ .f-sans{ display:none; } }
.f-restant-n{ font-weight:700; font-variant-numeric:tabular-nums; color:var(--ink-3, #94a3b8); }
.f-restant-btn[data-filtre-article]:not([data-filtre-article=""]) .f-restant-n{ color:#dc2626; }
.f-restant-btn[aria-pressed="true"]{
    background:#fff; color:var(--ink-1, #0f1b2d);
    box-shadow:0 1px 3px rgba(15,27,45,.14);
}

.f-menu{
    position:absolute; z-index:1080; width:252px;
    padding:12px; border-radius:12px; background:#fff;
    border:1px solid rgba(15,27,45,.10);
    box-shadow:0 12px 32px rgba(15,27,45,.18);
    font-size:var(--fs-xs); color:var(--ink-2);
    animation:fmIn .14s ease-out;
}
@keyframes fmIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.fm-tete{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; color:var(--ink); }
.fm-etat{ padding:.1rem .5rem; border-radius:999px; font-size:.68rem; font-weight:600; white-space:nowrap; }
.fm-aucun{ background:rgba(15,27,45,.06); color:var(--muted); }
.fm-reserve{ background:rgba(245,158,11,.14); color:#92400E; }
.fm-recu{ background:rgba(17,157,107,.12); color:#0c6e4b; }
.fm-info{ line-height:1.45; }
.fm-rang{ margin-top:4px; font-weight:600; color:var(--ink); }
.fm-actions{ display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.fm-btn{
    width:100%; padding:7px 10px; border-radius:8px; text-align:left;
    border:1px solid rgba(15,27,45,.12); background:#fff; color:var(--ink);
    font-size:var(--fs-xs); font-weight:600;
    transition:background-color .15s ease, border-color .15s ease;
}
.fm-btn:hover, .fm-btn:focus-visible{ background:rgba(15,27,45,.04); }
.fm-primaire{ background:#F59E0B; border-color:#F59E0B; color:#fff; }
.fm-primaire:hover, .fm-primaire:focus-visible{ background:#E08E06; }
.fm-succes{ background:var(--ok, #119D6B); border-color:var(--ok, #119D6B); color:#fff; }
.fm-succes:hover, .fm-succes:focus-visible{ background:#0e8a5d; }
.fm-danger{ color:#b42318; border-color:rgba(180,35,24,.25); }
.fm-danger:hover, .fm-danger:focus-visible{ background:rgba(180,35,24,.06); }

/* Répartition remis / à remettre sous chaque indicateur du bilan. */
.bf-kpi-remise{ display:flex; flex-wrap:wrap; gap:2px 12px; margin-top:6px; font-size:var(--fs-xxs, .72rem); color:var(--muted); }
.bf-kpi-remise > span{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.fr-dot{ display:inline-block; flex:0 0 auto; width:8px; height:8px; border-radius:50%; }
.fr-dot-on{ background:var(--ok, #119D6B); }
.fr-dot-res{ background:#F59E0B; }
/* Pastille d'article dans les indicateurs : neutre, le vert veut dire « remis ». */
.f-badge-kpi{ background:#0F1B2D; border-color:#0F1B2D; color:#fff; cursor:default; }

/* File de remise : onglets en boutons radio. Panneaux et boutons radio sont
   frères, dans le même ordre : le n-ième bouton coché montre le n-ième panneau. */
.fr-tabs{ display:flex; flex-wrap:wrap; gap:6px; }
.fr-radio{ position:absolute; opacity:0; pointer-events:none; }
.fr-tab{
    display:inline-flex; align-items:center; gap:6px; cursor:pointer;
    padding:6px 12px; border-radius:999px; font-size:var(--fs-xs); font-weight:600;
    color:var(--ink-2); background:rgba(15,27,45,.04); border:1px solid transparent;
    transition:background-color .15s ease, border-color .15s ease;
}
.fr-tab:hover{ background:rgba(15,27,45,.07); }
.fr-radio:focus-visible + .fr-tab{ outline:2px solid rgba(47,128,237,.55); outline-offset:1px; }
.fr-radio:checked + .fr-tab{ background:#fff; border-color:rgba(245,158,11,.55); color:var(--ink); box-shadow:0 2px 8px rgba(15,27,45,.06); }
.fr-count{ min-width:20px; padding:0 6px; border-radius:999px; background:rgba(15,27,45,.08); font-size:.7rem; text-align:center; }
.fr-panel{ display:none; flex:1 1 100%; margin-top:8px; }
.fr-radio:nth-of-type(1):checked ~ .fr-panel:nth-of-type(1),
.fr-radio:nth-of-type(2):checked ~ .fr-panel:nth-of-type(2),
.fr-radio:nth-of-type(3):checked ~ .fr-panel:nth-of-type(3),
.fr-radio:nth-of-type(4):checked ~ .fr-panel:nth-of-type(4),
.fr-radio:nth-of-type(5):checked ~ .fr-panel:nth-of-type(5),
.fr-radio:nth-of-type(6):checked ~ .fr-panel:nth-of-type(6),
.fr-radio:nth-of-type(7):checked ~ .fr-panel:nth-of-type(7),
.fr-radio:nth-of-type(8):checked ~ .fr-panel:nth-of-type(8),
.fr-radio:nth-of-type(9):checked ~ .fr-panel:nth-of-type(9){ display:block; }
/* Onglets combinés (BC+TS…) : les pastilles des articles, reliées par « + ». */
.fr-tab-combo{ gap:3px; }
.fr-tab-combo .fr-count{ margin-left:3px; }
.fr-plus{ font-weight:700; color:var(--muted); }
.fr-semaine td{
    padding-top:.7rem; font-family:'Oswald', sans-serif; font-weight:600;
    font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
    background:transparent !important; border-bottom:1px solid rgba(15,27,45,.10);
}
.fr-rang{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:24px; height:24px; border-radius:50%;
    background:rgba(245,158,11,.14); color:#92400E; font-weight:700; font-size:.75rem;
}
.fr-table tr:first-child + tr .fr-rang{ background:#F59E0B; color:#fff; }
.fr-ici td{ background:rgba(47,128,237,.04); }
.fr-remis{ white-space:nowrap; }
@media (prefers-reduced-motion: reduce){ .f-menu{ animation:none; } }
@media (max-width: 640px){
    .f-legende > span.text-muted{ flex-basis:100%; }
    .fr-tab{ padding:5px 10px; }

    /* File de remise en fiches : en tableau, la classe, l'heure et le bouton
       Remis partaient hors de l'écran à droite, et seul le nom restait
       visible, sans rien qui signale le défilement. Chaque élève tient
       désormais sur deux lignes : rang et nom, puis classe et heure, le
       bouton toujours à portée de pouce. */
    .fr-panel .table-responsive{ overflow:visible; }
    .fr-table, .fr-table tbody{ display:block; width:100%; }
    .fr-table thead{ display:none; }
    .fr-table tr{
        display:grid; align-items:center; column-gap:10px; row-gap:2px;
        grid-template-columns:28px auto 1fr auto;
        grid-template-areas:"rang nom nom btn" "rang classe date btn";
        padding:8px 2px; border-bottom:1px solid rgba(15,27,45,.10);
    }
    .fr-table td{ display:block; padding:0 !important; border:0 !important; background:transparent; min-width:0; }
    .fr-table td:nth-child(1){ grid-area:rang; text-align:left; }
    .fr-table td:nth-child(2){ grid-area:nom; white-space:normal; line-height:1.25; }
    .fr-table td:nth-child(3){ grid-area:classe; }
    .fr-table td:nth-child(4){ grid-area:date; font-size:var(--fs-xs); color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .fr-table td:nth-child(5){ grid-area:btn; }
    .fr-table .bf-tag{ font-size:.72rem; padding:0 .4rem; }
    .fr-table .fr-remis{ padding:.35rem .6rem; }
    /* L'en-tête de semaine reste une ligne pleine largeur. */
    .fr-table tr.fr-semaine{ display:block; padding:12px 2px 4px; border-bottom:1px solid rgba(15,27,45,.10); }
    .fr-table tr.fr-semaine td{ display:block; }
    .fr-ici{ background:rgba(47,128,237,.05); border-radius:8px; }
}

/* ---- 8. Sections des Paramètres : en-têtes, conduites à tenir, centre -----
   Un en-tête dit ce qu'est la section et à quoi elle sert, en une ligne. La
   pastille d'icône porte l'accent de la section, qui ne colore rien d'autre :
   la page reste calme, mais chaque section se reconnaît d'un coup d'œil. */
.sec-head{
    --sec: var(--brand, #F77F00);
    display:flex; align-items:center; gap:12px;
    margin:0 0 12px; padding-bottom:12px;
    border-bottom:1px solid rgba(15,27,45,.07);
}
.sec-ico{
    flex:0 0 auto; width:40px; height:40px; border-radius:12px;
    display:inline-flex; align-items:center; justify-content:center;
    color:var(--sec);
    background:color-mix(in srgb, var(--sec) 12%, #fff);
    box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--sec) 22%, transparent);
}
.sec-ico .duo{ opacity:.26; }
.sec-txt{ flex:1 1 auto; min-width:0; }
.sec-titre{
    margin:0; font-family:'Oswald', sans-serif; font-weight:600;
    font-size:1.02rem; letter-spacing:.03em; text-transform:uppercase; color:var(--ink);
}
.sec-sous{ margin:2px 0 0; font-size:var(--fs-xs); color:var(--muted); line-height:1.4; }
.sec-badge{ flex:0 0 auto; }
.sec-pill{
    display:inline-block; padding:.18rem .6rem; border-radius:999px;
    font-size:.7rem; font-weight:600; white-space:nowrap;
    color:color-mix(in srgb, var(--sec) 80%, #000);
    background:color-mix(in srgb, var(--sec) 12%, #fff);
}
/* Sous-section (h3) : même famille, plus discrète. */
.sec-head-sm{ margin-top:4px; padding-bottom:0; border-bottom:0; gap:10px; }
.sec-head-sm .sec-ico{ width:30px; height:30px; border-radius:9px; }
.sec-head-sm .sec-titre{ font-size:.86rem; }
/* La zone sensible garde un liseré rouge : c'est un avertissement, pas un réglage. */
#sec-danger .sec-titre{ color:#b42318; }

/* Conduite à tenir : repliée, elle ne gêne pas l'habitué. */
.ct{
    margin:0 0 14px; border-radius:12px;
    /* Fond blanc opaque : hors d'une carte, posee sur le ciel de la page,
       une conduite transparente devenait illisible. */
    background:rgba(255,255,255,.94); border:1px solid rgba(15,27,45,.08);
    box-shadow:0 2px 8px rgba(15,27,45,.05);
    transition:background-color .2s ease, border-color .2s ease;
}
.ct[open]{ background:#fff; border-color:rgba(47,128,237,.25); box-shadow:0 4px 14px rgba(15,27,45,.05); }
.ct > summary{
    display:flex; align-items:center; gap:8px; cursor:pointer; list-style:none;
    padding:9px 12px; font-size:var(--fs-xs); color:var(--ink-2);
}
.ct > summary::-webkit-details-marker{ display:none; }
.ct > summary > .ico-svg:first-child{ color:#2F80ED; }
.ct > summary > span{ flex:1 1 auto; }
.ct > summary > .ico-svg:last-child{ color:var(--muted); transition:transform .2s ease; }
.ct[open] > summary > .ico-svg:last-child{ transform:rotate(180deg); }
.ct > summary:hover{ color:var(--ink); }
.ct > summary:focus-visible{ outline:2px solid rgba(47,128,237,.5); outline-offset:2px; border-radius:12px; }
.ct-body{ padding:2px 14px 12px; animation:ctIn .18s ease-out; }
@keyframes ctIn{ from{ opacity:0; transform:translateY(-3px); } to{ opacity:1; transform:none; } }
.ct-etapes{ counter-reset:ct; list-style:none; margin:0; padding:0; }
.ct-etapes li{
    counter-increment:ct; position:relative;
    padding:5px 0 5px 34px; font-size:var(--fs-xs); line-height:1.5; color:var(--ink-2);
}
.ct-etapes li::before{
    content:counter(ct); position:absolute; left:0; top:4px;
    width:22px; height:22px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:.7rem; font-weight:700; color:#fff; background:#2F80ED;
}
.ct-etapes li + li::after{
    content:""; position:absolute; left:10.5px; top:-6px; width:1px; height:10px;
    background:rgba(47,128,237,.3);
}
.ct-pieges{
    margin-top:8px; padding:8px 12px; border-radius:10px;
    background:rgba(180,35,24,.045); border-left:3px solid #D62828;
}
.ct-pieges-titre{ font-size:.7rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#b42318; margin-bottom:2px; }
.ct-pieges ul{ margin:0; padding-left:18px; }
.ct-pieges li{ font-size:var(--fs-xs); line-height:1.5; color:var(--ink-2); }

/* Centre de configuration : un sommaire en étapes cliquables. */
.cfg{
    border-radius:18px; overflow:hidden;
    background:linear-gradient(135deg, #0F1B2D 0%, #1b2d4a 100%);
    box-shadow:0 10px 30px rgba(15,27,45,.18); color:#EAF1F7;
}
.cfg-head{ display:flex; align-items:center; gap:14px; padding:16px 18px; cursor:pointer; list-style:none; }
.cfg-head::-webkit-details-marker{ display:none; }
.cfg-head > .ico-svg:last-child{ margin-left:auto; opacity:.7; transition:transform .2s ease; }
.cfg[open] .cfg-head > .ico-svg:last-child{ transform:rotate(180deg); }
.cfg-ico{
    flex:0 0 auto; width:46px; height:46px; border-radius:14px;
    display:inline-flex; align-items:center; justify-content:center;
    color:#F77F00; background:rgba(247,127,0,.14); box-shadow:inset 0 0 0 1px rgba(247,127,0,.3);
}
.cfg-ico .duo{ opacity:.3; }
.cfg-titres{ display:flex; flex-direction:column; min-width:0; }
.cfg-titre{ font-family:'Oswald', sans-serif; font-weight:600; font-size:1.15rem; letter-spacing:.05em; text-transform:uppercase; }
.cfg-sous{ font-size:var(--fs-xs); color:rgba(234,241,247,.7); }
.cfg-body{ padding:4px 18px 16px; }
.cfg-bloc + .cfg-bloc{ margin-top:14px; }
.cfg-bloc-titre{
    font-family:'Oswald', sans-serif; font-weight:600; font-size:.74rem;
    letter-spacing:.1em; text-transform:uppercase; color:#F77F00; margin-bottom:8px;
}
.cfg-grille{ display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:8px; }
.cfg-etape{
    position:relative; display:flex; align-items:flex-start; gap:10px;
    padding:11px 12px; border-radius:12px; text-decoration:none; color:#EAF1F7;
    background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08);
    transition:background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.cfg-etape:hover, .cfg-etape:focus-visible{
    background:rgba(255,255,255,.1); border-color:rgba(247,127,0,.45); color:#fff;
}
.cfg-num{
    position:absolute; top:-6px; left:-4px; min-width:20px; height:20px; padding:0 5px;
    border-radius:999px; display:flex; align-items:center; justify-content:center;
    font-size:.66rem; font-weight:700; color:#0F1B2D; background:#F77F00;
}
.cfg-etape-ico{
    flex:0 0 auto; width:34px; height:34px; border-radius:10px;
    display:inline-flex; align-items:center; justify-content:center;
    color:#fff; background:rgba(255,255,255,.08);
}
.cfg-etape-ico .duo{ opacity:.25; }
.cfg-etape-txt{ display:flex; flex-direction:column; gap:1px; min-width:0; flex:1 1 auto; }
.cfg-etape-txt b{ font-size:var(--fs-sm); color:#fff; }
.cfg-etape-txt span{ font-size:var(--fs-xxs, .74rem); line-height:1.4; color:rgba(234,241,247,.72); }
.cfg-etape-txt span b{ font-size:inherit; color:#fff; }
.cfg-fleche{ align-self:center; opacity:.4; transition:opacity .2s ease, transform .2s ease; }
.cfg-etape:hover .cfg-fleche{ opacity:1; }
.cfg-astuce{ margin:14px 0 0; font-size:var(--fs-xxs, .74rem); color:rgba(234,241,247,.65); }
.cfg-astuce b{ color:#fff; }

@supports not (background: color-mix(in srgb, red 10%, white)){
    .sec-ico, .sec-pill{ background:rgba(15,27,45,.06); }
}
@media (prefers-reduced-motion: reduce){
    .ct-body{ animation:none; }
    .cfg-etape, .cfg-fleche, .ct{ transition:none; }
    .cfg-etape:hover{ transform:none; }
}
@media (max-width: 640px){
    .sec-ico{ width:34px; height:34px; border-radius:10px; }
    .sec-titre{ font-size:.92rem; }
    .sec-head{ flex-wrap:wrap; }
    .sec-badge{ order:3; flex-basis:100%; padding-left:46px; }
    .cfg-head{ padding:14px; }
    .cfg-body{ padding:4px 14px 14px; }
    .cfg-grille{ grid-template-columns:1fr; }
}

/* Sexe à vérifier : prénom non reconnu à l'import (29/09/2026). Le « ? » se
   remplace par F ou G ; la marque disparaît à l'enregistrement. */
select.sexe-a-verifier{ border-color:#F77F00; box-shadow:0 0 0 2px rgba(247,127,0,.25); font-weight:700; color:#C66400; }

/* Pastilles des groupes (Présences & notes, 30/09/2026) : un toucher ouvre le
   groupe. Assez hautes pour le doigt ; le groupe affiché est cerclé. */
.pastilles-groupes{ display:flex; flex-wrap:wrap; gap:8px; }
.pastille-groupe{
    display:inline-flex; align-items:center; min-height:38px; padding:6px 14px;
    border-radius:999px; font-weight:700; font-size:.88rem; line-height:1; color:#fff;
    text-decoration:none; border:1px solid rgba(15,27,45,.12);
    box-shadow:0 1px 2px rgba(15,27,45,.12); transition:transform .12s ease, opacity .12s ease;
}
.pastille-groupe.clair{ color:#111827; }
.pastille-groupe:hover{ color:#fff; opacity:.9; }
.pastille-groupe.clair:hover{ color:#111827; }
.pastille-groupe.actif{ outline:3px solid #0F1B2D; outline-offset:2px; }
.classe-presente{ background:#EEF9F3; border:1px solid #CDEFDD; border-radius:12px; padding:10px 12px; }
@media (prefers-reduced-motion: reduce){ .pastille-groupe{ transition:none; } .pastille-groupe:hover{ transform:none; } }

/* Groupes en points de couleur (Présences & notes, 21/10/2026, maquette type
   validée par Jems), posés sur le ciel sans carte. Les deux étiquettes du haut
   ont un fond sombre léger : le ciel de time_sky va du bleu nuit au bleu clair,
   un texte blanc nu y serait illisible à midi. Le nom d'un groupe apparaît au
   survol (souris) ou au clavier ; au doigt, le toucher ouvre le groupe. */
.points-groupes{ margin-bottom:14px; }
.pg-tete{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
/* inline-block et non inline-flex : un flex avale l'espace entre le texte et le gras (« ·6 élèves »). */
.pg-quoi{ display:inline-block; line-height:1.3; padding:6px 12px; border-radius:999px; background:rgba(15,27,45,.72); color:#fff; font-size:.9rem; }
.pg-classe{ display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:999px; background:rgba(15,27,45,.72); color:#fff; font-weight:700; font-size:.88rem; text-decoration:underline; white-space:nowrap; }
.pg-classe:hover{ color:#fff; }
.pg-classe.actif{ background:#0F1B2D; text-decoration:none; box-shadow:0 0 0 2px var(--brand); }
.pg-points{ display:grid; grid-template-columns:repeat(auto-fill, minmax(40px, 1fr)); gap:2px 0; }
.pg-point{ position:relative; display:flex; align-items:center; justify-content:center; height:46px; text-decoration:none; }
/* 34 px dans une case d'au moins 40 : huit groupes tiennent sur une ligne à 390 px, et l'anneau du
   groupe affiché (5 px) ne touche pas le point voisin. La case entière reste la zone du doigt. */
.pg-point .pg-dot{ width:34px; height:34px; border-radius:50%; background:var(--pg); border:2px solid rgba(255,255,255,.75); box-shadow:0 1px 3px rgba(15,27,45,.3); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:.95rem; }
.pg-point.clair .pg-dot{ color:#111827; border-color:rgba(15,27,45,.35); }
.pg-point.actif .pg-dot{ box-shadow:0 0 0 3px #0F1B2D, 0 0 0 5px #fff; }
/* Le nom et l'effectif ne se montrent que sur ordinateur (voir plus bas). */
.points-groupes .pg-nom, .points-groupes .pg-n{ display:none; }
.pg-point::after{ content:attr(data-nom); position:absolute; bottom:calc(100% - 2px); left:50%; transform:translateX(-50%); padding:4px 9px; border-radius:8px; background:#0F1B2D; color:#fff; font-size:.78rem; font-weight:700; white-space:nowrap; pointer-events:none; opacity:0; transition:opacity .12s ease; z-index:5; }
@media (hover:hover){ .pg-point:hover::after{ opacity:1; } }
.pg-point:focus-visible{ outline:none; }
.pg-point:focus-visible::after{ opacity:1; }
.pg-point:focus-visible .pg-dot{ outline:3px solid var(--brand); outline-offset:3px; }
@media (prefers-reduced-motion: reduce){ .pg-point::after{ transition:none; } }
/* Sur ordinateur (21/10/2026, maquette A choisie par Jems) : une barre blanche « Afficher »,
   « Toute la classe » et son effectif d'abord, puis chaque groupe avec son nom et son effectif,
   côte à côte. Avant, les points étaient à gauche et « Toute la classe » à l'autre bout de
   l'écran. Le téléphone garde les points (au-dessus de cette règle). */
@media (min-width:1200px){
    .points-groupes{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 14px; border-radius:18px; background:rgba(255,255,255,.94); box-shadow:0 1px 2px rgba(15,27,45,.08); }
    .points-groupes::before{ content:"Afficher"; font-size:.75rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-2); margin-right:4px; }
    .pg-tete{ display:contents; }
    .pg-quoi{ display:none; }
    .points-groupes .pg-nom, .points-groupes .pg-n{ display:inline; }
    .pg-n{ font-weight:500; color:var(--ink-2); }
    .pg-classe{ gap:8px; padding:0 14px; background:#fff; color:var(--ink); border:1px solid var(--line); text-decoration:none; font-size:.9rem; }
    .pg-classe:hover{ color:var(--ink); border-color:var(--brand); }
    .pg-classe.actif{ background:#0F1B2D; color:#fff; border-color:#0F1B2D; box-shadow:none; }
    .pg-classe.actif .pg-n, .pg-point.actif .pg-n{ color:#CBD5E1; }
    .pg-points{ display:flex; flex-wrap:wrap; gap:8px; padding-left:12px; margin-left:4px; border-left:1px solid var(--line); }
    .pg-point{ height:40px; padding:0 14px 0 10px; gap:8px; border-radius:999px; border:1px solid var(--line); background:#fff; color:var(--ink); font-weight:600; font-size:.9rem; white-space:nowrap; }
    .pg-point:hover{ color:var(--ink); border-color:var(--brand); }
    .pg-point .pg-dot{ width:18px; height:18px; border:0; box-shadow:inset 0 0 0 1px rgba(15,27,45,.18); font-size:.62rem; }
    .pg-point.actif{ background:#0F1B2D; color:#fff; border-color:#0F1B2D; }
    .pg-point.actif .pg-dot{ box-shadow:0 0 0 2px #fff; }
    .pg-point::after{ display:none; }
    .pg-point:focus-visible, .pg-classe:focus-visible{ outline:3px solid var(--brand); outline-offset:2px; }
    .pg-point:focus-visible .pg-dot{ outline:none; }
}

/* Vue « Toute la classe » de l'onglet Notes (01/10/2026). La pastille de la
   classe est sombre, pour ne se confondre avec aucune couleur de groupe. */
.pastille-classe{ background:#0F1B2D; gap:6px; }
.pastille-classe.actif{ outline-color:#F77F00; }
/* Puce de couleur d'un groupe ; --g est posée sur la puce ou sur sa ligne. */
.puce-g{
    display:inline-block; width:12px; height:12px; border-radius:50%; margin-right:6px;
    background:var(--g, #94A3B8); border:1px solid rgba(15,27,45,.25); vertical-align:-1px;
}
/* Bande qui ouvre chaque groupe dans les tableaux de classe. */
tr.bande-groupe{ --bs-table-bg:#F1F5F9; }
tr.bande-groupe > *{ background:#F1F5F9; border-top:2px solid var(--g, #94A3B8) !important; padding-top:7px; padding-bottom:7px; }
.grille-fixe tr.bande-groupe .bande-nom{ position:sticky; left:0; z-index:2; }
/* Appel de classe : la case garde la place d'écrire « A2 » en entier. */
.tableau-classe td > select.form-select-sm{ min-width:4.4rem; }
/* La bande se touche pour replier ou dérouler les élèves du groupe. */
table[data-plis] tr.bande-groupe{ cursor:pointer; user-select:none; }
.bande-chevron{ display:inline-flex; vertical-align:-2px; margin-right:4px; color:var(--muted); transition:transform .15s ease; }
tr.bande-groupe.plie .bande-chevron{ transform:rotate(-90deg); }
/* Zone repliable au-dessus d'un tableau long (pli_debut) : un bouton discret,
   « Dérouler » quand elle est fermée, « Replier » quand elle est ouverte. */
details.pli > summary{
    list-style:none; cursor:pointer; user-select:none; display:inline-flex; align-items:center; gap:6px;
    min-height:36px; padding:6px 14px; margin-bottom:10px; border-radius:999px;
    border:1px solid var(--line); background:var(--surface-alt); color:var(--ink-2); font-size:.85rem; font-weight:600;
}
details.pli > summary::-webkit-details-marker{ display:none; }
details.pli > summary:hover{ border-color:#2F80ED; color:#2F80ED; }
details.pli > summary:focus-visible{ outline:2px solid rgba(47,128,237,.5); outline-offset:2px; }
details.pli > summary > .ico-svg{ transition:transform .15s ease; transform:rotate(-90deg); }
details.pli[open] > summary > .ico-svg{ transform:none; }
details.pli > summary .pli-o, details.pli[open] > summary .pli-f{ display:none; }
details.pli[open] > summary .pli-o{ display:inline; }
details.pli:not([open]) > summary{ margin-bottom:0; }
/* Évaluation que le groupe de l'élève n'a pas passée : elle ne compte pas pour lui. */
input.hors-groupe{ background:repeating-linear-gradient(135deg, #F8FAFC 0 6px, #EEF2F6 6px 12px) !important; border-style:dashed !important; }
.legende-note.hg{ background:repeating-linear-gradient(135deg, #F8FAFC 0 3px, #DDE3EA 3px 6px); border:1px dashed #94A3B8; }
/* Case de saisie : étroite, pour laisser sa place au nom sur téléphone ; la
   note calculée s'affiche dessous. */
.tableau-classe td.evc-case{ width:112px; min-width:92px; }
.tableau-classe .evc-note:empty{ display:none; }
/* Note collective : une ligne par groupe (nom, qui la reçoit, note). Sur
   téléphone, la liste des élèves passe sous le nom, sur toute la largeur. */
.tableau-collectif .ncl-entete, .tableau-collectif .ncl-groupe{
    display:grid; grid-template-columns:minmax(6.5rem, 10rem) 1fr 96px; gap:4px 12px; align-items:start;
    padding:8px 4px; border-bottom:1px solid var(--line);
}
.tableau-collectif .ncl-entete{ font-size:var(--fs-xxs); font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.tableau-collectif .ncl-groupe > div:first-child{ padding-top:4px; }
.tableau-collectif details{ min-width:0; padding-top:4px; }
.tableau-collectif details > summary{ cursor:pointer; }
.tableau-collectif .ncl-liste{ max-height:300px; overflow-y:auto; }
.tableau-collectif .ncl-liste li{ padding:4px 0; }
.tableau-collectif .ncl-statut{ margin-right:6px; }
@media (max-width: 576px){
    .tableau-collectif .ncl-entete, .tableau-collectif .ncl-groupe{ grid-template-columns:1fr 96px; }
    .tableau-collectif .ncl-qui{ display:none; }
    .tableau-collectif details{ grid-column:1 / -1; grid-row:2; }
}

/* Bonus et malus depuis « Présences & notes » (07/10/2026). Un bloc par
   groupe, bordé de sa couleur ; les élèves en colonnes, larges pour le doigt. */
.aj-groupe{ border-left:4px solid var(--g, #94A3B8); padding:6px 0 6px 10px; margin-bottom:8px; }
.aj-tout{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:.9rem; cursor:pointer; min-height:32px; }
.aj-tout .puce-g{ margin-right:0; }
.aj-eleves{ display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:0 14px; margin-top:4px; }
.aj-eleves label{ display:flex; align-items:center; gap:6px; font-size:.85rem; min-height:32px; cursor:pointer; }
.aj-choisir > summary{ font-size:.82rem; color:var(--muted); cursor:pointer; padding:2px 0; }
.aj-panneau .form-check-input{ margin-top:0; flex:none; }

/* Paramètres, Groupes : flèches qui changent la place d'un groupe. */
.ordre-groupe{ display:inline-flex; gap:4px; }
.ordre-groupe .btn{ padding:2px 8px; line-height:1.2; }

/* Corriger un nom ou retirer un élève depuis « Présences & notes » (08/10/2026). */
.el-ligne{ display:flex; align-items:center; gap:6px; padding:3px 0; }
.el-num{ width:22px; text-align:right; font-size:.8rem; color:var(--muted); flex:none; }
.el-nom{ display:flex; gap:6px; flex:1; min-width:0; }
.el-nom .form-control{ min-width:0; }

/* Page d'inscription : l'application en trois captures (08/10/2026). */
.demo-app{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-bottom:6px; }
.demo-app a{ display:block; text-decoration:none; color:var(--ink-2); text-align:center; font-size:.74rem; font-weight:600; }
.demo-app img{ display:block; width:100%; height:auto; aspect-ratio:560/912; object-fit:cover; object-position:top;
    border-radius:var(--r-sm); border:1px solid var(--line); box-shadow:var(--shadow-1); margin-bottom:4px; background:var(--surface-alt); }

/* Respiration entre les blocs (08/10/2026, retour de Jems : « les pastilles
   touchent les en-têtes et certains tableaux se touchent »). Le contenu ne
   colle plus à la bande du titre, et deux blocs qui se suivent sans marge
   propre (cartes, rangées, conduite à tenir) sont écartés d'un rien. */
.stage > .page{ margin-top: 12px; }
.page > .card + .card, .page > .row + .card, .page > .ct + .card,
.page > .card + .ct, .page > .row + .ct{ margin-top: 14px; }
/* Une rangée Bootstrap remonte de sa gouttière : après un bloc, elle la garde. */
.page > .card + .row, .page > .ct + .row, .page > .row + .row{ margin-top: 0; }

/* Bilan, « Détail par groupe » (12/10/2026) : la ligne d'un groupe se touche
   pour dérouler, juste dessous, les notes de ses élèves à chaque évaluation. */
tr.groupe-ligne{ cursor:pointer; user-select:none; }
tr.groupe-ligne:focus-visible{ outline:2px solid rgba(247,127,0,.55); outline-offset:-2px; }
tr.groupe-ligne .bande-chevron{ transform:rotate(-90deg); }
tr.groupe-ligne.ouvert .bande-chevron{ transform:none; }
tr.groupe-ligne.ouvert > *{ background:#F8FAFC; }
/* max-width:0 : le tableau des notes, plus large que la carte, glisse dans sa
   zone au lieu d'élargir le tableau des groupes. */
tr.groupe-detail > td{ max-width:0; padding:8px 0 14px; background:#F8FAFC; border-left:3px solid var(--g, #94A3B8); }
tr.groupe-detail-moy > td{ font-weight:600; background:#F1F5F9; }
.grille-fixe tr.groupe-detail-moy .col-fixe{ background:#F1F5F9; }

#listeEleves[hidden]{ display:none !important; }
.legend-body h3{ margin:14px 0 6px; }

/* ===== Menu de gauche D (15/10/2026, en essai, lib/menu_d.php) =====
   Lisible en plein soleil : fond plein, gros caractères gras, page active en
   orange plein avec texte bleu nuit (le blanc sur orange est trop pâle).
   Blanc le jour, bleu nuit le soir (data-moment, posé par le serveur puis par
   l'heure du téléphone). Aucun bord rouge, aucun liseré, pas de flou. */
.rail.left.rail-d{
    --rail-w-open: 280px;
    --md-fond: #FFFFFF; --md-texte: #0F1B2D; --md-doux: #334155;
    --md-titre: #B45309; --md-survol: #F1F4F8; --md-etiq: #F4F6F9; --md-filet: #E5E9F0;
    border-right: 0;
    font-family: 'Inter', system-ui, sans-serif;
}
.rail.left.rail-d[data-moment="nuit"]{
    --md-fond: #0F1B2D; --md-texte: #FFFFFF; --md-doux: #E2E8F0;
    --md-titre: #FDBA74; --md-survol: rgba(255,255,255,.10); --md-etiq: #FFFFFF; --md-filet: rgba(255,255,255,.22);
}
.rail.left.rail-d, .rail.left.rail-d:hover, .rail.left.rail-d:focus-within{
    background: var(--md-fond);
    color: var(--md-texte);
    box-shadow: 6px 0 26px rgba(15,27,45,.18);
    transition: transform .3s cubic-bezier(.4,0,.2,1), background-color .4s ease, color .4s ease;
}
.rail-d .md-tete{ display:flex; align-items:center; gap:12px; padding:14px 12px 10px; min-height:64px; }
.rail-d .md-avatar{
    flex:0 0 40px; height:40px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background: var(--brand); color: var(--on-brand);
    font-family:'Oswald', sans-serif; font-weight:600; font-size:16px;
}
.rail-d .md-qui{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; line-height:1.25; white-space:nowrap; }
.rail-d .md-qui b{ font-size:16px; overflow:hidden; text-overflow:ellipsis; }
.rail-d .md-qui span{ font-size:13px; font-weight:600; color: var(--md-doux); overflow:hidden; text-overflow:ellipsis; }
.rail-d .md-fermer{
    display:none; flex:0 0 44px; height:44px; border:0; border-radius:12px;
    align-items:center; justify-content:center; cursor:pointer;
    background: var(--md-etiq); color:#0F1B2D;
}
.rail-d .md-classe{
    display:flex; align-items:center; gap:12px;
    margin:0 10px 6px; padding:8px 12px; min-height:56px;
    border:1px solid var(--md-filet); border-radius:14px;
    background: var(--md-etiq); color:#0F1B2D; text-align:left; cursor:pointer;
    font-family:inherit; white-space:nowrap; transition: transform .14s ease;
}
.rail-d .md-classe:active{ transform: scale(.97); }
.rail-d .md-point{ flex:0 0 14px; height:14px; border-radius:50%; box-shadow:0 0 0 3px rgba(15,27,45,.10); }
.rail-d .md-classe-txt{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.rail-d .md-classe-txt b{ font-size:15px; overflow:hidden; text-overflow:ellipsis; }
.rail-d .md-classe-txt span{ font-size:12px; font-weight:600; color:#475569; }
.rail-d .md-changer{ font-size:13px; font-weight:800; color:#B45309; }
.rail-d .md-liens{ flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding:0 0 6px; }
.rail-d .md-section{
    margin:12px 0 2px; padding:0 22px;
    font-size:12px; font-weight:800; letter-spacing:.1em; text-transform:uppercase;
    color: var(--md-titre); white-space:nowrap;
}
.rail-d .nav-list{ padding:0 8px; gap:3px; }
.rail-d .md-lien, .rail.left.rail-d .nav-list a{
    display:flex; align-items:center; gap:14px;
    min-height:50px; padding:0 12px; border-radius:14px;
    color: var(--md-texte); text-decoration:none; white-space:nowrap;
    font-size:16px; font-weight:700;
    transition: background-color .18s ease, color .18s ease, transform .14s ease;
}
.rail-d .md-lien .ico{ width:26px; flex:0 0 26px; justify-content:center; }
.rail-d .md-lien:hover{ background: var(--md-survol); color: var(--md-texte); }
.rail.left.rail-d .nav-list a.active{
    background: var(--brand); color:#0F1B2D; font-weight:800;
    box-shadow: 0 6px 16px rgba(247,127,0,.35);
}
.rail.left.rail-d .nav-list a.active::before{ display:none; }
.rail.left.rail-d .nav-list a:active{ transform: scale(.97); }
.rail-d .md-pied{ padding:8px 8px 14px; border-top:1px solid var(--md-filet); }
.rail-d .md-legal{ margin:4px 12px 0; font-size:12px; font-weight:600; color: var(--md-doux); white-space:nowrap; }
.rail-d .md-legal a{ color: inherit; text-decoration:underline; text-underline-offset:2px; display:inline-block; padding:8px 0; }
/* Ordinateur : un rail de libellés (21/10/2026, demande de Jems). Au repos, une bande de 88 px où
   chaque icône porte son nom court dessous (.md-mini) ; au survol, le menu complet s'ouvre par-dessus
   la page, en fondu, sans la pousser (règle du 08/10). Le rail ne se range plus après inactivité :
   rangé, il ne montrerait plus aucun nom. Le panneau de droite garde son comportement. */
.md-mini{ display:none; }
@media (min-width:993px){
    .rail.left.rail-d .rail-head-solo{ display:none; }
    .rail.left.rail-d:not(:hover):not(:focus-within),
    .rail.left.rail-d.tuck:not(:hover):not(:focus-within){ transform: translateX(calc(88px - var(--rail-w-open))); }
    .rail.left.rail-d:not(:hover):not(:focus-within) > :not(.rail-sport):not(.rail-watermark){ transform: translateX(calc(var(--rail-w-open) - 88px)); }
    .rail.left.rail-d.tuck::after{ display:none; }
    .rail-d > *{ transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease; }
    .rail.left.rail-d:not(:hover):not(:focus-within) > :not(.md-mini){ opacity:0; pointer-events:none; }
    .rail.left.rail-d:hover > .md-mini, .rail.left.rail-d:focus-within > .md-mini{ opacity:0; pointer-events:none; }
    .md-mini{
        display:flex; flex-direction:column; align-items:center; gap:2px;
        position:absolute; top:0; bottom:0; left:0; width:88px; padding:14px 0 12px; box-sizing:border-box;
        overflow-y:auto; overflow-x:hidden; scrollbar-width:none;
    }
    .mm-avatar{
        flex:0 0 38px; width:38px; border-radius:50%; margin-bottom:8px;
        display:flex; align-items:center; justify-content:center;
        background: var(--brand); color: var(--on-brand); font-family:'Oswald', sans-serif; font-weight:600; font-size:15px;
    }
    .mm-classe{
        display:flex; align-items:center; gap:5px; max-width:80px; margin-bottom:8px; padding:4px 8px; box-sizing:border-box;
        border-radius:999px; background: var(--md-etiq); color:#0F1B2D;
        font-size:11px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .mm-classe .md-point{ flex:0 0 9px; height:9px; }
    .mm-lien{
        display:flex; flex-direction:column; align-items:center; gap:4px; flex:0 0 auto;
        width:78px; padding:8px 2px; border-radius:14px; box-sizing:border-box;
        color: var(--md-texte); text-decoration:none; text-align:center;
        font-size:11.5px; font-weight:700; line-height:1.15;
    }
    .mm-lien:hover{ background: var(--md-survol); color: var(--md-texte); }
    .mm-lien.actif{ background: var(--brand); color:#0F1B2D; }
    .mm-sortir{ margin-top:auto; }
}
/* La page s'écarte du rail de 88 px tant qu'elle n'est pas centrée avec assez de place
   (1180 + 2 × 88 = 1356 px) ; au-delà, elle reste centrée comme avant. */
@media (min-width:993px) and (max-width:1355px){
    body:has(.rail-d) .stage{ margin-left: 88px; margin-right: var(--rail-w); }
}
@media (min-width:993px) and (prefers-reduced-motion: reduce){
    .rail-d > *{ transition:none; }
}
/* Téléphone : bouton de fermeture visible, et place en bas pour le bouton rond
   du menu, qui recouvrait la Déconnexion. */
@media (max-width:992px){
    .rail-d .md-fermer{ display:flex; }
    /* Tout le menu défile d'un bloc : « Guide » ne se cache plus en bas d'une liste. */
    .rail.left.rail-d{ overflow-y:auto; overscroll-behavior:contain; }
    .rail-d .md-liens{ flex:0 0 auto; overflow:visible; }
    .rail-d .md-pied{ padding-bottom: 86px; }
    .rail-d .md-lien, .rail.left.rail-d .nav-list a{ min-height:52px; font-size:17px; }
}
@media (prefers-reduced-motion: reduce){
    .rail.left.rail-d, .rail-d .md-lien, .rail-d .md-classe{ transition:none; }
}

/* Bilan de classe : « Ma classe / Toutes mes classes » en deux onglets (21/10/2026), même dessin
   que les onglets de travail des autres pages ; avant, deux gros boutons orange. */
.bv-seg{ display:flex; gap:4px; padding:4px; margin:0 0 14px; border-radius:12px; background:rgba(255,255,255,.94); box-shadow:0 1px 2px rgba(15,27,45,.08); max-width:460px; }
.bv-seg a{ flex:1 1 0; min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius:9px; font-weight:600; font-size:.9rem; color:var(--muted); text-decoration:none; white-space:nowrap; }
.bv-seg a:hover{ color:var(--ink); }
.bv-seg a.actif{ background:var(--ink); color:#fff; }
.bv-seg a:focus-visible{ outline:3px solid var(--brand); outline-offset:2px; }

/* ===== Ancien menu de gauche (celui de tous), 21/10/2026, demandes de Jems =====
   Le menu D, trop chargé, n'est pas retenu : l'ancien reste, avec quatre retouches.
   1. L'écriture des noms : Inter, en minuscules (style de base de .nav-list). Le 21/10 au soir,
      Jems revient sur l'Oswald en majuscules du matin : le menu rivalisait avec le titre de la page.
   2. Déconnexion séparée, tout en bas (au-dessus du bouton rond sur téléphone).
   3. Bleu nuit dès 18 h 30 (data-moment, comme le menu D), sur téléphone et ordinateur.
   4. Sur téléphone, un fond plein : la page ne se lit plus au travers (lisible au soleil). */
.rail.left:not(.rail-d) .logout-link{ margin-top:auto; }
@media (max-width:992px){
    .rail.left:not(.rail-d), .rail.left:not(.rail-d):hover, .rail.left:not(.rail-d):focus-within{ background:#FFFFFF; overflow-y:auto; overscroll-behavior:contain; }
    .rail.left:not(.rail-d) .logout-link{ margin-bottom:86px; }
}
/* Nuit */
.rail.left:not(.rail-d)[data-moment="nuit"]{ background: rgba(15,27,45,.90); border-right-color: rgba(255,255,255,.08); }
.rail.left:not(.rail-d)[data-moment="nuit"]:hover,
.rail.left:not(.rail-d)[data-moment="nuit"]:focus-within{ background:#0F1B2D; }
@media (max-width:992px){
    .rail.left:not(.rail-d)[data-moment="nuit"], .rail.left:not(.rail-d)[data-moment="nuit"]:hover,
    .rail.left:not(.rail-d)[data-moment="nuit"]:focus-within{ background:#0F1B2D; }
}
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a,
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link{ color:#E2E8F0; }
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a:hover,
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a:focus-visible,
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link:hover,
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link:focus-visible{ background: rgba(255,255,255,.08); color:#FFFFFF; }
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a:hover .ico,
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a:focus-visible .ico,
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link:hover .ico{ background: rgba(255,255,255,.10); }
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a.active{ background: rgba(247,127,0,.18); color:#FFFFFF; }
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a.active .ico{ background: rgba(247,127,0,.25); }
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link{ border-top-color: rgba(255,255,255,.14); }
/* Les icônes en clair aussi (vu sur la capture : gris foncé sur bleu nuit) ; la page active et le survol gardent leur accent. */
.rail.left:not(.rail-d)[data-moment="nuit"] .nav-list a:not(.active):not(:hover) .ico,
.rail.left:not(.rail-d)[data-moment="nuit"] .logout-link:not(:hover) .ico{ color:#CBD5E1; }
.rail.left:not(.rail-d)[data-moment="nuit"] .rail-sport{ filter: invert(1); opacity:.06; }
.rail.left:not(.rail-d)[data-moment="nuit"] .rail-watermark{ opacity:.10; }
@media (prefers-reduced-motion: reduce){
    .rail.left:not(.rail-d){ transition:none; }
}

/* ===== En-tête compact (21/10/2026, demande de Jems : « que les éléments soient juste à l'intérieur ») =====
   Ordinateur : moins de marge intérieure, menus Niveau / Classe / Groupe moins hauts et plus serrés, logo
   un peu plus petit (138 px de haut auparavant). Téléphone : les marges seulement, les menus gardent une
   hauteur de doigt. */
@media (min-width:769px){
    .topbar{ padding: 8px 18px; gap: 14px; }
    .topbar-identity{ gap: 2px; }
    .topbar-identity .brand-logo{ height: 30px; }
    .topbar-context{ gap: 4px; padding-left: 18px; }
    .topbar-context .ctx-row .form-select{ padding-top: .22rem; padding-bottom: .22rem; min-height: 0; line-height: 1.35; }
}
@media (max-width:768px){
    .topbar{ padding: 10px 14px; gap: 10px; }
    .topbar-identity{ gap: 3px; }
    .topbar-context{ gap: 6px; padding-top: 10px; }
}

/* Panneau d'export sur téléphone : Partager / Enregistrer (24/10/2026, assets/app.js).
   Posé en bas, à portée de pouce ; fond plein (pas d'effet verre), aucune animation. */
.exp-voile{ position: fixed; inset: 0; z-index: 2000; background: rgba(15,27,45,.45);
    display: flex; align-items: flex-end; justify-content: center; }
.exp-voile[hidden]{ display: none; }
.exp-panneau{ background: var(--surface); color: var(--ink); width: 100%; max-width: 480px;
    border-radius: var(--r-md) var(--r-md) 0 0; padding: 18px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(15,27,45,.18); }
.exp-titre{ font-weight: 600; font-size: 1rem; word-break: break-all; }
.exp-etat{ color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }
.exp-actions{ display: flex; gap: 10px; }
.exp-actions .btn{ flex: 1; min-height: 48px; font-weight: 600; }
.exp-fermer{ display: block; width: 100%; margin-top: 6px; color: var(--muted); min-height: 44px; }

/* ---------- Textes posés sur le ciel (scan du design, 16/11/2026) ----------
   Le ciel change six fois par jour (time_sky()) et défile derrière la page : un texte posé
   directement dessus doit se lire sur le plus clair comme sur le plus sombre. Mesuré avant :
   onglets gris à 1,05 l'après-midi, titres bleu nuit à 1,05 la nuit. Règle : jamais de texte nu
   sur le ciel, toujours une plaque (claire, ou bleu nuit à 72 %). */
main.page > .nav-tabs{
    background:rgba(255,255,255,.94); border:1px solid var(--line);
    border-radius:12px; padding:0 6px;
}
main.page > .nav-tabs .nav-item{ margin-bottom:0; }
/* Téléphone : les trois onglets tiennent dans la plaque, à parts égales (à 360 px « Journal » en sortait). */
@media (max-width:480px){
    main.page > .nav-tabs{ padding:0; gap:0; overflow:hidden; }
    main.page > .nav-tabs .nav-item{ flex:1 1 auto; }
    main.page > .nav-tabs .nav-link{ width:100%; text-align:center; padding:.7rem .3rem !important; letter-spacing:.03em; }
}
/* L'écran de l'appel (légende, consignes, « + Séance », « Tout replier ») était posé nu sur le ciel :
   toute la zone de travail repose sur une plaque claire. */
[data-pr-ecran="appel"]{
    background:rgba(255,255,255,.96); border:1px solid var(--line);
    border-radius:16px; padding:12px;
}
@media (max-width:480px){ [data-pr-ecran="appel"]{ padding:10px 8px; } }
/* Récap des notes sur téléphone : la colonne Sexe est repliée, pour montrer une évaluation de plus
   (décision de Jems, 16/11/2026). Le liseré rose ou bleu de la ligne dit toujours fille ou garçon.
   Repliée à zéro et non retirée (display:none) : les bandes de groupe fusionnent trois colonnes. */
@media (max-width:575.98px){
    .col-sexe{ width:0; max-width:0; padding:0 !important; border-left:0 !important; border-right:0 !important; font-size:0; overflow:hidden; }
    .col-sexe > *{ display:none; }
}
