/* ==========================================================================
   StagePAP V2 — feuille de style applicative
   Les jetons reprennent ceux des maquettes validées. Ils sont volontairement
   peu nombreux : toute couleur ajoutée dans un composant doit d'abord devenir
   un jeton ici, sinon la cohérence se perd au bout de trois écrans.
   ========================================================================== */

:root {
    /* Fonds */
    --plane:        #f4f3ee;   /* fond général de l'application */
    --surface:      #ffffff;   /* cartes, rail, barres */
    --surface-2:    #f7f7f4;   /* survol, lignes alternées */
    --line:         #e1e0d9;   /* filets */
    --line-fort:    #d3d2ca;

    /* Texte */
    --ink:          #24231f;   /* texte principal */
    --ink-2:        #52514e;   /* texte secondaire */
    --muted:        #8b8983;   /* légendes, en-têtes de groupe */

    /* Accent */
    --accent:       #2a78d6;
    --accent-ink:   #1c5cab;
    --accent-soft:  #eaf2fd;

    /* Sémantique */
    --good:         #0ca30c;
    --good-soft:    rgba(12, 163, 12, .12);
    --warning:      #c98a00;
    --warning-soft: rgba(201, 138, 0, .14);
    --critical:     #d03b3b;
    --critical-soft:rgba(208, 59, 59, .12);

    --rayon:        8px;
    --rayon-petit:  6px;
    --ombre:        0 1px 2px rgba(0, 0, 0, .04), 0 1px 8px rgba(0, 0, 0, .03);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--plane);
    color: var(--ink);
    font-family: "Segoe UI", "Inter", system-ui, -apple-system, "Noto Sans", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17.5px; font-weight: 650; margin: 0; }
h3 { font-size: 15px; font-weight: 650; margin: 0; color: var(--ink-2); }

a { color: var(--accent-ink); }

