/* ============================================================================
   Espace privé de cotation enseignant — feuille de style dédiée.
   Alignée sur les variables de css/styles.css (--bleu-win #0078D4, Inter,
   --header-height 66px) ; complète Bootstrap 5 chargé par les pages.

   Organisation :
     1. Base & fond
     2. Barre supérieure (desktop + bouton menu mobile)
     3. Menu mobile (offcanvas) — même esprit que le footer SchoolMan
     4. Contenu : cartes, statistiques, tableaux responsives
     5. Formulaires, modales flottantes
     6. Habillage des pages publiques (connexion / installation)
     7. Indicateur de robustesse du mot de passe
     8. Pied de page
   ========================================================================== */

:root {
    --priv-ombre-1: 0 .25rem .75rem rgba(16, 24, 40, .06);
    --priv-ombre-2: 0 .75rem 1.75rem rgba(16, 24, 40, .10);
    --priv-rayon: .75rem;
    --priv-rayon-lg: 1rem;
    --priv-bord: #E4E8EF;
    --priv-fond: #F4F7FB;
    /* Couleurs d'etat (synchronisation hors-ligne) : alignees sur Bootstrap. */
    --vert-succes: #107C10;
    --orange-alerte: #C77700;
    --rouge-erreur: #D13438;
}

/* ── 1. Base ─────────────────────────────────────────────────────────── */

