/* ============================================================
   app.css — écrans de Planif. Repris du prototype validé (planif-2026-11-08/prototype/it-1/src/style.css)
   et appuyé sur tokens.css : aucune couleur ni mesure en dur hors des jetons, sauf les tracés fins.
   Organisation : bandeau, en-tête, gabarit (menu, principal, panneau), barre de période, filtres et
   légende, grille, cases, pastilles, bandes, panneau de détail, messages, écrans de contenu,
   connexion, puis les deux paliers de largeur (tiroir sous 1 280 px, téléphone sous 768 px).
   La partie 2 ajoute ses écrans dans la section « Écrans de contenu » (classes .bloc, .liste,
   .tableau, .chiffres, .carte-jour… déjà présentes) sans toucher au reste.
   ============================================================ */
/* ==== Base ==== */
::selection { background: var(--accent-fond); color: var(--texte); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--accent-encre); text-underline-offset: 3px; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.ic-sm { width: 16px; height: 16px; }
svg.ic-xs { width: 13px; height: 13px; stroke-width: 2; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: var(--sp-2); top: -80px; min-height: 44px; display: inline-flex; align-items: center; z-index: var(--z-toast); padding: var(--sp-2) var(--sp-3); background: var(--surface); border-radius: var(--rayon-sm); }
.evitement:focus { top: var(--sp-2); }
kbd { font-family: var(--police-ui); font-size: var(--texte-xs); padding: 0 var(--sp-15); border: 1px solid var(--trait); border-bottom-width: 2px; border-radius: var(--rayon-xs); background: var(--surface); color: var(--texte-2); }

/* ==== Démonstration (décision du dirigeant du 22/11/2026 : plus de bande au-dessus de l'en-tête) ==== */
/* Mention « Données fictives », sélecteur « Changer de rôle » et « Signaler » tiennent dans l'en-tête (56 px) ;
   au téléphone, les deux derniers passent dans la feuille du menu. La connexion garde sa mention, dans la boîte. */
.mention-fictive { display: inline-flex; align-items: center; flex: none; min-height: 24px; padding: 0 var(--sp-2); border-radius: var(--rayon-xs);
  background: var(--surface-2); border: 1px solid var(--filet); color: var(--texte-2); font-size: var(--texte-xs); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.mention-connexion { margin: 0 0 var(--sp-3); }
.entete-demo { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex: 0 1 auto; }
.entete-demo .voir-en { min-width: 0; }
.entete-demo label, .feuille-demo label { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; color: var(--texte-2); font-size: var(--texte-xs); white-space: nowrap; }
.entete-demo select, .feuille-demo select { min-width: 0; max-width: 260px; height: 32px; padding: 0 var(--sp-2); border: 1px solid var(--bordure); border-radius: var(--rayon-xs); background: var(--surface); font-size: var(--texte-xs); }
/* « Remarque ou idée » : contour, texte et icône orange, fond transparent (dirigeant, 22/11/2026) ;
   AA : #b45309 sur blanc 5,0:1 (survol #fff7ed 4,7:1), #fb923c sur la surface sombre 7,2:1 (survol 7,0:1). */
.bt-signaler { --remarque: #b45309; --remarque-fond: #fff7ed;
  display: inline-flex; align-items: center; gap: var(--sp-1); flex: none; min-height: 32px; padding: 0 var(--sp-2); border: 1px solid var(--remarque); border-radius: var(--rayon-xs);
  background: transparent; color: var(--remarque); font-size: var(--texte-xs); font-weight: 600; text-decoration: none; white-space: nowrap; }
:root[data-theme="dark"] .bt-signaler { --remarque: #fb923c; --remarque-fond: #2a2116; }
.bt-signaler:hover { background: var(--remarque-fond); color: var(--remarque); }
/* Groupe de champs sans cadre (sert à désactiver un formulaire d'un coup, sans casser sa grille) */
fieldset.sans-cadre { display: contents; }
.message-reglage.info-protege { background: var(--surface-2); color: var(--texte); border: 1px solid var(--trait); }
.feuille-demo { display: grid; gap: var(--sp-2); padding: 0 0 var(--sp-3); margin-bottom: var(--sp-2); border-bottom: 1px solid var(--filet); }
.feuille-demo select { max-width: none; width: 100%; height: 44px; font-size: var(--texte-sm); }
.feuille-demo label { flex: 1; flex-direction: column; align-items: stretch; gap: var(--sp-1); }
.form-identifiant .champ-bloc { margin-top: var(--sp-4); }
.form-identifiant .champ-suivant { margin-top: var(--sp-3); }
.feuille-demo .bt-signaler-menu { justify-content: flex-start; gap: var(--sp-2); min-height: 44px; text-decoration: none; }
@media (max-width: 1279px) {
  .entete-demo .lib-voir, .entete-demo .lib-signaler { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .entete-demo select { max-width: 200px; }
}
@media (max-width: 767px) {
  .entete-demo .voir-en { display: none; }
  /* Téléphone : « Remarque ou idée » reste dans l'en-tête, réduit à l'icône (libellé accessible gardé). */
  .entete-demo .bt-signaler { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; border: 0; border-radius: var(--rayon-sm); }
  .entete-demo .bt-signaler svg.ic-sm { width: 20px; height: 20px; }
  /* La bulle rejoint les icônes de droite, au même pas qu'elles (44 px + l'écart de .entete-droite). */
  .entete-demo { margin-left: auto; }
  .entete-demo ~ .entete-droite { margin-left: 0; }
  /* Téléphone : le premier mot du nom seulement, sans points de suspension (dirigeant, 22/11/2026). */
  .entete .marque { min-width: 0; overflow: hidden; }
  .entete .marque span { display: none; }
  .entete-demo .mention-fictive { white-space: normal; max-width: 72px; padding: 2px var(--sp-1); text-align: center; }
}

/* ==== En-tête ==== */
.entete { position: sticky; top: 0; z-index: var(--z-nav); flex: none; height: var(--haut-entete); display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-3) 0 var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--trait); }
.bt-icone { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: var(--rayon-sm); color: var(--texte-2); position: relative; flex: none; }
.bt-icone:hover { background: var(--surface-2); color: var(--texte); }
.marque { text-decoration: none; font-size: var(--texte-xl); color: var(--marine); white-space: nowrap; line-height: 1; letter-spacing: -0.01em; }
.marque b { font-weight: 800; letter-spacing: 0; }
.marque span { font-weight: 500; }
.titre-vue { margin: 0; padding-left: var(--sp-4); border-left: 1px solid var(--trait); font-size: var(--texte-xl); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.entete-droite { margin-left: auto; display: flex; align-items: center; gap: var(--sp-1); }
.pastille-cloche { position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 var(--sp-1); border-radius: var(--rayon-plein); background: var(--compte-fond); color: var(--compte-encre); font-size: var(--texte-xs); font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bt-avatar { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 50%; padding: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--marine); color: var(--surface); font-size: var(--texte-xs); font-weight: 700; }
.ti-lune, .ti-soleil { display: grid; place-items: center; line-height: 0; }  /* boîte du SVG, pas de ligne de texte : centré comme les autres icônes */
.ti-soleil { display: none; }
:root[data-theme="dark"] .ti-lune { display: none; }
:root[data-theme="dark"] .ti-soleil { display: grid; }

.flottant { position: absolute; z-index: var(--z-menu); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-md); box-shadow: var(--ombre-3); padding: var(--sp-2); }
.notifs { top: calc(var(--haut-entete) - 4px); right: var(--sp-6); width: 360px; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.notifs h2 { font-size: var(--texte-sm); margin: var(--sp-1) var(--sp-2) var(--sp-2); }
.notif { text-decoration: none; color: inherit; display: flex; gap: var(--sp-2); width: 100%; text-align: left; padding: var(--sp-2); border: 0; background: none; border-radius: var(--rayon-sm); }
.notif:hover { background: var(--surface-2); }
.notif.non-lue { background: var(--accent-fond); }
.notif small { display: block; color: var(--texte-2); font-size: var(--texte-xs); }
.compte-menu { top: calc(var(--haut-entete) - 4px); right: var(--sp-3); width: 260px; }
.compte-menu p { margin: var(--sp-1) var(--sp-2) var(--sp-2); }
.compte-menu small { display: block; color: var(--texte-2); }
.choix-liste { display: grid; gap: var(--sp-05); }
.choix-liste button, .choix-liste a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: 0 var(--sp-2); border: 0; background: none; border-radius: var(--rayon-sm); text-align: left; }
.choix-liste button:hover, .choix-liste a:hover { background: var(--surface-2); }

/* ==== Gabarit : menu à libellés, jamais replié en icônes ==== */
.app { display: grid; grid-template-columns: var(--larg-menu) minmax(0, 1fr); align-items: start; }
.app.avec-panneau { grid-template-columns: var(--larg-menu) minmax(0, 1fr) var(--larg-panneau); }
.menu { align-self: stretch; background: var(--surface); border-right: 1px solid var(--trait); }
.menu-inner { position: sticky; top: var(--haut-entete); max-height: calc(100vh - var(--haut-entete)); max-height: calc(100dvh - var(--haut-entete)); overflow-y: auto; padding: var(--sp-3) var(--sp-2); }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-05); }
.menu hr { border: 0; border-top: 1px solid var(--trait); margin: var(--sp-3) var(--sp-2); }
.lien-menu { text-decoration: none; display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 42px; padding: 0 var(--sp-3); border: 0; background: none; border-radius: var(--rayon-sm); color: var(--texte-2); font-size: var(--texte-sm); text-align: left; }
.lien-menu:hover { background: var(--surface-2); color: var(--texte); }
.lien-menu[aria-current="page"] { background: var(--accent-fond); color: var(--marine); font-weight: 600; }
.lien-menu .compte { margin-left: auto; min-width: 22px; height: 22px; padding: 0 var(--sp-15); border-radius: var(--rayon-plein); background: var(--compte-fond); color: var(--compte-encre); font-size: var(--texte-xs); font-weight: 700; display: inline-grid; place-items: center; }
.principal { padding: var(--sp-4) var(--sp-3) var(--sp-7); min-width: 0; }

/* ==== Barre de période ==== */
.periode { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.navsem { display: inline-flex; align-items: stretch; border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); }
.navsem .nav-bt { text-decoration: none; width: 44px; min-height: 44px; border: 0; background: none; color: var(--texte-2); display: grid; place-items: center; }
.navsem .nav-bt:hover { background: var(--surface-2); color: var(--texte); }
.lib-periode { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4); min-width: 300px; font-size: var(--texte-base); font-weight: 600; border-left: 1px solid var(--filet); border-right: 1px solid var(--filet); white-space: nowrap; }
.lib-periode svg { color: var(--texte-2); }
.bt { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4); border-radius: var(--rayon-sm); border: 1px solid var(--bordure); background: var(--surface); font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--texte); }
.bt:hover { background: var(--surface-2); }
.bt-pale { background: var(--accent-fond); border-color: transparent; color: var(--accent-encre); font-weight: 600; }
.bt-pale:hover { background: var(--accent-fond); border-color: var(--accent); }
.bt-plein { background: var(--accent); border-color: var(--accent); color: var(--accent-contraste); font-weight: 600; }
.bt-plein:hover { background: var(--accent-survol); border-color: var(--accent-survol); color: var(--accent-survol-encre); }
.bt-danger { color: var(--erreur); border-color: var(--erreur); }
.bt-petit { min-height: 36px; padding: 0 var(--sp-3); }
.bt:disabled, .bt[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.lien-bt { border: 0; background: none; padding: 0; color: var(--accent-encre); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; cursor: pointer; }
.sep-v { width: 1px; height: 28px; background: var(--trait); }
.select, .champ { height: 44px; padding: 0 var(--sp-3); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background-color: var(--surface); color: var(--texte); }
.select { padding-right: var(--sp-6); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8aa0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.periode .droite { margin-left: auto; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
/* Période : les 5 durées en boutons au même rang (planning et astreintes) ; forme courte au téléphone */
.choix-periode { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); }
.bt-seg { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); min-height: 42px; padding: 0 var(--sp-3); color: var(--texte); text-decoration: none; font-weight: 500; white-space: nowrap; cursor: pointer; border-radius: var(--rayon-sm); }
.choix-periode > .bt-seg + .bt-seg { border-left: 1px solid var(--trait); }
.bt-seg:hover { background: var(--surface-2); }
.bt-seg[aria-current="true"] { background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); }
.choix-periode .l-court { display: none; }
.astuce { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm); background: var(--ok-fond); color: var(--texte); font-size: var(--texte-sm); }
.astuce svg { color: var(--ok); }
/* Noms longs sans espace (80 + 80 caractères admis) : ils passent à la ligne au lieu d'élargir la page au
   téléphone (revue lourde du 22/11/2026, robustesse R5). */
