/* Crewvaluation (suivi des employés) : styles. Thème « Signal » (décisions 8 et 9 de docs/v3-plan.md), repris de
   marque/ui/tokens.css (kit graphique de Max). Les lots A à D n'emploient QUE ces variables, aucune couleur codée.

   Règles : le lime n'est JAMAIS une couleur de texte sur fond clair (seulement sur marine ou sur bleu, ou en fond
   sous un texte marine) ; tout texte rendu a un contraste de 4,5:1 au moins (essais : tests/test_theme.py et
   essais/essai_socle.mjs, qui mesure les paires réellement rendues). */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/polices/PlusJakartaSans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Marque (marque/ui/tokens.css) */
  --bleu: #1D45C8;            /* principal : actions, bandeau */
  --bleu-fonce: #1838A6;      /* survol du principal */
  --lime: #C8F560;            /* accent, TOUJOURS sur marine ou bleu (ou en fond sous du marine) */
  --marine: #0F1630;          /* texte, cartes foncées */
  --blanc: #FFFFFF;
  --fond: #F4F6FC;            /* fond de la page */
  --surface: #FFFFFF;         /* cartes */
  --surface-douce: #F5F7FC;   /* cartes internes (tokens : --surface) */
  --bordure: #DCE2EE;
  --texte: var(--marine);
  --texte-2: #56607F;         /* texte secondaire */
  --texte-sur-bleu: #FFFFFF;
  --texte-sur-bleu-2: #E3E9FF; /* liens du menu, sous-titres sur le bandeau */
  --bleu-pale: #E3E9FF;
  --danger: #B3261E;
  --danger-pale: #FBE9E7;
  /* Échelle 1 à 5 : dégradé de bleus, le 5 en marine avec texte lime */
  --note-1: #E3E9FF;  --note-1-texte: #0F1630;
  --note-2: #C9D4FF;  --note-2-texte: #0F1630;
  --note-3: #8EA3FF;  --note-3-texte: #0F1630;
  --note-4: #3E5DE0;  --note-4-texte: #FFFFFF;
  --note-5: #0F1630;  --note-5-texte: #C8F560;
  /* Formes */
  --rayon-pastille: 999px;
  --rayon-carte: 20px;
  --rayon: 12px;
  --rayon-petit: 8px;
  --ombre: 0 6px 24px rgb(15 22 48 / 0.10);
  --hauteur-bouton: 46px;
  --police: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.45;
  color: var(--texte);
  background: var(--fond);
}

h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.5px; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 750; }
h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-2); }
a { color: var(--bleu); }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
.entete :focus-visible, .bande :focus-visible, .ecran-connexion > :focus-visible { outline-color: var(--lime); }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----- Entête (bleu) ----- */

.entete { padding: 14px 24px 10px; background: var(--bleu); color: var(--texte-sur-bleu); }
.entete-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; max-width: 1152px; margin: 0 auto; }
.entete-haut > .espace { flex: 1 1 auto; }
.marque { display: inline-flex; align-items: center; border-radius: var(--rayon-petit); text-decoration: none; }
/* Logo (logo-inverse.svg = reverse.svg du kit, 622 x 140, fond bleu et marge intérieure de 20 unités) : le symbole
   occupe environ les 2/3 de la hauteur de l'image. 72 px = symbole d'environ 48 px ; les marges négatives retirent la
   marge intérieure du SVG (invisible sur le bandeau bleu) pour aligner le symbole à gauche sans grandir la barre. */