/* Les nombres alignés verticalement : indispensable dans les grilles de gestion. */
.nombre, .montant { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   En-tête de page (titre + puces d'état + actions)
   -------------------------------------------------------------------------- */
.entete {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.entete .separateur { flex: 1 1 auto; min-width: 12px; }

/* --------------------------------------------------------------------------
   Cartes
   -------------------------------------------------------------------------- */
.carte {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 14px 16px;
}

.carte + .carte { margin-top: 12px; }

.grille-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.kpi .valeur { font-size: 30px; font-weight: 650; letter-spacing: -.02em; }
.kpi .titre  { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi .sous   { font-size: 14px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Encarts d'information
   -------------------------------------------------------------------------- */
.encart {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0;
    padding: 10px 12px;
    font-size: 14.5px;
    color: var(--ink-2);
}
.encart.attention { border-left-color: var(--warning);  background: var(--warning-soft); }
.encart.critique  { border-left-color: var(--critical); background: var(--critical-soft); }
.encart.succes    { border-left-color: #0ca30c; background: rgba(12,163,12,.10); }

/* Deux champs sur la même ligne dans un popup (port + sécurité, etc.) */
.champs-cote-a-cote { display: flex; gap: 12px; }
.champs-cote-a-cote .champ { flex: 1; min-width: 0; }

/* Bloc « Tester » des comptes mail : séparé du formulaire d'enregistrement */
.bloc-test {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px dashed var(--line-fort);
    display: flex; flex-direction: column; gap: 8px;
}

/* --------------------------------------------------------------------------
   Éditeur de modèles de courriels
   -------------------------------------------------------------------------- */
.editeur-modele { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .editeur-modele { grid-template-columns: 1fr; } }

.cas-applicables { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 12px 0; font-size: 15px; }
.cas-applicables > span { color: var(--ink-2); font-weight: 600; }
.cases-cas { letter-spacing: 2px; }

.champ-corps { display: flex; flex-direction: column; gap: 4px; }
.corps-modele {
    width: 100%; min-height: 300px; resize: vertical;
    font-family: Consolas, Monaco, monospace; font-size: 14.5px; line-height: 1.5;
    padding: 10px; border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    background: var(--surface); color: var(--ink);
}
.corps-modele:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.panneau-variables { display: flex; flex-direction: column; gap: 8px; }
.filtre-variables { font-size: 15px; padding: 7px 10px; }
.liste-variables { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.variable-item {
    display: flex; flex-direction: column; gap: 1px; text-align: left;
    padding: 6px 8px; border: 0; border-radius: var(--rayon-petit);
    background: transparent; cursor: pointer;
}
.variable-item:hover { background: var(--accent-soft); }
.variable-item code { font-size: 14px; color: var(--accent); }
.variable-item span { font-size: 13.5px; color: var(--ink-2); }

/* Fenêtre « Envoyer un courriel » aux stagiaires d'un stage */
.popup-envoi .corps-libre { min-height: 180px; }
.entete-destinataires {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
}
.liste-destinataires {
    max-height: 220px; overflow-y: auto;
    border: 1px solid var(--line); border-radius: var(--rayon-petit);
    padding: 4px 8px; display: flex; flex-direction: column;
}
.ligne-destinataire {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 2px; font-size: 14.5px; cursor: pointer;
}
.ligne-destinataire .nom { font-weight: 600; min-width: 180px; }
.ligne-destinataire .cas { color: var(--muted); width: 44px; }
.ligne-destinataire .email { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.ligne-destinataire.sans-email .nom,
.ligne-destinataire.sans-email .email { color: var(--muted); font-style: italic; }

.carte-apercu { margin-top: 16px; }
.ligne-apercu { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.combo-apercu { min-width: 320px; }
.dest-test { min-width: 240px; }
.apercu-sujet { font-size: 15px; margin: 8px 0 6px; }
.iframe-apercu {
    width: 100%; height: 420px; border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit); background: #fff;
}

/* --------------------------------------------------------------------------
   Grilles DevExpress — densité proche de l'application WinDev.
   La grille des stages porte beaucoup de colonnes : on resserre sans
   descendre sous les seuils de lisibilité.
   -------------------------------------------------------------------------- */
.grille-stages {
    height: calc(100vh - 150px);
    border-radius: var(--rayon);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.grille-stages .dxbl-grid-table > tbody > tr > td { padding-top: 3px; padding-bottom: 3px; }

.grille-stages .dxbl-grid-header-content,
.grille-stages th {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

/* Bandeaux de regroupement : c'est ce qui rend les 40+ colonnes lisibles. */
.grille-stages .dxbl-grid-band-header {
    background: var(--surface-2);
    font-weight: 650;
    color: var(--ink-2);
}

/* Ligne annulée : barrée et estompée, comme dans l'application actuelle. */
.ligne-annulee { text-decoration: line-through; opacity: .55; }

/* --------------------------------------------------------------------------
   Bandeau d'erreur Blazor
   -------------------------------------------------------------------------- */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1100;
    background: #2a2823;
    color: #f6f5f0;
    padding: 10px 16px;
    font-size: 15px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
}
#blazor-error-ui .reload  { color: #9ec5f5; margin-left: 10px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; opacity: .7; }

/* --------------------------------------------------------------------------
   Accessibilité
   -------------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
/* Titre focalisé par la navigation (FocusOnNavigate) : pas de cadre, un titre ne se manipule pas au clavier. */
h1:focus, h1:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* Impression : on ne veut ni rail ni barre haute sur les listes imprimées. */
@media print {
    .rail, .barre-haute, .menu-haut, .bandeau-recette, .entete .dxbl-btn { display: none !important; }
    .app-shell { display: block; height: auto; }
    .contenu   { overflow: visible; padding: 0; }
    body       { background: #fff; }
}

/* ==========================================================================
   Thème FONCÉ — mêmes jetons, valeurs sombres et chaudes (jamais de
   bleu-noir). Accent éclairci pour rester lisible sur fonds sombres.
   Appliqué par html[data-theme="fonce"], ou automatiquement quand le
   système est sombre et que l'utilisateur a choisi « auto » (theme.js).
   NB : les deux blocs sont identiques — toute retouche se fait DANS LES
   DEUX (le CSS ne permet pas de les mutualiser sans préprocesseur).
   ========================================================================== */
html[data-theme="fonce"] {
    --plane:        #171614;
    --surface:      #201f1c;
    --surface-2:    #282723;
    --line:         #34322d;
    --line-fort:    #423f39;
    --ink:          #ecebe6;
    --ink-2:        #b8b5ad;
    --muted:        #85827a;
    --accent:       #5b9be2;
    --accent-ink:   #8ab8ee;
    --accent-soft:  rgba(91, 155, 226, .16);
    --good:         #4cba4c;
    --good-soft:    rgba(76, 186, 76, .16);
    --warning:      #d9a13a;
    --warning-soft: rgba(217, 161, 58, .16);
    --critical:     #e05c5c;
    --critical-soft:rgba(224, 92, 92, .16);
    --ombre:        0 1px 2px rgba(0, 0, 0, .35), 0 1px 10px rgba(0, 0, 0, .25);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --plane:        #171614;
        --surface:      #201f1c;
        --surface-2:    #282723;
        --line:         #34322d;
        --line-fort:    #423f39;
        --ink:          #ecebe6;
        --ink-2:        #b8b5ad;
        --muted:        #85827a;
        --accent:       #5b9be2;
        --accent-ink:   #8ab8ee;
        --accent-soft:  rgba(91, 155, 226, .16);
        --good:         #4cba4c;
        --good-soft:    rgba(76, 186, 76, .16);
        --warning:      #d9a13a;
        --warning-soft: rgba(217, 161, 58, .16);
        --critical:     #e05c5c;
        --critical-soft:rgba(224, 92, 92, .16);
        --ombre:        0 1px 2px rgba(0, 0, 0, .35), 0 1px 10px rgba(0, 0, 0, .25);
    }
}

/* --------------------------------------------------------------------------
   Écrans pleine page (connexion, installation) — gabarit LayoutPlein.
   -------------------------------------------------------------------------- */
.plein-ecran {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 30px 16px;
    background:
        radial-gradient(700px 340px at 12% -10%, var(--accent-soft), transparent 60%),
        var(--plane);
}

.carte-connexion { width: 340px; max-width: 100%; padding: 26px 26px 22px; }

.marque-connexion { display: flex; align-items: center; gap: 10px; }
.marque-connexion b { font-size: 18.5px; }
.marque-connexion .centre { display: block; font-size: 13.5px; color: var(--muted); font-weight: 500; }

.pastille-logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--accent); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 18.5px;
}

.carte-connexion h3 { margin: 18px 0 2px; font-size: 16px; color: var(--ink); }
.carte-connexion .sous { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.carte-connexion .encart { margin-top: 12px; }

.champ { display: block; margin-top: 12px; }
.champ span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
/* Champs NUS des écrans de connexion/installation UNIQUEMENT : ne surtout
   pas styler les <input> internes des éditeurs DevExpress (cases à cocher
   comprises) — ils se stylent eux-mêmes. */
.carte-connexion .champ input {
    width: 100%; box-sizing: border-box; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit); padding: 8px 10px;
}
.carte-connexion .champ input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.bouton-principal {
    width: 100%; margin-top: 16px; padding: 9px;
    background: var(--accent); color: #fff; border: 0;
    border-radius: var(--rayon-petit); font: inherit; font-weight: 600; cursor: pointer;
}
.bouton-principal:hover { background: var(--accent-ink); }

.carte-connexion .aide { margin: 12px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.pied-connexion { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* Utilisateur connecté et bouton de déconnexion (barre du haut). */
.utilisateur { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.form-deconnexion { display: inline; }
.form-deconnexion button {
    border: 0; background: none; cursor: pointer;
    color: var(--ink-2); font: inherit; font-size: 16px;
    padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.form-deconnexion button:hover { background: var(--surface-2); color: var(--critical); }

/* --------------------------------------------------------------------------
   Recherche d'élèves (/eleves) et fiches en lecture.
   -------------------------------------------------------------------------- */
.carte-recherche { margin-bottom: 12px; }

.saisie-recherche {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 17.5px;
    color: var(--ink); background: var(--surface);
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    padding: 10px 12px;
}
.saisie-recherche:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.aide-recherche { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }

.grille-eleves {
    border-radius: var(--rayon); overflow: hidden;
    border: 1px solid var(--line); background: var(--surface);
}
.grille-eleves .dxbl-grid-table > tbody > tr { cursor: pointer; }

/* Fiche en lecture : liste libellé / valeur. */
dl.fiche { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
dl.fiche dt { font-size: 13.5px; font-weight: 600; color: var(--muted); align-self: baseline; }
dl.fiche dd { margin: 0; font-size: 14.5px; color: var(--ink); }

/* --------------------------------------------------------------------------
   Fiches en édition (fiche élève) : formulaires en grille, onglets.
   -------------------------------------------------------------------------- */
.onglets-fiche { margin-top: 4px; }
.onglets-fiche .dxbl-tabs-content { padding-top: 12px; }

.fiche-identite { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }

.formulaire {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2px 12px;
    margin-top: 6px;
}
.formulaire .champ { margin-top: 8px; }
.formulaire .champ-large { grid-column: 1 / -1; }

/* --------------------------------------------------------------------------
   Paramètres généraux — deux colonnes équilibrées, cartes empilées
   -------------------------------------------------------------------------- */
.page-parametres {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px; align-items: start; max-width: 1100px;
}
@media (max-width: 900px) { .page-parametres { grid-template-columns: 1fr; } }
.colonne-parametres { display: flex; flex-direction: column; gap: 16px; }
.carte-cgv { max-width: 1100px; margin-top: 16px; }

/* Sous-bloc séparé d'un filet dans une carte (règlement, alertes) */
.sous-bloc { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* Horaires : petit tableau Jour × (Matin, Après-midi), plages « de – à » */
.tableau-horaires {
    display: grid; grid-template-columns: 52px 1fr 1fr;
    gap: 8px 14px; align-items: center; margin-top: 6px;
}
.tableau-horaires .th-horaire { font-size: 14px; font-weight: 600; color: var(--muted); }
.tableau-horaires .th-jour { font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.plage-horaire { display: flex; align-items: center; gap: 6px; }
.plage-horaire > *:not(.tiret) { width: 96px; flex: 0 0 auto; }
.plage-horaire .tiret { color: var(--muted); }

/* Couleurs des documents : pastilles + combo + aperçu */
.ligne-couleurs { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.pastille-couleur { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.pastille-couleur input[type="color"] {
    width: 34px; height: 26px; padding: 1px;
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    background: var(--surface); cursor: pointer;
}
.ligne-couleurs .combo-predefinies { width: 190px; margin-left: auto; }
/* L'aperçu figure le PAPIER : il garde ses couleurs quel que soit le thème. */
.apercu-document {
    margin-top: 10px; padding: 12px 14px; font-size: 14.5px; font-weight: 600;
    border: 1px solid rgba(0, 0, 0, .18); border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .12);
}

/* Alertes ANTS : case + champ sur la même ligne */
.ligne-alerte { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ligne-alerte > :first-child { flex: 0 0 160px; }
.ligne-alerte > :nth-child(2) { flex: 1; }
.ligne-alerte .lib-alerte { flex: 0 0 auto; font-size: 14.5px; color: var(--ink-2); }
.ligne-alerte .spin-jours { flex: 0 0 76px; }

/* Pied de facture : trois lignes pleine largeur, serrées */
.lignes-pied { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

.encart-espace { margin-top: 10px; }
.texte-cgv { min-height: 160px; font-family: inherit; }

/* --------------------------------------------------------------------------
   Référentiels — menu latéral de sections + contenu
   -------------------------------------------------------------------------- */
.layout-referentiels {
    display: grid; grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px; align-items: start;
}
@media (max-width: 900px) { .layout-referentiels { grid-template-columns: 1fr; } }
.nav-referentiels {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--rayon); padding: 8px; box-shadow: var(--ombre);
    position: sticky; top: 12px;
}
.nav-referentiels button {
    text-align: left; padding: 7px 10px; font-size: 15px;
    border: 0; border-radius: var(--rayon-petit);
    background: transparent; color: var(--ink-2); cursor: pointer;
}
.nav-referentiels button:hover { background: var(--surface-2); color: var(--ink); }
.nav-referentiels button.actif { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.contenu-referentiel { min-width: 0; }
.entete-referentiel { margin-bottom: 6px; }
.entete-referentiel h3 { margin: 0; }

/* Organisation › Animateurs : les quatre rôles et leurs autorisations */
.grille-roles {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; margin-top: 12px;
}
@media (max-width: 700px) { .grille-roles { grid-template-columns: 1fr; } }
.cadre-role {
    border: 1px solid var(--line-fort); border-left-width: 3px;
    border-radius: var(--rayon-petit); padding: 8px 10px;
}
.cadre-role.role-valide { border-left-color: var(--good); }
.cadre-role.role-alerte { border-left-color: var(--warning); background: var(--warning-soft); }
.cadre-role.role-expire { border-left-color: var(--critical); background: var(--critical-soft); }
.validite-role { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }

/* Cases d'émargement (C1) : boutons discrets tri-état, saisissables en grille */
.cellule-emargement {
    width: 30px; height: 24px; padding: 0;
    border: 1px solid var(--line); border-radius: var(--rayon-petit);
    background: var(--surface); cursor: pointer;
    font-size: 15px; line-height: 1; position: relative;
}
.cellule-emargement:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.cellule-emargement:disabled { cursor: default; opacity: .75; }
.cellule-emargement.em-present { color: var(--good); font-weight: 700; }
.cellule-emargement.em-absent { color: var(--critical); font-weight: 700; }
.cellule-emargement.em-vide { color: var(--muted); }
.signe-emargement {
    position: absolute; top: -6px; right: -4px;
    font-size: 11.5px; color: var(--accent-ink);
}

/* Pastille « pièce au dossier » cliquable → aperçu du document */
.pastille-doc {
    border: 0; background: transparent; padding: 2px 4px;
    color: var(--good); font-weight: 700; font-size: 15px; cursor: pointer;
    border-radius: var(--rayon-petit);
}
.pastille-doc:hover { background: var(--accent-soft); }

/* Liens d'entête (feuille d'émargement…) : mêmes proportions que les boutons */
.lien-entete {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; font-size: 15px; text-decoration: none;
    color: var(--accent-ink); border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit); background: var(--surface);
}
.lien-entete:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Aperçu signature / pièce dans la fenêtre (fond blanc : documents papier) */
.iframe-apercu-piece { height: 480px; background: #fff; }

.carte .sous-titre { margin-top: 14px; }

.audit { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Fiche stage : section inscrits, anomalies, fenêtre d'inscription.
   -------------------------------------------------------------------------- */
.titre-section { margin: 18px 0 10px; }

.liste-anomalies { list-style: none; margin: 8px 0 0; padding: 0; }
.liste-anomalies li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 14.5px; }

.commentaire { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); white-space: pre-wrap; }

.popup-inscription .saisie-recherche { margin-bottom: 8px; }
.liste-candidats { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; margin-bottom: 8px; }
.candidat {
    text-align: left; font: inherit; cursor: pointer;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--rayon-petit);
    padding: 7px 10px; display: flex; flex-direction: column; gap: 1px;
}
.candidat span { font-size: 13.5px; color: var(--muted); }
.candidat:hover { background: var(--surface-2); }
.candidat.choisi { border-color: var(--accent); background: var(--accent-soft); }
.popup-inscription .bouton-popup { margin-top: 12px; width: 100%; }
.popup-inscription .encart { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Écran Stages en maître-détail : liste réduite quand un stage est ouvert,
   grille des stagiaires du stage sélectionné dessous (réflexe WinDev).
   -------------------------------------------------------------------------- */
.grille-stages-reduite { height: calc(46vh - 90px); min-height: 220px; }

.detail-entete { margin-top: 14px; }
.detail-entete .total-du { font-size: 14.5px; color: var(--ink-2); font-weight: 600; }

.grille-detail { max-height: none; }

.p-present { color: var(--good); font-weight: 700; }
.p-absent  { color: var(--critical); font-weight: 700; }
.p-vide    { color: var(--muted); }

/* Panneau de filtres de l'écran Stages. */
.panneau-filtres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 2px 14px;
    align-items: end;
    margin-bottom: 12px;
}
.panneau-filtres .bouton-raz { display: flex; align-items: end; }

/* Puces de filtre génériques (Paramètres › Utilisateurs : type de compte). */
.puces-filtre { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 10px; }
.puce-filtre {
    border: 1px solid var(--line-fort);
    background: var(--surface);
    color: var(--ink-2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.puce-filtre.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Fiche modèle de SMS : zone de saisie courte, compteur et bulle d'aperçu. */
.corps-sms { min-height: 120px; }
.compteur-sms { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 6px 0 0; }
.compteur-sms .aide-compteur { font-weight: 400; color: var(--muted); }
/* Module justice : butoir dépassé sans stage réalisé. */
.butoir-depasse { color: var(--critical); font-weight: 700; }

/* Module justice : KPI du suivi des relances (C7b-4). */
.suivi-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.suivi-kpi {
    flex: 1 1 140px;
    background: var(--surface);
    border: 1px solid var(--line-fort);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 8px 12px;
}
.suivi-kpi b { display: block; font-size: 25.5px; line-height: 1.1; }
.suivi-kpi span { font-size: 14px; color: var(--ink-2); }
.suivi-kpi.rouge  { border-left-color: var(--critical); }
.suivi-kpi.orange { border-left-color: #e8923a; }
.suivi-kpi.bleu   { border-left-color: var(--accent); }
.suivi-kpi.vert   { border-left-color: var(--good); }

/* Prochaine relance : la couleur dit l'urgence. */
.relance.retard     { color: var(--critical); font-weight: 700; }
.relance.aujourdhui { color: #e8923a; font-weight: 700; }
.relance.semaine    { color: var(--accent); font-weight: 600; }

/* Module justice : pastilles d'étapes des courriers (à faire / faite). */
.etape-courrier {
    display: inline-block;
    border: 1px solid var(--line-fort);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 12.5px;
    color: var(--muted);
    margin-right: 3px;
}
.etape-courrier.faite { color: var(--good); border-color: var(--good); font-weight: 600; }

/* Vérification ANTS : badge de statut d'une demande (couleur libelle_ants). */
.badge-statut-ants {
    display: inline-block;
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.commentaire-ants {
    font-size: 14px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

/* Paramètres › ANTS : pastille de couleur des libellés de statut. */
.pastille-ants {
    display: inline-block;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1px solid var(--line-fort);
    vertical-align: middle;
}

.apercu-sms {
    max-width: 420px;
    background: var(--surface-2);
    border: 1px solid var(--line-fort);
    border-radius: 14px 14px 14px 4px;
    padding: 10px 14px;
    font-size: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-top: 8px;
}

/* Hub Paramètres : cartes cliquables / familles à venir. */
a.carte-lien { text-decoration: none; color: inherit; display: block; }
a.carte-lien:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
a.carte-lien p, .carte-inerte p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.carte-inerte { opacity: .65; }
.carte-inerte h3 { display: flex; align-items: center; gap: 8px; }

/* Popup compte utilisateur : actions secondaires sous le bouton principal. */
.actions-compte { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.ligne-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ligne-actions .choix-compte { min-width: 340px; max-width: 520px; flex: 1 1 340px; }

/* ==========================================================================
   ESPACE ANIMATEUR — pensé téléphone d'abord (l'animateur est en salle,
   mobile ou tablette) : barre haute compacte, contenu pleine largeur en
   colonne, cartes de stage tactiles. Les jetons restent ceux du haut de
   cette feuille, donc le thème sombre s'applique tel quel.
   ========================================================================== */
.ea-coque {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--plane);
}

.ea-barre {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.ea-barre .separateur { flex: 1 1 auto; }

.ea-marque {
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.ea-marque span { font-weight: 500; color: var(--muted); font-size: 14px; }

.ea-lien-centre {
    font-size: 14px;
    color: var(--accent-ink);
    text-decoration: none;
    white-space: nowrap;
}
.ea-lien-centre:hover { text-decoration: underline; }

.ea-contenu {
    flex: 1 1 auto;
    width: 100%;
    max-width: 680px;          /* colonne lisible ; pleine largeur sur mobile */
    margin: 0 auto;
    padding: 16px 14px 32px;
    box-sizing: border-box;
}

.ea-titre { font-size: 23px; margin-bottom: 4px; }

.ea-section {
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.ea-vide { color: var(--muted); font-size: 14.5px; margin: 4px 0 0; }

/* Cartes de stage : une par stage, assez hautes pour le doigt. */
.ea-carte-stage {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 12px 14px;
    margin-bottom: 10px;
}
.ea-carte-stage.aujourdhui { border-color: var(--good); border-width: 1.5px; }
.ea-carte-stage.passe { opacity: .78; }

.ea-stage-entete {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ea-stage-dates { font-weight: 650; font-size: 15.5px; }
.ea-stage-roles { margin-left: auto; font-size: 13.5px; color: var(--accent-ink); font-weight: 600; white-space: nowrap; }

.ea-stage-lieu { margin-top: 3px; font-size: 14.5px; color: var(--ink-2); }

.ea-stage-infos {
    margin-top: 6px;
    display: flex;
    gap: 14px;
    font-size: 14px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Lien de repli (« Accès réservé » → retour à l'espace). */
.ea-lien-retour { font-weight: 600; }

/* --------------------------------------------------------------------------
   Espace animateur — écran de travail (C3-2) : périodes, pointage, pavé.
   -------------------------------------------------------------------------- */
a.ea-carte-stage { display: block; text-decoration: none; color: inherit; }
a.ea-carte-stage:hover { border-color: var(--accent); }

.ea-lien-retour { font-size: 14.5px; color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.ea-lien-retour:hover { text-decoration: underline; }

.ea-travail-entete { margin-top: 10px; }

/* Puces de période : la session en cours porte un point vert. */
.ea-periodes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 14px 0 10px;
}
.ea-puce-periode {
    position: relative;
    border: 1px solid var(--line-fort);
    background: var(--surface);
    color: var(--ink-2);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ea-puce-periode.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.ea-point-direct {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--good);
    margin-left: 5px;
    vertical-align: 1px;
}

.ea-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ea-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rayon-petit);
    padding: 6px 10px;
    font-size: 14px;
    color: var(--ink-2);
}
.ea-stat b { color: var(--ink); font-size: 15px; }
.ea-stat.alerte b { color: var(--critical); }
.ea-stat small { color: var(--muted); font-weight: 400; }

/* Carte stagiaire : nom + pointage + cases d'émargement. */
.ea-carte-stagiaire {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rayon);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.ea-carte-stagiaire.absent { opacity: .72; background: var(--surface-2); }

.ea-stagiaire-entete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ea-stagiaire-nom { font-weight: 650; font-size: 15.5px; flex: 1 1 auto; }

.ea-btn-absent {
    border: 1px solid var(--line-fort);
    background: var(--surface);
    color: var(--ink-2);
    border-radius: var(--rayon-petit);
    padding: 6px 10px;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
}
.ea-btn-absent:hover { color: var(--critical); border-color: var(--critical); }
.ea-btn-absent.confirmer {
    background: var(--critical);
    border-color: var(--critical);
    color: #fff;
    font-weight: 700;
}
.ea-btn-absent.retour:hover { color: var(--good); border-color: var(--good); }

.ea-ligne-emargement {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.ea-cases { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.ea-case {
    border: 1px solid var(--line-fort);
    background: var(--surface);
    color: var(--muted);
    border-radius: var(--rayon-petit);
    padding: 6px 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-width: 44px;        /* cible tactile */
}
.ea-case.presente { color: var(--good); border-color: var(--good); background: var(--good-soft); }
.ea-case.absente  { color: var(--critical); border-color: var(--critical); background: var(--critical-soft); }
.ea-case.signee   { color: var(--good); border-color: var(--good); background: var(--good-soft); font-weight: 700; }
.ea-case .signe-emargement { margin-left: 2px; }

.ea-btn-signer {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: var(--rayon-petit);
    padding: 8px 14px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.ea-btn-signer:hover { background: var(--accent-ink); }

/* Voile + dialogue maison (plein écran mobile, centré au-delà). */
.ea-voile {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 14px;
}
.ea-dialogue {
    position: relative;
    background: var(--surface);
    border-radius: var(--rayon);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    padding: 16px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
}
.ea-dialogue-titre { font-weight: 700; font-size: 17.5px; padding-right: 28px; }
.ea-dialogue-sous { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.ea-dialogue-fermer {
    position: absolute; top: 10px; right: 10px;
    border: none; background: none; cursor: pointer;
    color: var(--muted); font-size: 16px; padding: 4px 6px;
}
.ea-dialogue-fermer:hover { color: var(--ink); }
.ea-dialogue-actions { display: flex; gap: 10px; margin-top: 12px; }
.ea-dialogue-actions button { flex: 1 1 50%; }
.ea-dialogue .encart { margin-top: 8px; }

/* Le pavé : fond clair même en thème sombre (c'est le « papier »). */
.ea-pad {
    display: block;
    width: 100%;
    height: 190px;
    margin-top: 12px;
    border: 2px dashed var(--line-fort);
    border-radius: var(--rayon-petit);
    background: #fdfdfb;
    touch-action: none;
    box-sizing: border-box;
}
.ea-pad-indice { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.ea-btn-principal {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: var(--rayon-petit);
    padding: 9px 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.ea-btn-principal:disabled { opacity: .6; cursor: default; }
/* P15 : encadré rouge « Documents importants manquants » de l'accueil animateur */
.ea-docs-manquants { margin: 0 0 14px; }
.ea-docs-manquants-titre { font-weight: 700; color: var(--critical); margin-bottom: 6px; }
.ea-docs-manquants .ea-btn-principal { display: inline-block; margin-top: 10px; background: var(--critical);
    border-color: var(--critical); text-decoration: none; }
.ea-btn-secondaire {
    border: 1px solid var(--line-fort);
    background: var(--surface);
    color: var(--ink-2);
    border-radius: var(--rayon-petit);
    padding: 9px 14px;
    font-size: 15px;
    cursor: pointer;
}

.ea-apercu-signature {
    margin-top: 12px;
    background: #fff;             /* la signature est sur « papier » */
    border: 1px solid var(--line);
    border-radius: var(--rayon-petit);
    padding: 10px;
    text-align: center;
}
.ea-apercu-signature img { max-width: 100%; max-height: 220px; }

/* --------------------------------------------------------------------------
   Portail stagiaire (C4a-1) : côté animateur (code de session, lien, QR)…
   -------------------------------------------------------------------------- */
.ea-ligne-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; }
.ea-btn-code {
    border: 1px dashed var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-radius: var(--rayon-petit);
    padding: 7px 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}
.ea-code-note { font-size: 13.5px; color: var(--muted); }

.ea-grand-code {
    text-align: center;
    font-size: 46px;
    font-weight: 800;
    letter-spacing: .25em;
    font-variant-numeric: tabular-nums;
    margin: 14px 0 6px;
    color: var(--ink);
}
.ea-code-fenetre { font-size: 14.5px; color: var(--ink-2); margin: 8px 0 0; }

.ea-btn-portail {
    border: 1px solid var(--line-fort);
    background: var(--surface);
    border-radius: var(--rayon-petit);
    padding: 5px 8px;
    font-size: 15px;
    cursor: pointer;
}
.ea-btn-portail:hover { border-color: var(--accent); }

.ea-qr { text-align: center; margin-top: 12px; }
.ea-qr img { width: 220px; max-width: 100%; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: var(--rayon-petit); }

.ea-lien-portail {
    font-size: 13.5px;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--rayon-petit);
    padding: 7px 9px;
    word-break: break-all;
    user-select: all;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Espace animateur — habillage (P5, 05/11/2026) : marque comme au back-office,
   cartes plus aérées, bloc date sur les cartes de stage, tuiles d'accès
   tactiles, en-tête de stage en carte. Mêmes jetons : le thème sombre suit.
   -------------------------------------------------------------------------- */
.ea-coque { --ea-rayon: 12px; }

.ea-barre {
    padding: 10px 18px;
    gap: 12px;
    border-top: 3px solid var(--accent);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .04);
}
.ea-marque { display: flex; align-items: center; gap: 8px; }
.ea-marque .ea-pastille {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--accent); color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 15px;
}
.ea-marque b { font-size: 17px; color: var(--accent-ink); }
.ea-espace {
    font-size: 12.5px; font-weight: 600; color: var(--accent-ink);
    background: var(--accent-soft);
    border-radius: 999px; padding: 3px 10px;
}
.ea-lien-centre {
    border: 1px solid var(--line-fort); border-radius: 999px;
    padding: 5px 12px; font-weight: 600;
}
.ea-lien-centre:hover { text-decoration: none; border-color: var(--accent); }
.ea-deconnexion button {
    border: 1px solid var(--line-fort); background: var(--surface); color: var(--ink-2);
    border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.ea-deconnexion button:hover { color: var(--critical); border-color: var(--critical); }
@media (max-width: 520px) {
    .ea-espace { display: none; }
    .ea-barre { padding: 8px 12px; }
}

.ea-contenu { max-width: 760px; padding: 22px 16px 40px; }

.ea-titre { font-size: 26px; letter-spacing: -.015em; margin: 0 0 2px; }
.ea-date-jour { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

.ea-section {
    display: flex; align-items: center; gap: 10px;
    margin: 26px 0 10px;
    font-size: 12.5px;
}
.ea-section::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* Tuiles d'accès (accueil, outils du stage) : grandes cibles pour le doigt. */
.ea-tuiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    margin: 4px 0 6px;
}
.ea-tuile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--ea-rayon);
    box-shadow: var(--ombre);
    padding: 14px 10px 12px;
    color: var(--ink); text-decoration: none;
    font-weight: 600; font-size: 14.5px; line-height: 1.25;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ea-tuile:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, .07); }
.ea-tuile-icone {
    flex: 0 0 auto;
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-ink);
    font-size: 27px; line-height: 1;
}
@media (max-width: 520px) {
    .ea-tuiles { grid-template-columns: repeat(2, 1fr); }
}
.ea-tuiles-stage { margin: 14px 0 4px; }

/* Cartes de stage : bloc date à gauche, chevron à droite. */
.ea-carte-stage {
    border-radius: var(--ea-rayon);
    padding: 14px 16px;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.ea-carte-stage:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, .07); }
.ea-carte-stage.avec-date { display: flex; align-items: center; gap: 14px; }
.ea-carte-stage.aujourdhui { border-color: var(--good); border-width: 2px; background: linear-gradient(0deg, var(--good-soft), var(--good-soft)), var(--surface); }
.ea-carte-stage.passe { opacity: 1; }
.ea-carte-stage.passe .ea-bloc-date { background: var(--surface-2, var(--plane)); color: var(--muted); }
.ea-carte-stage.passe .ea-stage-dates { color: var(--ink-2); }
.ea-bloc-date {
    flex: 0 0 auto;
    width: 58px; padding: 7px 0 6px;
    border-radius: 10px;
    background: var(--accent-soft); color: var(--accent-ink);
    display: flex; flex-direction: column; align-items: center; line-height: 1;
}
.ea-bloc-jour { font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ea-bloc-mois { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.ea-carte-corps { flex: 1 1 auto; min-width: 0; }
.ea-stage-dates { font-size: 16px; }
.ea-stage-dates::first-letter { text-transform: uppercase; }
.ea-chevron { flex: 0 0 auto; font-size: 26px; color: var(--muted); line-height: 1; }
a.ea-carte-stage:hover .ea-chevron { color: var(--accent); }

.ea-stage-infos { flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ea-puce-info, .ea-puce-role {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 999px; padding: 3px 10px;
    font-size: 13px; font-weight: 600;
    white-space: nowrap;
}
.ea-puce-info { background: var(--plane); color: var(--ink-2); border: 1px solid var(--line); }
.ea-puce-role { background: var(--accent-soft); color: var(--accent-ink); }

/* En-tête d'un stage : une carte, comme au back-office. */
.ea-travail-entete {
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--ea-rayon);
    box-shadow: var(--ombre);
    padding: 14px 18px;
}
.ea-travail-entete .ea-titre { font-size: 22px; }
.ea-travail-entete .ea-titre::first-letter { text-transform: uppercase; }

/* Puces de période en contrôle segmenté, compteurs en pastilles. */
.ea-periodes {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px;
    display: inline-flex;
    gap: 2px;
    margin: 18px 0 10px;
    max-width: 100%;
    overflow-x: auto;
}
.ea-puce-periode { border-color: transparent; background: transparent; padding: 7px 14px; }
.ea-puce-periode:hover:not(.active) { background: var(--plane); }
.ea-stat { border-radius: 999px; padding: 6px 14px; box-shadow: var(--ombre); }

/* Boutons d'envoi et du code de session : contour net, arrondis. */
.ea-btn-code { border-radius: 999px; }

/* Cartes stagiaire. */
.ea-carte-stagiaire {
    border-radius: var(--ea-rayon);
    box-shadow: var(--ombre);
    padding: 12px 14px;
    margin-bottom: 10px;
}
.ea-stagiaire-nom { font-size: 16px; }
.ea-case { border-radius: 8px; padding: 7px 8px; }
.ea-btn-absent { border-radius: 999px; padding: 6px 12px; }
.ea-btn-signer, .ea-btn-principal { border-radius: 999px; }

/* Les cartes génériques des autres pages de l'espace (factures, documents…). */
.ea-contenu .carte { border-radius: var(--ea-rayon); }
.ea-contenu h1 { font-size: 26px; letter-spacing: -.015em; }

/* Carte de séance : code de session, compteurs, envois. */
.ea-periodes { width: fit-content; }
.ea-carte-seance {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--ea-rayon);
    box-shadow: var(--ombre);
    padding: 14px 16px 12px;
    margin: 8px 0 4px;
}
.ea-carte-seance .ea-stat { box-shadow: none; background: var(--plane); }
.ea-carte-seance .ea-ligne-code { margin: 0 0 10px; }
.ea-btn-code {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
}
.ea-btn-code:hover { background: var(--accent); color: #fff; }
.ea-titre-envois {
    margin: 12px 0 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted);
}
.ea-envois { gap: 8px; margin-bottom: 2px; }
.ea-envois .ea-btn-code { background: var(--surface); }
.ea-envois .ea-btn-code:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   Espace animateur — couleurs (P5b, 05/11/2026, « un peu plus coloré ») :
   bandeau dégradé d'accueil et d'en-tête de stage, une teinte par tuile,
   bloc date dégradé, pastilles teintées. Les teintes restent lisibles en
   thème sombre (fonds par color-mix, texte blanc sur les dégradés).
   -------------------------------------------------------------------------- */
.ea-coque {
    --ea-bleu: #2a78d6;
    --ea-violet: #7b4fd6;
    --ea-sarcelle: #0e9a96;
    --ea-vert: #2c9a46;
    --ea-orange: #e07424;
    --ea-rose: #d3427a;
    --ea-indigo: #4c5bd4;
    --ea-ambre: #c98a00;
    --ea-degrade: linear-gradient(120deg, #2a78d6 0%, #5a5fe0 55%, #8a4fd6 100%);
}

/* Barre : filet dégradé. */
.ea-barre { border-top: 0; position: sticky; }
.ea-barre::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--ea-degrade);
}
.ea-marque .ea-pastille { background: var(--ea-degrade); }

/* Bandeau d'accueil. */
.ea-accueil {
    position: relative; overflow: hidden;
    background: var(--ea-degrade);
    color: #fff;
    border-radius: 16px;
    padding: 22px 24px 20px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(74, 80, 214, .25);
}
.ea-accueil::before, .ea-accueil::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.ea-accueil::before { width: 180px; height: 180px; right: -40px; top: -70px; }
.ea-accueil::after { width: 110px; height: 110px; right: 90px; bottom: -60px; background: rgba(255, 255, 255, .08); }
.ea-accueil .ea-titre { color: #fff; font-size: 28px; position: relative; }
.ea-accueil .ea-date-jour { color: rgba(255, 255, 255, .85); margin: 2px 0 0; position: relative; }

/* Une teinte par tuile. */
.ea-tuile { --teinte: var(--ea-bleu); position: relative; overflow: hidden; }
.ea-tuile.t-sarcelle { --teinte: var(--ea-sarcelle); }
.ea-tuile.t-vert     { --teinte: var(--ea-vert); }
.ea-tuile.t-violet   { --teinte: var(--ea-violet); }
.ea-tuile.t-orange   { --teinte: var(--ea-orange); }
.ea-tuile.t-rose     { --teinte: var(--ea-rose); }
.ea-tuile.t-indigo   { --teinte: var(--ea-indigo); }
.ea-tuile.t-ambre    { --teinte: var(--ea-ambre); }
.ea-tuile::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--teinte);
}
.ea-tuile .ea-tuile-icone {
    background: color-mix(in srgb, var(--teinte) 16%, transparent);
    color: var(--teinte);
}
.ea-tuile:hover { border-color: var(--teinte); box-shadow: 0 6px 18px color-mix(in srgb, var(--teinte) 22%, transparent); }

/* Sections : une pastille de couleur devant le titre. */
.ea-section::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--ea-degrade); flex: 0 0 auto;
}

/* Cartes de stage : bloc date dégradé, filet de couleur à gauche. */
.ea-carte-stage.avec-date { border-left: 4px solid var(--ea-bleu); }
.ea-bloc-date { background: var(--ea-degrade); color: #fff; box-shadow: 0 3px 10px rgba(74, 80, 214, .25); }
.ea-carte-stage.aujourdhui { border-left-color: var(--ea-vert); }
.ea-carte-stage.aujourdhui .ea-bloc-date { background: linear-gradient(135deg, #2c9a46, #0e9a96); box-shadow: 0 3px 10px rgba(14, 154, 150, .3); }
.ea-carte-stage.passe { border-left-color: var(--line-fort); }
.ea-carte-stage.passe .ea-bloc-date { background: var(--plane); color: var(--muted); box-shadow: none; }
a.ea-carte-stage:hover { border-color: var(--ea-violet); border-left-color: var(--ea-violet); }

/* Pastilles teintées. */
.ea-puce-info.p-inscrits { background: color-mix(in srgb, var(--ea-sarcelle) 13%, transparent); color: var(--ea-sarcelle); border-color: transparent; }
.ea-puce-info.p-horaires { background: color-mix(in srgb, var(--ea-orange) 13%, transparent); color: var(--ea-orange); border-color: transparent; }
.ea-puce-role { background: color-mix(in srgb, var(--ea-violet) 13%, transparent); color: var(--ea-violet); }

/* En-tête d'un stage : bandeau dégradé comme l'accueil. */
.ea-travail-entete {
    position: relative; overflow: hidden;
    background: var(--ea-degrade);
    border: 0;
    border-radius: 16px;
    color: #fff;
    padding: 18px 22px;
    box-shadow: 0 8px 24px rgba(74, 80, 214, .25);
}
.ea-travail-entete::after {
    content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%;
    right: -40px; top: -60px; background: rgba(255, 255, 255, .12);
}
.ea-travail-entete .ea-titre { color: #fff; position: relative; }
.ea-travail-entete .ea-stage-lieu { color: rgba(255, 255, 255, .9); position: relative; }
.ea-travail-entete .ea-puce-info, .ea-travail-entete .ea-puce-role {
    background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; position: relative;
}

/* Périodes : la période choisie en dégradé. */
.ea-puce-periode.active { background: var(--ea-degrade); border-color: transparent; box-shadow: 0 2px 8px rgba(74, 80, 214, .3); }

/* Carte de séance : filet de couleur, compteurs teintés. */
.ea-carte-seance { border-top: 3px solid var(--ea-sarcelle); }
.ea-carte-seance .ea-stat { background: color-mix(in srgb, var(--ea-sarcelle) 10%, var(--surface)); border-color: transparent; }
.ea-carte-seance .ea-stat.alerte { background: var(--critical-soft); }

/* Cartes stagiaire : filet de couleur selon l'état. */
.ea-carte-stagiaire { border-left: 4px solid var(--ea-bleu); }
.ea-carte-stagiaire.absent { border-left-color: var(--critical); }

/* --------------------------------------------------------------------------
   Espace animateur — bandeau des pages (P5d) : comme l'accueil, dans la teinte
   de la tuile qui y mène. Dégradé de la teinte vers une nuance plus sombre,
   texte blanc ; liens de retour dans le bandeau.
   -------------------------------------------------------------------------- */
.ea-bandeau {
    --teinte: var(--ea-bleu);
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--teinte) 0%, color-mix(in srgb, var(--teinte) 62%, #241a5e) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 14px 22px 18px;
    margin: 0 0 16px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--teinte) 30%, transparent);
}
.ea-bandeau.b-sarcelle { --teinte: var(--ea-sarcelle); }
.ea-bandeau.b-vert     { --teinte: var(--ea-vert); }
.ea-bandeau.b-violet   { --teinte: var(--ea-violet); }
.ea-bandeau.b-orange   { --teinte: var(--ea-orange); }
.ea-bandeau.b-rose     { --teinte: var(--ea-rose); }
.ea-bandeau.b-indigo   { --teinte: var(--ea-indigo); }
.ea-bandeau.b-ambre    { --teinte: var(--ea-ambre); }
.ea-bandeau::before, .ea-bandeau::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.ea-bandeau::before { width: 170px; height: 170px; right: -40px; top: -70px; background: rgba(255, 255, 255, .13); }
.ea-bandeau::after  { width: 100px; height: 100px; right: 100px; bottom: -60px; background: rgba(255, 255, 255, .08); }
.ea-bandeau-liens { position: relative; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: rgba(255, 255, 255, .75); }
.ea-bandeau-liens a { color: #fff; text-decoration: none; opacity: .92; }
.ea-bandeau-liens a:hover { text-decoration: underline; opacity: 1; }
.ea-bandeau-corps { position: relative; display: flex; align-items: center; gap: 14px; }
.ea-bandeau-icone {
    flex: 0 0 auto;
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .92);
    font-size: 30px; line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.ea-bandeau .ea-titre { color: #fff; font-size: 26px; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.ea-bandeau-sous { margin: 3px 0 0; color: rgba(255, 255, 255, .88); font-size: 14.5px; }
@media (max-width: 520px) {
    .ea-bandeau { padding: 12px 16px 16px; }
    .ea-bandeau .ea-titre { font-size: 22px; }
    .ea-bandeau-icone { width: 44px; height: 44px; font-size: 25px; }
}

/* --------------------------------------------------------------------------
   …et côté stagiaire : zone /s/{jeton}, la plus simple possible (téléphone).
   -------------------------------------------------------------------------- */
.es-coque { min-height: 100vh; display: flex; flex-direction: column; background: var(--plane); }
.es-barre {
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.es-marque { font-weight: 700; font-size: 16px; color: var(--ink); }
.es-marque span { font-weight: 500; color: var(--muted); font-size: 14px; }
.es-contenu {
    flex: 1 1 auto;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 14px 32px;
    box-sizing: border-box;
}
.es-attente { color: var(--muted); text-align: center; margin-top: 30px; }

.es-identite { margin-bottom: 12px; }
.es-nom { font-size: 22px; font-weight: 700; }
.es-stage { font-size: 15px; color: var(--ink-2); margin-top: 2px; }

.es-carte {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 14px;
    margin-bottom: 12px;
}
.es-titre { font-size: 19.5px; margin: 0 0 6px; }
.es-soustitre { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--ink-2); }
.es-note { font-size: 15px; color: var(--ink-2); margin: 6px 0; }
.es-note small { display: block; color: var(--muted); margin-top: 4px; }
.es-note.ok { color: var(--good); font-weight: 650; }

.es-periodes { list-style: none; margin: 0; padding: 0; }
.es-periodes li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
}
.es-periodes li:last-child { border-bottom: none; }
.es-periodes li.ouverte .es-periode-nom { font-weight: 700; }
.es-periode-etat { color: var(--muted); font-size: 14.5px; }
.es-periode-etat.ok { color: var(--good); font-weight: 700; }
.es-periode-etat.direct { color: var(--accent-ink); font-weight: 700; }

.es-code {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 25.5px;
    letter-spacing: .3em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit);
    background: var(--surface);
    color: var(--ink);
}
.es-btn {
    display: block;
    width: 100%;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: var(--rayon-petit);
    padding: 11px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.es-btn:disabled { opacity: .55; cursor: default; }
.es-actions { display: flex; gap: 10px; margin-top: 10px; }
.es-actions button { flex: 1 1 50%; }

/* --------------------------------------------------------------------------
   Tunnel du dossier stagiaire (C4a-2) — complète les es-* du portail.
   -------------------------------------------------------------------------- */
a.es-carte-lien { display: block; text-decoration: none; color: inherit; }
a.es-carte-lien:hover { border-color: var(--accent); }

.es-progression { margin-bottom: 12px; }
.es-progression-barre {
    height: 8px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.es-progression-barre > span {
    display: block; height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width .35s ease;
}
.es-progression-libelle { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 5px; text-align: right; }

.es-texte { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin: 6px 0; }
.es-lien { display: block; text-align: center; margin-top: 12px; font-size: 15px; color: var(--accent-ink); }

.es-champ { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.es-champ small { font-weight: 400; color: var(--muted); }
.es-champ input, .es-champ select {
    display: block; width: 100%; box-sizing: border-box;
    margin-top: 4px; padding: 10px;
    font-size: 17.5px; font-weight: 400;
    color: var(--ink); background: var(--surface);
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
}
.es-grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.es-grille3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }

.es-choix2 { display: flex; gap: 10px; margin-bottom: 12px; }
.es-choix2 button, .es-choix-colonne button {
    flex: 1; text-align: left;
    border: 2px solid var(--line-fort); border-radius: var(--rayon);
    background: var(--surface); color: var(--ink);
    padding: 11px 13px; font-size: 15.5px; cursor: pointer;
}
.es-choix2 button { text-align: center; font-weight: 700; }
.es-choix2 button.on, .es-choix-colonne button.on {
    border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink);
}
.es-choix-colonne { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.es-choix-colonne small { color: var(--ink-2); }

.es-suggestions {
    list-style: none; margin: -6px 0 10px; padding: 0;
    border: 1px solid var(--line); border-radius: var(--rayon-petit);
    max-height: 220px; overflow: auto; background: var(--surface);
}
.es-suggestions li { padding: 9px 10px; font-size: 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.es-suggestions li:last-child { border-bottom: none; }
.es-suggestions li:hover { background: var(--surface-2); }
.es-suggestions small { color: var(--muted); margin-left: 6px; }

.es-piece { border: 1px solid var(--line); border-radius: var(--rayon-petit); padding: 10px; margin-bottom: 8px; }
.es-piece.ok { border-color: var(--good); background: var(--good-soft); }
.es-piece-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.es-piece-nom { font-size: 15px; font-weight: 700; }
.es-piece-etat { font-size: 14px; font-weight: 800; color: var(--good); white-space: nowrap; }
.es-piece-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.es-btn-ajout {
    display: inline-block;
    background: var(--accent); color: #fff;
    border-radius: var(--rayon-petit);
    padding: 9px 13px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.es-btn-valider {
    background: var(--good); color: #fff; border: none;
    border-radius: var(--rayon-petit);
    padding: 9px 13px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.es-btn-valider:disabled { opacity: .55; }
.es-fichiers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.es-fichier {
    font-size: 14px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 8px; max-width: 100%; overflow-wrap: anywhere;
}
.es-fichier button { border: none; background: none; cursor: pointer; color: var(--critical); font-size: 12.5px; }

.es-reglement {
    max-height: 240px; overflow: auto;
    border: 1px solid var(--line); border-radius: var(--rayon-petit);
    padding: 10px; font-size: 15px; line-height: 1.55;
    color: var(--ink-2); background: var(--surface-2);
    white-space: pre-wrap; margin-bottom: 10px;
}
.es-case-cocher { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin-bottom: 10px; }

.es-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.es-btn-suite {
    background: var(--accent); color: #fff; border: 1px solid var(--accent);
    border-radius: var(--rayon-petit);
    padding: 11px 16px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.es-btn-suite:disabled { opacity: .55; cursor: default; }
.es-btn-retour {
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit);
    padding: 11px 14px; font-size: 15px; cursor: pointer;
}
.es-fin { text-align: center; }
/* P18b : présentation de l'ami pour l'accès et le tunnel du stagiaire — fond sarcelle, cartes blanches, en-tête
   translucide, boutons sarcelle. Les jetons sont redéfinis dans .es-ami : même rendu en thème clair ou sombre. */
.es-coque:has(.es-ami) { background: linear-gradient(160deg, #0f6b67 0%, #0b4f4c 45%, #0a3634 100%); min-height: 100vh; }
.es-coque:has(.es-ami) .es-barre { background: transparent; border-bottom-color: rgba(255, 255, 255, .18); color: #fff; }
.es-coque:has(.es-ami) .es-marque, .es-coque:has(.es-ami) .es-marque span, .es-coque:has(.es-ami) .pied-version { color: rgba(255, 255, 255, .85); }
.es-ami {
    --surface: #ffffff; --surface-2: #f8fafc; --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
    --line: #e2e8f0; --line-fort: #cbd5e1; --accent: #0f766e; --accent-ink: #0f766e; --accent-soft: #ecfdf5;
    --good: #059669; --good-soft: #ecfdf5; --critical: #b91c1c; --critical-soft: #fdecef; --warning-soft: #fef3c7;
    color-scheme: light; color: var(--ink); max-width: 560px; margin: 0 auto;
}
.es-ami .es-identite { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: 12px;
    padding: 14px; margin-bottom: 10px; color: #fff; }
.es-ami .es-nom { color: #fff; font-weight: 800; font-size: 18px; text-transform: uppercase; }
.es-ami .es-stage { color: #fff; opacity: .9; font-size: 13px; }
.es-ami .es-progression-barre { background: rgba(255, 255, 255, .25); }
.es-ami .es-progression-barre > span { background: #fff; }
.es-ami .es-progression-libelle { color: #fff; font-size: 12px; }
.es-ami .es-carte { background: #fff; border: 0; border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); padding: 16px; }
.es-ami .es-soustitre { color: #0f766e; font-weight: 800; font-size: 16px; }
.es-ami .es-texte, .es-ami .es-note { color: #334155; }
.es-ami .es-champ { font-size: 12.5px; color: #475569; }
.es-ami .es-champ input, .es-ami .es-champ select { border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px; font-size: 15px; background: #fff; color: #0f172a; }
.es-ami .es-btn, .es-ami .es-btn-suite { background: #0f766e; border-color: #0f766e; border-radius: 10px; font-weight: 800; }
.es-ami .es-btn-retour { background: #e2e8f0; border-color: #e2e8f0; color: #1e293b; border-radius: 10px; font-weight: 700; }
.es-ami .es-btn-ajout { background: #0f766e; border-radius: 10px; }
.es-ami .es-choix2 button.on { background: #0f766e; border-color: #0f766e; color: #fff; }
.es-ami .es-cas button { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.es-ami .es-cas button.on { background: #f0fdfa; border: 2px solid #0f766e; color: #0f172a; }
.es-cas-num { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #0f766e; }
.es-btn-remplacer { margin-top: 8px; }

/* P19 : numéros de téléphone affichés par le CSS (robustes aux extensions qui réécrivent les numéros) */
.numero-tel::before { content: attr(data-numero); }
a.numero-tel { color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
a.numero-tel:hover { text-decoration: underline; }
span.numero-tel { white-space: nowrap; }

/* P19 : spécimen de signature (tunnel) */
.es-specimen { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; margin: 8px 0 12px; text-align: center; background: #f8fafc; }
.es-specimen-titre { font-weight: 700; font-size: 13px; color: #475569; margin-bottom: 6px; }
.es-specimen img { max-width: 100%; max-height: 120px; object-fit: contain; opacity: .75; }

/* P18c : bloc « Gagnez du temps » (import de l'ADCS) */
.es-adcs { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; padding: 12px; margin: 10px 0 12px; }
.es-adcs-titre { font-weight: 800; color: #0f766e; margin-bottom: 4px; }
.es-adcs .es-btn-ajout.occupe { opacity: .7; cursor: progress; }
.es-adcs-msg { margin-top: 8px; font-size: 14px; font-weight: 700; color: #334155; }

/* P21b : scan du code 2D-DOC à la caméra (48N, ordonnance) */
button.es-btn-ajout { border: none; }
.es-btn-scan { margin: 0 8px 8px 0; background: #0b5c55; }
.es-btn-scan:disabled { opacity: .6; }
.es-scan { margin-top: 10px; text-align: center; }
.es-scan-video { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; background: #0f172a; }

/* P22 : tunnel comme chez l'ami — voile pendant les transferts, vignettes des photos, ADCS déjà transmise */
.es-voile { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.72); display: flex; align-items: center;
    justify-content: center; padding: 24px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.es-voile-boite { background: #fff; border-radius: 14px; padding: 22px 20px; max-width: 340px; width: 100%; text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.es-voile-roue { width: 38px; height: 38px; margin: 0 auto 12px; border: 4px solid #d1fae5; border-top-color: #0f766e;
    border-radius: 50%; animation: es-voile-tour .8s linear infinite; }
@keyframes es-voile-tour { to { transform: rotate(360deg); } }
.es-voile-texte { font-weight: 800; font-size: 15px; color: #0f172a; }
.es-voile-sous { margin-top: 6px; font-size: 12.5px; color: #64748b; line-height: 1.4; }
.es-vignettes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.es-vignette { position: relative; width: 70px; height: 70px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden;
    background: #f8fafc; margin: 4px auto; }
.es-vignettes .es-vignette { margin: 0; }
.es-vignette img { width: 100%; height: 100%; object-fit: cover; }
.es-vignette-pdf { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; font-weight: 800; color: #0f766e; }
.es-vignette button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%;
    background: rgba(15,23,42,.75); color: #fff; font-size: 11px; cursor: pointer; line-height: 1; }
.es-face-titre small { display: block; font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.es-adcs-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 9px; padding: 10px 12px; font-size: 13px;
    font-weight: 700; margin-bottom: 10px; }

/* P21c : journal des saisies du portail */
.journal-saisies .js-ligne { border-top: 1px solid #e2e8f0; padding: 8px 0; }
.journal-saisies .js-ligne.retablie { opacity: .6; }
.journal-saisies .js-entete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.journal-saisies .js-changements { margin: 4px 0 0 0; padding-left: 18px; font-size: 13px; }
.journal-saisies .js-avant { color: #64748b; text-decoration: line-through; }

/* P18a : tunnel « Mon dossier » comme chez l'ami */
.es-express { text-align: center; }
.es-express .es-btn { margin-bottom: 10px; }
.es-btn-large { display: block; width: 100%; margin-top: 8px; }
.es-permis-formats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.es-permis-format { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px;
    border: 1px solid var(--line-fort); border-radius: var(--rayon); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.es-permis-format.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.es-permis-format img { width: 100%; max-width: 300px; height: auto; }
.es-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.es-face { border: 1px dashed var(--line-fort); border-radius: var(--rayon-petit); padding: 10px; text-align: center;
    display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 0; }
.es-face.ok { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.es-face small { overflow-wrap: anywhere; color: var(--muted); }
.es-face-titre { font-weight: 700; }
.es-oblig { color: var(--critical) !important; font-weight: 800; }
.es-btn-sans { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    padding: 8px 12px; font-size: 14px; cursor: pointer; }
.es-cgv { margin: 8px 0 12px; }
.es-cgv summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; }
.es-cgv .es-reglement { margin-top: 8px; }
.es-champ input:placeholder-shown, .es-champ select:has(option[value=""]:checked) { background: var(--critical-soft); }
.es-fin-picto { font-size: 51px; margin-bottom: 4px; }
.es-fin .es-btn { margin-top: 8px; }

/* Paramètres › Documents : ligne de purge des signatures (C5-2). */
.champ-retention { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.champ-retention > span { font-size: 14.5px; color: var(--ink-2); }

/* Espace stagiaire durable (C4b). */
.es-barre { display: flex; align-items: center; justify-content: space-between; }
.es-stage-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.es-stage-dates { font-weight: 700; font-size: 16px; }
.es-stage-etat { text-align: right; }
.es-btn-attestation { display: inline-block; width: auto; padding: 9px 13px; font-size: 15px; text-decoration: none; }

/* Compte de l'élève (C8-1b) : relevé, solde, affectations. */
.entete-compte { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.entete-compte .separateur { flex: 1; }
.solde-compte {
    font-size: 17.5px; font-weight: 700; padding: 6px 12px;
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit); background: var(--surface);
}
.solde-compte.credit { color: #07834f; border-color: #a7e3c8; background: #effaf4; }
.solde-compte.debit  { color: #b91c1c; border-color: #f3c2c2; background: #fdf2f2; }

.table-compte { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); }
.table-compte th, .table-compte td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.table-compte th { font-size: 13.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-2); }
.titre-section-compte { margin: 18px 0 6px; font-size: 16px; }
.table-compte .num { text-align: right; white-space: nowrap; }
.table-compte td.credit { color: #07834f; font-weight: 700; }
.table-compte td.debit  { color: #b91c1c; font-weight: 700; }
.table-compte tr.hors-journal td { color: var(--ink-2); background: color-mix(in srgb, var(--surface) 92%, var(--line)); }
.table-compte .detail { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-compte .actions { white-space: nowrap; text-align: right; }

.lien-recu { font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ligne-affectation { justify-content: space-between; border: 1px dashed var(--line); border-radius: var(--rayon-petit); padding: 6px 8px; }
.ligne-affectation .reste { font-size: 14px; color: var(--ink-2); }
.montant-affectation { width: 110px; }
.filtres-reglements { align-items: flex-end; }

/* Règlements tiers payants (C8-3). */
.texte-debit  { color: #b91c1c; font-weight: 700; }
.texte-credit { color: #07834f; font-weight: 700; }
.item-remise {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 8px 10px; font-size: 15px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.item-remise:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.item-remise.actif { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-left: 3px solid var(--accent); }

/* --------------------------------------------------------------------------
   Signature publique d'une convention animateur (C10) — page anonyme
   /convention/signer/{jeton}, sur le gabarit « plein écran » de la connexion.
   -------------------------------------------------------------------------- */
.carte-signature { width: 840px; max-width: 100%; padding: 22px 24px; }
.titre-signature { margin: 16px 0 2px; font-size: 17.5px; }
.sous-signature { color: var(--muted); font-size: 14.5px; margin: 4px 0 10px; }
.iframe-convention { height: 520px; }
.aide-signature { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.lien-refus {
    display: block; margin: 10px auto 0; border: 0; background: none; cursor: pointer;
    color: var(--muted); font: inherit; font-size: 13.5px; text-decoration: underline;
}
.lien-refus:hover { color: var(--ink-2); }
.saisie-motif {
    width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit;
    color: var(--ink); background: var(--surface);
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit); padding: 8px 10px;
    resize: vertical;
}
.saisie-motif:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

/* Filtre placé dans une barre d'entête (ex. animateur sur Conventions) :
   largeur fixe, sinon l'éditeur DevExpress prend toute la ligne. */
.entete .filtre-entete { width: 260px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Planning prévisionnel (C11) — grille mois × lieu (BAFM | PSY par lieu).
   -------------------------------------------------------------------------- */
.pl-barre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.pl-barre .separateur { flex: 1; }
.pl-mois { font-size: 17.5px; min-width: 130px; text-align: center; text-transform: capitalize; }
.pl-tampon {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
    padding: 6px 10px; border: 1px dashed var(--line-fort); border-radius: var(--rayon-petit); font-size: 14.5px;
}
.pl-tampon.actif { border-color: var(--accent); background: var(--accent-soft); }
.pl-tampon .filtre-entete { width: 240px; }
.pl-combo-role { width: 100px; }

.pl-conteneur {
    overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--line);
    border-radius: var(--rayon); background: var(--surface);
}
.pl-grille { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.pl-grille th, .pl-grille td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
.pl-grille thead th {
    position: sticky; top: 0; z-index: 2; background: var(--surface); font-weight: 700;
    padding: 4px 6px; text-align: center; white-space: nowrap;
}
.pl-grille thead tr:nth-child(2) th { top: 38px; font-size: 12px; color: var(--muted); }
.pl-grille th.pl-lieu { height: 30px; border-left: 2px solid var(--line-fort); }
.pl-grille th.pl-lieu small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.pl-grille th.pl-jour, .pl-grille td.pl-jour {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
    min-width: 92px; text-align: left; padding: 2px 6px; white-space: nowrap;
}
.pl-grille thead th.pl-jour { z-index: 3; }
.pl-grille tr.pl-we td.pl-jour { color: var(--muted); }
.pl-grille tr.pl-lundi td { border-top: 2px solid var(--line-fort); }
.pl-date { text-transform: capitalize; }
.pl-semaine { margin-left: 4px; font-size: 11.5px; color: var(--accent-ink); font-weight: 700; }
.pl-vacances {
    display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 4px; font-size: 11px;
    font-weight: 700; background: var(--warning-soft); color: var(--warning);
}
.pl-grille td { height: 24px; min-width: 52px; text-align: center; position: relative; }
.pl-grille td.pl-place, .pl-grille td.pl-libre.modifiable, .pl-grille td.pl-j2 { cursor: pointer; }
.pl-place.complet, span.pl-place.complet  { background: var(--accent-soft); }
.pl-place.partiel  { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.pl-place.incomplet, span.pl-place.incomplet { background: var(--warning-soft); }
.pl-place.retenu, span.pl-place.retenu { background: var(--good-soft); }
.pl-place.hors, span.pl-place.hors { background: var(--surface-2, #f0efea); color: var(--muted); }
/* P26 (comme l'ami) : « Estomper les pourvues », panneau d'alertes. */
.pl-place.pl-estompee { opacity: .3; }
.pl-alertes .liste-anomalies { max-height: 220px; overflow: auto; margin: 6px 0 0; }
.pl-place:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.pl-code { font-weight: 700; letter-spacing: .3px; }
.pl-vacant { color: var(--warning); font-weight: 700; }
.pl-badge {
    display: inline-block; min-width: 14px; padding: 0 3px; margin-left: 3px; border-radius: 7px;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 14px;
}
.pl-type {
    position: absolute; right: 2px; top: 1px; font-size: 10px; font-weight: 700; padding: 0 3px;
    border-radius: 3px; background: var(--critical-soft); color: var(--critical);
}
.pl-type-place { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 14.5px; }
.pl-num { position: absolute; left: 2px; bottom: 0; font-size: 10px; color: var(--good); }
.pl-grille td.pl-j2 { color: var(--muted); font-size: 11.5px; background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.pl-grille td.pl-j2.retenu { background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.pl-grille td.pl-j2.hors { background: var(--surface-2); }
.pl-arbitrage .candidat span.pl-nom { font-size: 14.5px; color: var(--ink); }
.pl-grille td.pl-ferme {
    background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px);
    color: var(--muted); font-size: 11px;
}
.pl-plus { visibility: hidden; color: var(--accent); font-weight: 700; }
.pl-libre.modifiable:hover .pl-plus { visibility: visible; }
.pl-libre.modifiable:hover { background: var(--accent-soft); }
.pl-voeux { color: var(--critical); font-size: 12px; font-weight: 700; margin-right: 3px; }

.grille-campagnes { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.pl-legende { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 14px; font-size: 13.5px; color: var(--ink-2); }
.pl-legende .pl-place { padding: 2px 8px; border-radius: 4px; }

.pl-tableau { border-collapse: collapse; font-size: 14.5px; margin-top: 8px; min-width: 420px; }
.pl-tableau th, .pl-tableau td { border-bottom: 1px solid var(--line); padding: 5px 10px; text-align: left; }
.pl-tableau th { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.pl-tableau tr.pl-muet td { color: var(--muted); }
.pl-actions { white-space: nowrap; display: flex; gap: 6px; }

.pl-arbitrage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
@media (max-width: 760px) { .pl-arbitrage { grid-template-columns: 1fr; } }
.pl-titulaire { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pl-arbitrage .liste-candidats { max-height: 340px; overflow-y: auto; }
.pl-arbitrage .candidat { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 6px; flex-wrap: wrap; cursor: default; padding: 5px 8px; }
.pl-arbitrage .candidat .separateur { flex: 1; }
.pl-arbitrage .candidat.pl-indispo { opacity: .6; }
.pl-nom { font-weight: 600; }
.pl-source { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--line); color: var(--ink-2); }
.pl-source.s1 { background: var(--good-soft); color: var(--good); }
.pl-source.s2 { background: var(--critical-soft); color: var(--critical); }
.pl-source.s3 { background: var(--accent-soft); color: var(--accent-ink); }
.pl-conflit { font-size: 12.5px; color: var(--critical); }

/* Espace animateur — Mon planning / Mes zones (C11). */
.ea-sous-titre { font-size: 16px; margin: 18px 0 4px; }
.ea-agenda { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ea-qr { width: 132px; height: 132px; background: #fff; border: 1px solid var(--line); border-radius: var(--rayon-petit); }
.ea-agenda > div { flex: 1; min-width: 220px; }
.ea-lien-agenda {
    width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-size: 13.5px;
    color: var(--ink); background: var(--surface); border: 1px solid var(--line-fort);
    border-radius: var(--rayon-petit); padding: 6px 8px;
}
.ea-btn-agenda { display: inline-block; margin: 6px 0 4px; text-decoration: none; }
.ea-onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ea-mois { margin: 10px 0; }
.ea-mois-titre { font-weight: 700; font-size: 15px; margin-bottom: 4px; text-transform: capitalize; }
.ea-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; }
.ea-cal-entete { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.ea-cal-jour {
    height: 38px; border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
}
.ea-cal-jour.coche { background: var(--good); border-color: var(--good); color: #fff; font-weight: 700; }
.ea-cal-jour:disabled { opacity: .35; cursor: default; }
.ea-cal-jour.coche:disabled { opacity: .7; }
.ea-actions-place { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ea-ligne-voeu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ea-form-voeu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ea-form-voeu > * { min-width: 140px; }
.ea-zones { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.ea-zone {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 14px;
    background: var(--accent-soft); color: var(--accent-ink); font-weight: 700;
}
.ea-zone button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 17.5px; line-height: 1; }
/* P16 : boutons « Vérifier » de Mes informations, zones d'intervention par cases à cocher (comme chez l'ami) */
.ea-ligne-verif { display: flex; gap: 8px; align-items: center; }
.ea-ligne-verif > :first-child { flex: 1; min-width: 0; }
.ea-ligne-verif .ea-btn-secondaire { white-space: nowrap; padding: 6px 12px; }
.ea-lien-bouton { display: inline-block; text-decoration: none; }
.ea-zones-resume { margin: 0 0 10px; }
.mz-barre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.mz-pied { justify-content: space-between; margin-bottom: 0; }
.mz-compte { font-size: 14px; color: var(--ink-2); }
.mz-filtre { flex: 1; min-width: 140px; padding: 8px 10px; border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    background: var(--surface); color: var(--ink); font-size: 15px; }
.mz-liste { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--rayon); padding: 4px; }
.mz-region { border-bottom: 1px solid var(--line); padding: 6px 4px; }
.mz-region:last-child { border-bottom: 0; }
.mz-region-titre { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 2px; }
.mz-region-titre input, .mz-dep input { width: 17px; height: 17px; accent-color: var(--accent); }
.mz-region-titre.partiel b { color: var(--warning); }
.mz-region-nb { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mz-deps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 10px; padding: 4px 0 8px 24px; }
.mz-dep { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 4px 6px;
    border-radius: var(--rayon-petit); }
.mz-dep:hover { background: var(--surface-2); }
.mz-dep.coche { background: var(--good-soft); color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .mz-deps { grid-template-columns: 1fr 1fr; padding-left: 10px; } }

/* --------------------------------------------------------------------------
   Statistiques (C14) — graphiques à barres maison (GraphBarres.razor) et
   tableau de bord.
   -------------------------------------------------------------------------- */
.gb-colonnes { display: flex; align-items: stretch; gap: 4px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.gb-colonne { flex: 1 1 0; min-width: 18px; display: flex; flex-direction: column; align-items: center; }
.gb-zone { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.gb-barre { width: min(28px, 70%); background: var(--accent); border-radius: 4px 4px 0 0; }
.gb-colonne:hover .gb-barre { background: var(--accent-ink); }
.gb-libelle { font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.gb-lignes { display: flex; flex-direction: column; gap: 6px; }
.gb-ligne { display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.gb-libelle-h { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-piste { height: 12px; }
.gb-barre-h { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.gb-ligne:hover .gb-barre-h { background: var(--accent-ink); }
.gb-valeur { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 60px; text-align: right; }

.st-filtres { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.st-filtres .champ { margin: 0; min-width: 150px; }
.st-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
.st-grille .carte h3 { margin: 0 0 8px; }
.st-mois td { background: var(--surface-2); font-weight: 700; }
.pl-tableau td.nombre, .pl-tableau th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
@media print {
    .rail, .barre-haute, .menu-haut, .bandeau-recette, .st-filtres, .entete .separateur ~ *, .dxbl-tabs-tablist { display: none !important; }
    .travail { margin: 0 !important; }
}
.tb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 10px; }
.tb-grille .carte h3 { margin: 0 0 8px; }
/* Grilles de cartes (statistiques, tableau de bord) : pas de marge haute
   héritée de « .carte + .carte », et une carte trop large (tableau) défile
   dans la carte au lieu d'élargir la page. */
.st-grille > .carte, .tb-grille > .carte { min-width: 0; overflow-x: auto; }
.st-grille > .carte + .carte, .tb-grille > .carte + .carte { margin-top: 0; }
.st-grille > .st-large { grid-column: 1 / -1; }
@media (min-width: 1100px) { .tb-grille > .tb-large { grid-column: span 2; } }
/* Beaucoup de colonnes (12 mois) : libellés verticaux, sans chevauchement. */
.gb-colonnes.dense .gb-colonne { min-width: 14px; }
.gb-colonnes.dense .gb-libelle { writing-mode: vertical-rl; transform: rotate(180deg); height: 46px; margin-top: 6px; }
a.suivi-kpi { text-decoration: none; color: inherit; display: block; }
a.suivi-kpi:hover { border-color: var(--accent); }

/* SMS (lot SMS) : fil d'un élève en bulles, boîte de réception, lien d'appel 3CX */
.fil-sms { display: flex; flex-direction: column; gap: 8px; padding: 8px 2px; max-width: 760px; }
.bulle-sms { max-width: 78%; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.bulle-sms.entrant { align-self: flex-start; border-bottom-left-radius: 3px; }
.bulle-sms.sortant { align-self: flex-end; border-bottom-right-radius: 3px; background: var(--accent-soft); border-color: transparent; }
.bulle-sms.erreur { border-color: var(--critical); background: var(--critical-soft); }
.bulle-sms .texte-sms { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.bulle-sms .meta-sms { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
tr.sms-non-lu td { font-weight: 600; background: var(--accent-soft); }
.lien-3cx { margin-left: 8px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--accent); }
.lien-3cx:hover { text-decoration: underline; }
.bouton-lien { display: inline-block; padding: 6px 14px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
.bouton-lien:hover { background: var(--accent-ink); }

/* Version de l'application en pied des espaces animateur et stagiaire : une ligne discrète. */
.pied-version { text-align: center; font-size: 12px; color: var(--muted); padding: 0 14px 14px; user-select: all; }
@media print { .pied-version { display: none; } }

/* Tarifs des stages : mise à jour, comparatif des concurrents, liens, configuration (migration 24) */
.tf-onglets { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.tf-onglet { padding: 8px 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tf-onglet:hover { color: var(--accent-ink); }
.tf-onglet.actif { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tf-filtres { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; }
.tf-groupe { min-width: 200px; max-width: 520px; }
.tf-groupe-titre { font-size: 14.5px; margin-bottom: 6px; color: var(--ink-2); }
.tf-lien { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--accent-ink); font-size: 13.5px; cursor: pointer; text-decoration: underline; }
.tf-coches { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tf-message { margin: 8px 0; }
.tf-table { margin-top: 8px; }
.tf-table td, .tf-table th { vertical-align: middle; }
.tf-dates { white-space: nowrap; }
.tf-saisie { width: 130px; }
.tf-url { max-width: 420px; overflow-wrap: anywhere; font-size: 14px; }
.tf-situation { font-size: 14px; color: var(--ink-2); }
.tf-barre { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.tf-detail { margin: 8px 0 12px; }
.tf-detail > summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.tf-edition { margin-top: 14px; }
.tf-sous-titre { margin: 16px 0 6px; }
.tf-actions { margin-top: 12px; }
.tf-mapping td { padding: 4px 6px; }
tr.tf-risque td:first-child { box-shadow: inset 3px 0 0 var(--critical); }
tr.tf-vert td    { background: var(--good-soft); }
tr.tf-orange td  { background: var(--warning-soft); }
tr.tf-rouge td   { background: var(--critical-soft); }
tr.tf-gris td    { background: var(--surface-2); color: var(--ink-2); }
.tf-puce { display: inline-block; margin: 1px 6px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 14px; background: var(--surface); border: 1px solid var(--line-fort); white-space: nowrap; }
.tf-puce.moins-cher { border-color: var(--critical); font-weight: 700; }
.tf-puce.notre { border-style: dashed; color: var(--accent-ink); background: var(--accent-soft); }

/* --- TODO du centre : « Que dois-je faire ? » (migration n°25) ------------------- */
.tk-journee { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.tk-compteur {
    flex: 1 1 150px;
    background: var(--surface);
    border: 1px solid var(--line-fort);
    border-left-width: 5px;
    border-radius: 8px;
    padding: 8px 12px;
}
.tk-cpt-nb { font-size: 30px; font-weight: 800; line-height: 1; }
.tk-cpt-lib { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.cat-rouge  { border-left-color: var(--critical); }
.cat-orange { border-left-color: #e8923a; }
.cat-jaune  { border-left-color: var(--warning); }
.cat-vert   { border-left-color: var(--good); }
.cat-gris   { border-left-color: var(--muted); }
.tk-compteur.cat-rouge .tk-cpt-nb { color: var(--critical); }
.tk-compteur.cat-orange .tk-cpt-nb { color: #e8923a; }
.tk-compteur.cat-jaune .tk-cpt-nb { color: var(--warning); }
.tk-compteur.cat-vert .tk-cpt-nb { color: var(--good); }
.tk-filtres { margin-top: 8px; }
.tk-section { margin-bottom: 16px; }
.tk-sec-titre { font-size: 17.5px; margin: 0 0 6px; border-left: 0; }
.tk-sec-nb { background: var(--accent-soft); color: var(--ink-2); border-radius: 999px; padding: 0 8px; font-size: 14px; margin-left: 6px; }
.tk-carte {
    background: var(--surface);
    border: 1px solid var(--line-fort);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.tk-carte.prio-critique { border-left-color: var(--critical); }
.tk-carte.prio-urgente  { border-left-color: #e8923a; }
.tk-carte.prio-haute    { border-left-color: var(--warning); }
.tk-carte.prio-normale  { border-left-color: var(--accent); }
.tk-carte.prio-faible   { border-left-color: var(--muted); }
.tk-carte-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-prio { color: #fff; border-radius: 4px; padding: 1px 8px; font-size: 12.5px; font-weight: 700; }
.tk-prio.prio-critique { background: var(--critical); }
.tk-prio.prio-urgente  { background: #e8923a; }
.tk-prio.prio-haute    { background: var(--warning); }
.tk-prio.prio-normale  { background: var(--accent); }
.tk-prio.prio-faible   { background: var(--muted); }
.tk-titre { font-size: 16px; }
.tk-carte-ctx { font-size: 14px; color: var(--muted); margin-top: 3px; }
.tk-carte-desc { font-size: 14.5px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }
.tk-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 7px; }
.tk-lien { font-size: 14px; text-decoration: none; color: var(--accent-ink); }
.tk-lien:hover { text-decoration: underline; }
.tk-historique { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Bandeau du mode recette (BandeauRecette.razor) : base de test, rien ne sort.
   -------------------------------------------------------------------------- */
.bandeau-recette {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 4px 12px;
    background: #b45309; color: #fff;
    font-size: 14px; line-height: 1.35; text-align: center;
}
.bandeau-recette b { letter-spacing: .06em; }
.bandeau-recette.fixe { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; }
@media print { .bandeau-recette { display: none !important; } }

/* Préavis d'échéance de la licence (22/10/2026), sous le bandeau de recette. */
.bandeau-licence {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 4px 12px;
    background: var(--critical-soft); color: var(--ink); border-bottom: 1px solid var(--critical);
    font-size: 14px; line-height: 1.35; text-align: center;
}
.bandeau-licence b { letter-spacing: .06em; color: var(--critical); }
@media print { .bandeau-licence { display: none !important; } }

/* --------------------------------------------------------------------------
   Pastilles de l'écran Stages (1.12.0) — remplacent le « + » rouge :
   vert = signé / présent, gris = pas encore dû, orange = manquant,
   anneau orange = pièce absente du dossier, anneau vert = présent sans
   signature, rouge = absent.
   -------------------------------------------------------------------------- */
.pst { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; box-sizing: border-box; }
.pst-ok { background: #16a34a; }
.pst-saisi { background: transparent; border: 2.5px solid #16a34a; }
.pst-attendu { background: #d6d3cb; }
.pst-manque { background: #f59e0b; }
.pst-piece-manque { background: transparent; border: 2px solid #f59e0b; }
.pst-absent { background: #dc2626; }
/* P35 (comme l'ami) : période passée sans signature ni présence = rouge « + » ; absent = rouge « ✗ ». */
.pst-sans { background: #dc2626; }
.pst-marque { width: 14px; height: 14px; color: #fff; font: 700 11px/14px system-ui, sans-serif; text-align: center; }
.cellule-pastille {
    border: 0; background: none; padding: 3px 5px; margin: 0; cursor: pointer;
    line-height: 0; border-radius: 4px;
}
.cellule-pastille:hover:not(:disabled) { background: var(--accent-soft); }
.cellule-pastille:disabled { cursor: default; }

/* ---- Fiche stage 1.13.0 : encadrement / rôle GTA, heures, préfecture (repris de l'ami) ---- */
.encadrement { display: flex; flex-direction: column; gap: 2px; }
.ligne-encadrement { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: end; }
.ligne-encadrement .champ { margin-top: 8px; }
.ligne-encadrement .autorisation { grid-column: 1 / -1; font-size: 12.5px; margin-top: 2px; }
.autorisation.valable { color: #15803d; }
.autorisation.invalide { color: #b91c1c; }
.radio-gta { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; padding-bottom: 7px; white-space: nowrap; cursor: pointer; }
.indicateur-gta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.indicateur-gta label { display: inline-flex; align-items: center; gap: 4px; }
.recap-heures { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.pastille-heures { border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.pastille-heures.ok { background: #dcfce7; color: #166534; }
.pastille-heures.ko { background: #fee2e2; color: #b91c1c; }   /* P37 : rouge (7h00 par jour exactement, comme l'ami) */
.alerte-heures { margin-top: 6px; color: var(--critical); font-weight: 600; font-size: 13.5px; }
/* P37 : bandeau de santé de la fiche stage */
.bandeau-sante { border-left: 4px solid #16a34a; background: #f0fdf4; padding: 7px 12px; margin: 0 0 8px; border-radius: 4px; font-size: 13.5px; color: var(--ink); }
.bandeau-sante.sante-asurveiller { border-color: #d97706; background: #fffbeb; }
.bandeau-sante.sante-actionurgente { border-color: #dc2626; background: #fef2f2; }
.bandeau-sante.sante-bloque { border-color: #7f1d1d; background: #fee2e2; }
.bandeau-sante.sante-nonconcerne { border-color: #9ca3af; background: var(--surface-2, #f5f5f4); }
.bandeau-sante .sante-detail { color: var(--muted); }
.aide-heures { font-size: 12.5px; color: var(--ink-2); }
.case-champ { display: flex !important; align-items: center; gap: 6px; align-self: end; padding-bottom: 6px; }
.case-champ span { margin: 0 !important; }
.aide-champ { font-size: 13px; margin-top: 4px; }
.attention-texte { color: #b45309; }

/* ---- Fiche élève 1.13.0 : bascules, champs calculés, erreurs de saisie (repris de l'ami) ---- */
.bascule-2 { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--ligne, #d4d4d8); border-radius: 8px; overflow: hidden; margin: 2px 10px 2px 0; }
.bascule-2 button { white-space: nowrap; border: 0; background: transparent; padding: 5px 12px; font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.bascule-2 button + button { border-left: 1px solid var(--ligne, #d4d4d8); }
.bascule-2 button.on { background: var(--accent, #1d4ed8); color: #fff; font-weight: 600; }
.bascule-verte button.on { background: #15803d; }
.valeur-calculee { padding: 6px 2px; font-size: 14px; color: var(--ink); }
.saisie-erreur, .saisie-erreur input { border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626 inset; }
.lien-action { border: 0; background: none; padding: 0 4px; color: var(--accent, #1d4ed8); cursor: pointer; font: inherit; font-size: 13.5px; text-decoration: underline; }

/* ---- Transfert d'un stagiaire (1.13.0) ---- */
.liste-transfert { max-height: 46vh; overflow: auto; border: 1px solid var(--ligne, #d4d4d8); border-radius: 8px; margin: 8px 0; }
.ligne-transfert { display: grid; grid-template-columns: auto 90px 120px minmax(0, 1fr) 90px 80px; gap: 8px; align-items: center; padding: 6px 10px; cursor: pointer; font-size: 14px; }
.ligne-transfert + .ligne-transfert { border-top: 1px solid var(--ligne, #e4e4e7); }
.ligne-transfert.choisie { background: var(--accent-soft, #dbeafe); }
.ligne-transfert.complet { color: var(--muted, #71717a); }
.ligne-transfert .t-num { font-weight: 700; }
.ligne-transfert .t-lieu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-transfert .t-places, .ligne-transfert .t-prix { text-align: right; }
@media (max-width: 640px) { .ligne-transfert { grid-template-columns: auto 1fr 1fr; } .ligne-transfert .t-lieu { grid-column: 2 / -1; } }

/* Contrôle ADCS (L3) */
.controle-adcs .grille-ecarts { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.controle-adcs .grille-ecarts th, .controle-adcs .grille-ecarts td { padding: 4px 8px; border-bottom: 1px solid var(--border, #e2e8f0); text-align: left; }
.controle-adcs .valeur-fiche { color: var(--critical, #b91c1c); }
.controle-adcs .valeur-adcs { font-weight: 600; }
.controle-adcs .diagnostic-adcs pre { max-height: 240px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.controle-adcs .encart { margin-bottom: 8px; }

/* L2c — fiche stage : documents à régénérer et coches « vérifiée » */
.verifications-stage { margin-bottom: 10px; }
.verifications-stage .ligne-verification { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 3px 0; }
.verifications-stage .ligne-verification > b { min-width: 170px; }

/* L2d — fiche stage : pastilles des envois de fin de stage */
.pastille-envoi { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 4px; font-size: .75em;
    color: var(--good); border: 1px solid var(--good); cursor: help; }
.cellule-emargement.em-arme { border-color: var(--warning, #b7791f); color: var(--warning, #b7791f); }
.cellule-emargement.em-envoye { color: var(--accent); }

/* ===== Fiche élève : onglets Documents et Suivi (L2g) ===== */
.arbre-docs { margin: 4px 0 8px; }
.arbre-docs > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.arbre-docs-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0 3px 22px; border-bottom: 1px solid var(--line); }
.arbre-docs-ligne a { color: var(--accent-ink); text-decoration: none; }
.arbre-docs-ligne a:hover { text-decoration: underline; }
.suivi-modeles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.suivi-modele { border: 1px solid var(--line-fort); background: var(--surface); border-radius: var(--rayon-petit); padding: 4px 8px; cursor: pointer; font-size: 13px; }
.suivi-modele.actif { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.suivi-chrono { list-style: none; margin: 0; padding: 0; }
.suivi-chrono-ligne { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.suivi-chrono-icone { width: 24px; text-align: center; flex: none; }
.suivi-chrono-detail { color: var(--muted); white-space: pre-wrap; margin-top: 2px; }
.suivi-chrono-ligne.suivi-automatique b, .suivi-chrono-ligne.suivi-fiche b, .suivi-chrono-ligne.suivi-rgpd b { font-weight: 500; }

/* ===== Scan au téléphone (L3c) ===== */
.scan-telephone { margin: 6px 0 10px; }
.scan-telephone-qr { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: var(--rayon-petit); background: var(--surface); }
.scan-telephone-qr img { flex: none; background: #fff; padding: 6px; border-radius: 6px; }
.scan-telephone-qr p { margin: 0 0 6px; }

/* ===== Stages à surveiller (L3d) ===== */
.barre-filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 8px 0 12px; }
.grille-surveillance td { vertical-align: top; }
.grille-surveillance .valeur-alerte { color: var(--critical); font-weight: 700; }

/* L3f — dossiers ANTS à traiter */
.puces-filtre .separateur { display: inline-block; width: 14px; }
.ligne-attenuee td { opacity: .6; }
.lien-bouton { border: 0; background: transparent; color: var(--accent, #0664aa); text-decoration: underline; cursor: pointer; font-size: 12px; }

/* L4b — message du portail au secrétariat */
.es-message { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--bordure, #cbd5e1); border-radius: 8px; font: inherit; margin: 6px 0 10px; }
.portail-a-verifier { margin-bottom: 12px; }
.portail-stagiaire td { background: rgba(254, 202, 202, .35); }
.portail-animateur td { background: rgba(254, 215, 170, .35); }

/* --- L4c : évaluation de fin de stage (portail) et comptes rendus --- */
.es-progression { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.es-progression > span { display: block; height: 100%; background: var(--accent); }
.es-question { margin-bottom: 16px; }
.es-question-titre { font-weight: 700; margin-bottom: 8px; }
.es-options { display: flex; flex-wrap: wrap; gap: 6px; }
.es-option { border: 1px solid var(--line); border-radius: var(--rayon-petit); padding: 8px 10px; font-size: 14px; cursor: pointer; }
.es-option.petite { padding: 5px 8px; font-size: 13px; }
.es-option.choisie { border-color: var(--accent); background: var(--surface-2); font-weight: 700; }
.es-option input { margin-right: 4px; }
.es-grille-ligne { padding: 8px 0; border-top: 1px solid var(--line); }
.es-grille-ligne.manquante .es-grille-libelle { color: var(--critical); }
.es-grille-libelle { margin-bottom: 6px; font-size: 14px; }
.es-champ { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--line); border-radius: var(--rayon-petit); font: inherit; margin-top: 6px; }
.es-etoiles { display: flex; gap: 6px; }
.es-etoile { font-size: 38px; line-height: 1; border: none; background: none; cursor: pointer; color: var(--line); padding: 0 2px; }
.es-etoile.pleine { color: #f59e0b; }
.cr-entete { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin: 8px 0 12px; }
.cr-note { font-weight: 800; color: #b45309; }
.cr-question h4 { margin: 0 0 8px; }
.cr-case { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.cr-case-libelle { min-width: 220px; }
.cr-jauge { flex: 1; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.cr-jauge > span { display: block; height: 100%; background: var(--accent); }
.cr-case-nb { min-width: 90px; text-align: right; font-weight: 700; }
.cr-matrice-cadre { overflow-x: auto; }
.cr-matrice td.cr-cellule { text-align: center; white-space: nowrap; }
.cr-matrice td.cr-cellule.pleine { background: var(--surface-2); }
.cr-textes { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.cr-texte { font-style: italic; font-size: 13px; }

/* --- L4d : dossier d'un stagiaire en salle (espace animateur) --- */
.ea-formulaire { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ea-formulaire:disabled { opacity: .65; }

/* --- L4e : contrôle des signatures --- */
.grille-signatures td { text-align: center; vertical-align: middle; min-width: 84px; }
.grille-signatures td:first-child { text-align: left; }
.vignette-signature { max-width: 90px; max-height: 44px; display: block; margin: 0 auto; background: #fff; }
.sig-verdict { font-size: 11px; font-weight: 700; }
.grille-signatures td.sig-absente { background: var(--critical-soft); }
.grille-signatures td.sig-bloquante { background: var(--critical-soft); }
.grille-signatures td.sig-douteuse { background: #fff4d6; }
.grille-signatures td.sig-absent-pointe { background: var(--surface-2); }
.journal-valeur { max-width: 320px; overflow-wrap: anywhere; white-space: pre-wrap; }
/* Doublons et fusion d'élèves (L5e) */
.fusion-sens { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.fusion-fiche { flex: 1 1 280px; border: 1px solid var(--bordure, #d0d7de); border-radius: 8px; padding: 10px 12px; }
.fusion-fiche.conservee { border-color: var(--accent, #1d4ed8); border-width: 2px; }
.fusion-resume > div { font-size: 13.5px; margin-top: 2px; }
.ligne-choisie { background: var(--fond-choisi, rgba(29, 78, 216, .08)); }

/* Profils de droits (L5f) */
.grille-permissions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.grille-permissions fieldset { border: 1px solid var(--bordure, #d0d7de); border-radius: 6px; padding: 6px 10px; }
.grille-permissions legend { font-weight: 600; font-size: 13px; }
.grille-permissions label { display: block; font-size: 13px; margin: 2px 0; }
.table-droits td { padding: 2px 6px; font-size: 13px; }

/* Balance de fin d'exercice (L6d) */
.cartes-totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cartes-totaux .montant-total { font-size: 24px; font-weight: 700; margin: 4px 0; font-variant-numeric: tabular-nums; }
/* Rémunération des animateurs (L7a) : champs compacts dans le détail du mois. */
.champ-court { width: 9rem; min-width: 7rem; }
.ligne-detail td { font-size: 13px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Compte rendu du test psychotechnique (L11c, espace du psychologue)
   -------------------------------------------------------------------------- */
.cr-entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.cr-entete strong { font-size: 17px; margin-right: 8px; }
.cr-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-mini { color: var(--muted); font-size: 13px; }
.cr-lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.cr-etapes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.cr-etape {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--line-fort); background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer;
}
.cr-etape.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.cr-num {
    display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--surface-2); font-size: 12.5px; font-weight: 700;
}
.cr-etape.active .cr-num { background: var(--accent); color: #fff; }
.cr-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cr-fieldset[disabled] { opacity: .85; }
.cr-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 16px; }
.cr-champ {
    width: 100%; box-sizing: border-box; padding: 7px 9px; font: inherit; font-size: 14.5px;
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit); background: var(--surface); color: var(--ink);
}
.cr-champ:focus, .cr-texte:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.cr-champ-court { max-width: 220px; }
.cr-note { width: 72px; text-align: right; }
.cr-texte {
    width: 100%; box-sizing: border-box; padding: 10px; font: inherit; font-size: 14.5px; line-height: 1.5; resize: vertical;
    border: 1px solid var(--line-fort); border-radius: var(--rayon-petit); background: var(--surface); color: var(--ink);
}
.cr-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; margin: 6px 0; }
.cr-cases-ligne { grid-template-columns: 1fr; }
.cr-cases label, .cr-radios label, .cr-coche { display: inline-flex; gap: 8px; align-items: flex-start; }
.cr-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0; }
.cr-coche { margin: 12px 0; font-weight: 600; }
.cr-boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 12px 0; }
.cr-boutons-gauche { justify-content: flex-start; align-items: center; }
.cr-cgv {
    max-height: 260px; overflow-y: auto; white-space: pre-wrap; padding: 12px; font-size: 13.5px; line-height: 1.5;
    border: 1px solid var(--line); border-radius: var(--rayon-petit); background: var(--surface-2); color: var(--ink);
}
/* L11e : parcours du candidat sur son téléphone */
.cr-qr { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 8px 0; }
.cr-qr img { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: var(--rayon-petit); }
.cr-qr p { flex: 1; min-width: 200px; margin: 0; }
.cr-pieces { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; }
.cr-signature { max-height: 120px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--rayon-petit); padding: 4px; }
.cr-domaine { margin: 14px 0 6px; font-weight: 700; color: var(--accent-ink); }
.cr-tableau { overflow-x: auto; }
.cr-tableau table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cr-tableau th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.cr-tableau td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cr-tableau tr.cr-alerte td { background: var(--critical-soft); }
.cr-retirer { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 6px; }
.cr-retirer:hover { color: var(--critical); }
.cr-ajout { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.cr-ajout .cr-champ { flex: 1; min-width: 220px; width: auto; }
.cr-proposition { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-fort); border-radius: var(--rayon-petit); }
.cr-proposition h4 { margin: 0 0 6px; }
.cr-profil { max-width: min(480px, 100%); max-height: 320px; border: 1px solid var(--line); border-radius: var(--rayon-petit); background: #fff; }
.cr-fichier { display: inline-flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.cr-definition { margin-top: 8px; }
.cr-definition div { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }
.cr-outils-texte { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.cr-outils-texte .cr-champ { width: auto; max-width: 100%; }
.cr-mef {
    min-width: 34px; height: 34px; border: 1px solid var(--line-fort); border-radius: var(--rayon-petit);
    background: var(--surface); color: var(--ink); cursor: pointer; font: inherit;
}
.cr-apercu { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--rayon-petit); background: var(--surface-2); font-size: 14px; }
.cr-gras { font-weight: 700; }
.cr-souligne { text-decoration: underline; }
.cr-versions { margin: 0; padding-left: 18px; }
.cr-versions li { margin: 4px 0; }
.cr-lien { border: 0; background: none; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font: inherit; }
.cr-lien.active { font-weight: 700; }

/* Vérification publique d'un compte rendu de test psychotechnique (L11d) */
.va-grille { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0; }
.va-grille dt { font-weight: 600; color: var(--ink-2); }
.va-grille dd { margin: 0; }
.va-empreinte { display: block; word-break: break-all; font-size: 12.5px; padding: 8px; border-radius: var(--rayon-petit); background: var(--surface-2); }

/* L3u : concordance des demandes ANTS, lignes à traiter */
.table-compte tr.ligne-a-traiter td { background: var(--warning-soft); }

/* P19 : choix par boutons radio (Paramètres › Téléphonie 3CX) */
.choix-radio { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-size: 14.5px; cursor: pointer; }
.choix-radio input { margin-top: 3px; }

/* P26 (23/11/2026) : salle de l'animateur — état des pièces de chaque stagiaire, filtre et boutons actifs (comme l'ami). */
.ea-pieces { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.ea-puce-piece { font-size: 12px; padding: 2px 8px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); }
.ea-puce-piece.ok { background: var(--good-soft, #e7f6ee); color: #0a7a4b; }
.ea-puce-piece.manque { background: var(--warning-soft, #fdf1dc); color: #9a4a06; font-weight: 600; }
.ea-btn-code.actif { background: var(--accent); color: #fff; border-color: var(--accent); }
.ea-btn-code.confirmer { background: #b45309; color: #fff; border-color: #b45309; }
.ea-outils-grille { margin: 0 0 8px; }

/* P33 : validité d'une autorisation (fiche animateur, test psy) ; largeurs de champs adaptées à la donnée. */
.validite-ok { color: #157f3b; font-weight: 600; margin: 4px 0 0; }
.validite-ko { color: #b42318; font-weight: 600; margin: 4px 0 0; }
.champ.fa-court { max-width: 110px; flex: 0 0 auto; }
.champ.fa-moyen { max-width: 170px; flex: 0 0 auto; }
.fa-verif { display: flex; align-items: flex-end; gap: 6px; }
.fa-verif .champ { flex: 1 1 auto; }
/* P33 : noms de fichiers longs coupés avec « … » (onglet Documents de la fiche élève). */
.arbre-docs-ligne { align-items: center; flex-wrap: wrap; }
.arbre-docs-ligne .doc-nom { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.solde-compte.solde { color: var(--ink-2); background: var(--surface-2); }   /* P33 : compte soldé, en gris */
.table-compte tr.appel-manque td { color: #b42318; background: #fdf2f2; }   /* P33 : appel manqué */
.carte.portail-compact { padding-top: 6px; padding-bottom: 6px; }   /* P33 */
.carte.portail-compact h3 { font-size: 14px; }
.ligne-boutons-p37 { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ligne-boutons-p37.gauche { justify-content: flex-start; margin-top: 6px; }