.astuce > span, .tete-ecran h2, .liste .quoi, .histo li { min-width: 0; overflow-wrap: anywhere; }

/* ==== Filtres et légende ==== */
.filtres { display: grid; grid-template-columns: repeat(4, minmax(0, 230px)) auto; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.filtres .filtre-case { display: flex; align-items: center; gap: var(--sp-2); align-self: end; min-height: 40px; }
.filtres .filtre-case input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.filtres .filtre-case label { display: inline-flex; align-items: center; gap: var(--sp-1); margin: 0; color: var(--texte); cursor: pointer; }
.filtres .filtre-case svg { color: var(--dep); }
.filtres label { display: block; font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); }
.filtres .select { width: 100%; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3);
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); font-size: var(--texte-xs); color: var(--texte-2); }
.legende > strong { color: var(--texte); font-size: var(--texte-sm); }
.legende .etroit-seul { display: none; }
.legende.etroite .etroit-seul { display: inline-flex; }
.leg { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
.leg .ech { display: inline-grid; place-items: center; height: 22px; min-width: 34px; padding: 0 var(--sp-2); border-radius: var(--rayon-xs); border: 1px solid transparent; font-weight: 700; font-size: var(--texte-xs); }
.leg .ech.gris { background: var(--gris-plein); }
.leg abbr { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.leg .mini { position: relative; display: inline-block; width: 22px; height: 18px; border-radius: 3px; background: var(--act-bleu); }

/* ==== Grille ==== */
.grille-cadre { position: relative; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); overflow: auto; max-height: calc(100vh - var(--haut-entete) - 24px); max-height: calc(100dvh - var(--haut-entete) - 24px);
  overscroll-behavior-x: contain; }   /* en vertical, la molette passe à la page une fois la grille au bout */
.grille-inner { position: relative; }
table.grille { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.grille th, .grille td { padding: 0; }
.grille thead th { position: sticky; z-index: var(--z-colle); background: var(--surface); font-weight: 600; font-size: var(--texte-xs); color: var(--texte-2); border-bottom: 1px solid var(--filet); white-space: nowrap; overflow: hidden; }
.grille thead th.jour { color: var(--texte); font-size: var(--texte-sm); border-left: 1px solid var(--filet); }
.grille thead th.jour.passe { color: var(--texte-2); font-weight: 500; }
.grille thead th.auj { color: var(--accent-contraste); background: var(--accent); font-weight: 700; }
/* Le jour actuel : toute la colonne teintée et encadrée d'accent, sans toucher aux couleurs d'activité. */
.grille td.c-auj { position: relative; background: var(--accent-fond); }
.grille td.c-auj::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; border: 0 solid var(--accent); }
.grille td.c-auj.am::after { border-left-width: 3px; }
.grille td.c-auj.pm::after { border-right-width: 3px; }
.grille td.c-auj.j::after { border-left-width: 3px; border-right-width: 3px; }
.grille tbody:last-child tr:last-child td.c-auj::after { border-bottom-width: 3px; }
.grille thead th.ferie-th { color: var(--gris-encre); background: var(--gris-plein); }
.grille thead th.dj { font-weight: 500; border-left: 1px solid var(--filet); font-family: var(--police-case); }
.grille thead th.dj.pm { border-left-style: dotted; }
.grille thead th.mois { text-align: left; padding-left: var(--sp-2); color: var(--texte); font-size: var(--texte-sm); border-left: 1px solid var(--trait); }
.grille thead th.sem { text-align: left; padding-left: var(--sp-1); border-left: 1px solid var(--trait); font-weight: 500; }
.grille thead th .colle { position: sticky; left: calc(var(--larg-col-ressource) + var(--sp-2)); }
/* le libellé de mois colle au bord de la grille, pas au bord de sa cellule (overflow visible) */
.grille thead th.mois { overflow: visible; }
.grille thead th.nj { border-left: 1px solid var(--filet); font-size: var(--texte-xs); }
.grille thead th.nj.lundi { border-left-color: var(--trait); }
.grille .col-res { position: sticky; left: 0; z-index: var(--z-flottant); }
.grille thead th.col-res { z-index: var(--z-coin); text-align: left; padding-left: var(--sp-4); font-size: var(--texte-sm); color: var(--texte); vertical-align: middle; border-right: 1px solid var(--trait); }
.grille .col-charge { position: sticky; right: 0; z-index: var(--z-flottant); border-left: 1px solid var(--trait); }
.grille thead th.col-charge { z-index: var(--z-coin); font-size: var(--texte-sm); color: var(--texte); line-height: var(--interligne-titre); white-space: normal; text-align: left; padding: 0 var(--sp-3); }

.l-dir > * { background: var(--bande-direction); height: 40px; }
.l-pole > * { background: var(--bande-pole); height: 36px; }
.etroit .l-dir > * { height: 34px; } .etroit .l-pole > * { height: 32px; }
.l-dir th, .l-pole th { text-align: left; color: var(--bande-encre); white-space: nowrap; overflow: hidden; border-right: 1px solid var(--trait); }
.repli > span:not(.resume) { overflow: hidden; text-overflow: ellipsis; }
.repli { min-width: 0; }
.l-dir th { font-size: var(--texte-base); font-weight: 700; font-family: var(--police-case); }
.l-pole th { font-size: var(--texte-sm); font-weight: 600; font-family: var(--police-case); }
.l-dir td, .l-pole td { border-bottom: 1px solid var(--surface); }
.repli { display: inline-flex; align-items: center; gap: var(--sp-2); height: 100%; min-height: 36px; width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 0 var(--sp-2); }
.l-pole .repli { padding-left: var(--sp-5); }
.repli .chev { transition: transform var(--duree-rapide) var(--easing); }
.repli[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.repli .resume { font-weight: 500; font-size: var(--texte-xs); color: var(--texte-2); }
.l-dir .repli .resume, .l-pole .repli .resume { color: var(--bande-encre); opacity: 1; }
td.libres { text-align: center; font-size: var(--texte-xs); font-weight: 700; color: var(--ok); }
td.libres.zero { color: var(--texte-2); font-weight: 400; }
td.libres.passe:not(.zero) { color: var(--texte-2); font-weight: 600; }
td.libres.am { border-left: 1px solid color-mix(in srgb, var(--marine) 8%, transparent); }
tbody.replie tr.l-res, tbody.cache-dir tr { display: none; }

.l-res th { text-align: left; font-weight: 500; padding: 0 var(--sp-2) 0 var(--sp-5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--filet); background: var(--surface); font-size: var(--texte-sm); border-right: 1px solid var(--trait); }
.etroit .l-res th { padding-left: var(--sp-5); }
.l-res th .nom { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.l-res th .nom > span { overflow: hidden; text-overflow: ellipsis; }
.l-res th .nom svg { color: var(--texte-2); }
.l-res th .quot, .l-res th .moi { font-size: var(--texte-xs); color: var(--texte-2); font-weight: 500; flex: none; }
.l-res th .moi { color: var(--accent-encre); font-weight: 700; }
/* Vue Projets : « Modifier » à côté du nom, pour qui administre les projets (lot PROJ) ; zone de toucher de 32 px */
.l-res th .modif-projet { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px -6px -6px auto; border-radius: var(--rayon-sm); color: var(--accent-encre); }
.l-res th .modif-projet:hover, .l-res th .modif-projet:focus-visible { background: var(--surface-2); }
.l-res th .nom .modif-projet svg { display: block; color: inherit; }   /* le téléphone masque les autres icônes du nom */
.formulaire-panneau { grid-template-columns: 1fr; }
.lien-parametres { margin-top: var(--sp-3); font-size: var(--texte-sm); }
.l-res th .sous { display: block; font-size: var(--texte-xs); color: var(--texte-2); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.l-res td { border-bottom: 1px solid var(--filet); height: 56px; padding: var(--sp-05) var(--sp-px); vertical-align: middle; background: var(--surface); }
.l-res td.c.am { padding-left: var(--sp-05); }
.etroit .l-res td { height: 32px; padding: var(--sp-05) 0 var(--sp-05) var(--sp-px); }
.l-res td.col-charge { padding: 0; }

/* La case : un seul div, pas d'ombre par case */
.k { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 50px; padding: var(--sp-05);
  border: 1px solid transparent; border-radius: var(--rayon-xs); background: var(--surface); color: var(--act-encre);
  font-family: var(--police-case); font-size: var(--texte-xs); line-height: var(--interligne-case); text-align: center; overflow: hidden; cursor: pointer; }
.etroit .k { height: 26px; padding: 0; border-radius: 2px; }
.k .lib { letter-spacing: -0.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; max-width: 100%; }
.k .mq { position: absolute; top: 2px; left: 3px; right: 3px; display: flex; justify-content: space-between; align-items: center; height: 18px; pointer-events: none; }
.k .mq > span { display: inline-flex; gap: var(--sp-05); align-items: center; }
.k.avec-mq { justify-content: flex-end; padding-bottom: var(--sp-px); }
.k.avec-mq .lib { line-height: 1.1; }
.k.libre { border: 1px dashed var(--bordure-forte); color: var(--texte-2); background: var(--surface); }
.k.libre:hover { border-style: solid; background: var(--accent-fond); color: var(--accent-encre); }
.k.non-saisi { background: var(--surface-2); color: var(--texte-2); }
.k.ferie, .k.nontrav { background: var(--gris-plein); color: var(--gris-encre); cursor: not-allowed; }
td.c-ferie { padding-top: 0 !important; padding-bottom: 0 !important; border-bottom-color: var(--gris-plein) !important; }
td.c-ferie .k { height: 100%; min-height: 56px; border-radius: 0; }
.etroit td.c-ferie .k { min-height: 32px; }
.l-dir td.c-ferie, .l-pole td.c-ferie { background: var(--gris-plein); }
/* Férié planifiable (décision du 23/11/2026, lot L1) : vide, il reste gris et se sélectionne ; planifié, la case garde
   la couleur de son activité, sur le fond gris du férié et sous des hachures, pour que le férié reste visible. */
.k.ferie { cursor: pointer; }
.l-res td.c-ferie-pl { background: var(--gris-plein); }
.l-res td.c-tp-pl { background: var(--gris-plein); }
.k:hover { border-color: var(--bordure-forte); }
.k.modifiee::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent var(--accent) transparent transparent; }
/* jour fusionné : un trait apparaît au survol et au focus pour garder les deux demi-journées identifiables */
/* Trait du milieu d'une journée : coupé au centre, là où se lit le libellé (PC-07 : « R|TT » était barré). */
.c.j .k::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 50%; width: 1px; background: linear-gradient(to bottom, var(--bordure-forte) 0 25%, transparent 25% 75%, var(--bordure-forte) 75% 100%); opacity: 0; pointer-events: none; }
.c.j:hover .k::before, .c.j:focus .k::before, .c.j.sel .k::before { opacity: 1; }
/* sélection */
.c:focus { box-shadow: none; }
.c:focus-visible .k, .c.sel .k { box-shadow: inset 0 0 0 2px var(--accent); }
.c.sel-am .k, .c.sel-pm .k { box-shadow: none; }
.c.sel-am .k > .demi, .c.sel-pm .k > .demi { display: block; }
.k > .demi { display: none; position: absolute; top: 0; bottom: 0; width: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); border-bottom: 4px solid var(--accent); pointer-events: none; }
.c.sel-am .k > .demi { left: 0; } .c.sel-pm .k > .demi { right: 0; }
.c.dans-plage .k { box-shadow: inset 0 0 0 2px var(--accent); background-image: linear-gradient(color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent) 14%, transparent)); }

/* Activités : la teinte vient du référentiel (Project.couleur, Activity.couleur) */
.t-bleu { background: var(--act-bleu); } .t-ciel { background: var(--act-ciel); } .t-pervenche { background: var(--act-pervenche); }
.t-turquoise { background: var(--act-turquoise); } .t-sable { background: var(--act-sable); } .t-ocre { background: var(--act-ocre); }
.t-lagon { background: var(--act-lagon); } .t-brique { background: var(--act-brique); } .t-gris { background: var(--act-gris); }
.t-vert { background: var(--act-vert); } .t-jaune { background: var(--act-jaune); } .t-lavande { background: var(--act-lavande); }
.t-menthe { background: var(--act-menthe); }
/* Activité posée un jour férié (lot L1), grille et accueil : hachures par-dessus la couleur (après les .t-*, qui
   remettent l'image de fond à zéro). */