.marque-logo { display: block; width: auto; height: 72px; margin: -12px 0 -12px -14px; }
.compte { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.compte-nom { font-weight: 700; color: var(--texte-sur-bleu); }
.etiquette.etiquette-rang {
  margin: 0; padding: 4px 12px; border-radius: var(--rayon-pastille);
  background: rgb(255 255 255 / 0.16); color: var(--texte-sur-bleu);
}

.menu { max-width: 1152px; margin: 10px auto 0; }
.menu-rangee { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-lien {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border: 0; border-radius: var(--rayon-pastille); background: transparent;
  color: var(--texte-sur-bleu-2); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.menu-lien:hover { background: rgb(255 255 255 / 0.14); color: var(--texte-sur-bleu); }
.menu-lien[aria-current="page"], .menu-groupe-actif { background: var(--blanc); color: var(--bleu); font-weight: 750; }
.menu-groupe-actif:hover { background: var(--blanc); color: var(--bleu); }
/* « Administration » : bouton qui ouvre la deuxième rangée ; chevron dessiné en CSS (aucune image, aucun émoji). */
.menu-chevron {
  width: 8px; height: 8px; margin: -3px 2px 0 2px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform 0.15s;
}
.menu-groupe[aria-expanded="true"] .menu-chevron { margin-top: 3px; transform: rotate(-135deg); }
/* Deuxième rangée : pastilles bordées, plus discrètes que le menu principal, sous un filet. */
.menu-sous {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / 0.22);
}
.menu-sous[hidden] { display: none; }
.menu-sous .menu-lien { min-height: 40px; padding: 6px 14px; border: 1.5px solid rgb(255 255 255 / 0.4); font-size: 15px; }
.menu-sous .menu-lien[aria-current="page"] { border-color: var(--blanc); }
.compteur-menu {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: var(--rayon-pastille); background: var(--lime); color: var(--marine);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}

.bascule-langue { display: inline-flex; border: 1.5px solid rgb(255 255 255 / 0.55); border-radius: var(--rayon-pastille); overflow: hidden; }
.bascule-option {
  min-width: 46px; min-height: 40px; padding: 6px 12px; border: 0; background: transparent; color: var(--texte-sur-bleu);
  font: inherit; font-weight: 700; cursor: pointer;
}
.bascule-option[aria-pressed="true"] { background: var(--blanc); color: var(--bleu); }
.bascule-option:focus-visible { outline-offset: -3px; }

/* Menu « Compte » : au-dessus de 600 px, bouton caché et panneau en ligne (rien ne change) ; la copie de la bascule
   de langue placée dans le panneau ne sert qu'au téléphone. */
.compte-bouton { display: none; }
.compte-panneau { display: contents; }
.bascule-langue.bascule-langue-menu { display: none; }
.compte-initiale {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: var(--rayon-pastille); background: var(--lime); color: var(--marine); font-weight: 800; font-size: 16px;
}
.compte-bouton[aria-expanded="true"] .menu-chevron { margin-top: 3px; transform: rotate(-135deg); }
.message-info {
  margin: -4px 0 12px; padding: 10px 14px; border-radius: var(--rayon-petit);
  background: var(--bleu-pale); color: var(--marine); font-weight: 650;
}

/* ----- Mise en page : bandeau bleu (titre de la page) et corps qui le chevauche ----- */

.contenu { padding: 0 0 56px; }
.page { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bande { background: var(--bleu); color: var(--texte-sur-bleu); padding: 18px 0 70px; }
.bande:empty, .bande-interieur:empty { padding: 0; }
.page-corps { margin-top: -46px; position: relative; }
.vue:has(> .bande > .bande-interieur:empty) > .bande { padding: 0 0 8px; }
.vue:has(> .bande > .bande-interieur:empty) > .page-corps { margin-top: 24px; }
.page-corps > :first-child { margin-top: 0; }

.bande h1 { color: var(--texte-sur-bleu); }
.bande .sous-titre { color: var(--texte-sur-bleu-2); }
.bande a:not(.bouton) { color: var(--texte-sur-bleu-2); }
.lien-retour { display: inline-block; margin-bottom: 14px; font-weight: 650; text-decoration: none; }
.lien-retour:hover { text-decoration: underline; }

.barre-titre { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.sous-titre { margin-top: 6px; color: var(--texte-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.notes-employe { margin-top: 16px; max-width: 80ch; color: var(--texte-2); white-space: pre-wrap; }

.carte {
  margin-top: 18px; padding: 20px 22px;
  background: var(--surface); border-radius: var(--rayon-carte); box-shadow: var(--ombre);
}
.carte > h2 { margin-bottom: 12px; }
.carte-aide { margin: -4px 0 12px; color: var(--texte-2); font-size: 14px; }

.etat-vide { margin-top: 18px; padding: 32px 20px; text-align: center; color: var(--texte-2);
  background: var(--surface); border: 1.5px dashed var(--bordure); border-radius: var(--rayon-carte); }
.chargement { margin-top: 0; padding: 18px 22px; color: var(--texte-2); background: var(--surface); border-radius: var(--rayon-carte); }
.message-erreur { color: var(--danger); font-weight: 650; }
.bloc-erreur { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ----- Boutons (46 px de haut au moins) et champs ----- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--hauteur-bouton); padding: 0 20px;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon-pastille);
  background: var(--surface); color: var(--texte);
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.bouton:hover { border-color: var(--bleu); }
.bouton:disabled { opacity: 0.6; cursor: default; }
.bouton-principal { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.bouton-principal:hover:not(:disabled) { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.bouton-danger { color: var(--danger); }
.bouton-danger:hover { border-color: var(--danger); background: var(--danger-pale); }
.bouton-petit { padding: 0 14px; font-size: 14px; }

/* Sur le bandeau bleu : contour blanc ; l'action principale en lime (texte marine). */
.bande .bouton, .entete .bouton { background: transparent; border-color: rgb(255 255 255 / 0.6); color: var(--texte-sur-bleu); }
.bande .bouton:hover, .entete .bouton:hover { background: rgb(255 255 255 / 0.12); border-color: var(--blanc); }
.bande .bouton-principal { background: var(--lime); border-color: var(--lime); color: var(--marine); font-weight: 800; }
.bande .bouton-principal:hover:not(:disabled) { background: var(--blanc); border-color: var(--blanc); color: var(--marine); }
.bande .bouton-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--blanc); }

.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ > label { font-size: 13px; font-weight: 700; color: var(--texte-2); }
.champ-texte {
  width: 100%; min-height: var(--hauteur-bouton); padding: 9px 14px;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon);
  background: var(--surface); color: var(--texte); font: inherit;
}
textarea.champ-texte { resize: vertical; line-height: 1.4; }
.champ-texte:focus-visible { outline-offset: 0; border-color: var(--bleu); }
.champ-invalide { border-color: var(--danger); }
.champ-aide { font-size: 13px; color: var(--texte-2); }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; }
.champ-large { grid-column: 1 / -1; }

.filtres { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.filtres > .champ { flex: 1 1 220px; max-width: 360px; }
.champs-colonne { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.actions-formulaire { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.page-etroite { max-width: 460px; margin: 24px auto 0; }
.page-etroite .message-erreur { margin-top: 12px; }
.page-etroite h1 { margin-bottom: 12px; font-size: 28px; }
.page-etroite h1 + .slogan { margin: -6px 0 12px; font-weight: 700; color: var(--bleu); }
.champ-libelle { font-size: 13px; font-weight: 700; color: var(--texte-2); }
.identifiant { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; }

.cases { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.cases > legend { margin-bottom: 4px; padding: 0; font-size: 13px; font-weight: 700; color: var(--texte-2); }
.case { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.case input { width: 18px; height: 18px; margin: 0; accent-color: var(--bleu); }

.bandeau {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 18px; padding: 14px 18px;
  background: var(--bleu-pale); color: var(--marine); border-left: 5px solid var(--bleu); border-radius: var(--rayon);
}
.bandeau-archive { background: var(--marine); color: var(--blanc); border-left-color: var(--lime); }
.bandeau-texte { display: flex; flex-direction: column; gap: 2px; }
.bandeau-titre { font-weight: 750; }

/* Évaluation en lecture seule : champs désactivés mais lisibles. */
.fieldset-nu { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.fieldset-nu .champ-texte:disabled { opacity: 1; color: var(--texte); -webkit-text-fill-color: var(--texte); background: var(--surface-douce); }
.fieldset-nu .note-option input { cursor: default; }
.fieldset-nu .note-option:hover span { border-color: var(--bordure); }

.ligne-copie { display: flex; gap: 8px; margin-top: 14px; }
.mot-de-passe-temporaire { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-size: 20px; letter-spacing: 0.08em; }

/* ----- Écran de connexion : fond bleu du kit, carte blanche ----- */

.ecran-connexion {
  min-height: calc(100vh - 64px); padding: 32px 16px 48px;
  background: var(--bleu) url("/fond-connexion.svg") center / cover no-repeat;
}
/* Finition (lot C) : la zone bleue remplit l'écran sous l'entête, sans défilement, et la carte y est centrée
   verticalement (plus de grand vide bleu sous la carte au téléphone). */
body:has(.ecran-connexion) { display: flex; flex-direction: column; min-height: 100svh; }
body:has(.ecran-connexion) > .contenu { display: flex; flex-direction: column; flex: 1 0 auto; }
.contenu > .ecran-connexion {
  display: flex; flex-direction: column; justify-content: center; flex: 1 0 auto; min-height: 0; padding: 24px 16px;
}
.contenu > .ecran-connexion > * { width: 100%; margin-top: 0; margin-bottom: 0; }
.contenu:has(> .ecran-connexion) { padding-bottom: 0; }
.ecran-connexion > .carte, .ecran-connexion > section > .carte { margin-top: 0; }
.ecran-connexion .lien-retour { color: var(--texte-sur-bleu-2); }

/* ----- Tableaux ----- */

.defilement-horizontal { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th, .tableau td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--bordure); }
.tableau thead th { font-size: 12px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--texte-2); white-space: nowrap; vertical-align: bottom; }
.tableau tbody tr:last-child > * { border-bottom: 0; }
.tableau tbody th { font-weight: 650; }
.tableau .numerique { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau .cellule-actions { white-space: nowrap; text-align: right; }
.tableau .cellule-actions > * + * { margin-left: 6px; }
.tableau .cellule-secondaire { color: var(--texte-2); }
.ligne-categorie th { padding-top: 16px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--texte-2); background: transparent; }
.lien-nom { font-weight: 700; text-decoration: none; }
.lien-nom:hover { text-decoration: underline; }

/* Largeurs minimales : sur un petit écran, le tableau défile au lieu de s'écraser. */
.tableau-employes { min-width: 760px; }
.tableau-comptes { min-width: 720px; }
.tableau-equipes { min-width: 520px; }
.tableau-demandes { min-width: 680px; }
.tableau .cellule-motif { max-width: 36ch; white-space: pre-wrap; }
.tableau .ligne-inactive > * { color: var(--texte-2); }
.tableau-criteres { min-width: 700px; }
.tableau-criteres tbody th { min-width: 240px; }
.tableau-historique { min-width: 780px; }
.tableau-historique tbody th { white-space: nowrap; }

.etiquette {
  display: inline-block; margin: 2px 0 0 8px; padding: 2px 10px; border-radius: var(--rayon-pastille);
  background: var(--bleu-pale); color: var(--marine); font-size: 12px; font-weight: 700; vertical-align: middle;
}
.etiquette-archive { background: var(--lime); color: var(--marine); }

/* ----- Fiche de l'employé ----- */

.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tuile { padding: 18px 20px; background: var(--surface); border-radius: var(--rayon-carte); box-shadow: var(--ombre); }
.tuile-libelle { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.tuile-valeur { margin-top: 4px; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tuile-echelle { font-size: 15px; font-weight: 600; color: var(--texte-2); }

.tableau-progression { min-width: 900px; }
.tableau-progression .colonne-type { white-space: nowrap; font-weight: 700; }
.tableau-progression .portee { font-weight: 650; }
.tableau-progression .note-qualification { margin-top: 2px; font-size: 13px; color: var(--texte-2); }
.cellule-progression { min-width: 112px; text-align: center !important; }
.cellule-faite { background: var(--bleu-pale); }
.cellule-faite .cellule-detail { color: var(--marine); }
.cellule-moyenne { display: block; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cellule-detail { display: block; font-size: 12px; color: var(--texte-2); white-space: nowrap; }
.cellule-vide { color: var(--texte-2); }

.moyenne-avec-barre { display: inline-flex; align-items: center; gap: 8px; }
.barre { display: inline-block; width: 64px; height: 8px; border-radius: var(--rayon-pastille); background: var(--bleu-pale); overflow: hidden; }
.barre-remplissage { display: block; height: 100%; background: var(--bleu); }

.evolution { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.evolution-note {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 5px;
  border: 1px solid var(--bordure); border-radius: var(--rayon-pastille); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.evolution-note:last-child { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }

/* ----- Formulaire d'évaluation : grille ----- */

.critere { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 20px; padding: 16px 0; border-top: 1px solid var(--bordure); }
.critere:focus-visible { outline-offset: 4px; border-radius: var(--rayon-petit); }
.critere-nom { font-size: 15px; font-weight: 750; display: inline; }
.critere-description { margin-top: 4px; font-size: 14px; color: var(--texte-2); max-width: 70ch; }

.note-groupe { display: flex; flex-wrap: wrap; gap: 6px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.note-option { position: relative; display: inline-flex; }
.note-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.note-option span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 8px;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon-pastille);
  background: var(--surface); color: var(--marine); font-weight: 750; font-variant-numeric: tabular-nums;
}
.note-option:hover span { border-color: var(--bleu); }
.note-option-1 input:checked + span { background: var(--note-1); border-color: var(--bleu); color: var(--note-1-texte); }
.note-option-2 input:checked + span { background: var(--note-2); border-color: var(--note-2); color: var(--note-2-texte); }
.note-option-3 input:checked + span { background: var(--note-3); border-color: var(--note-3); color: var(--note-3-texte); }
.note-option-4 input:checked + span { background: var(--note-4); border-color: var(--note-4); color: var(--note-4-texte); }
.note-option-5 input:checked + span { background: var(--note-5); border-color: var(--note-5); color: var(--note-5-texte); }
.note-option-vide span { font-size: 13px; color: var(--texte-2); }
.note-option-vide input:checked + span { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
.note-option-aucune input:checked + span { background: var(--bordure); border-color: var(--bordure); color: var(--marine); }
.note-option input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }

@media (min-width: 960px) {
  .critere { grid-template-columns: minmax(0, 1.2fr) auto minmax(220px, 1fr); align-items: start; }
}

.barre-enregistrement {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 20px; padding: 12px 20px;
  background: var(--surface); border-radius: var(--rayon-carte) var(--rayon-carte) 0 0;
  box-shadow: 0 -6px 18px rgb(15 22 48 / 0.10);
}
.barre-enregistrement .compteur { font-weight: 700; font-variant-numeric: tabular-nums; }
.barre-enregistrement .espace { flex: 1 1 auto; }
.barre-enregistrement .message-erreur { flex: 1 1 100%; }

/* ----- Dialogues et avis ----- */

.dialogue {
  width: min(500px, calc(100vw - 32px)); padding: 22px 24px;
  border: 0; border-radius: var(--rayon-carte);
  background: var(--surface); color: var(--texte); box-shadow: var(--ombre);
}
.dialogue::backdrop { background: rgb(15 22 48 / 0.55); }
.dialogue h2 { margin-bottom: 14px; }
.dialogue-formulaire { display: flex; flex-direction: column; gap: 12px; }
.dialogue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* En bas au centre de l'écran (finition du lot C : plus au milieu des tableaux). Sur une évaluation, afficherAvis
   le pose juste au-dessus de la barre d'enregistrement : il ne recouvre aucun bouton d'action. */
.avis {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.avis-message {
  padding: 12px 18px; border-radius: var(--rayon-pastille);
  background: var(--marine); color: var(--blanc); font-weight: 700; box-shadow: 0 6px 18px rgb(15 22 48 / 0.25);
}
.avis-erreur { background: var(--danger); color: var(--blanc); }

@media (max-width: 600px) {
  .entete { padding: 10px 16px 8px; }
  .marque-logo { height: 56px; margin: -10px 0 -10px -11px; } /* symbole d'environ 37 px */
  /* Téléphone : logo et bouton « Compte » (initiale) sur une seule ligne ; nom, rang, mot de passe, déconnexion et
     langue dans un petit menu sous le bouton. Sans session : logo et langue. */
  .entete-haut > .compte { position: relative; }
  .entete-haut.avec-compte > .bascule-langue { display: none; }
  .compte-bouton {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px;
    border: 1.5px solid rgb(255 255 255 / 0.55); border-radius: var(--rayon-pastille); background: transparent;
    color: var(--texte-sur-bleu); font: inherit; font-weight: 700; cursor: pointer;
  }
  .compte-bouton:hover, .compte-bouton[aria-expanded="true"] { background: rgb(255 255 255 / 0.14); border-color: var(--blanc); }
  .compte-panneau { display: none; }
  .compte-ouvert .compte-panneau {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: min(280px, calc(100vw - 32px));
    padding: 14px; border-radius: var(--rayon); background: var(--marine); box-shadow: 0 10px 30px rgb(15 22 48 / 0.35);
  }
  .compte-panneau .compte-nom { overflow-wrap: anywhere; }
  .compte-panneau .etiquette-rang { align-self: flex-start; }
  .compte-panneau .bouton { white-space: normal; text-align: center; }
  .compte-ouvert .compte-panneau .bascule-langue-menu { display: inline-flex; align-self: flex-start; }
  /* Menu au téléphone : le menu principal tient sur deux lignes ; la rangée « Administration » défile de côté (sans
     barre visible), la page courante ramenée à l'écran par montrerOngletCourant (app.js). */
  .menu-rangee { gap: 4px; }
  .menu-lien { padding: 8px 12px; font-size: 15px; }
  .menu-sous { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .menu-sous::-webkit-scrollbar { display: none; }
  .menu-sous .menu-lien { flex: 0 0 auto; padding: 6px 12px; font-size: 14px; }
  .page { padding: 0 16px; }
  .bande { padding: 14px 0 62px; }
  .page-etroite { margin-top: 8px; }
  h1 { font-size: 24px; }
  .carte { padding: 16px 14px; }
  .tuile-valeur { font-size: 21px; }
  .tuiles { gap: 10px; }
  .tuile { padding: 14px 14px; }
  .note-option span { min-width: 40px; height: 40px; }
  .barre-enregistrement { padding: 10px 14px; }
  .barre-enregistrement .compteur { flex: 1 1 100%; font-size: 14px; }
  .barre-enregistrement .espace { display: none; }
  .barre-enregistrement .bouton { flex: 1 1 0; }
}

/* =====================================================================================================================
   Lot B (A1, A3 à A7, A9, B6) : liste triable, rapports, fiche imprimable, graphique. Écran seulement ; l'impression
   est dans impression.css. Variables du thème Signal uniquement. (Le plan ne donne au lot B aucune feuille d'écran :
   ce bloc est le seul ajout du lot B à style.css.)
   ===================================================================================================================== */

.seulement-impression { display: none; }
/* Un texte « visuellement caché » (position absolue) dans un tableau qui défile reste DANS la boîte de défilement. */
.defilement-horizontal { position: relative; }
.espace { flex: 1 1 auto; }
.n { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barre-carte { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; }
.barre-carte h2 { margin-bottom: 0; }
.etat-vide-interne { margin-top: 4px; padding: 20px; border-radius: var(--rayon); }

/* Pastilles de l'échelle : dégradé de bleus, le 5 en marine avec texte lime. */
.pastille-note {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 28px; padding: 0 9px;
  border-radius: var(--rayon-pastille); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.note-1 { background: var(--note-1); color: var(--note-1-texte); box-shadow: inset 0 0 0 1px var(--note-2); }
.note-2 { background: var(--note-2); color: var(--note-2-texte); }
.note-3 { background: var(--note-3); color: var(--note-3-texte); }
.note-4 { background: var(--note-4); color: var(--note-4-texte); }
.note-5 { background: var(--note-5); color: var(--note-5-texte); }
.pastille-vide { background: var(--surface-douce); color: var(--texte-2); }
.pastille-statut {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1.5px dashed var(--bordure);
  border-radius: var(--rayon-pastille); color: var(--texte-2); font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* Étiquettes de suivi */
.etiquette-retard { background: var(--danger-pale); color: var(--danger); }
.etiquette-a-jour { background: var(--bleu-pale); color: var(--marine); }
.cellule-retard .date-echeance, .tableau-retards .cellule-retard { color: var(--danger); font-weight: 750; }
.cellule-retard .etiquette-retard { margin-left: 6px; }

/* ----- A9 : liste triable ----- */
.tableau-employes.tableau-triable { min-width: 1040px; }
.tableau-triable thead th { padding-top: 6px; padding-bottom: 6px; }
/* Intégration v3 : à l'ordinateur, les en-têtes longs passent sur deux lignes pour que les 11 colonnes tiennent à
   1280 px sans défilement ; au téléphone, le tableau défile (nom collant). */
@media (min-width: 601px) {
  .tableau-triable thead th, .tableau-triable .bouton-tri { white-space: normal; }
  .tableau-triable .bouton-tri { text-align: left; }
  .tableau-triable .numerique .bouton-tri { text-align: right; }
}
.cellule-date, .date-echeance { white-space: nowrap; }
/* Nom collant : il reste visible quand le tableau défile (téléphone). */
.tableau-triable tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--bordure); }
@media (max-width: 600px) { .tableau-triable tbody th { min-width: 140px; max-width: 160px; } }
.bouton-tri {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0 -8px; padding: 4px 8px;
  border: 0; border-radius: var(--rayon-petit); background: transparent; color: inherit;
  font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap;
}
.bouton-tri:hover { background: var(--surface-douce); color: var(--marine); }
.bouton-tri-actif { color: var(--bleu); }
.numerique .bouton-tri { flex-direction: row-reverse; }
.fleche-tri { font-size: 10px; opacity: 0.75; }
.bouton-tri-actif .fleche-tri { opacity: 1; }
.cases-filtres { flex: 1 1 220px; }
.cases-filtres .case { min-height: 34px; }
.resume-liste { margin: 14px 4px 0; font-size: 14px; font-weight: 650; color: var(--texte-2); }
.resume-retard { color: var(--danger); }

/* Analyse, comparaison et fiche imprimable : chaque ligne porte des pastilles ; le nom du critère est centré verticalement sur elles
   (intégration v3 : il restait collé en haut de la ligne). */
.tableau-analyse tbody td, .tableau-analyse tbody th, .tableau-comparaison tbody td, .tableau-comparaison tbody th,
.tableau-fiche-imprimable tbody td, .tableau-fiche-imprimable tbody th { vertical-align: middle; }

/* ----- Onglets en pastilles sur le bandeau bleu (Rapports, Formations à venir, Paramètres) : UNE définition pour
   toute l'application (intégration v3 : les lots B et D avaient chacun la leur) ----- */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.onglet {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px;
  border: 1.5px solid rgb(255 255 255 / 0.45); border-radius: var(--rayon-pastille);
  color: var(--texte-sur-bleu); font-weight: 650; text-decoration: none; white-space: nowrap;
}
.bande a.onglet { color: var(--texte-sur-bleu); }
.onglet:hover { background: rgb(255 255 255 / 0.14); border-color: var(--blanc); }
.bande a.onglet[aria-current="page"] { background: var(--blanc); border-color: var(--blanc); color: var(--bleu); font-weight: 750; }
/* Onglets de la fiche de l'employé (Évaluations, Formations, Compétences) : vrais onglets ARIA (boutons), même pastille ;
   au téléphone, ils se partagent la largeur (et passent à la ligne s'il le faut, jamais de défilement de la page). */
button.onglet { background: transparent; font: inherit; font-weight: 650; cursor: pointer; }
.bande .onglet[role="tab"][aria-selected="true"] { background: var(--blanc); border-color: var(--blanc); color: var(--bleu); font-weight: 750; }
@media screen { .panneau-fiche > :first-child { margin-top: 0; } }
@media (max-width: 600px) {
  .onglets-fiche { gap: 6px; }
  .onglets-fiche .onglet { flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 8px 10px; font-size: 14px; }
}
.champs-filtres { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.actions-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.zone-resultats[aria-busy="true"] { opacity: 0.55; transition: opacity 0.15s; }
.zone-resultats > .tuiles { margin-top: 18px; }
.tuiles + .bandeau { margin-top: 14px; }

/* Analyse (A7) */
.tableau-analyse { min-width: 720px; }
.tableau-analyse tbody th { min-width: 220px; }
.cellule-moyenne-n { white-space: nowrap; }
.cellule-repartition { width: 34%; min-width: 200px; }
.barre-repartition { display: flex; height: 22px; overflow: hidden; border-radius: var(--rayon-pastille); background: var(--surface-douce); }
.segment {
  display: flex; align-items: center; justify-content: center; min-width: 4px; height: 100%;
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: none;
}
.segment + .segment { border-left: 2px solid var(--surface); }
.legende-compacte { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 650; color: var(--texte-2); }
.legende-compacte li { display: inline-flex; align-items: center; gap: 6px; }
.legende-compacte .pastille-note { min-width: 24px; height: 22px; padding: 0 6px; font-size: 12px; }
.liste-forces { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.liste-forces li { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 12px 6px 6px; border-radius: var(--rayon); background: var(--surface-douce); }
.liste-forces .forces-nom { flex: 1 1 auto; font-weight: 700; min-width: 0; }
.liste-forces .n { margin-left: 0; }

/* Comparaison (A6) */
.tableau-comparaison .entete-employe { min-width: 130px; text-align: center; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--marine); white-space: normal; }
.tableau-comparaison .entete-employe .etiquette { margin-left: 4px; }
.entete-detail { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--texte-2); }
.cellule-comparaison { text-align: center !important; white-space: nowrap; }
.cellule-comparaison .n { display: block; margin: 3px 0 0; }
.ligne-resume > * { background: var(--surface-douce); }
/* Colonne des critères collante : le libellé reste visible quand le tableau défile (téléphone). */
.tableau-comparaison tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--bordure); }
.tableau-comparaison .ligne-resume > :first-child { background: var(--surface-douce); }
.tableau-comparaison .ligne-categorie > :first-child { position: static; box-shadow: none; }
@media (max-width: 600px) { .tableau-comparaison tbody th { min-width: 150px; max-width: 170px; } }
.ligne-resume th { font-weight: 750; }
.liste-choix {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 12px;
  max-height: 340px; overflow-y: auto; margin: 14px 0 0; padding: 4px; list-style: none;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon);
}
.choix { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: var(--rayon-petit); }
.choix:hover { background: var(--surface-douce); }
.choix input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--bleu); }
.choix label { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; cursor: pointer; }
.choix-nom { font-weight: 700; }
.choix-detail { flex-basis: 100%; font-size: 13px; color: var(--texte-2); }
.choix .etiquette { margin: 0; }
.choix-limite label { cursor: default; }
.compteur-selection { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Échéances (B6) */
.tableau-retards { min-width: 760px; }
.carte-echeance .echeance-valeur { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.echeance-date { font-size: 28px; font-weight: 800; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.carte-echeance .etiquette { margin: 0; font-size: 13px; padding: 4px 12px; }
.echeance-detail { margin-top: 6px; color: var(--texte-2); }
.carte-echeance-retard { box-shadow: var(--ombre), inset 5px 0 0 var(--danger); }
.carte-echeance-retard .echeance-date { color: var(--danger); }

/* Forces et points (A3) */
.grille-forces { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 24px; }
.bloc-forces h3 { margin-bottom: 10px; }
.bloc-forces h3::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.bloc-forts h3::before { background: var(--note-5); box-shadow: inset 0 0 0 3px var(--lime); }
.bloc-faibles h3::before { background: var(--surface); box-shadow: inset 0 0 0 2px var(--note-4); }
.aide-limite { color: var(--marine); }
.carte-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.carte-outils h2 { margin-bottom: 4px; }
.carte-outils .carte-aide { margin: 0; max-width: 70ch; }

/* ----- A1 : fiche imprimable d'une évaluation (à l'écran) ----- */
.liste-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 0; }
.liste-infos .info { min-width: 0; }
.liste-infos dt { font-size: 12px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texte-2); }
.liste-infos dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.tableau-fiche-imprimable { min-width: 620px; }
.tableau-fiche-imprimable tbody th { width: 40%; }
.tableau-fiche-imprimable .cellule-note { width: 120px; }
.cellule-commentaire, .texte-long { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-bas { margin: 12px 4px 0; font-size: 14px; color: var(--texte-2); }
.legende-echelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.legende-echelle li { display: flex; align-items: flex-start; gap: 10px; }
.legende-echelle .pastille-note { min-width: 32px; }
.legende-texte { display: flex; flex-direction: column; }
.legende-libelle { font-weight: 750; }
.legende-description { font-size: 13px; color: var(--texte-2); }

/* ----- A5 : graphique de progression (carte foncée : le lime y est permis) ----- */
.carte-graphique { background: var(--marine); color: var(--blanc); }
.carte-graphique h2 { color: var(--blanc); }
.carte-graphique .graphique-aide { margin-top: 4px; font-size: 14px; color: var(--texte-sur-bleu-2); max-width: 64ch; }
.carte-graphique .champ > label { color: var(--texte-sur-bleu-2); }
.carte-graphique :focus-visible { outline-color: var(--lime); }
.graphique-choix { min-width: min(320px, 100%); }
.graphique-zone { margin-top: 6px; min-height: 120px; }
.graphique-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--police); }
.graphique-svg .ligne-grille { stroke: var(--texte-sur-bleu-2); stroke-opacity: 0.16; stroke-width: 1; }
.graphique-svg .axe { stroke: var(--texte-sur-bleu-2); stroke-opacity: 0.55; stroke-width: 1; }
.graphique-svg .graduation { fill: var(--texte-sur-bleu-2); font-size: 12px; font-weight: 700; }
.graphique-svg .etiquette-date { fill: var(--texte-sur-bleu-2); font-size: 11px; font-weight: 600; }
.graphique-svg .badge-type-fond { fill: var(--bleu); }
.graphique-svg .badge-type-texte { fill: var(--blanc); font-size: 11px; font-weight: 800; }
.serie-ligne { stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.serie-point { stroke: var(--marine); stroke-width: 1.5; }
.serie-globale .serie-ligne, .serie-critere .serie-ligne { stroke: var(--lime); stroke-width: 3.5; }
.serie-globale .serie-point, .serie-critere .serie-point { fill: var(--lime); }
.serie-technique .serie-ligne { stroke: var(--blanc); }
.serie-technique .serie-point { fill: var(--blanc); }
.serie-comportemental .serie-ligne { stroke: var(--note-3); stroke-dasharray: 7 5; }
.serie-comportemental .serie-point { fill: var(--note-3); }
.graphique-legende { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; font-weight: 700; color: var(--blanc); }
.graphique-legende li { display: inline-flex; align-items: center; gap: 8px; }
.echantillon { display: block; overflow: visible; }
.graphique-vide { padding: 24px 0; color: var(--texte-sur-bleu-2); }

@media (max-width: 600px) {
  .echeance-date { font-size: 22px; }
  .onglets { gap: 6px; margin-top: 14px; }
  .onglet { min-height: 40px; padding: 6px 13px; font-size: 14px; }
  .liste-choix { grid-template-columns: 1fr; max-height: 300px; }
  .carte-outils .actions, .carte-outils .actions .bouton { width: 100%; }
}