.priv-body {
    background: var(--priv-fond, #F4F7FB);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-text-size-adjust: 100%;
}

.priv-conteneur {
    flex: 1 0 auto;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
}

/* ── 2. Barre supérieure ─────────────────────────────────────────────── */

.priv-bar {
    background: linear-gradient(135deg, var(--bleu-win, #0078D4) 0%, var(--bleu-win-dark, #005A9E) 100%);
    min-height: var(--header-height, 66px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    position: sticky;
    top: 0;
    z-index: 1030;
    flex-wrap: nowrap;
}

.priv-marque {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    min-width: 0;
}

.priv-marque-sub {
    font-weight: 400;
    opacity: .85;
    font-size: .9rem;
}

/* Badge d'espace (enseignant / administration) : repère visuel immédiat. */
.priv-espace-badge {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .18rem .55rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    white-space: nowrap;
}

.priv-lien {
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    padding: .45rem .8rem;
    border-radius: .5rem;
    font-size: .92rem;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.priv-lien:hover,
.priv-lien:focus-visible {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.priv-lien.actif {
    background: rgba(255, 255, 255, .24);
    color: #fff;
    font-weight: 600;
}

/* Parent « Structure » : bouton deroulant, meme apparence que les liens. */
.priv-lien-parent {
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

/* Barre PC : entrees groupees, toujours sur UNE seule ligne. */
.priv-nav {
    flex-wrap: nowrap;
    min-width: 0;
}

.priv-nav-groupe {
    flex: 0 0 auto;
}

.priv-nav-groupe .priv-lien-parent {
    display: inline-flex;
    align-items: center;
}

.priv-nav-groupe .dropdown-toggle::after {
    margin-left: .4rem;
    vertical-align: .12em;
}

.priv-nav-groupe .dropdown-menu {
    margin-top: .35rem;
}

.priv-dropdown {
    border: 1px solid var(--priv-bord, #E4E8EF);
    border-radius: .6rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
    padding: .35rem;
    min-width: 15rem;
}

.priv-dropdown .dropdown-item {
    border-radius: .4rem;
    font-size: .9rem;
    padding: .45rem .6rem;
    display: flex;
    align-items: center;
}

.priv-dropdown .dropdown-item.active,
.priv-dropdown .dropdown-item:active {
    background: var(--bleu-fonce, #0F4C81);
    color: #fff;
}

.priv-compte {
    font-size: .9rem;
    white-space: nowrap;
}

/* Bouton hamburger (visible uniquement en mobile, cf. media query). */
.priv-burger {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: .5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.priv-burger:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

/* ── 3. Menu mobile (offcanvas) — esprit du footer SchoolMan ─────────── */

.priv-menu-mobile {
    background: #1F2937; /* --gray-800 du footer officiel */
    color: #D1D5DB;      /* --gray-400 */
    width: 300px;
    max-width: 88vw;
    border-right: none;
}

.priv-menu-mobile .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.priv-menu-mobile .offcanvas-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.priv-menu-mobile .priv-menu-titre {
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 1.1rem 0 .5rem;
    padding: 0 .25rem;
}

.priv-menu-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .92rem;
}

.priv-menu-mobile li {
    padding: 1px 0;
}

.priv-menu-mobile a {
    color: #93C5FD; /* lien bleu du footer officiel */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .65rem;
    border-radius: .5rem;
}

.priv-menu-mobile a:hover,
.priv-menu-mobile a:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.priv-menu-mobile a.actif {
    background: rgba(147, 197, 253, .16);
    color: #fff;
    font-weight: 600;
}

/* Sous-menus de « Structure » : groupes repliables sous le parent. */
.priv-menu-mobile .priv-menu-chevron {
    margin-left: auto;
    font-size: .8rem;
    transition: transform .2s ease;
}

.priv-menu-mobile a[aria-expanded="true"] .priv-menu-chevron {
    transform: rotate(180deg);
}

.priv-menu-mobile .priv-sous-lien {
    padding-left: 2.1rem;
    font-size: .88rem;
    color: #BFDBFE;
}

.priv-menu-mobile ul.collapse,
.priv-menu-mobile ul.collapsing {
    border-left: 1px solid rgba(255, 255, 255, .12);
    margin-left: .8rem;
}

.priv-menu-mobile .priv-menu-sep {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin: .9rem 0;
}

.priv-menu-mobile .priv-menu-note {
    font-size: .8rem;
    color: #9CA3AF;
}

/*
 * Rubriques du menu mobile : chaque rubrique est une section titree facon
 * pied de page (titre + liens groupes), separee de la suivante par un filet.
 * Le client a demande des menus tres semblables au footer SchoolMan.
 */
.priv-menu-mobile .priv-menu-rubrique + .priv-menu-rubrique {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: .35rem;
    padding-top: .35rem;
}

.priv-menu-mobile .priv-menu-rubrique .priv-menu-titre {
    margin-top: .8rem;
}

/* ── 4. Contenu : cartes, statistiques, tableaux ─────────────────────── */

/*
 * Boutons d'action compacts (petites icones) : le client a demande des
 * actions discretes, y compris sur smartphone ou la place est comptee.
 * Chaque bouton fait 2rem : assez grand pour le doigt, assez petit pour
 * tenir 3 icones dans une cellule.
 */
.priv-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .3rem;
    justify-content: center;
    align-items: center;
}

.priv-action-form {
    display: inline-flex;
    margin: 0;
}

.priv-action-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: .45rem;
    background: #F3F4F6;
    color: #4B5563;
    font-size: .95rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.priv-action-btn:hover,
.priv-action-btn:focus-visible {
    border-color: currentColor;
    text-decoration: none;
}

.priv-action-modifier {
    background: rgba(0, 120, 212, .1);
    color: var(--bleu-win, #0078D4);
}

.priv-action-modifier:hover,
.priv-action-modifier:focus-visible {
    background: var(--bleu-win, #0078D4);
    color: #fff;
}

.priv-action-supprimer {
    background: rgba(220, 38, 38, .1);
    color: #DC2626;
}

.priv-action-supprimer:hover,
.priv-action-supprimer:focus-visible {
    background: #DC2626;
    color: #fff;
}

.priv-action-activer {
    background: rgba(22, 163, 74, .12);
    color: #16A34A;
}

.priv-action-activer:hover,
.priv-action-activer:focus-visible {
    background: #16A34A;
    color: #fff;
}

.priv-action-inactif {
    background: rgba(156, 163, 175, .14);
    color: #9CA3AF;
    cursor: default;
}

/* Colonne d'actions : largeur minimale stable, jamais etiree. */
.priv-col-actions {
    width: 1%;
    white-space: nowrap;
}

.priv-titre {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--noir, #202020);
    margin-bottom: 1rem;
}

.priv-titre i {
    color: var(--bleu-win, #0078D4);
}

.priv-carte {
    background: #fff;
    border: 1px solid var(--priv-bord, #E4E8EF);
    border-radius: var(--priv-rayon, .75rem);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--priv-ombre-1);
    height: 100%;
}

/* Carte cliquable / accent : survol discret pour signaler l'interaction. */
.priv-carte-cliquable {
    transition: transform .15s ease, box-shadow .15s ease;
}

.priv-carte-cliquable:hover {
    transform: translateY(-2px);
    box-shadow: var(--priv-ombre-2);
}

.priv-chiffre {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--bleu-win, #0078D4);
    line-height: 1.1;
}

.priv-libelle {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gris-moyen, #9E9E9E);
}

.priv-table thead th {
    background: var(--bleu-win, #0078D4);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
    border-color: transparent;
}

.priv-table td {
    vertical-align: middle;
    font-size: .92rem;
}

.priv-cellule-points {
    width: 5.2rem;
    text-align: center;
}

/* ── Cotation hors-ligne : etats de cellule et barre de synchronisation ─── */
.priv-sync-barre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.priv-sync-etat {
    font-size: .82rem;
    margin-left: auto;
    color: var(--gris-moyen, #9E9E9E);
}

.priv-sync-etat.ok {
    color: var(--vert-succes, #107C10);
    font-weight: 600;
}

.priv-sync-etat.attente {
    color: var(--orange-alerte, #C77700);
    font-weight: 600;
}

.priv-sync-etat.erreur {
    color: var(--rouge-erreur, #D13438);
    font-weight: 600;
}

/* Chaque cellule porte sa propre pastille d'etat : l'enseignant voit d'un
   coup d'oeil ce qui est enregistre, ce qui attend, ce que le serveur a
   refuse — sans quitter la grille. */
td.priv-cellule-attente {
    box-shadow: inset 0 0 0 2px var(--orange-alerte, #C77700);
    background: #FFF8E8;
}

td.priv-cellule-erreur {
    box-shadow: inset 0 0 0 2px var(--rouge-erreur, #D13438);
    background: #FDECEE;
}

td.priv-cellule-ok {
    box-shadow: inset 0 0 0 2px var(--vert-succes, #107C10);
}

/* Saisie refusee localement (borne ou entier) : le champ lui-meme passe en
   rouge, dans les deux modes (carte eleve et tableau par cours). */
.priv-cellule-erreur .priv-point-input,
td.priv-cellule-erreur input {
    border-color: var(--rouge-erreur, #D13438) !important;
    background: #FFF7F8;
    color: #A4262C;
}

/* Element masque par le filtre de recherche (fiche eleve ou ligne de cours). */
.priv-filtre-cache {
    display: none !important;
}

/* Choix de classe (modale) : cible tactile large, une option par ligne. */
.priv-choix-classe {
    border: 1px solid var(--priv-bord, #E4E8EF);
    border-radius: var(--priv-rayon, .75rem);
    padding: .6rem .75rem .6rem 2.4rem;
    margin-bottom: .5rem;
}

.priv-choix-classe:has(input:checked) {
    border-color: var(--bleu-win, #0078D4);
    background: #F2F8FE;
}

/* Modale de choix : hauteur bornee par l'ecran, filtres fixes et liste
   reellement defilante (y compris dans la WebView Capacitor et quand le
   clavier virtuel reduit la zone visible).

   Chaque niveau est explicitement une colonne flex contrainte. Sans cela, le
   <form> intermediaire grandit avec la liste et le contenu est coupe au lieu
   de defiler. `--priv-hauteur-modale` est renseigne par priv-classe.js a
   partir de visualViewport ; le calc() reste le repli sans JavaScript. */
#privModalClasse .modal-dialog {
    display: flex;
    height: auto;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: .5rem auto;
}

#privModalClasse .modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: var(--priv-hauteur-modale, calc(100vh - 1rem));
    max-height: var(--priv-hauteur-modale, calc(100dvh - 1rem));
    overflow: hidden;
}

#privModalClasse .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#privModalClasse .modal-header,
#privModalClasse .modal-footer {
    flex: 0 0 auto;
}

/* Specificite volontairement superieure a
   `.modal-dialog-scrollable .modal-body { overflow-y: auto }` de Bootstrap :
   c'est la LISTE qui defile, pas le corps entier (sinon les filtres
   disparaissent au premier glissement). */
#privModalClasse .modal-body.priv-choix-corps {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#privModalClasse .priv-choix-filtres {
    flex: 0 0 auto;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--priv-bord, #E4E8EF);
}

#privModalClasse .priv-choix-liste {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: .75rem .25rem 0 0;
    margin-right: -.25rem;
}

/* Barre de confirmation : placee sous la classe cochee (JS), collee au bas
   de la zone defilante pour rester visible sans faire defiler la fenetre. */
.priv-choix-flottant {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin: .5rem 0 .75rem;
    padding: .6rem .75rem;
    background: #fff;
    border: 1px solid var(--bleu-win, #0078D4);
    border-radius: var(--priv-rayon, .75rem);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .12);
}

.priv-choix-flottant[hidden] {
    display: none;
}

/* Colonne eleve figee a gauche : sur mobile, le nom suit le defilement. */
.priv-col-eleve {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.priv-table thead .priv-col-eleve {
    background: var(--bleu-win, #0078D4);
    z-index: 3;
}

.priv-etiquette {
    font-size: .78rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 1rem;
}

/* Pastille d'etape du parcours (tableau de bord « Mon espace »). */
.priv-etape-num {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    background: rgba(0, 120, 212, .12);
    color: var(--bleu-win, #0078D4);
}

.priv-etape-num.prive-etape-faite {
    background: #16A34A;
    color: #fff;
}

/* ── Onglets des etats de sortie (bulletins / proclamation / palmares) ── */

.priv-onglets {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    border-bottom: 1px solid var(--priv-bord, #E4E8EF);
    margin-bottom: .9rem;
}

.priv-onglet {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--texte-secondaire, #5A6572);
    font-weight: 600;
    font-size: .875rem;
    padding: .5rem .85rem;
    border-bottom: 2px solid transparent;
    border-radius: .5rem .5rem 0 0;
    cursor: pointer;
}

.priv-onglet:hover {
    background: #F1F5FB;
}

.priv-onglet.active {
    color: var(--bleu-win, #0078D4);
    border-bottom-color: var(--bleu-win, #0078D4);
}

.priv-panneau-sortie {
    padding-top: .25rem;
}

/* Etats de sortie imprimes (sortie.php) : fond blanc, sans chrome. */
.priv-sortie-contenu {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: .5rem;
    box-shadow: var(--priv-ombre-1);
}

@media print {
    .priv-sortie-contenu {
        max-width: none;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0 !important;
    }

    .priv-sortie-contenu .table {
        font-size: .82rem;
    }
}

/* En-tête de section collant en mobile : l'action reste accessible. */
.priv-barre-actions {
    position: sticky;
    top: calc(var(--header-height, 66px) + .25rem);
    z-index: 10;
}

/* Tableaux responsives : chaque ligne devient une carte en mobile. */
@media (max-width: 767.98px) {
    .priv-table-responsive thead {
        display: none;
    }

    .priv-table-responsive tbody tr {
        display: block !important; /* prime sur le display:table-row inline de table-utils.js */
        background: #fff;
        border: 1px solid var(--priv-bord, #E4E8EF);
        border-radius: var(--priv-rayon, .75rem);
        box-shadow: var(--priv-ombre-1);
        padding: .75rem .9rem;
        margin-bottom: .75rem;
    }

    .priv-table-responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: .4rem 0;
        border: none;
        text-align: right;
    }

    .priv-table-responsive tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--gris-moyen, #9E9E9E);
        text-align: left;
        flex-shrink: 0;
    }

    .priv-table-responsive tbody td:first-child {
        border-bottom: 1px solid var(--priv-bord, #E4E8EF);
        margin-bottom: .35rem;
        font-weight: 600;
    }

    .priv-table-responsive tbody td:first-child::before {
        content: none;
    }

    /* La grille de cotation reste à défilement horizontal (saisie de notes). */
    .priv-grille-defilement {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Tableaux COMPACTS (console d'administration) ─────────────────────── *
 * Objectif : reduire au maximum la hauteur des lignes, sur PC comme sur
 * mobile, tout en gardant toutes les informations lisibles. Les pages
 * « enseignants » et « abonnements » ajoutent la classe
 * `priv-table-compacte` a leur tableau responsive.
 */
.priv-table-compacte.table > :not(caption) > * > * {
    padding: .22rem .4rem;
    font-size: .76rem;
    line-height: 1.15;
    vertical-align: middle;
}

.priv-table-compacte.table thead th {
    font-size: .68rem;
    letter-spacing: .02em;
    white-space: nowrap;
}

.priv-table-compacte.table tbody td {
    line-height: 1.15;
}

.priv-table-compacte .badge {
    font-size: .64rem;
    font-weight: 600;
    padding: .16rem .38rem;
    line-height: 1.1;
}

.priv-table-compacte .small,
.priv-table-compacte small {
    font-size: .66rem;
    line-height: 1.12;
}

.priv-table-compacte .btn {
    font-size: .68rem;
    line-height: 1.1;
    padding: .18rem .42rem;
    border-radius: .4rem;
    gap: .2rem;
}

.priv-table-compacte .btn i {
    font-size: .76rem;
}

.priv-table-compacte .d-flex {
    gap: .2rem !important;
}

/* Badge « classe occupee » (console d'administration). */
.priv-classe-badge {
    display: inline-block;
    max-width: 100%;
    padding: .1rem .4rem;
    border-radius: .35rem;
    background: #EAF2FE;
    color: #0B5CAB;
    border: 1px solid #C7DCF8;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.priv-classe-plus {
    display: inline-block;
    margin-left: .12rem;
    padding: .06rem .3rem;
    border-radius: 999px;
    background: #EEF2F6;
    color: #475569;
    font-size: .62rem;
    font-weight: 700;
    vertical-align: middle;
}

@media (max-width: 767.98px) {
    /* Grille 2 colonnes : nom / ecole / classe / actions sur toute la
       largeur, les compteurs et dates se partagent les deux colonnes. */
    .priv-table-responsive.priv-table-compacte tbody tr {
        display: grid !important; /* prime sur le display:table-row inline de table-utils.js */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .1rem .65rem;
        padding: .5rem .65rem;
        margin-bottom: .5rem;
        border-radius: var(--priv-rayon, .75rem);
    }

    .priv-table-responsive.priv-table-compacte tbody td {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: .1rem .5rem;
        padding: .1rem 0;
        border: none;
        text-align: right;
        font-size: .74rem;
    }

    .priv-table-responsive.priv-table-compacte tbody td::before {
        font-size: .62rem;
        letter-spacing: .02em;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="Nom"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Enseignant"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Ecole"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Classe"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Etat"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Actions"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Fiche"] {
        grid-column: 1 / -1;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="Nom"],
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Enseignant"] {
        display: block;
        text-align: left;
        border-bottom: 1px solid var(--priv-bord, #E4E8EF);
        padding-bottom: .25rem;
        margin-bottom: .1rem;
        font-weight: 600;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="Nom"]::before,
    .priv-table-responsive.priv-table-compacte tbody td[data-label="Enseignant"]::before {
        content: none;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="N°"] {
        display: none;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="Actions"] {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: .2rem;
        padding-top: .3rem;
    }

    .priv-table-responsive.priv-table-compacte tbody td[data-label="Actions"]::before {
        content: none;
    }

    .priv-classe-badge {
        font-size: .66rem;
    }
}

/* ── 5. Formulaires, modales flottantes & boutons harmonisés ──────────── */

/* Système de boutons unifié pour tout l'espace privé */
.priv-body .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.2;
    padding: .5rem .95rem;
    border-radius: .6rem;
    border: 1px solid transparent;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease,
        box-shadow .15s ease, filter .15s ease;
    vertical-align: middle;
    white-space: nowrap;
}

.priv-body .btn:hover {
    filter: brightness(.97);
}

.priv-body .btn:active {
    filter: brightness(.94);
}

.priv-body .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 .2rem rgba(0, 120, 212, .18);
}

.priv-body .btn:disabled,
.priv-body .btn.disabled {
    opacity: .6;
    pointer-events: none;
    box-shadow: none;
}

.priv-body .btn-sm {
    font-size: .83rem;
    padding: .42rem .8rem;
    border-radius: .55rem;
    gap: .35rem;
}

.priv-body .btn-lg {
    font-size: .98rem;
    padding: .62rem 1.15rem;
    border-radius: .7rem;
}

.priv-body .btn i,
.priv-body .btn .bi,
.priv-body .btn .material-symbols-outlined {
    font-size: 1rem;
    line-height: 1;
}

.priv-body .btn-sm i,
.priv-body .btn-sm .bi,
.priv-body .btn-sm .material-symbols-outlined {
    font-size: .95rem;
}

.priv-body .btn-primary {
    background: linear-gradient(180deg, #1f8be3 0%, #0078D4 100%);
    border-color: #0078D4;
    color: #fff;
}

.priv-body .btn-primary:hover,
.priv-body .btn-primary:focus {
    background: linear-gradient(180deg, #197ad1 0%, #006cbe 100%);
    border-color: #006cbe;
    color: #fff;
}

.priv-body .btn-outline-primary {
    background: #fff;
    border-color: rgba(0, 120, 212, .7);
    color: #005A9E;
}

.priv-body .btn-outline-primary:hover,
.priv-body .btn-outline-primary:focus {
    background: rgba(0, 120, 212, .08);
    border-color: #0078D4;
    color: #005A9E;
}

.priv-body .btn-secondary,
.priv-body .btn-outline-secondary {
    background: #fff;
    border-color: var(--priv-bord, #E4E8EF);
    color: #334155;
}

.priv-body .btn-secondary:hover,
.priv-body .btn-outline-secondary:hover,
.priv-body .btn-secondary:focus,
.priv-body .btn-outline-secondary:focus {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #1F2937;
}

.priv-body .btn-success {
    background: linear-gradient(180deg, #22c55e 0%, #16A34A 100%);
    border-color: #16A34A;
    color: #fff;
}

.priv-body .btn-success:hover,
.priv-body .btn-success:focus {
    background: linear-gradient(180deg, #16a34a 0%, #15803D 100%);
    border-color: #15803D;
    color: #fff;
}

.priv-body .btn-outline-success {
    background: #fff;
    border-color: rgba(22, 163, 74, .7);
    color: #15803D;
}

.priv-body .btn-outline-success:hover,
.priv-body .btn-outline-success:focus {
    background: rgba(22, 163, 74, .08);
    border-color: #16A34A;
    color: #166534;
}

.priv-body .btn-warning {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: #fff;
}

.priv-body .btn-warning:hover,
.priv-body .btn-warning:focus {
    background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
    border-color: #b45309;
    color: #fff;
}

.priv-body .btn-outline-warning {
    background: #fff;
    border-color: rgba(217, 119, 6, .7);
    color: #B45309;
}

.priv-body .btn-outline-warning:hover,
.priv-body .btn-outline-warning:focus {
    background: rgba(245, 158, 11, .09);
    border-color: #d97706;
    color: #92400E;
}

.priv-body .btn-danger {
    background: linear-gradient(180deg, #f87171 0%, #DC2626 100%);
    border-color: #DC2626;
    color: #fff;
}

.priv-body .btn-danger:hover,
.priv-body .btn-danger:focus {
    background: linear-gradient(180deg, #ef4444 0%, #B91C1C 100%);
    border-color: #B91C1C;
    color: #fff;
}

.priv-body .btn-outline-danger {
    background: #fff;
    border-color: rgba(220, 38, 38, .7);
    color: #DC2626;
}

.priv-body .btn-outline-danger:hover,
.priv-body .btn-outline-danger:focus {
    background: rgba(220, 38, 38, .08);
    border-color: #DC2626;
    color: #B91C1C;
}

.priv-body .btn-light {
    background: #fff;
    border-color: var(--priv-bord, #E4E8EF);
    color: #1F2937;
}

.priv-body .btn-light:hover,
.priv-body .btn-light:focus {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #111827;
}

.priv-body .btn-outline-light {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
    backdrop-filter: blur(4px);
}

.priv-body .btn-outline-light:hover,
.priv-body .btn-outline-light:focus {
    background: rgba(255, 255, 255, .18);
    border-color: #fff;
    color: #fff;
}

.priv-body .btn-link {
    background: transparent;
    border-color: transparent;
    color: #0078D4;
    padding: .35rem .5rem;
    font-weight: 600;
    box-shadow: none;
}

.priv-body .btn-link:hover,
.priv-body .btn-link:focus {
    color: #005A9E;
    text-decoration: none;
    background: rgba(0, 120, 212, .08);
    filter: none;
}

.priv-body .btn-close {
    width: .9rem;
    height: .9rem;
    opacity: .6;
}

.priv-body .btn-close:hover {
    opacity: 1;
}

/* Groupe de boutons aligné */
.priv-body .btn-group .btn,
.priv-body .pagination .btn {
    border-radius: 0;
}

.priv-body .btn-group .btn:first-child,
.priv-body .pagination .btn:first-child {
    border-top-left-radius: .55rem;
    border-bottom-left-radius: .55rem;
}

.priv-body .btn-group .btn:last-child,
.priv-body .pagination .btn:last-child {
    border-top-right-radius: .55rem;
    border-bottom-right-radius: .55rem;
}

/* Barre d'actions basse harmonisée */
.priv-body .priv-barre-actions-bas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
}

.priv-body .priv-barre-actions-bas .ms-auto {
    margin-left: auto !important;
}

@media (max-width: 575.98px) {
    .priv-body .priv-barre-actions-bas {
        flex-direction: column;
        align-items: stretch;
    }

    .priv-body .priv-barre-actions-bas .btn,
    .priv-body .priv-barre-actions-bas a.btn {
        width: 100%;
    }

    .priv-body .priv-barre-actions-bas .ms-auto {
        margin-left: 0 !important;
    }
}

.priv-carte .form-label {
    font-size: .88rem;
    font-weight: 600;
    color: #374151;
}

.modal-content {
    border: none;
    border-radius: var(--priv-rayon-lg, 1rem);
    box-shadow: 0 1rem 3rem rgba(16, 24, 40, .28);
}

/* Blocage de l'arrière-plan pendant une modale : le backdrop Bootstrap couvre
   déjà la page. On ne met JAMAIS `pointer-events: none` sur `.priv-conteneur`
   car les modales de l'espace privé vivent DANS ce conteneur : elles
   deviendraient elles-mêmes inertes (boutons Annuler/Enregistrer morts). */

/* Aperçu de mot de passe : champ avec bouton incrusté. */
.priv-champ-mdp {
    position: relative;
}

.priv-champ-mdp .form-control {
    padding-right: 2.8rem;
}

.priv-champ-mdp .priv-oeil {
    position: absolute;
    top: 50%;
    right: .5rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--gris-moyen, #9E9E9E);
    font-size: 1.05rem;
    line-height: 1;
    padding: .25rem;
    cursor: pointer;
}

.priv-champ-mdp .priv-oeil:hover {
    color: var(--bleu-win, #0078D4);
}

.modal-header {
    border-bottom: 1px solid var(--priv-bord, #E4E8EF);
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--priv-bord, #E4E8EF);
    padding: .9rem 1.25rem;
}

/* ── 6. Pages publiques (connexion / installation) ───────────────────── */

.priv-connexion-carte {
    width: 100%;
    max-width: 470px;
    margin: auto;
}

.priv-ecran {
    min-height: 100vh;
    background:
        radial-gradient(1100px 520px at 15% -10%, rgba(0, 120, 212, .16), transparent 60%),
        radial-gradient(900px 480px at 100% 0%, rgba(0, 90, 158, .14), transparent 55%),
        var(--priv-fond, #F4F7FB);
}

.priv-entete-publique {
    text-align: center;
    margin-bottom: 1.5rem;
}

.priv-logo-rond {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: #fff;
    background: linear-gradient(135deg, var(--bleu-win, #0078D4), var(--bleu-win-dark, #005A9E));
    box-shadow: 0 8px 20px rgba(0, 90, 158, .35);
    margin-bottom: .85rem;
}

/* Bandeau « connexion sécurisée » : information honnête (aucune promesse
   de chiffrement : le transport est celui du serveur). */
.priv-securise {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-size: .8rem;
    color: #4B5563;
    margin-top: .75rem;
}

.priv-securise i {
    color: var(--bs-success, #198754);
}

/* Indicateur du nombre d'essais restants : version visuelle du limiteur. */
.priv-note-essais {
    font-size: .8rem;
    color: #B45309;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: .5rem;
    padding: .5rem .75rem;
    margin-bottom: .9rem;
}

/* ── 7. Robustesse du mot de passe ───────────────────────────────────── */

.priv-jauge {
    height: 6px;
    border-radius: 1rem;
    background: #E5E7EB;
    overflow: hidden;
    margin-top: .45rem;
}

.priv-jauge-barre {
    height: 100%;
    width: 0;
    border-radius: 1rem;
    transition: width .25s ease, background .25s ease;
}

.priv-jauge-barre[data-score="1"] { width: 25%; background: #dc3545; }
.priv-jauge-barre[data-score="2"] { width: 50%; background: #FFB300; }
.priv-jauge-barre[data-score="3"] { width: 75%; background: #4A90E2; }
.priv-jauge-barre[data-score="4"] { width: 100%; background: #28a745; }

.priv-jauge-texte {
    font-size: .78rem;
    color: var(--gris-moyen, #9E9E9E);
    margin-top: .3rem;
}

.priv-check-liste {
    list-style: none;
    padding: 0;
    margin: .5rem 0 0;
    font-size: .8rem;
    color: #6B7280;
}

.priv-check-liste li {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: 1px 0;
}

.priv-check-liste li.ok {
    color: var(--bs-success, #198754);
}

/* ── 8. Pied de page ─────────────────────────────────────────────────── */

.priv-pied {
    border-top: 1px solid var(--priv-bord, #E4E8EF);
    background: #fff;
}

/*
 * Pied de page MOBILE facon SchoolMan ecole (#priv-footer-mobile).
 *
 * Reproduction de #footer-mobile de structure/footer.php : barre fixe en bas,
 * masquee des 992px (classe Bootstrap d-lg-none), rubriques en « pilules »
 * avec icone + libelle empiles, menus ouvrant VERS LE HAUT.
 *
 * On fixe quelques details que le style officiel tenait d'autres feuilles :
 * bord superieur net, ombre portee vers le haut, et etat actif bleu.
 */
#priv-footer-mobile {
    border-top: 1px solid var(--priv-bord, #E4E8EF);
    box-shadow: 0 -.35rem 1rem rgba(16, 24, 40, .08);
    z-index: 1035;
}

#priv-footer-mobile .nav-link {
    font-size: .72rem;
    line-height: 1.15;
    gap: 1px;
    padding: .3rem .55rem;
    border-radius: .55rem;
    text-align: center;
    white-space: nowrap;
}

#priv-footer-mobile .nav-link .material-symbols-outlined,
#priv-footer-mobile .nav-link i {
    font-size: 1.35rem;
}

#priv-footer-mobile .nav-link.active {
    background: rgba(0, 120, 212, .12);
    color: var(--bleu-win, #0078D4) !important;
}

/* Les menus du pied de page ouvrent vers le haut : on borne leur largeur pour
   qu'ils restent lisibles sur un ecran etroit (comme le footer officiel). */
#priv-footer-mobile .dropdown-menu {
    min-width: 13.5rem;
    border: 1px solid var(--priv-bord, #E4E8EF);
    border-radius: .6rem;
    padding: .3rem;
}

#priv-footer-mobile .dropdown-item {
    border-radius: .4rem;
    font-size: .9rem;
    padding: .45rem .55rem;
}

#priv-footer-mobile .dropdown-item.active,
#priv-footer-mobile .dropdown-item:active {
    background: var(--bleu-win, #0078D4);
    color: #fff;
}

/* Chevron des sous-groupes repliables : tourne a l'ouverture. */
#priv-footer-mobile .collapse-icon {
    transition: transform .2s ease;
}

#priv-footer-mobile a[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* ── Adaptations mobile de la barre supérieure ───────────────────────── */

/* PC intermédiaire (992–1279 px) : la barre reste sur une ligne en
   compactant les liens et en masquant le sous-titre de la marque. */
@media (min-width: 992px) and (max-width: 1279.98px) {
    .priv-marque-sub {
        display: none;
    }

    .priv-lien {
        padding: .4rem .6rem;
        font-size: .88rem;
    }
}

@media (max-width: 991.98px) {
    .priv-bar {
        flex-wrap: nowrap;
    }

    .priv-marque-sub {
        display: none;
    }

    .priv-compte {
        display: none;
    }
}

/* ── Impression : la grille de cotation doit rester lisible sur papier ── */

@media print {
    .priv-bar,
    .priv-menu-mobile,
    .priv-pied,
    .priv-burger,
    .btn,
    .modal,
    .modal-backdrop,
    .offcanvas-backdrop {
        display: none !important;
    }

    .priv-body {
        background: #fff;
    }

    .priv-conteneur {
        max-width: none;
        padding: 0;
    }

    .priv-table thead th {
        background: #eee !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .priv-grille-defilement {
        overflow: visible !important;
    }

    .priv-carte {
        box-shadow: none;
        border-color: #999;
    }
}

/* ── Accessibilite : respect du reglage « animations reduites » ───────── */

@media (prefers-reduced-motion: reduce) {
    .priv-carte-cliquable,
    .priv-lien,
    .priv-jauge-barre {
        transition: none !important;
    }

    .priv-carte-cliquable:hover {
        transform: none;
    }
}

/* ============================================================================
   9. REFONTE « MOBILE D'ABORD » — experience type messagerie (WhatsApp)
   ----------------------------------------------------------------------------
   Objectif client : un enseignant debutant doit comprendre son parcours d'un
   coup d'oeil, sur telephone, sans lire de documentation. On reprend les
   codes d'une messagerie (en-tete compacte, liste de cartes verticales,
   pastilles d'etat, barre d'action fixe) SANS changer la navigation ni les
   identifiants utilises par les scripts.

   Ces regles sont ADDITIVES : elles surchargent l'habillage precedent et
   laissent intactes les pages d'administration, la connexion et les sorties.
   ========================================================================== */

:root {
    --priv-fond-app: #EEF2F6;
    --priv-carte-fond: #FFFFFF;
    --priv-separateur: #E7EBF0;
    --priv-texte: #111B21;
    --priv-texte-2: #667781;
    --priv-vert: #1FA855;
    --priv-rouge: #D9534F;
    --priv-rond: 14px;
    --priv-rond-sm: 10px;
}

.priv-body {
    background:
        linear-gradient(180deg, rgba(0, 120, 212, .06) 0, rgba(0, 120, 212, 0) 220px),
        var(--priv-fond-app);
    color: var(--priv-texte);
}

/* En-tête compacte et fixe : on gagne de la hauteur pour le contenu. */
.priv-bar {
    min-height: 56px;
    background: #0B5C93;
    background: linear-gradient(120deg, #0B5C93 0%, #0078D4 100%);
    box-shadow: 0 1px 2px rgba(11, 27, 33, .28);
}

.priv-marque {
    font-size: .98rem;
    letter-spacing: .01em;
}

.priv-lien {
    padding: .38rem .62rem;
    font-size: .86rem;
    border-radius: .55rem;
}

.priv-conteneur {
    max-width: 980px;
    padding-bottom: 1.25rem;
}

@media (min-width: 992px) {
    .priv-conteneur {
        padding-top: 1.5rem !important;
    }
}

/* ── En-tête de page (titre + sous-titre + action) ───────────────────── */

.priv-page-tete {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1rem;
}

.priv-page-tete .priv-page-icone {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 120, 212, .12);
    color: #0078D4;
    font-size: 1.25rem;
}

.priv-page-tete h1 {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.priv-page-tete p {
    font-size: .85rem;
    color: var(--priv-texte-2);
    margin: .2rem 0 0;
}

.priv-retour {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .84rem;
    font-weight: 600;
    color: #0078D4;
    text-decoration: none;
    margin-bottom: .45rem;
}

.priv-retour:hover {
    text-decoration: underline;
}

/* ── Accueil : salutation et carte « reprendre » ─────────────────────── */

.priv-accueil-tete {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}

.priv-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(140deg, #0078D4, #0B5C93);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .02em;
}

.priv-accueil-tete h1 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}

.priv-accueil-tete p {
    margin: .1rem 0 0;
    font-size: .84rem;
    color: var(--priv-texte-2);
}

.priv-carte-reprendre {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: #fff;
    border: 1px solid var(--priv-separateur);
    border-left: 4px solid #1FA855;
    border-radius: var(--priv-rond);
    padding: 1rem 1.05rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(11, 27, 33, .05);
    transition: box-shadow .15s ease, transform .15s ease;
}

.priv-carte-reprendre:hover {
    color: inherit;
    box-shadow: 0 6px 18px rgba(11, 27, 33, .1);
    transform: translateY(-1px);
}

.priv-carte-reprendre .priv-reprendre-icone {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #E7F7EC;
    color: #1FA855;
    font-size: 1.3rem;
}

.priv-carte-reprendre .priv-reprendre-titre {
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.25;
}

.priv-carte-reprendre .priv-reprendre-sous {
    font-size: .82rem;
    color: var(--priv-texte-2);
    margin-top: .15rem;
}

.priv-carte-reprendre .bi-chevron-right {
    color: var(--priv-texte-2);
    margin-left: auto;
}

/* ── Listes de cartes verticales (parcours, pages) ───────────────────── */

.priv-liste-cartes {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.priv-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: var(--priv-carte-fond);
    border: 1px solid var(--priv-separateur);
    border-radius: var(--priv-rond);
    padding: .7rem .85rem;
    text-decoration: none;
    color: inherit;
    min-height: 64px;
    box-shadow: 0 1px 1px rgba(11, 27, 33, .04);
    transition: background .12s ease, border-color .12s ease;
}

.priv-item:hover,
.priv-item:focus-visible {
    background: #F8FAFC;
    border-color: #D5DDE6;
    color: inherit;
}

.priv-item.priv-item-faite {
    background: #FBFCFD;
}

.priv-item-icone {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 120, 212, .1);
    color: #0078D4;
    font-size: 1.08rem;
}

.priv-item-faite .priv-item-icone {
    background: #E7F7EC;
    color: #1FA855;
}

.priv-item-corps {
    min-width: 0;
    flex: 1 1 auto;
}

.priv-item-titre {
    font-weight: 650;
    font-size: .94rem;
    line-height: 1.25;
    color: var(--priv-texte);
}

.priv-item-sous {
    font-size: .78rem;
    color: var(--priv-texte-2);
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priv-item-fin {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--priv-texte-2);
}

.priv-pastille {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: #EDF1F5;
    color: #5B6B7A;
    white-space: nowrap;
}

.priv-pastille.vert {
    background: #E7F7EC;
    color: #15803D;
}

.priv-pastille.bleu {
    background: #E5F1FB;
    color: #0369A1;
}

.priv-pastille.orange {
    background: #FEF3C7;
    color: #B45309;
}

.priv-pastille.rouge {
    background: #FDE8E8;
    color: #B91C1C;
}

/* ── Bandeau de statistiques compact (3 tuiles) ──────────────────────── */

.priv-tuiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: 1rem;
}

.priv-tuile {
    background: #fff;
    border: 1px solid var(--priv-separateur);
    border-radius: var(--priv-rond-sm);
    padding: .6rem .5rem;
    text-align: center;
    box-shadow: 0 1px 1px rgba(11, 27, 33, .04);
}

.priv-tuile .priv-tuile-valeur {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.15;
    color: #0B5C93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priv-tuile .priv-tuile-libelle {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--priv-texte-2);
    margin-top: .12rem;
}

/* ── Chips (periodes, filtres) : defilement horizontal au pouce ──────── */

.priv-chips {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding: .15rem .1rem .6rem;
    margin: 0 -.1rem .55rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.priv-chips::-webkit-scrollbar {
    display: none;
}

.priv-chip {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .05rem;
    border: 1px solid #D8E0E8;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: .42rem .85rem;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.15;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.priv-chip small {
    font-size: .64rem;
    font-weight: 500;
    color: var(--priv-texte-2);
}

.priv-chip:hover {
    border-color: #9CC7E8;
    background: #F5FAFE;
    color: #0B5C93;
}

.priv-chip.actif {
    background: #0078D4;
    border-color: #0078D4;
    color: #fff;
}

.priv-chip.actif small {
    color: rgba(255, 255, 255, .82);
}

/* ── Barre d'outils (recherche + synchronisation) ────────────────────── */

.priv-outils {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
}

.priv-recherche {
    position: relative;
    flex: 1 1 auto;
}

.priv-recherche .bi {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--priv-texte-2);
    font-size: .92rem;
    pointer-events: none;
}

.priv-recherche input {
    width: 100%;
    border: 1px solid #D8E0E8;
    background: #fff;
    border-radius: 999px;
    padding: .5rem .85rem .5rem 2.1rem;
    font-size: .88rem;
}

.priv-recherche input:focus {
    outline: none;
    border-color: #86BEE8;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, .1);
}

.priv-bouton-sync {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid #D8E0E8;
    background: #fff;
    color: #0B5C93;
    border-radius: 999px;
    padding: .48rem .8rem;
    font-size: .8rem;
    font-weight: 600;
}

.priv-bouton-sync:hover {
    background: #F5FAFE;
}

/* Etat reseau : pastille discrete dans l'en-tete. */
.priv-reseau {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    white-space: nowrap;
}

.priv-reseau::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7CE38B;
    box-shadow: 0 0 0 2px rgba(124, 227, 139, .25);
}

.priv-reseau.hors-ligne::before {
    background: #FFB4A2;
    box-shadow: 0 0 0 2px rgba(255, 180, 162, .3);
}

.priv-reseau.attente::before {
    background: #FFD166;
    box-shadow: 0 0 0 2px rgba(255, 209, 102, .28);
}

/* ── Progression de la saisie ────────────────────────────────────────── */

.priv-progression {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .2rem 0 .9rem;
}

.priv-progression .progress {
    flex: 1 1 auto;
    height: 7px;
    background: #E3E9EF;
    border-radius: 999px;
    overflow: hidden;
}

.priv-progression .progress-bar {
    background: #1FA855;
    transition: width .2s ease;
}

.priv-progression-texte {
    flex: 0 0 auto;
    font-size: .76rem;
    font-weight: 600;
    color: var(--priv-texte-2);
    white-space: nowrap;
}

/* ── Fiches eleves (cotation) : cartes facon conversation ────────────── */

.priv-eleves {
    display: grid;
    grid-template-columns: 1fr;
    gap: .7rem;
}

@media (min-width: 992px) {
    .priv-eleves {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.priv-eleve-carte {
    background: #fff;
    border: 1px solid var(--priv-separateur);
    border-radius: var(--priv-rond);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(11, 27, 33, .05);
}

.priv-eleve-tete {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .8rem;
    background: #F7F9FB;
    border-bottom: 1px solid var(--priv-separateur);
}

.priv-eleve-tete .priv-avatar {
    width: 38px;
    height: 38px;
    font-size: .86rem;
}

.priv-eleve-ident {
    min-width: 0;
    flex: 1 1 auto;
}

.priv-eleve-ident strong {
    display: block;
    font-size: .9rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priv-eleve-ident small {
    font-size: .72rem;
    color: var(--priv-texte-2);
}

.priv-eleve-compteur {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 700;
    color: #5B6B7A;
    background: #E9EEF3;
    border-radius: 999px;
    padding: .18rem .48rem;
}

.priv-eleve-compteur.complet {
    background: #E7F7EC;
    color: #15803D;
}

.priv-points {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .priv-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.priv-point {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .38rem .8rem;
    border-bottom: 1px solid #F0F3F6;
    margin: 0;
    min-height: 48px;
}

.priv-point:nth-last-child(-n+2) {
    border-bottom: none;
}

/* Sous-total d'une totalisation : pleine largeur de la grille des points. */
.priv-sous-total {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin: .15rem .55rem .35rem;
    padding: .38rem .55rem;
    border: 1px dashed var(--priv-separateur);
    border-radius: var(--priv-rond-sm);
    background: #F7F9FB;
    font-size: .78rem;
    color: var(--priv-texte-2);
}

.priv-sous-total-libelle {
    font-weight: 600;
    color: #26343F;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priv-sous-total-valeur {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #0B5C93;
    white-space: nowrap;
}

.priv-point-libelle {
    min-width: 0;
    font-size: .8rem;
    font-weight: 600;
    color: #26343F;
    line-height: 1.15;
}

.priv-point-libelle small {
    display: block;
    font-size: .64rem;
    font-weight: 500;
    color: var(--priv-texte-2);
}

.priv-point-input {
    flex: 0 0 auto;
    width: 4.1rem;
    height: 2.35rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #0B5C93;
    border: 1px solid #D8E0E8;
    border-radius: var(--priv-rond-sm);
    background: #FBFCFD;
    padding: .2rem .35rem;
    -moz-appearance: textfield;
}

.priv-point-input::-webkit-outer-spin-button,
.priv-point-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.priv-point-input:focus {
    outline: none;
    border-color: #0078D4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, .12);
}

.priv-point-input:placeholder-shown {
    color: #94A3B8;
}

/* Conduite : meme gabarit que les cases de points, en liste deroulante. */
.priv-conduite-select {
    flex: 0 0 auto;
    width: 4.6rem;
    height: 2.35rem;
    padding: .2rem 1.4rem .2rem .45rem;
    text-align: center;
    font-size: .95rem;
    font-weight: 700;
    color: #0B5C93;
    border: 1px solid #D8E0E8;
    border-radius: var(--priv-rond-sm);
    background-color: #FBFCFD;
}

.priv-conduite-select:focus {
    border-color: #0078D4;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, .12);
}

.priv-point-conduite {
    background: #F8FAFC;
}

/* Etats de synchronisation : la carte du point devient la pastille. */
.priv-point.priv-cellule-attente {
    background: #FFF8E8;
    box-shadow: inset 3px 0 0 #C77700;
}

.priv-point.priv-cellule-erreur {
    background: #FDECEE;
    box-shadow: inset 3px 0 0 #D13438;
}

.priv-point.priv-cellule-ok .priv-point-input {
    border-color: #86D3A3;
    background: #F4FBF6;
}

/* Message « aucun eleve » apres filtrage. */
.priv-vide {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--priv-texte-2);
    font-size: .88rem;
}

.priv-vide.visible {
    display: block;
}

/* ── Bouton d'action flottant (mobile) ───────────────────────────────── */

.priv-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(64px + 1rem);
    z-index: 1034;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #1FA855;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .72rem 1.1rem;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(31, 168, 85, .35);
}

.priv-fab:hover {
    background: #188F47;
    color: #fff;
}

@media (min-width: 992px) {
    .priv-fab {
        display: none;
    }
}

/* ── Tableaux : habillage plus doux, coherent avec les cartes ────────── */

.priv-table thead th {
    background: #F1F5F9;
    color: #334155;
    border-bottom: 1px solid var(--priv-separateur);
}

.priv-table.table-bordered {
    border-color: var(--priv-separateur);
}

.priv-table td {
    border-color: #EEF2F6;
}

/* ── Pied de page mobile : barre translucide type messagerie ─────────── */

#priv-footer-mobile {
    background: rgba(255, 255, 255, .97) !important;
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(11, 27, 33, .08);
}

#priv-footer-mobile .nav-link {
    font-size: .68rem;
    color: #5B6B7A;
    border-radius: .7rem;
    padding: .32rem .5rem;
}

#priv-footer-mobile .nav-link.active,
#priv-footer-mobile .nav-link.text-primary {
    color: #0078D4 !important;
    background: rgba(0, 120, 212, .09);
}

/* ── Petits ecrans : marges et tailles optimisees au pouce ───────────── */

@media (max-width: 575.98px) {
    .priv-conteneur {
        padding-left: .7rem !important;
        padding-right: .7rem !important;
    }

    .priv-page-tete {
        margin-bottom: .8rem;
    }

    .priv-carte {
        padding: .9rem .85rem;
        border-radius: var(--priv-rond);
    }

    .priv-item {
        padding: .6rem .7rem;
    }

    .priv-tuile {
        padding: .5rem .3rem;
    }

    .priv-tuile .priv-tuile-valeur {
        font-size: 1rem;
    }
}

/* Mode impression : la nouvelle presentation ne doit rien casser. */
@media print {
    .priv-reseau,
    .priv-fab,
    .priv-chips,
    .priv-outils,
    .priv-progression {
        display: none !important;
    }
}

/* ── Tableau de bord admin — cartes statistiques compactes ────────────── */

.priv-admin-stat {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: .5rem;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .02), 0 4px 10px rgba(15, 23, 42, .02);
    transition: all .2s ease;
    min-height: 58px;
}

.priv-admin-stat:hover {
    border-color: rgba(11, 92, 147, .4);
    box-shadow: 0 2px 6px rgba(11, 92, 147, .08);
    transform: translateY(-1px);
}

.priv-admin-stat-icone {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .4rem;
    background: rgba(11, 92, 147, .08);
    color: #0B5C93;
    font-size: 1rem;
}

.priv-admin-stat-icone.success { background: rgba(25, 135, 84, .1); color: #198754; }
.priv-admin-stat-icone.danger  { background: rgba(220, 53, 69, .1);  color: #dc3545; }
.priv-admin-stat-icone.warning{ background: rgba(255, 193, 7, .12); color: #b98a00; }
.priv-admin-stat-icone.secondary { background: rgba(108, 117, 125, .1); color: #6c757d; }

.priv-admin-stat-valeur {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
}

.priv-admin-stat-libelle {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    line-height: 1.2;
}

.priv-admin-stat-abon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
    padding: .4rem .6rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: .5rem;
    background: #fff;
    min-height: 52px;
    transition: all .15s ease;
}

.priv-admin-stat-abon:hover {
    border-color: rgba(11, 92, 147, .35);
    background: linear-gradient(90deg, rgba(11, 92, 147, .02) 0%, #fff 100%);
}

.priv-admin-stat-abon-val {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.priv-admin-stat-abon-label {
    font-size: .68rem;
    color: #6b7280;
}

/* ── Recu d'abonnement (admin, imprimable) ───────────────────────────── */

.priv-recu {
    width: 100%;
    max-width: 620px;
    background: #fff;
    border: 1px solid var(--priv-bord, #E4E8EF);
    border-radius: .75rem;
    box-shadow: var(--priv-ombre-1);
    overflow: hidden;
}

.priv-recu-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    border-bottom: 2px solid rgba(0, 120, 212, .18);
    background: #F7FAFD;
}

.priv-recu-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078D4, #0B5C93);
    color: #fff;
    font-size: 1.05rem;
}

.priv-recu-marque {
    font-weight: 700;
    color: #0B5C93;
    line-height: 1.1;
}

.priv-recu-titre {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .14em;
    color: #0B5C93;
    line-height: 1.1;
}

.priv-recu-corps {
    padding: 1rem 1.1rem 1.1rem;
}

.priv-recu-table th {
    width: 48%;
    font-size: .82rem;
    font-weight: 600;
    color: var(--priv-texte-2, #667781);
}

.priv-recu-table td {
    font-size: .86rem;
}

.priv-recu-signature {
    border-top: 1px dashed #B9C2CC;
    padding-top: .5rem;
    margin: .5rem 0 1rem;
    min-height: 52px;
    font-size: .75rem;
    color: var(--priv-texte-2, #667781);
    text-align: right;
}

.priv-recu-contact {
    border-top: 1px solid var(--priv-separateur, #E7EBF0);
    padding-top: .6rem;
    color: var(--priv-texte-2, #667781);
}

/* Filigrane des documents de sortie : jamais dans le flux. */
.priv-filigrane-abonnement {
    position: fixed !important;
    pointer-events: none !important;
}

@media print {
    .priv-recu-page {
        max-width: none !important;
    }
}

/* Utilitaire local : autorise la troncature des libelles longs. */
.priv-accueil-tete .min-w-0,
.priv-page-tete .min-w-0,
.priv-carte-reprendre .min-w-0,
.priv-item-corps {
    min-width: 0;
}



/* -----------------------------------------------------------------------
   DEVERROUILLAGE LOCAL (mode hors-ligne)
   Le voile couvre entierement la page : tant que le code local n'est pas
   saisi, aucune donnee (eleves, notes) ne doit etre lisible a l'ecran.
   ----------------------------------------------------------------------- */
.priv-local-bloque {
    overflow: hidden !important;
}

.priv-local-voile {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(9, 30, 48, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.priv-local-voile[hidden] {
    display: none !important;
}

.priv-local-carte {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.25rem 1.1rem;
    box-shadow: 0 24px 60px rgba(8, 24, 40, .35);
    text-align: center;
}

.priv-local-icone {
    width: 56px;
    height: 56px;
    margin: 0 auto .75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8F1FA;
    color: var(--bleu-win, #0B5C93);
    font-size: 1.5rem;
}

.priv-local-titre {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    color: #16324A;
}

.priv-local-texte {
    font-size: .86rem;
    color: #5B6B7B;
    margin: 0 0 .9rem;
}

.priv-local-label {
    display: block;
    text-align: left;
    font-size: .78rem;
    font-weight: 600;
    color: #42566A;
    margin: .55rem 0 .25rem;
}

.priv-local-champ {
    width: 100%;
    border: 1px solid #C7D3DF;
    border-radius: 10px;
    padding: .55rem .7rem;
    font-size: .95rem;
    color: #16324A;
    background: #FBFCFE;
}

.priv-local-champ:focus {
    outline: none;
    border-color: var(--bleu-win, #0B5C93);
    box-shadow: 0 0 0 3px rgba(11, 92, 147, .16);
}

.priv-local-erreur {
    margin: .55rem 0 0;
    padding: .45rem .6rem;
    border-radius: 8px;
    background: #FDECEC;
    color: #A32222;
    font-size: .8rem;
    text-align: left;
}

.priv-local-erreur[hidden] {
    display: none !important;
}

.priv-local-note {
    margin: .8rem 0 0;
    font-size: .72rem;
    color: #7A8896;
}

/* Bandeau d'activation : discret, il ne masque jamais le contenu. */
.priv-local-bandeau {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    z-index: 1080;
    width: calc(100% - 1.5rem);
    max-width: 640px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .8rem;
    border-radius: 12px;
    background: #0B5C93;
    color: #fff;
    font-size: .84rem;
    box-shadow: 0 10px 28px rgba(8, 24, 40, .28);
}

.priv-local-bandeau[hidden] {
    display: none !important;
}

.priv-local-bandeau-actions {
    display: flex;
    gap: .4rem;
    margin-left: auto;
}

@media (min-width: 992px) {
    .priv-local-bandeau {
        bottom: 1.25rem;
    }
}