/* Même marque pour une activité posée un jour de temps partiel (REV-B, PM-02) : elle compte, et se distingue. */
.ferie-pl { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--gris-encre) 28%, transparent) 6px 8px); }
.tp-pl { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--gris-encre) 28%, transparent) 6px 8px); }
/* Absences : encadrées (décision 3), code dans l'encre de la teinte */
.k.abs { font-family: var(--police-ui); font-weight: 700; }
/* Absences : une seule teinte, l'abréviation dans la case (CP, RTT, Récup, Mal.) */
.x-CP, .x-RTT, .x-RECUP, .x-SICK, .x-OTHER, .x-MASQUE { background: var(--abs); color: var(--abs-encre); border-color: var(--abs-filet); }
.k.abs { border-width: 1px; }
.etroit .k.abs { border-width: 2px; }
.etroit .k.abs { border-color: var(--abs-encre); }
.k.abs:hover { border-color: currentColor; }

/* Pastilles (vue large) */
.pa { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-05); height: 18px; min-width: 24px; padding: 0 var(--sp-1); border-radius: var(--rayon-xs);
  font-family: var(--police-ui); font-size: var(--texte-xs); font-weight: 700; line-height: 1; }
.pa-a1 { background: var(--a1); color: var(--a1-encre); }
.pa-a2 { background: var(--a2); color: var(--a2-encre); }
.pa-plus { background: var(--surface-2); color: var(--texte); min-width: 0; }
.pa-nuit { background: var(--nuit); color: var(--nuit-encre); min-width: 18px; padding: 0 var(--sp-05); }
.pa-nuit svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.pa-tt { color: var(--marine); padding: 0; min-width: 0; font-size: var(--texte-xs); }
.pa-tt svg { width: 13px; height: 13px; stroke-width: 2.2; }
.pa-abs { color: var(--abs-encre); padding: 0; min-width: 0; }
.pa-dep { color: var(--dep); padding: 0; min-width: 0; }
.pa-dep svg { width: 14px; height: 14px; stroke-width: 2.2; }
.legende .pa-dep { background: var(--dep-fond); }
.interrupteur > span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.interrupteur > span svg { color: var(--dep); flex: none; }
.legende .pa { height: 22px; min-width: 34px; padding: 0 var(--sp-2); }
.legende .pa-tt { background: var(--accent-fond); }

/* Repères minimaux (vue longue) : liseré bas = niveau, liseré haut = nuit, point = télétravail */
.k .r-tt, .k .r-ast, .k .r-nuit, .k .r-dep { position: absolute; pointer-events: none; }
.k .r-dep, .leg .mini .r-dep { top: 3px; right: 3px; width: 6px; height: 6px; transform: rotate(45deg); background: var(--dep); box-shadow: 0 0 0 1px var(--surface); }
.leg .mini .r-dep { position: absolute; }
.k .r-tt { top: 3px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--marine); box-shadow: 0 0 0 1px var(--surface); }
.k .r-ast { bottom: 0; height: 4px; }
.k .r-nuit { top: 0; height: 4px; background: var(--nuit-repere); }
.r-g { left: 0; width: 50%; } .r-d { right: 0; width: 50%; } .r-p { left: 0; right: 0; }
.r-a1 { background: var(--a1); } .r-a2 { background: var(--a2); }
/* Point d'astreinte (vues longues) : la forme et la place de l'ancien point TT, couleur à part */
/* Placé au centre de sa demi-journée, près du bas, à la même place dans toutes les cases (le losange du
   déplacement garde le coin haut droit). Au-dessus de la bande du férié (z-index 5) : jamais recouvert,
   même le jour férié lui-même (revue du dirigeant du 22/11/2026). */
.k .r-pt, .leg .mini .r-pt { position: absolute; z-index: 6; pointer-events: none; left: 50%; bottom: 4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ast-point-1); box-shadow: 0 0 0 1.5px var(--surface); }
.k .r-pt.r-am { left: 25%; } .k .r-pt.r-pm { left: 75%; }
/* la case du férié remplit sa cellule (sans marge haute ni basse) : point remonté d'autant pour rester aligné */
.etroit td.c-ferie .k .r-pt { bottom: 7px; }
.leg .mini .r-pt { bottom: 3px; }
.k .r-pt.r-n2, .leg .mini .r-pt.r-n2 { background: var(--ast-point-2); }
.leg .mini .r-tt, .leg .mini .r-ast, .leg .mini .r-nuit { position: absolute; }
.leg .mini .r-tt { top: 3px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--marine); }
.leg .mini .r-ast { bottom: 0; left: 0; right: 0; height: 4px; }
.leg .mini .r-nuit { top: 0; left: 0; right: 0; height: 4px; background: var(--nuit-repere); }

/* Bande férié unique (B3) */
.bande-ferie { position: absolute; z-index: 5; display: flex; align-items: flex-start; justify-content: center; pointer-events: none; }
.bande-ferie span { position: sticky; top: 96px; margin-top: var(--sp-4); writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--texte-sm); font-weight: 600; color: var(--gris-encre); letter-spacing: 0.04em; white-space: nowrap; background: var(--gris-plein); padding: var(--sp-2) 0; }
/* Férié planifié (REV-B, PM-06) : la cellule planifiée passe DEVANT la bande, son activité reste lisible ; le
   libellé vertical se pose dans la plus longue suite de cases vides (planning.js), ou s'efface. Le fond hachuré
   distinct reste. Sous les colonnes collantes (--z-flottant). */
.grille td.c-ferie-pl { position: relative; z-index: 6; }

/* Vue Projets */
.k .noms { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.c.j .k .noms { flex-direction: row; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; }
.k .noms { max-width: 100%; }
.k .noms span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.k .plus { font-weight: 700; color: var(--texte-2); }
.k.vide-projet { background: transparent; border: 1px solid var(--filet); cursor: pointer; }
.k .coin-abs { position: absolute; top: 0; width: 0; height: 0; border-style: solid; border-color: var(--abs-encre) transparent transparent transparent; border-width: 9px 9px 0 0; pointer-events: none; }
.k .coin-abs.g { left: 0; } .k .coin-abs.d { left: 50%; } .k .coin-abs.p { left: 0; }
.etroit .k .coin-abs { border-width: 7px 7px 0 0; }

/* Colonne charge */
.charge { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-3); }
.charge .ch-lib3 { grid-column: 1 / -1; font-size: var(--texte-xs); line-height: 1.3; margin-top: var(--sp-05); }
.charge .ch-pc { font-weight: 700; font-size: var(--texte-sm); color: var(--texte); }
.charge .ch-frac { font-size: var(--texte-xs); color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--police-case); }
.charge.proj { grid-template-columns: 1fr; }
.charge.proj .ch-pc { white-space: nowrap; }
.charge .ch-ecart { font-size: var(--texte-xs); line-height: 1.25; color: var(--texte-2); }
.charge .ch-ecart.au-dela { color: var(--attention); font-weight: 600; }
.charge .ch-libres { color: var(--ok); font-weight: 600; }
.charge .jauge { grid-column: 1 / -1; height: 6px; margin-top: var(--sp-05); border-radius: var(--rayon-plein); background: var(--surface-2); overflow: hidden; }
.etroit .charge .jauge { height: 4px; margin-top: var(--sp-05); }
.charge .jauge i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.charge.plein .jauge i { background: var(--marine); }
.charge.depasse .jauge i { background: var(--attention); }
.charge.sous .jauge i { background: var(--texte-3); }
.l-dir .charge .jauge, .l-pole .charge .jauge { background: var(--surface); }
.l-dir td.col-charge { background: var(--bande-direction); } .l-pole td.col-charge { background: var(--bande-pole); }
.l-dir .charge .ch-pc, .l-pole .charge .ch-pc, .l-dir .charge .ch-frac, .l-pole .charge .ch-frac { color: var(--bande-encre); }
.l-dir .ch-libres, .l-pole .ch-libres { color: var(--bande-encre); }

/* Info-bulle unique (cases étroites, au survol et au focus) */
.bulle { position: fixed; z-index: var(--z-toast); max-width: 280px; padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm); background: var(--texte); color: var(--surface); font-size: var(--texte-xs); line-height: 1.4; pointer-events: none; box-shadow: var(--ombre-2); }
.bulle[hidden] { display: none; }
.bulle strong { display: block; }

/* État vide */
.vide-ecran { max-width: 560px; margin: var(--sp-7) auto; text-align: center; color: var(--texte-2); }
.vide-ecran > svg { width: 40px; height: 40px; color: var(--texte-2); }
.vide-ecran h2 { color: var(--texte); font-size: var(--texte-lg); margin: var(--sp-3) 0 var(--sp-2); }
.vide-ecran .bt { margin-top: var(--sp-4); }
.chargement { display: flex; align-items: center; gap: var(--sp-2); color: var(--texte-2); padding: var(--sp-4); }

/* ==== Panneau de détail (A3) : colonne à droite, tiroir sous 1 280 px ==== */
.panneau { position: sticky; top: var(--haut-entete); height: calc(100vh - var(--haut-entete)); height: calc(100dvh - var(--haut-entete)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-left: 1px solid var(--trait); padding: var(--sp-4) var(--sp-4) var(--sp-6); }
.panneau[hidden] { display: none; }
.panneau-tete { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.panneau-tete h2 { margin: 0; font-size: var(--texte-lg); line-height: var(--interligne-titre); }
.panneau-tete p { margin: 0 0 var(--sp-1); color: var(--texte-2); font-size: var(--texte-xs); }
.panneau-tete .bt-icone { margin: calc(var(--sp-2) * -1) calc(var(--sp-2) * -1) 0 auto; }
.portee { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); overflow: hidden; margin-bottom: var(--sp-3); }
.portee button { min-height: 40px; border: 0; background: var(--surface); font-size: var(--texte-xs); font-weight: 500; color: var(--texte-2); }
.portee button + button { border-left: 1px solid var(--bordure); }
.portee button[aria-pressed="true"] { background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; }
.portee button:disabled { cursor: not-allowed; opacity: .55; }
.regle { display: flex; gap: var(--sp-2); padding: var(--sp-3); margin-bottom: var(--sp-3); border-radius: var(--rayon-sm); background: var(--erreur-fond); color: var(--texte); font-size: var(--texte-sm); }
.regle svg { color: var(--erreur); margin-top: var(--sp-05); }
.regle.info { background: var(--surface-2); }
.regle.info svg { color: var(--texte-2); }
.regle p { margin: 0; }
.regle .bt { margin-top: var(--sp-2); }
.p-section { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--filet); }
.p-section:first-of-type { border-top: 0; padding-top: 0; }
.p-section h3 { display: flex; align-items: center; gap: var(--sp-2); justify-content: space-between; margin: 0 0 var(--sp-2); font-size: var(--texte-sm); }
.p-section h3 small { font-weight: 500; color: var(--texte-2); font-size: var(--texte-xs); }
.etat-dj { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.puce { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 28px; padding: 0 var(--sp-2); border-radius: var(--rayon-xs); font-family: var(--police-case); font-weight: 600; border: 1px solid transparent; color: var(--act-encre); }
.palette-act { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
.palette-act button > span:not(.ech) { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.palette-act button { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--bordure); background: var(--surface); border-radius: var(--rayon-sm); text-align: left; font-size: var(--texte-sm); }
/* Une seule mise en évidence, la sélection (bordure d'accent épaissie, gras) ; le survol reste discret et
   n'existe qu'avec une souris (aucun survol accroché après un appui au doigt) ; le focus ne se voit qu'au
   clavier (revue du dirigeant du 22/11/2026). */
@media (hover: hover) {
  .palette-act button:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--surface-2); }
}
.palette-act button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.palette-act button:focus { outline: none; }
.palette-act button:focus-visible { box-shadow: var(--anneau-focus); }
.palette-act button[aria-pressed="true"]:focus-visible { box-shadow: inset 0 0 0 1px var(--accent), var(--anneau-focus); }
.palette-act button:disabled { opacity: .5; cursor: not-allowed; }
.palette-act .ech { width: 16px; height: 16px; border-radius: 3px; flex: none; border: 1px solid var(--trait); }
.palette-act kbd { margin-left: auto; }
/* Projets clos (REV-B, PM-04) : rubrique repliée en fin de palette, boutons atténués. */
.palette-clos { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.palette-clos > summary { cursor: pointer; font-size: var(--texte-xs); font-weight: 600; color: var(--texte-2); min-height: 32px; display: flex; align-items: center; gap: var(--sp-1); }
.palette-clos > summary small { font-weight: 500; }
.palette-clos .aide-touches { margin: 0; }
.palette-clos button { border-style: dashed; color: var(--texte-2); }
.palette-act h4 { grid-column: 1 / -1; margin: var(--sp-2) 0 0; font-size: var(--texte-xs); font-weight: 600; color: var(--texte-2); }
.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 44px; margin-top: var(--sp-2); }
.interrupteur button { position: relative; width: 44px; height: 26px; border-radius: var(--rayon-plein); border: 1px solid var(--bordure-forte); background: var(--surface-2); flex: none; }
.interrupteur button::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--texte-2); transition: transform var(--duree-rapide) var(--easing); }
.interrupteur button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.interrupteur button[aria-checked="true"]::after { transform: translateX(18px); background: var(--accent-contraste); }
.interrupteur button:disabled { opacity: .5; cursor: not-allowed; }
.liste-alertes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.liste-alertes li { display: flex; gap: var(--sp-2); font-size: var(--texte-sm); }
.liste-alertes li svg { margin-top: var(--sp-05); color: var(--attention); }
.liste-alertes li.ok svg { color: var(--ok); }
.liste-alertes li.neutre svg { color: var(--texte-2); }
.fiche { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: var(--sp-2) var(--sp-3); font-size: var(--texte-sm); }
.fiche dt { color: var(--texte-2); }
.fiche dd { margin: 0; min-width: 0; }
.histo { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); font-size: var(--texte-sm); }
.histo li small { display: block; color: var(--texte-2); font-size: var(--texte-xs); }
.semaine-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-1); }
.semaine-mini div { text-align: center; font-size: var(--texte-xs); color: var(--texte-2); }
.semaine-mini i { display: block; height: 14px; margin-top: var(--sp-05); border-radius: 3px; border: 1px solid transparent; }
.semaine-mini i.vide { border: 1px dashed var(--bordure-forte); }
.semaine-mini i.gris { background: var(--gris-plein); }
.semaine-mini i.sel { box-shadow: 0 0 0 2px var(--accent); }

/* ==== Messages ==== */
.messages { position: fixed; left: 50%; bottom: var(--sp-5); transform: translateX(-50%); z-index: var(--z-message); display: grid; gap: var(--sp-2); width: min(600px, calc(100vw - 2 * var(--sp-4))); pointer-events: none; }
.message { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--rayon-md); background: var(--surface); color: var(--texte); border: 1px solid var(--trait); box-shadow: var(--ombre-3); font-size: var(--texte-sm); pointer-events: auto; }
.message.erreur { background: var(--erreur-fond); border-color: var(--erreur); }
.message.erreur > svg { color: var(--erreur); }
.message.ok { background: var(--ok-fond); border-color: var(--ok); }
.message.ok > svg { color: var(--ok); }
.message strong { display: block; }
.message p { margin: 0; }
.message .actions-msg { display: flex; gap: var(--sp-3); margin-top: var(--sp-1); }
.message .fermer-msg { margin-left: auto; width: 32px; height: 32px; border: 0; background: none; border-radius: var(--rayon-xs); display: grid; place-items: center; color: var(--texte-2); flex: none; }

/* ==== Écrans de contenu ==== */
.tete-ecran { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.tete-ecran h2 { margin: 0; font-size: var(--texte-xl); }
.tete-ecran .droite { margin-left: auto; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.sous-titre { color: var(--texte-2); margin: 0; }
.bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); padding: var(--sp-4); }
.bloc + .bloc { margin-top: var(--sp-4); }
.deux-col > .bloc + .bloc { margin-top: 0; }
.bloc > h3 { margin: 0 0 var(--sp-3); font-size: var(--texte-base); }
.bloc > h3 small { font-weight: 400; color: var(--texte-2); font-size: var(--texte-sm); margin-left: var(--sp-2); }
.deux-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.statut { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 26px; padding: 0 var(--sp-2); border-radius: var(--rayon-xs); font-size: var(--texte-xs); font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.st-brouillon { background: var(--surface-2); color: var(--texte-2); border-color: var(--trait); }
.st-soumis { background: var(--accent-fond); color: var(--accent-encre); }
.st-refuse { background: var(--erreur-fond); color: var(--erreur); }
.st-valide { background: var(--ok-fond); color: var(--ok); }
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--filet); }
.liste > li:first-child { border-top: 0; padding-top: 0; }
.liste .quoi { flex: 1 1 240px; min-width: 0; }
.liste .quoi strong { display: block; }
.liste .quoi small { color: var(--texte-2); font-size: var(--texte-sm); }
.tableau { width: 100%; border-collapse: collapse; font-size: var(--texte-sm); }
.tableau th { vertical-align: top; text-align: left; font-size: var(--texte-xs); color: var(--texte-2); font-weight: 600; padding: var(--sp-2); border-bottom: 1px solid var(--trait); white-space: nowrap; }
.tableau td { padding: var(--sp-2); border-bottom: 1px solid var(--filet); vertical-align: top; }
.tableau .nb { text-align: right; }
.defile-x { overflow-x: auto; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--trait); border-radius: var(--rayon-sm); background: var(--surface); }
.chiffres > div { padding: var(--sp-3) var(--sp-4); border-left: 1px solid var(--filet); border-top: 1px solid var(--filet); margin: calc(var(--sp-px) * -1) 0 0 calc(var(--sp-px) * -1); }
.chiffres dt { color: var(--texte-2); font-size: var(--texte-sm); }
.chiffres dd { margin: var(--sp-1) 0 0; font-size: var(--texte-lg); font-weight: 700; }
.chiffres dd small { display: block; font-size: var(--texte-sm); font-weight: 400; color: var(--texte-2); line-height: 1.4; }
.barre-h { display: grid; grid-template-columns: 150px minmax(0, 1fr) 230px; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; border-top: 1px solid var(--filet); }
.barre-h:first-of-type { border-top: 0; }
.barre-h .piste { position: relative; height: 10px; border-radius: var(--rayon-plein); background: var(--surface-2); }
.barre-h .piste i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--accent); }
.barre-h .piste b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--texte); }
.barre-h .val { font-size: var(--texte-sm); text-align: right; }
.barre-h.depasse .piste i { background: var(--attention); }
.etiq { display: inline-block; padding: 0 var(--sp-2); border-radius: var(--rayon-xs); font-size: var(--texte-xs); font-weight: 700; }
.etiq.attention { background: var(--attention-fond); color: var(--attention); }
.etiq.ok { background: var(--ok-fond); color: var(--ok); }
.etiq.neutre { background: var(--surface-2); color: var(--texte-2); }
.places { display: grid; gap: var(--sp-2); }
.places li { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.places ul { margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.places .nom-p { min-width: 150px; font-weight: 600; }
.creneau { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--sp-3); border: 1px dashed var(--bordure-forte); border-radius: var(--rayon-sm); background: var(--surface); font-size: var(--texte-sm); }
.creneau:hover { border-style: solid; border-color: var(--accent); background: var(--accent-fond); color: var(--accent-encre); }
.creneau[aria-disabled="true"] { cursor: default; }
.formulaire { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-3) var(--sp-4); }
.formulaire .large { grid-column: 1 / -1; }
.formulaire label { display: block; font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); }
.formulaire .select, .formulaire .champ { width: 100%; }
.formulaire .duree { display: flex; gap: var(--sp-2); align-items: center; }
.formulaire .duree .champ { width: 80px; }
.err { color: var(--erreur); font-size: var(--texte-sm); margin: var(--sp-1) 0 0; font-weight: 600; }
.champ[aria-invalid="true"], .select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--erreur); }
.aide-champ { color: var(--texte-2); font-size: var(--texte-xs); margin: var(--sp-1) 0 0; }
.segment { display: inline-flex; border: 1px solid var(--bordure); border-radius: var(--rayon-sm); overflow: hidden; background: var(--surface); }
.segment button { min-height: 44px; padding: 0 var(--sp-4); border: 0; background: none; font-weight: 500; color: var(--texte-2); }
.segment button + button { border-left: 1px solid var(--bordure); }
.segment button[aria-pressed="true"] { background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; }

/* Astreintes */
.ast-grille th, .ast-grille td { min-width: 110px; }
.ast-grille td.ferie-l { background: var(--gris-plein); }
.ast-ligne { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-05) 0; white-space: nowrap; }
.ast-ligne .pa { height: 22px; }
.ast-ligne .pa-abs { margin: 0; }
/* Astreintes, vues longues (1 à 3 mois) : la grille étroite du planning, deux cases par jour (jour, nuit) */
.bloc-grille { padding-bottom: var(--sp-3); }
.ast-cadre { max-height: none; }
table.ast-sem { width: 100%; min-width: calc(var(--larg-col-ressource) + var(--larg-col-charge) + 14 * 34px); }
.grille thead th.we, .grille .ast-dates td.we { background: var(--surface-2); }
.grille thead th.th-nuit { color: var(--nuit-repere); }
.grille thead th.th-nuit svg { width: 12px; height: 12px; fill: currentColor; stroke: none; vertical-align: -2px; }
.grille thead th.dj { text-align: center; }
.ast-dates td { text-align: center; font-size: var(--texte-xs); font-weight: 600; color: var(--bande-encre); border-left: 1px solid var(--surface); }
.ast-dates td.auj { box-shadow: inset 0 -3px 0 var(--accent); color: var(--accent-encre); }
.ast-dates td.passe { font-weight: 500; }
.ast-dates td.ferie-th { background: var(--gris-plein); color: var(--gris-encre); }
.ast-dates td.hors { background: transparent; }
.ast-dates th { padding-left: var(--sp-3); font-size: var(--texte-sm); font-weight: 600; }
.ast-interv { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-3); font-size: var(--texte-xs); color: var(--bande-encre); }
.l-res td.c-ast { cursor: default; }
td.c-ast .k { cursor: default; flex-direction: row; gap: 2px; padding: 0 2px; font-family: var(--police-ui); font-weight: 700; }
td.c-ast .k > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
td.c-ast .k .plus { flex: none; font-weight: 700; opacity: .85; color: inherit; }
td.c-ast .k svg { width: 11px; height: 11px; fill: currentColor; stroke: none; flex: none; }
td.c-ast .k.ast-vide { background: transparent; border-color: transparent; }
td.c-ast .k.ast-hors { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--filet) 4px 5px); border-color: transparent; }
td.c-ast .k.abs { border-width: 2px; border-color: var(--abs-filet); }
td.c-ast[tabindex]:focus-visible .k { box-shadow: inset 0 0 0 2px var(--accent); }
.ast-res td.c-ast .k > span.l-long { overflow: visible; }
td.td-nuit { border-left: 1px dotted var(--filet); }
.ast-l-abs th .pa-abs, .ast-l-abs th .pa { margin: 0; }
.ast-l-n1 th .pa, .ast-l-n2 th .pa { flex: none; }
/* « initiales si la place manque » : ecrans.js pose .court quand le nom déborde de sa case */
td.c-ast .k.court .l-long { display: none; } td.c-ast .k.court .l-court { display: inline; }
.ast-court { display: none; }
td.td-nuit { background: color-mix(in srgb, var(--nuit) 6%, var(--surface)); }
@media (max-width: 767px) {
  /* Téléphone : colonnes fixes resserrées (pastille seule, nombre seul) pour voir au moins deux jours */
  table.ast-sem { --larg-col-ressource: 64px; --larg-col-charge: 44px; }
  table.ast-sem { min-width: calc(64px + 44px + 14 * 40px); }
  .ast-sem .ast-court { display: inline; }
  .ast-sem .ast-lib, .ast-sem .ast-unite, .ast-sem .l-res th .nom svg { display: none; }
  .ast-sem .l-res th { padding-left: var(--sp-2); }
  .ast-sem .ast-dates th { padding-left: var(--sp-2); font-size: var(--texte-xs); white-space: normal; line-height: 1.1; }
  .ast-sem thead th.col-charge { padding: 0 var(--sp-1); font-size: 10px; }
  .ast-sem .charge { padding: 0 var(--sp-1); }
  .ast-interv { padding: 0 var(--sp-1); }
  .ast-res .l-res th .nom > span { font-size: var(--texte-xs); }
}

/* ==== Mes CRA ==== */
.etapes { display: flex; gap: var(--sp-1); margin: 0 0 var(--sp-4); padding: 0; list-style: none; flex-wrap: wrap; }
.etapes li { flex: 1 1 120px; padding-top: var(--sp-2); border-top: 3px solid var(--filet); font-size: var(--texte-sm); color: var(--texte-2); }
.etapes li.fait { border-top-color: var(--accent); color: var(--texte); }
.etapes li.actuel { border-top-color: var(--accent); color: var(--texte); font-weight: 700; }
.etapes li.refus { border-top-color: var(--erreur); color: var(--erreur); font-weight: 700; }
.etapes li.valide { border-top-color: var(--ok); color: var(--ok); font-weight: 700; }
.bandeau-refus { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: var(--rayon-sm); background: var(--erreur-fond); border: 1px solid var(--erreur); }
.bandeau-refus > svg { color: var(--erreur); margin-top: var(--sp-05); }
.bandeau-refus p { margin: 0; }
.bandeau-info { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: var(--rayon-sm); background: var(--surface); border: 1px solid var(--trait); }
.bandeau-info.verrou { background: var(--ok-fond); border-color: var(--ok); }
.bandeau-info.verrou > svg { color: var(--ok); }
.bandeau-info p { margin: 0; }
.onglets { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--trait); margin-bottom: var(--sp-3); overflow-x: auto; }
.onglet { min-height: 44px; padding: 0 var(--sp-4); border: 0; background: none; color: var(--texte-2); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.onglet[aria-selected="true"] { color: var(--marine); border-bottom-color: var(--accent); font-weight: 700; }
.onglet .manque { color: var(--attention); font-weight: 700; }
.cra-gabarit { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-5); align-items: start; }
.jours-cra { display: grid; gap: var(--sp-2); }
.carte-jour { display: grid; grid-template-columns: 150px 1fr 1fr; gap: var(--sp-2) var(--sp-3); align-items: stretch; padding: var(--sp-3); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); }
.carte-jour.auj { border-color: var(--accent); }
.carte-jour .jour-nom { display: flex; align-items: center; gap: var(--sp-2); }
.carte-jour .jour-nom b { font-size: var(--texte-2xl); line-height: 1; min-width: 34px; }
.carte-jour .jour-nom span { display: block; font-weight: 600; }
.carte-jour .jour-nom small { display: block; color: var(--texte-2); font-size: var(--texte-xs); }
.carte-jour .bande-jour { grid-column: 2 / -1; display: flex; align-items: center; gap: var(--sp-2); min-height: 52px; padding: 0 var(--sp-3); border-radius: var(--rayon-xs); background: var(--gris-plein); color: var(--gris-encre); font-weight: 600; }
.dj-bt { position: relative; display: grid; align-content: center; gap: var(--sp-05); min-height: 64px; padding: var(--sp-2) var(--sp-3); border: 1px solid transparent; border-radius: var(--rayon-sm); text-align: left; color: var(--act-encre); }
.dj-bt .moment { font-size: var(--texte-xs); color: var(--texte-2); font-weight: 600; font-family: var(--police-ui); }
.dj-bt .act { font-weight: 700; font-family: var(--police-case); font-size: var(--texte-base); display: flex; align-items: center; gap: var(--sp-1); }
.dj-bt .note-dj { font-size: var(--texte-xs); color: var(--texte-2); }
.dj-bt.manquant { border: 2px dashed var(--attention); background: var(--attention-fond); color: var(--texte); }
.dj-bt.manquant .act { color: var(--attention); font-family: var(--police-ui); }
.dj-bt.modifie { border-color: var(--accent); }
.dj-bt.abs { cursor: default; }
.dj-bt:disabled { cursor: default; }
button.dj-bt:not(:disabled):hover, button.dj-bt:active { border-color: var(--accent); }
.badge-modif { display: inline-flex; align-items: center; gap: var(--sp-1); width: fit-content; padding: 0 var(--sp-15); border-radius: var(--rayon-xs); background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; font-size: var(--texte-xs); font-family: var(--police-ui); }
.cra-pied { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); }
.cra-pied .bilan-court { flex: 1 1 260px; color: var(--texte-2); }
.cra-pied .bilan-court strong { color: var(--texte); }
.controles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.controles li { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--texte-sm); }
.controles li svg { margin-top: var(--sp-05); flex: none; }
.controles li.ok svg { color: var(--ok); }
.controles li.ko svg { color: var(--erreur); }
.controles li.ko { font-weight: 600; }
.controles .liens-manque { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-1); font-weight: 400; }
.bilan { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2) var(--sp-3); }
.bilan dt { color: var(--texte-2); }
.bilan dd { margin: 0; font-weight: 700; text-align: right; }
.motif-form { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.motif-form label { font-weight: 600; }
.motif-form textarea { width: 100%; min-height: 88px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); resize: vertical; }
.cartes-equipe { display: grid; gap: var(--sp-2); }
.carte-equipe { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: center; padding: var(--sp-3); border: 1px solid var(--trait); border-radius: var(--rayon-sm); background: var(--surface); }
.carte-equipe .quoi { flex: 1 1 200px; }
.carte-equipe .quoi strong { display: block; }
.carte-equipe .quoi small { color: var(--texte-2); }

/* Feuille de choix (CRA) et fenêtres */
.voile { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--voile); display: grid; place-items: center; padding: var(--sp-4); }
.voile[hidden] { display: none; }
.fenetre { width: min(520px, 100%); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; background: var(--surface); border-radius: var(--rayon-md); box-shadow: var(--ombre-3); padding: var(--sp-4); }
.fenetre h2 { margin: 0 0 var(--sp-2); font-size: var(--texte-lg); }
.fenetre .pied { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.choix-act { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-top: var(--sp-3); }
.choix-act button { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-3); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); text-align: left; }
.choix-act button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.choix-act .ech { width: 18px; height: 18px; border-radius: 3px; border: 1px solid var(--trait); flex: none; }
.palette-cmd { width: min(620px, 100%); padding: 0; overflow: hidden; align-self: start; margin-top: 12vh; }
.palette-cmd .champ-cmd { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4); border-bottom: 1px solid var(--filet); }
.palette-cmd input { flex: 1; height: 52px; border: 0; background: transparent; font-size: var(--texte-base); }
.palette-cmd input:focus-visible { box-shadow: none; }
.palette-cmd ul { list-style: none; margin: 0; padding: var(--sp-1); max-height: 50vh; overflow-y: auto; }
.palette-cmd li { display: flex; align-items: center; gap: var(--sp-3); min-height: 42px; padding: 0 var(--sp-3); border-radius: var(--rayon-sm); cursor: pointer; }
.palette-cmd li small { color: var(--texte-2); }
.palette-cmd li kbd { margin-left: auto; }
.palette-cmd li[aria-selected="true"] { background: var(--accent-fond); }
.palette-cmd .pied-cmd { display: flex; gap: var(--sp-4); padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--filet); color: var(--texte-2); font-size: var(--texte-xs); background: var(--fond); }

/* Connexion de démonstration */
/* Pleine hauteur par une colonne flex sur body, sans dépendre de la hauteur du bandeau */
body:has(> .connexion), body:has(> .app) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.connexion { flex: 1 0 auto; display: grid; place-items: center; padding: var(--sp-5) var(--sp-4); }
.connexion .boite { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-md); padding: var(--sp-6); }
.connexion h1 { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--texte-2xl); }
.comptes { display: grid; gap: var(--sp-2); margin: var(--sp-4) 0; padding: 0; border: 0; }
.comptes legend { font-weight: 600; margin-bottom: var(--sp-2); }
.compte-choix { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); cursor: pointer; }
.compte-choix:has(input:checked) { border-color: var(--accent); background: var(--accent-fond); }
.compte-choix input { width: 18px; height: 18px; accent-color: var(--accent); }
.compte-choix small { display: block; color: var(--texte-2); }
.mention-proto { display: flex; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--rayon-sm); background: var(--attention-fond); color: var(--texte); margin-top: var(--sp-3); }
.mention-proto svg { color: var(--attention); }

/* ==== Ajouts de l'application (au-delà du prototype) ==== */
.ancre { display: inline-flex; }
.app { flex: 1 0 auto; }   /* pleine hauteur : body en colonne flex (règle de .connexion) */
/* Libellé court du référentiel quand la place manque : panneau ouvert, ou téléphone */
.k .l-court { display: none; }
.avec-panneau .k .l-long { display: none; }
.avec-panneau .k .l-court { display: inline; }
.voir-en { margin: 0; display: flex; }
.flottant[hidden], .feuille-menu[hidden] { display: none; }
.coin-modif, .leg .mini .coin-modif { position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent var(--accent) transparent transparent; }
.leg .mini.mini-vide { background: var(--surface); border: 1px solid var(--bordure); }
.leg .mini .coin-abs { position: absolute; top: 0; left: 0; border-style: solid; border-width: 9px 9px 0 0; border-color: var(--abs-encre) transparent transparent transparent; }
.puce-gris { background: var(--gris-plein); color: var(--gris-encre); }
.puce-libre { border: 1px dashed var(--bordure-forte); color: var(--texte-2); }
.puce-neutre { background: var(--surface-2); }
.p-section h3 > span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.bt-vider { margin-top: var(--sp-2); }
.bt-plage { margin-top: var(--sp-2); margin-left: var(--sp-2); }
/* Panneau d'une case : « Vider » et « Planifier une période… » l'un sous l'autre, pleine largeur, même départ */
.actions-case { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.actions-case .bt { width: 100%; margin: 0; justify-content: flex-start; }
.interrupteur-tt > span svg { color: var(--accent-encre); }
.aide-touches { margin: calc(-1 * var(--sp-1)) 0 var(--sp-1); font-size: var(--texte-xs); color: var(--texte-2); }
/* Planifier une période (panneau) */
.form-plage label { font-size: var(--texte-sm); }
.form-plage fieldset { border: 0; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.form-plage legend { font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); padding: 0; width: 100%; }
.form-plage fieldset label, .plage-personnes label { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 32px; cursor: pointer; }
.form-plage input[type="checkbox"], .form-plage input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.plage-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-2); }
.plage-dates label { display: block; color: var(--texte-2); margin-bottom: var(--sp-1); }
.plage-dates .champ { width: 100%; min-width: 0; }
.form-plage .select { width: 100%; }
.plage-personnes { display: grid; gap: 0; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--trait); border-radius: var(--rayon-sm); }
.plage-actions { margin: var(--sp-3) 0; }
.apercu-plage .apercu-total, .apercu-plage .apercu-conflits { margin: var(--sp-1) 0; font-size: var(--texte-base); }
.liste-conflits { margin: var(--sp-2) 0; padding-left: var(--sp-4); font-size: var(--texte-sm); display: grid; gap: var(--sp-2); }
.liste-conflits ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-3); color: var(--texte-2); }
.apercu-plage .bt-plein { width: 100%; margin-top: var(--sp-2); }
/* Vue Projets : « Ajouter des personnes » (lot PROJ-AFF) */
.affecter-projet .bt-affecter { width: 100%; margin-top: var(--sp-2); }
.form-affecter .aff-recherche { width: 100%; margin-bottom: var(--sp-2); }
.aff-liste { display: grid; gap: var(--sp-2); max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-1) var(--sp-2) var(--sp-2); border: 1px solid var(--trait); border-radius: var(--rayon-sm); }
.form-affecter .aff-groupe { margin: 0; display: grid; gap: 0; }
.form-affecter .aff-groupe legend { margin: var(--sp-2) 0 0; font-weight: 600; color: var(--texte); }
.form-affecter .aff-groupe label { min-height: 36px; }
.form-affecter .aff-groupe label[hidden], .form-affecter .aff-groupe[hidden] { display: none; }
.aff-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.aff-actions .bt { width: 100%; }
.aff-avert .aff-confirmer { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.aff-avert .aff-confirmer .champ { height: auto; min-height: 66px; padding: var(--sp-2) var(--sp-3); width: 100%; }
.aff-retour { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; }
#panneau [tabindex="-1"]:focus { outline: none; }
#panneau .regle[tabindex="-1"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 767px) {
  .form-affecter .aff-groupe label, .form-affecter fieldset label { min-height: 44px; }
  .aff-liste { max-height: 260px; }
  .aff-actions { grid-template-columns: 1fr; }
}
.ok-plage { background: var(--ok-fond); }
.ok-plage svg { color: var(--ok); }
.panneau .bt { white-space: normal; text-align: left; height: auto; padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.semaine-titre { margin: var(--sp-3) 0 var(--sp-1); }
.sous-plage { margin: 0 0 var(--sp-3); }
.absents { margin-top: var(--sp-2); }
.semaine-mini i.abs { border-width: 1px; }
.semaine-mini i.abs { border-color: var(--abs-filet); }
.message .details-msg { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }
.raccourcis { margin: var(--sp-3) 0 0; padding-left: var(--sp-4); display: grid; gap: var(--sp-2); }
.zone { min-width: 0; }
/* Planning (Ressources, Projets), au bureau : un seul défilement vertical, celui de la grille. La page tient
   dans l'écran (body en colonne flex, hauteur de l'écran) ; la grille prend la hauteur qui reste sous
   l'en-tête et la barre d'outils et défile seule, en-têtes et colonne des noms collants. Aucune hauteur
   d'en-tête ni de bandeau dans un calcul : tout passe par flex et min-height: 0. Écran trop bas (< 560 px) :
   on garde le défilement de la page. */
@media (min-width: 768px) and (min-height: 560px) {
  body:has(.app .zone) { height: 100vh; height: 100dvh; overflow: hidden; }
  body:has(.app .zone) .app { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  body:has(.app .zone) .menu { min-height: 0; }
  body:has(.app .zone) .menu-inner { position: static; height: 100%; max-height: none; }
  body:has(.app .zone) .principal { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: var(--sp-3); }
  body:has(.app .zone) .zone { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  body:has(.app .zone) .zone > .grille-cadre { flex: 0 1 auto; min-height: 180px; max-height: none; }
}
@media (min-width: 1400px) and (min-height: 560px) {
  body:has(.app .zone) .panneau { position: static; height: auto; min-height: 0; }
}
/* Tiroir (768 à 1 399 px, MacBook Air 13 compris : revue du 22/11/2026, MB-2) : accroché à la zone sous l'en-tête plutôt qu'à var(--haut-entete), qui ignore les bandeaux */
@media (min-width: 768px) and (max-width: 1399px) and (min-height: 560px) {
  body:has(.app .zone) .app { position: relative; }
  body:has(.app .zone) .panneau { position: absolute; top: 0; bottom: 0; }
}
.ctx { margin: 0; }
.grille-cadre .chargement { min-height: 120px; }
.htmx-request.zone, .htmx-request .grille-inner { opacity: .7; transition: opacity var(--duree-rapide) var(--easing); }
/* Page « à venir » (partie 2) */
.a-venir .bienvenue { margin: var(--sp-3) 0 0; color: var(--texte); font-size: var(--texte-lg); font-weight: 600; }
.a-venir .actions-vide { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.a-venir .actions-vide .bt { margin-top: 0; }
/* Connexion */
.connexion .marque { font-size: var(--texte-xl); }
.connexion .sous-titre { margin: 0; }
.form-connexion { margin: 0; }
.champ-bloc label { display: block; font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); }
.champ-bloc .champ { width: 100%; }
.bt-large { width: 100%; margin-top: var(--sp-4); }
.message-erreur { margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--rayon-sm); background: var(--erreur-fond); color: var(--texte); border: 1px solid var(--erreur); }
/* Feuille du menu au téléphone */
.feuille-menu { position: fixed; left: 0; right: 0; bottom: 64px; z-index: var(--z-modal); max-height: 70vh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--trait); border-radius: var(--rayon-md) var(--rayon-md) 0 0; box-shadow: var(--ombre-3); padding: var(--sp-3); }
.feuille-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-05); }
.feuille-menu .lien-menu { min-height: 48px; font-size: var(--texte-base); }

/* Barre du bas (téléphone) */
.barre-bas { display: none; }

/* ==== Partie 2 : Accueil, Mes CRA, Astreintes, Charges, Rapports, Paramètres, Historique ==== */
.segment a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-4); font-weight: 500; color: var(--texte-2); text-decoration: none; white-space: nowrap; }
.segment a + a { border-left: 1px solid var(--bordure); }
.segment a[aria-pressed="true"] { background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; }
.segment a:hover { color: var(--texte); }
a.onglet { display: inline-flex; align-items: center; text-decoration: none; }
a.creneau { text-decoration: none; color: var(--texte); }
.onglets-cra { margin-bottom: var(--sp-4); }
.qui-cra { margin: calc(var(--sp-3) * -1) 0 var(--sp-3); }
.cra-pied .a-renseigner { color: var(--attention); font-weight: 700; }
.cra-pied .ko-texte { color: var(--erreur); font-weight: 700; }
.bt[aria-disabled="true"] { opacity: .55; }
.actions-motif { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.controles .anomalies { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); font-weight: 400; }
.anomalies-cra { margin-top: var(--sp-3); font-size: var(--texte-sm); }
.anomalies-cra summary { cursor: pointer; color: var(--accent-encre); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.anomalies-cra ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); display: grid; gap: var(--sp-1); color: var(--texte); }
.aide-ctrl { margin-top: var(--sp-3); }
.cra-aside .aide-champ { margin-top: var(--sp-2); }
.carte-equipe .bt { gap: var(--sp-2); }
.carte-equipe .bt.a-valider { border-color: var(--accent); }
.fenetre-choix .motif-form { margin-top: var(--sp-3); }
.histo { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.histo li small { display: block; color: var(--texte-2); font-size: var(--texte-xs); }
/* Accueil */
.taches > li > svg { color: var(--texte-2); }
.taches > li.alerte > svg { color: var(--attention); }
.mon-planning { margin-top: var(--sp-3); }
.semaine-mini div.auj { color: var(--texte); font-weight: 700; }
/* Astreintes */
.chiffres-ast, .chiffres-charges { margin-bottom: var(--sp-4); }
.ast-bas, .charges-bas { margin-top: var(--sp-4); }
.ast-grille tr.auj th { color: var(--accent-encre); }
.formulaire .aide-champ { margin-top: var(--sp-2); }
/* Charges */
.chiffres-charges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tableau .retrait { padding-left: var(--sp-5); }
.tableau tr.l-direction th, .tableau tr.l-direction td { background: var(--surface-2); }
.places { align-self: start; }
/* Rapports */
.actions-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.apercu .tableau td { white-space: nowrap; }
.form-telecharger { margin-top: var(--sp-3); }
/* Paramètres */
.mention-complete { display: inline-block; margin-left: var(--sp-2); padding: 0 var(--sp-2); border-radius: var(--rayon-xs); background: var(--surface-2); color: var(--texte-2); font-size: var(--texte-xs); font-weight: 500; vertical-align: middle; }
.couleur { display: flex; align-items: center; gap: var(--sp-2); }
.couleur .champ { flex: 1; }
.champ-couleur { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--trait); border-radius: var(--rayon-xs); background: var(--surface); cursor: pointer; }
.pastille-couleur { width: 28px; height: 28px; border-radius: var(--rayon-xs); border: 1px solid var(--trait); flex: none; }
.message-reglage { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm); }
.message-reglage.ok { background: var(--ok-fond); color: var(--ok); }
.message-reglage.erreur { background: var(--erreur-fond); color: var(--erreur); }
.droits td.nb, .droits th.nb { text-align: center; }
.droits .oui { color: var(--ok); }
.droits .non { color: var(--texte-2); }
.pa-abs { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--sp-2); border: 1px solid; border-radius: var(--rayon-xs); font-size: var(--texte-xs); font-weight: 700; margin: 0 var(--sp-1) var(--sp-1) 0; }
.bilan dd.feries { font-weight: 600; }
.tableau tr.inactif td { color: var(--texte-2); text-decoration: line-through; }
/* Historique */
.filtre-histo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.filtre-histo label { color: var(--texte-2); font-size: var(--texte-sm); }
.journal td.quand { white-space: nowrap; color: var(--texte-2); }
.journal td:nth-child(2), .journal td:nth-child(3) { white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); }

/* ==== Tiroir sous 1 400 px : par-dessus la grille, sans l'écraser (à 1 280 px, un panneau fixe réduisait
   la grille à 784 px et coupait le vendredi : revue du 22/11/2026, MB-2) ==== */
@media (max-width: 1399px) {
  .app.avec-panneau { grid-template-columns: var(--larg-menu) minmax(0, 1fr); }
  .panneau { position: fixed; top: var(--haut-entete); right: 0; bottom: 0; height: auto; width: min(360px, 100vw); z-index: var(--z-tiroir); box-shadow: var(--ombre-3); }
}
@media (max-width: 1279px) {
  .filtres { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
  .lib-periode { min-width: 0; }
  .deux-col, .cra-gabarit { grid-template-columns: minmax(0, 1fr); }
  .chiffres-charges { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ==== Téléphone ==== */
@media (max-width: 767px) {
  /* Écart assumé au prototype : colonnes fixes resserrées pour laisser voir au moins deux demi-journées */
  :root { --larg-col-ressource: 116px; --larg-col-charge: 96px; }
  .k .l-long { display: none; } .k .l-court { display: inline; }
  .grille thead th.col-charge { font-size: var(--texte-xs); padding: 0 var(--sp-2); }
  .charge { padding: 0 var(--sp-2); }
  .l-dir th, .l-pole th { white-space: normal; }
  body { font-size: var(--texte-base); }
  .etapes { flex-wrap: nowrap; }
  .etapes li { flex: 1 1 0; min-width: 0; font-size: var(--texte-xs); }
  .entete { padding: 0 var(--sp-1) 0 var(--sp-3); gap: var(--sp-1); }
  .entete .bt-aide, .entete .bt-recherche, .titre-vue { display: none; }
  .marque { font-size: var(--texte-lg); }
  .notifs, .compte-menu { right: var(--sp-2); left: var(--sp-2); width: auto; }
  .app, .app.avec-panneau { display: block; }
  .menu { display: none; }
  .panneau { top: auto; left: 0; right: 0; width: auto; max-height: 78vh; border-left: 0; border-top: 1px solid var(--trait); border-radius: var(--rayon-md) var(--rayon-md) 0 0; padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom)); z-index: var(--z-tiroir); }
  /* le panneau du bas reste SOUS les messages et les fenêtres de confirmation (revue de l'écran des absences,
     parcours n° 1 : un refus passait derrière lui à 390 px), au-dessus de la barre du bas */
  .principal { padding: var(--sp-4) var(--sp-4) calc(88px + var(--sp-6)); }
  .barre-bas { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav); height: 64px;
    background: var(--surface); border-top: 1px solid var(--trait); padding-bottom: env(safe-area-inset-bottom); }
  .barre-bas a, .barre-bas button { text-decoration: none; display: grid; justify-items: center; align-content: center; gap: var(--sp-05); border: 0; background: none; color: var(--texte-2); font-size: var(--texte-xs); font-weight: 500; position: relative; }
  .barre-bas [aria-current="page"], .barre-bas .actif { color: var(--marine); font-weight: 700; }
  .barre-bas [aria-current="page"]::before, .barre-bas .actif::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .periode { gap: var(--sp-2); }
  .navsem { width: 100%; }
  .lib-periode { flex: 1; justify-content: center; font-size: var(--texte-sm); padding: 0 var(--sp-2); min-width: 0; white-space: normal; text-align: center; }
  .lib-periode svg { display: none; }
  .periode .sep-v { display: none; }
  .choix-periode { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
  .choix-periode .bt-seg { padding: 0 var(--sp-1); font-size: var(--texte-sm); }
  .choix-periode .l-long { display: none; } .choix-periode .l-court { display: inline; }
  .periode .droite { margin-left: 0; width: 100%; }
  .periode .droite .bt { flex: 1; }
  .filtres { grid-template-columns: 1fr 1fr; }
  .legende { gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) var(--sp-3); }
  /* Téléphone : la page défile ; la grille fait au plus la hauteur visible entre l'en-tête et la barre du bas,
     pour garder ses en-têtes de jours et sa colonne de noms collants, et rend la main à la page à ses bouts. */
  .grille-cadre { max-height: calc(100vh - var(--haut-entete) - 64px - env(safe-area-inset-bottom)); max-height: calc(100dvh - var(--haut-entete) - 64px - env(safe-area-inset-bottom));
    scroll-margin-top: var(--haut-entete); }
  .legende .leg { white-space: normal; }   /* les mentions longues de la vue longue débordaient la page de 10 px */
  .grille .l-res th { padding-left: var(--sp-3); }
  .l-res th .nom svg, .l-res th .quot { display: none; }
  .l-pole .repli { padding-left: var(--sp-3); }
  .messages { bottom: calc(64px + var(--sp-3)); }
  .tete-ecran h2 { font-size: var(--texte-lg); }
  .carte-jour { grid-template-columns: 1fr 1fr; }
  .carte-jour .jour-nom { grid-column: 1 / -1; }
  .carte-jour .bande-jour { grid-column: 1 / -1; }
  .dj-bt { min-height: 72px; }
  .cra-pied { position: fixed; left: var(--sp-2); right: var(--sp-2); bottom: 72px; margin: 0; z-index: var(--z-flottant); box-shadow: var(--ombre-2); }
  .jours-cra { padding-bottom: var(--haut-pied-cra, 150px); }
  .cra-pied { padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); }
  .cra-pied .bilan-court { font-size: var(--texte-sm); }
  .cra-pied .bt-plein { flex: 1 1 100%; }
  .choix-act { grid-template-columns: 1fr; }
  .voile.feuille { place-items: end stretch; padding: 0; }
  .voile.feuille .fenetre { width: 100%; border-radius: var(--rayon-md) var(--rayon-md) 0 0; max-height: 80vh; }
  .barre-h { grid-template-columns: 1fr; gap: var(--sp-1); }
  .barre-h .val { text-align: left; }
  .connexion .boite { padding: var(--sp-4); }
  .segment button, .segment a { padding: 0 var(--sp-3); }
  .segment { max-width: 100%; overflow-x: auto; }
  .tete-ecran .droite { margin-left: 0; width: 100%; }
  .chiffres-charges { grid-template-columns: 1fr 1fr; }
  .places .nom-p { min-width: 0; flex: 1 1 100%; }
  .pagination { flex-wrap: wrap; }
}

/* Palette de commandes (Ctrl+K) */
.liste-cmd { list-style: none; margin: var(--sp-2) 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.liste-cmd li { display: flex; align-items: center; gap: var(--sp-2); min-height: 42px; padding: 0 var(--sp-3); border-radius: var(--rayon-sm); cursor: pointer; }
.liste-cmd li small { color: var(--texte-2); }
.liste-cmd li[aria-selected="true"], .liste-cmd li:hover { background: var(--accent-fond); }

/* ==== Réglages et préférences (11/2026) ==== */
/* Bandeau « Mode démonstration » : date figée par l'administration. Informatif, jamais alarmant. */
.bandeau-date { display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-15) var(--sp-4);
  background: var(--accent-fond); color: var(--accent-encre); font-size: var(--texte-xs); font-weight: 600; border-bottom: 1px solid var(--trait); }
.bandeau-date > svg { flex: none; margin-top: 1px; }
.bandeau-date p { margin: 0; }
.bandeau-date a { color: inherit; text-underline-offset: 3px; font-weight: 500; margin-left: var(--sp-1); white-space: nowrap; }
/* Boîte « Mes préférences » et valeurs par défaut de l'organisation */
.groupe-pref { border: 0; margin: 0 0 var(--sp-3); padding: 0; display: grid; gap: var(--sp-2); }
.groupe-pref legend { font-weight: 700; font-size: var(--texte-sm); margin-bottom: var(--sp-1); padding: 0; }
.ligne-pref label { display: block; font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); }
.ligne-pref .select { width: 100%; }
.case-pref { display: flex; align-items: flex-start; gap: var(--sp-2); min-height: 44px; padding: var(--sp-2); border-radius: var(--rayon-sm); cursor: pointer; }
.case-pref:hover { background: var(--surface-2); }
.case-pref input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.case-pref small { display: block; color: var(--texte-2); font-size: var(--texte-xs); }
.intro-pref { margin: 0 0 var(--sp-3); }
.form-pref .pied { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.form-pref-oubli { margin-top: var(--sp-3); text-align: right; font-size: var(--texte-xs); }
.page-pref { max-width: 560px; }
.reglages-pref .groupe-pref { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.reglages-pref .groupe-pref legend { grid-column: 1 / -1; }
.date-actuelle { margin: 0 0 var(--sp-3); }
/* Préférence « Surligner aujourd'hui » décochée : le jour actuel n'est plus mis en avant. */
.sans-auj .grille thead th.auj { color: inherit; background: none; font-weight: inherit; }
.sans-auj .grille td.c-auj { background: none; }
.sans-auj .grille td.c-auj::after { display: none; }
.sans-auj .ast-dates td.auj { box-shadow: none; color: inherit; }
.sans-auj .carte-jour.auj { border-color: var(--trait); }
.sans-auj .ast-grille tr.auj th { color: inherit; }
/* Préférence « Griser les jours passés » : les cases passées sont atténuées. */
.griser-passe .grille td.c-passe > .k { opacity: 0.5; }
/* sauf le férié : son opacité l'aurait glissé sous la bande du férié avec son point d'astreinte (22/11/2026) */
.griser-passe .grille td.c-ferie > .k { opacity: 1; }
.griser-passe .grille thead th.passe { opacity: 0.6; }
.pied-form { margin-top: var(--sp-3); }
/* Boîte « Mes préférences » plus haute que l'écran (téléphone) : les boutons restent visibles. */
.fenetre-pref .form-pref .pied { position: sticky; bottom: calc(-1 * var(--sp-4)); margin: var(--sp-3) calc(-1 * var(--sp-4)) 0;
  padding: var(--sp-3) var(--sp-4); background: var(--surface); border-top: 1px solid var(--filet); }

/* Revue des parcours du 16/11/2026 : rien ne déborde à 390 px (légende de la Vue Projets, filtre de
   l'Historique) ; un long motif d'intervention se coupe au lieu d'être rogné. */
.leg.leg-texte { white-space: normal; min-width: 0; }
.filtre-histo { flex-wrap: wrap; min-width: 0; }
.filtre-histo .select { max-width: 100%; min-width: 0; }
.tableau td.motif { overflow-wrap: anywhere; min-width: 10rem; }
/* Paramètres › fiche d'une personne ou d'un projet (V1-6) */
.fiche-referentiel { max-width: 760px; }
.fiche-referentiel .message-reglage ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }
/* Essai 218 : avertissement de la fiche (quotité, affectations sur un jour devenu non travaillé) et régime daté */
.message-reglage.avert { align-items: flex-start; background: var(--attention-fond); color: var(--texte); }
.message-reglage.avert svg { color: var(--attention); flex: none; margin-top: var(--sp-05); }
.historique-regime { margin: var(--sp-2) 0 0; padding-left: var(--sp-4); color: var(--texte-2); font-size: var(--texte-xs); }
.historique-regime li + li { margin-top: var(--sp-05); }
.jours-off { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.jours-off legend { font-size: var(--texte-sm); color: var(--texte-2); margin-bottom: var(--sp-1); padding: 0; }
.formulaire .jours-off label, .formulaire .case-a-cocher { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; margin: 0; color: var(--texte); font-size: var(--texte-sm); }
.formulaire .jours-off input, .formulaire .case-a-cocher input { width: 18px; height: 18px; margin: 0; }
.bloc h3 .bt-petit { margin-left: auto; }
/* Confidentialité (V1-5) */
.boite-texte { max-width: 720px; text-align: left; }
.boite-texte h2 { font-size: var(--texte-lg, 1.125rem); margin: var(--sp-4) 0 var(--sp-2); }
.boite-texte p, .boite-texte li { color: var(--texte); line-height: 1.55; }
.lien-confidentialite { margin: var(--sp-3) 0 0; text-align: center; font-size: var(--texte-sm); }
/* Connexion par code (V1-4) */
.form-code { margin-bottom: var(--sp-3); }
.champ-code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; }

/* ==== Haut de page compact des écrans de planning (demande du dirigeant du 22/11/2026, « version Mac ») ====
   Deux étages au-dessus de la grille sur un portable : (1) période, durées, disposition, actions, légende
   repliée ; (2) filtres, « En déplacement », prochaine demi-journée libre. Commandes de 32 px à la souris ;
   au doigt (tablette, téléphone), les cibles de 44 px restent. */
/* Légende repliable : fermée par défaut, l'en-tête porte le résumé (visible si la place le permet,
   sinon dans l'infobulle et pour les lecteurs d'écran). */
.legende-pli { min-width: 0; }
.periode > .legende-pli { margin-left: auto; }
.periode > .droite + .legende-pli { margin-left: 0; }
.legende-tete { display: flex; align-items: center; gap: var(--sp-1); min-height: 44px; padding: 0 var(--sp-3); list-style: none; cursor: pointer;
  border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); color: var(--texte-2); font-size: var(--texte-xs); white-space: nowrap; }
.legende-tete::-webkit-details-marker { display: none; }
.legende-tete::marker { content: ""; }
.legende-tete:hover { background: var(--surface-2); color: var(--texte); }
.legende-titre { color: var(--texte); font-weight: 500; font-size: var(--texte-sm); }
.legende-resume { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.legende-tete .chev { margin-left: var(--sp-1); color: var(--texte-2); transition: transform var(--duree-rapide) var(--easing); }
.legende-pli[open] > .legende-tete { background: var(--accent-fond); border-color: var(--accent); color: var(--accent-encre); }
.legende-pli[open] > .legende-tete .legende-titre { color: var(--accent-encre); }
.legende-pli[open] > .legende-tete .chev { transform: rotate(180deg); color: var(--accent-encre); }
.legende-pli > .legende { margin: var(--sp-2) 0 0; }
.filtres .astuce { margin: 0; }
.astuce-texte { min-width: 0; }

@media (min-width: 768px) {
  .zone .ctx { position: relative; }   /* repère de la légende ouverte */
  .zone .periode, .ecran-astreintes > .periode { gap: var(--sp-2); }
  .zone .periode { margin-bottom: var(--sp-2); }
  .zone .filtres { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
  /* largeur de chaque filtre réglée sur sa première option (« Toutes les personnes »…) à 13 px */
  .zone .filtres .filtre { flex: none; width: 10rem; }
  .zone .filtres .filtre:has(#f-pole), .zone .filtres .filtre:has(#f-projet) { width: 8.5rem; }
  /* libellés des filtres : lus par les lecteurs d'écran ; la première option dit déjà le filtre */
  .zone .filtres .filtre label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  .zone .filtres .filtre-case { flex: none; align-self: center; min-height: 32px; padding: 0 var(--sp-1) 0 0; }
  /* la phrase « libre » prend la place restante ; trop longue, elle s'abrège (phrase entière dans l'infobulle) */
  .filtres .astuce { flex: 1 1 13rem; max-width: max-content; min-width: 0; gap: var(--sp-15); flex-wrap: nowrap; white-space: nowrap; min-height: 32px; padding: 0 var(--sp-2); font-size: var(--texte-xs); }
  .filtres .astuce > svg, .filtres .astuce > a { flex: none; }
  .filtres .astuce-texte { overflow: hidden; text-overflow: ellipsis; }
  /* légende ouverte : par-dessus la grille, sous les deux étages, sans la pousser */
  .zone .legende-pli[open] > .legende { position: absolute; left: 0; right: 0; top: calc(100% + var(--sp-1)); z-index: var(--z-nav); margin: 0; box-shadow: var(--ombre-3); border-color: var(--bordure); }
}
@media (min-width: 768px) and (max-width: 1679px) {
  .periode .legende-resume { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Souris ou pavé tactile : commandes de 32 px, icônes de 16 à 18 px */
@media (min-width: 768px) and (pointer: fine) {
  .periode .navsem .nav-bt { width: 32px; min-height: 30px; }
  .periode .navsem .nav-bt svg.ic { width: 18px; height: 18px; }
  .periode .lib-periode { min-width: 0; padding: 0 var(--sp-3); gap: var(--sp-15); font-size: var(--texte-sm); }
  .periode .lib-periode svg.ic { width: 16px; height: 16px; }
  .periode .bt { min-height: 32px; padding: 0 var(--sp-3); gap: var(--sp-15); font-size: var(--texte-sm); }
  .periode .sep-v { height: 20px; }
  .periode .bt-seg, .periode .choix-vue .bt-seg { min-height: 30px; padding: 0 var(--sp-2); font-size: var(--texte-sm); }
  .periode .bt-seg[aria-current="true"], .periode .choix-vue .bt-seg[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .periode .segment a { min-height: 30px; padding: 0 var(--sp-2); font-size: var(--texte-sm); }
  .zone .filtres .select { width: 100%; height: 32px; padding-left: var(--sp-2); padding-right: 24px; background-position: right 6px center; background-size: 14px; font-size: var(--texte-xs); }
  .zone .filtres .filtre-case input { width: 16px; height: 16px; }
  .zone .filtres .filtre-case label { font-size: var(--texte-xs); }
  .legende-tete { min-height: 32px; padding: 0 var(--sp-2) 0 var(--sp-3); }
}

/* Portables (jusqu'à 1 599 px) : durées en forme courte, Lignes | Colonnes en icônes, sans icône de calendrier ;
   sous 1 440 px, les deux actions en icône seule (nom complet dans l'infobulle et aria-label). */
@media (min-width: 768px) and (max-width: 1599px) {
  .periode .choix-periode .l-long { display: none; }
  .periode .choix-periode .l-court { display: inline; }
  .periode .choix-vue .l-bt { display: none; }
  .periode .choix-vue .bt-seg { min-width: 32px; padding: 0 var(--sp-2); }
  .periode .lib-periode svg { display: none; }
  .filtres .astuce > svg { display: none; }
}
#bt-roulement .l-court { display: none; }
@media (min-width: 768px) and (max-width: 1439px) {
  #bt-roulement .l-long { display: none; }
  #bt-roulement .l-court { display: inline; }
  #bt-roulement svg { display: none; }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .periode .bt-action .l-bt { display: none; }
  .periode .bt-action { min-width: 32px; padding: 0 var(--sp-2); }
}
/* Portable de 1 280 px (MacBook Air, parcours PA-10) : Planifier et Dupliquer gardent leur nom, la phrase
   « libre » et le choix du rôle se lisent en entier. La place vient d'écarts et de marges resserrés. */
@media (min-width: 1280px) and (max-width: 1439px) and (pointer: fine) {
  .zone .periode { gap: var(--sp-1); }
  .periode .navsem .lib-periode { padding: 0 var(--sp-2); }
  .periode .bt-seg, .periode .choix-vue .bt-seg, .periode .bt-pale { padding: 0 5px; }
  .periode .sep-v { display: none; }
  .periode .bt-action { padding: 0 var(--sp-2); gap: var(--sp-1); }
  .zone .filtres { gap: var(--sp-1); }
  .zone .filtres .filtre:has(#f-pole) { width: 7.375rem; }
  .zone .filtres .filtre:has(#f-projet) { width: 8rem; }
  .zone .filtres .filtre-case { padding: 0; }
  .zone .filtres .filtre-case label svg { display: none; }
  .filtres .astuce { padding: 0 var(--sp-15); gap: var(--sp-1); }
  .zone .filtres .filtre-case, .zone .filtres .filtre-case label { gap: var(--sp-1); }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  .entete-demo .lib-voir { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Téléphone : rien ne rétrécit ; la phrase « libre » et la légende prennent toute la largeur, dans le flux */
@media (max-width: 767px) {
  .filtres .astuce { grid-column: 1 / -1; margin: 0; }
  .periode > .legende-pli { width: 100%; margin-left: 0; }
  .legende-tete { white-space: normal; }
}

/* ==== Messages des écrans de planning (revue de parcours du 22/11/2026, P-12) ====
   Sur grand écran, l'écran de planning tient dans la hauteur de la fenêtre (body en colonne flex) : les
   messages y deviennent un bandeau DANS LE FLUX, sous la zone de travail. La grille raccourcit le temps du
   message au lieu d'être recouverte ; rien d'utile n'est masqué. Ailleurs (autres écrans, téléphone), le
   message flottant en bas d'écran reste. */
@media (min-width: 768px) and (min-height: 560px) {
  body:has(.app .zone) .messages { position: static; transform: none; width: auto; flex: none; pointer-events: auto;
    padding: 0 var(--sp-3) var(--sp-2) calc(var(--larg-menu) + var(--sp-3)); gap: var(--sp-1); }
  body:has(.app .zone) .messages:empty { display: none; }
  body:has(.app .zone) .message { max-width: 760px; padding: var(--sp-2) var(--sp-3); box-shadow: none; }
  body:has(.app .zone) .message .actions-msg { margin-top: 0; }
}

/* ==== Téléphone : titre de la vue et filtres lisibles (revue de parcours du 22/11/2026, P-11) ====
   Le titre de l'en-tête (h1) n'a pas la place au téléphone : il y devient invisible à l'œil mais reste lu par
   les lecteurs d'écran, et un titre court s'affiche en tête des écrans. Les filtres passent sur
   une colonne, libellé à gauche : la liste a toute la largeur, plus rien n'est tronqué. */
.titre-tel { display: none; }
@media (max-width: 767px) {
  .entete .titre-vue { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; border: 0; }
  /* Essai 220 : sur tous les écrans (le titre répété a quitté les pages), sauf ceux qui ont déjà le leur. */
  .principal:not(:has(> .tete-ecran h2)) > .titre-tel { display: block; margin: 0 0 var(--sp-3); font-size: var(--texte-lg); font-weight: 700; line-height: var(--interligne-titre); color: var(--texte); }
  .zone .filtres { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .zone .filtres .filtre { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: var(--sp-2); }
  .zone .filtres .filtre label { margin: 0; }
}
/* Téléphone : un seul message flottant à la fois (le plus récent), pour couvrir le moins possible la grille ;
   il disparaît seul (7 à 9 s) ou à la croix. */
@media (max-width: 767px) {
  .messages > .message:not(:last-child) { display: none; }
  .legende-tete .chev { margin-left: auto; }
}

/* ==== Guides (demande du dirigeant du 22/11/2026) : page Guides et parcours pas à pas (static/js/guides.js) ====
   Le halo et le fond ne captent aucun clic (pointer-events: none) : le geste attendu se fait sur la page.
   Positions posées par le script (CSSOM, autorisé par la CSP) ; aucune couleur hors des jetons. */
.intro-guides { max-width: 72ch; margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); }
.liste-guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--sp-4); }
.liste-guides > .bloc + .bloc { margin-top: 0; }
.guide-carte { display: flex; flex-direction: column; gap: var(--sp-4); }
.guide-carte h3 { margin: 0 0 var(--sp-1); font-size: var(--texte-base); }
.guide-corps > p { margin: 0; color: var(--texte-2); }
.guide-corps > .guide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); font-size: var(--texte-xs); }
.guide-duree { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--texte-2); }
.guide-corps > .guide-note { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm); background: var(--surface-2); color: var(--texte-2); font-size: var(--texte-sm); }
.guide-note svg { margin-top: 2px; }
.guide-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.guide-actions .bt[hidden] { display: none; }

.guide-fond { position: fixed; inset: 0; z-index: var(--z-guide); background: var(--voile-guide); pointer-events: none; }
.guide-halo { position: fixed; z-index: var(--z-guide); border-radius: var(--rayon-xs); pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 6px var(--accent-fond); }
.guide-bulle { position: fixed; z-index: calc(var(--z-guide) + 1); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto;
  background: var(--surface); color: var(--texte); border: 1px solid var(--trait); border-top: 3px solid var(--accent); border-radius: var(--rayon-md);
  box-shadow: var(--ombre-3); padding: var(--sp-2) var(--sp-4) var(--sp-4); }
.guide-bulle:focus { outline: none; }
.guide-fond[hidden], .guide-halo[hidden], .guide-bulle[hidden], .guide-efface { display: none; }
.guide-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-right: calc(-1 * var(--sp-3)); }
.guide-etape { margin: 0; font-size: var(--texte-xs); font-weight: 600; color: var(--texte-2); }
.guide-fermer { font-size: 1.5rem; line-height: 1; }
.guide-bulle h2 { margin: 0 0 var(--sp-2); font-size: var(--texte-lg); line-height: var(--interligne-titre); }
.guide-texte { margin: 0; }
.guide-geste { margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm); background: var(--accent-fond); color: var(--accent-encre); font-weight: 500; }
.guide-geste[hidden] { display: none; }
.guide-pied { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }
.guide-pied .bt { padding: 0 var(--sp-3); }
.guide-pied .bt:first-child:not(:only-child):not(.bt-plein) { margin-right: auto; border-color: transparent; color: var(--texte-2); }
.guide-pied .bt:first-child:not(:only-child):not(.bt-plein):hover { color: var(--texte); }
@media (max-width: 767px) {
  .guide-bulle { padding: var(--sp-1) var(--sp-3) var(--sp-3); }
  .guide-bulle h2 { font-size: var(--texte-base); }
  .guide-geste { margin-top: var(--sp-2); padding: var(--sp-1) var(--sp-2); }
  .guide-pied { margin-top: var(--sp-3); }
}

/* ==== « Remarque ou idée » (décision du dirigeant du 22/11/2026) : le formulaire, sa confirmation, la page
   « Remarques » de l'administration. Mêmes jetons que « Mes préférences » ; clair et sombre par les jetons. ==== */
.form-remarque { display: grid; gap: var(--sp-3); }
.form-remarque .intro-remarque, .form-remarque .auto-remarque { margin: 0; }
.message-remarque { position: static; margin: 0; box-shadow: none; }
.cat-remarque { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.cat-remarque legend { font-weight: 700; font-size: var(--texte-sm); margin-bottom: var(--sp-1); padding: 0; }
.cat-choix { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-2);
  border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface); cursor: pointer; font-weight: 500; }
.cat-choix input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.cat-choix:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-fond); color: var(--accent-encre); font-weight: 700; }
.cat-choix:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.champ-remarque label { display: block; font-weight: 600; font-size: var(--texte-sm); margin-bottom: var(--sp-1); }
.champ-remarque textarea { display: block; width: 100%; min-height: 76px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--bordure);
  border-radius: var(--rayon-sm); background: var(--surface); color: var(--texte); resize: vertical; font-size: 1rem; }
.form-remarque .pied, .merci-remarque .pied { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); margin-top: 0; }
.fenetre-remarque .form-remarque .pied { position: sticky; bottom: calc(-1 * var(--sp-4)); margin: 0 calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)); padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border-top: 1px solid var(--filet); }
.merci-remarque { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4) 0 0; text-align: center; }
.merci-remarque:focus { outline: none; }
.merci-remarque p { margin: 0; }
.merci-remarque .merci-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ok-fond); color: var(--ok); }
.merci-remarque .pied { justify-content: center; margin-top: var(--sp-3); }
.page-remarque { max-width: 600px; }
.filtre-remarques { margin-bottom: var(--sp-4); }
.liste-remarques { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.fiche-remarque { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-sm); padding: var(--sp-3) var(--sp-4); }
.tete-remarque { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); align-items: baseline; }
.tete-remarque .sous-titre { overflow-wrap: anywhere; }
.textes-remarque { margin: var(--sp-3) 0 0; display: grid; gap: var(--sp-1); }
.textes-remarque dt { font-weight: 600; font-size: var(--texte-sm); color: var(--texte-2); }
.textes-remarque dd { margin: 0 0 var(--sp-2); white-space: pre-line; overflow-wrap: anywhere; }
.pied-remarque { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--filet); }
.statut-remarque { display: flex; align-items: center; gap: var(--sp-2); }
@media (max-width: 640px) {
  .cat-remarque { grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-1); }
  .cat-choix { padding: 0 var(--sp-1); }
}

/* Avertir plutôt que bloquer : un avertissement à confirmer (app/services/avertissements.py). */
.message.attention, .regle.attention { background: var(--attention-fond); border-color: var(--attention); }
.message.attention > svg, .regle.attention > svg { color: var(--attention); }
.form-avertissement { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.form-avertissement textarea { min-height: 4.5em; }
.message.attention .details-msg { max-height: 40vh; overflow-y: auto; }

/* ==== « Réinitialiser les données de test » (bac à sable, lot RSP) ==== */
/* La mention « Données fictives » devient un bouton qui ouvre son menu (tout rôle simulé). */
.bt-fictive { gap: var(--sp-1); cursor: pointer; font-family: inherit; }
.bt-fictive:hover { border-color: var(--bordure); color: var(--texte); }
.entete-demo .ancre { position: relative; }
.menu-fictives { top: calc(100% + 6px); left: 0; width: 280px; }
.menu-fictives p { margin: var(--sp-1) var(--sp-2) var(--sp-2); color: var(--texte-2); font-size: var(--texte-xs); }
.menu-fictives .choix-liste a { color: var(--erreur); font-weight: 600; }
.alerte-remise { display: flex; align-items: center; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--rayon-sm);
  background: var(--erreur-fond); color: var(--erreur); }
.form-remise p { margin: 0; }
.fenetre-remise { max-width: 520px; }
.bloc-remise { max-width: 640px; }
@media (max-width: 767px) { .menu-fictives { position: fixed; left: var(--sp-3); right: var(--sp-3); width: auto; top: calc(var(--haut-entete) - 4px); } }
/* Fiche d'un projet clos : « Rouvrir le projet » (REV-B, PM-04). */
.rouvrir-projet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--bordure); border-radius: var(--rayon-sm); background: var(--surface-2); }
.rouvrir-projet .sous-titre { margin: 0; flex: 1 1 16rem; }
/* Vue Projets : projets clos repliés sous la grille (REV-B, PM-04). */
.projets-clos { margin-top: var(--sp-3); font-size: var(--texte-sm); }
.projets-clos > summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; gap: var(--sp-1); font-weight: 600; color: var(--texte-2); }
.projets-clos ul { margin: var(--sp-2) 0 0; padding-left: var(--sp-4); display: grid; gap: var(--sp-1); }
.projets-clos small { color: var(--texte-2); }

/* Démonstration du 23/11/2026 : au téléphone (écran étroit ou sans survol), pas de raccourci clavier annoncé. */
@media (max-width: 767px), (hover: none) and (pointer: coarse) { .raccourci { display: none; } }
/* Guide au téléphone : la feuille du panneau se réduit quand l'étape montre une case de la grille (guides.js). */
@media (max-width: 767px) { body.guide-panneau-bas .panneau { max-height: 34vh; } }
