:root {
  /* Fond presque blanc, chaud ; accents pastel. Le texte reste foncé sur
     toutes les couleurs de fond (contraste AA). --accent : liens et bordures,
     --bouton : aplats. */
  --fond: #fbf8f3; --carte: #fffefb; --texte: #2b2118; --discret: #6f6254;
  --bord: #ebe2d4; --accent: #a8492a; --accent-fort: #8c3a20;
  --bouton: #f4c2ac; --bouton-texte: #3a1a0c;
  --ok: #e9f3e3; --ok-bord: #5b9a47; --ok-texte: #3b6b2c; --alerte: #fdf0dc; --alerte-bord: #dd9440;
  --erreur: #fbe5e1; --erreur-bord: #a83b2e;
  --we: #f5eee3; --ferie: #ebe4f6;   /* férié : lilas, hors des teintes des vœux (retour du 04/11/2026) */
  /* Vacances scolaires (07/11/2026, choix C4 et E2 de l'utilisateur) :
     bleu ciel, seule famille de teintes libre à côté des vœux (rouge,
     orange, vert), du week-end (beige) et du férié (lilas). --vacances :
     ruban, légende, puces ; --vacances-halo : halo pâle du calendrier ;
     --vacances-filet : cadre de la période dans la vue d'ensemble ;
     texte : 5,8:1 sur le ruban. */
  --vacances: #c6ddf0; --vacances-halo: #d6e6f4; --vacances-filet: #8fb8dd; --vacances-texte: #24537a;
  --gris: #f1ece5; --rouge: #eea79f; --orange: #f6d29c; --vert: #b9ddb2;
  --sur-couleur: #2b1a12;
  --bord-champ: #9c8e7b;   /* bord des champs : 3,2:1 sur la carte (WCAG 1.4.11) */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1d1915; --carte: #26211c; --texte: #f1e8dc; --discret: #b3a390;
    --bord: #3b332b; --accent: #f0a888; --accent-fort: #f5bba1;
    --bouton: #e7a386; --bouton-texte: #23130b;
    --ok: #223019; --ok-bord: #8cc279; --ok-texte: #8cc279; --alerte: #3a2a16; --alerte-bord: #f0b061;
    --erreur: #3d1f1a; --erreur-bord: #ef8a7c;
    --we: #2d2721; --ferie: #302a3d;
    --vacances: #26405a; --vacances-halo: #22374b; --vacances-filet: #4f7aa3; --vacances-texte: #a9cdeb;
    --gris: #38312a; --rouge: #e8958c; --orange: #efc27f; --vert: #a3d19a;
    --sur-couleur: #1d1915;
    --bord-champ: #7a6d5e;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
/* Un nom mène à la personne (principe 1) : discret, souligné en pointillé ;
   « détail » à côté, le repli de la page */
a.personne { color: inherit; text-decoration: underline dotted var(--accent); text-underline-offset: 2px; }
a.personne:hover { color: var(--accent); text-decoration-style: solid; }
a.detail { font-size: .8rem; color: var(--discret); font-weight: normal; }
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; }
code { font-size: .9em; }
pre { background: var(--fond); padding: .6rem .8rem; border-radius: 6px; overflow-x: auto; }

.barre { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: .5rem; padding: .7rem 1.2rem; background: var(--carte); border-bottom: 1px solid var(--bord); }
.barre { border-top: 4px solid var(--bouton); }
.barre .marque { font-weight: 700; color: var(--accent); text-decoration: none; }
.barre nav { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.barre nav a { text-decoration: none; }
/* Recherche d'un praticien (ergonomie, étape 1) */
.barre .recherche-praticien input { width: 10rem; padding: .2rem .5rem; font-size: .9rem; }
.barre form { margin: 0; }
.barre .menu-site { display: none; }
/* « Plus ▾ » (ergonomie, étape 9) : le plus rare, en menu déroulant ; sans
   JavaScript (.repliable absent), les liens à plat */
.barre .plus { position: relative; display: flex; gap: 1.2rem; align-items: center; }
.barre .plus-bouton { display: none; }
.barre .plus-menu { display: flex; gap: 1.2rem; align-items: center; }
.barre.repliable .plus-bouton { display: inline; text-decoration: none; }
.barre.repliable .plus-menu button.lien { text-decoration: none; }
.barre.repliable .plus-bouton.courant { font-weight: 600; }
.barre.repliable .plus-menu { display: none; position: absolute; right: 0; top: calc(100% + .5rem); z-index: 50;
  flex-direction: column; align-items: stretch; gap: 0; min-width: 12rem; padding: .3rem 0;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.barre.repliable .plus.ouvert .plus-menu { display: flex; }
.barre.repliable .plus-menu a, .barre.repliable .plus-menu button.lien { display: block; padding: .4rem 1rem; text-align: left; width: 100%; }
.barre.repliable .plus-menu a:hover, .barre.repliable .plus-menu button.lien:hover { background: var(--fond); }
.barre.repliable .plus-menu .deconnexion { border-top: 1px solid var(--bord); margin-top: .3rem; padding-top: .3rem; }
/* Effectif : arrivée et départ sur la ligne du praticien ; ce qui manque
   (fiche, e-mail), là et dans l'aperçu d'une nouvelle campagne */
a.a-completer { font-size: .8rem; color: var(--accent); white-space: nowrap; }
table.effectif td.bilan-resume { white-space: nowrap; }
table.effectif .age, table.effectif .mail { text-align: center; white-space: nowrap; }
table.effectif .coche { color: var(--ok-texte); font-weight: 700; }
@media (min-width: 900px) { table.effectif td:nth-child(2) { min-width: 8rem; } }
/* Bilan d'un membre (R26) : en projet (planning généré, pas encore publié) à part */
tr.projet td, tr.projet th { font-style: italic; color: var(--discret); }
tr.intertitre th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--discret); padding-top: .7rem; }
/* Colonne figée (téléphone) : les noms de campagne passent à la ligne
   (largeur bornée sur un bloc : une cellule de tableau ignore max-width) */
table.bilan-equite tbody th { text-align: left; font-weight: 400; }
/* Antécédents (fêtes, fériés, week-ends, vacances), année après année */
table.antecedents td, table.antecedents thead th { text-align: center; white-space: nowrap; }
table.antecedents tbody th { text-align: left; font-weight: 400; white-space: nowrap; }
table.antecedents .prevu { font-style: italic; }
table.antecedents .absent { color: var(--discret); }
table.antecedents .total { border-left: 1px solid var(--bord); }
p.sommaire { margin: .2rem 0 1rem; }
:is(table.bilan-equite, table.bilan-temps) .titre-ligne { display: inline-block; max-width: 16rem; }
table.bilan-temps .couvre { display: block; font-size: .8rem; color: var(--discret); white-space: nowrap; }
@media (max-width: 640px) {
  :is(table.bilan-equite, table.bilan-temps) .titre-ligne { min-width: 8rem; max-width: 9rem; }
}
ul.campagnes-bilan { list-style: none; padding: 0; margin: 0; }
ul.campagnes-bilan li { padding: .25rem 0; }
/* Service courant (compte principal) : sélecteur en tête du menu */
.barre .service-courant label { display: flex; flex-direction: row; align-items: center; gap: .3rem;
  margin: 0; }
.barre .service-courant select { padding: .15rem .3rem; }
/* Propositions d'échange à traiter (R28) */
.barre .a-traiter { display: inline-block; min-width: 1.25rem; padding: 0 .35rem; margin-left: .2rem;
  border-radius: 99px; background: var(--accent); color: var(--carte); font-size: .75rem;
  font-weight: 700; line-height: 1.25rem; text-align: center; }
.echange + .echange { border-top: 1px solid var(--bord); margin-top: .8rem; padding-top: .8rem; }
.echange p { margin: 0 0 .5rem; }
ul.echanges-passes li + li { margin-top: .5rem; }
ul.effets { margin: 0 0 .5rem; padding-left: 1.2rem; font-size: .9rem; }
/* Annonces (R46) : sorte en étiquette, volontaires d'un poste vide */
.sorte-annonce { display: inline-block; padding: 0 .4rem; border-radius: 99px; font-size: .8rem;
  background: var(--fond); border: 1px solid var(--bord); white-space: nowrap; }
.volontaire { margin: .6rem 0 0 1rem; }
.resume-annonces span { white-space: nowrap; }
.volontaire + .volontaire { border-top: 1px dashed var(--bord); padding-top: .6rem; }
@media (max-width: 640px) {
  .barre.repliable .menu-site { display: inline-block; min-height: 2.4rem; padding: .3rem .9rem; }
  .barre.repliable nav { display: none; flex-basis: 100%; flex-direction: column; align-items: start; gap: .2rem; }
  .barre.repliable.ouvert nav { display: flex; }
  .barre.repliable nav a, .barre.repliable nav button.lien { display: block; padding: .45rem 0; }
  .barre.repliable .recherche-praticien { align-self: stretch; padding: .3rem 0; }
  .barre.repliable .recherche-praticien input { width: 100%; font-size: 1rem; }
  /* Au téléphone, « Plus » à plat dans « Menu » */
  .barre.repliable .plus, .barre.repliable .plus-menu, .barre.repliable .plus.ouvert .plus-menu {
    display: flex; position: static; flex-direction: column; align-items: start; gap: .2rem;
    min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .barre.repliable nav button.plus-bouton { display: none; }
  .barre.repliable .plus-menu a, .barre.repliable .plus-menu button.lien { padding: .45rem 0; }
  .barre.repliable .plus-menu .deconnexion { border-top: 0; margin-top: 0; padding-top: 0; }
}

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px;
  padding: 1.1rem 1.3rem; margin: 1.2rem 0; overflow-x: auto; }
.etroite { max-width: 380px; margin: 4rem auto; }
.entete { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; }
.discret, .aide { color: var(--discret); }
.aide { font-size: .88rem; margin: .3rem 0 .6rem; }

.message { padding: .55rem .8rem; border-radius: 6px; border-left: 4px solid var(--ok-bord); background: var(--ok); }
.message.erreur { border-color: var(--erreur-bord); background: var(--erreur); }
.message.attention { border-color: var(--alerte-bord); background: var(--alerte); }
.controles.ok { border-left: 5px solid var(--ok-bord); }
.controles.alerte { border-left: 5px solid var(--alerte-bord); background: var(--alerte); }
.controles.rouge { border-left: 5px solid var(--erreur-bord); background: var(--erreur); }
.rouge-texte { color: var(--erreur-bord); font-weight: 600; }
/* Repère dans une liste : poste modifié depuis la publication, poste proche (R45) */
.repere { color: var(--accent); font-weight: 600; font-size: .88em; }
/* Précisions des vœux (texte libre, 29/10/2026) */
p.commentaire { white-space: pre-line; border-left: 3px solid var(--accent); padding-left: .6rem; }
a.note-voeux { text-decoration: none; color: var(--accent); }
.controles li { margin: .3rem 0; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: middle; }
th { font-weight: 600; font-size: .85rem; color: var(--discret); }
.nombre { text-align: right; }
td.nombre { white-space: nowrap; }
/* Cellules courtes (horaires, valeurs) : sur une ligne, pour garder des
   rangées de hauteur égale */
td.serre, span.serre { white-space: nowrap; }
td.nombre .variante { white-space: normal; }
th.groupe-col { text-align: center; border-bottom: 2px solid var(--bord); }
tfoot td { font-weight: 600; border-bottom: none; }
tr.absent td { color: var(--discret); }

input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--carte); border: 1px solid var(--bord-champ); border-radius: 6px; padding: .35rem .5rem; }
/* Même hauteur pour champs et listes (Chrome donnait 33 à 37 px selon le type) */
input:where(:not([type=checkbox], [type=radio], [type=hidden])), select { height: 2.4rem; }
input[type=color] { padding: .2rem; cursor: pointer; }  /* V50 : pastille à la hauteur des champs */
/* Safari d'iOS (V55) : le champ de date natif dépassait la hauteur commune (50 pt contre 38)
   et centrait la date. WebKit tactile seulement : sur Mac, Safari connaît aussi
   -webkit-touch-callout, et le champ sans apparence y devenait rose une fois vide */
@media (pointer: coarse) { @supports (-webkit-touch-callout: none) {
  input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
  input::-webkit-date-and-time-value { margin: 0; text-align: left; }
} }
/* Safari : un champ de date ou d'heure vide montrait la date du jour ou 12:30
   (V58) ; champs.js le marque .sans-valeur (pas .vide : case non couverte du
   planning). -apple-system-body : Safari seulement */
@supports (font: -apple-system-body) {
  input.sans-valeur:not(:focus)::-webkit-datetime-edit { opacity: 0; }
}
.ligne-form > button { min-height: 2.4rem; }
/* Lecture seule visible (V04, V06) : champ sans fond, en pointillés ; une
   case non cochée s'efface avec son libellé */
input:disabled:where(:not([type=checkbox], [type=radio])), select:disabled, textarea:disabled {
  background: transparent; border-style: dashed; color: var(--discret); cursor: not-allowed; }
label.case:has(> input:disabled:not(:checked)) { opacity: .45; }
input:where(:not([type=checkbox], [type=radio])), textarea { width: 100%; }  /* :where : input.court l’emporte */
input.court { width: 6.5rem; }
.nombre input.court { text-align: right; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
label.case { flex-direction: row; align-items: center; gap: .4rem; }
label.case > input[type=checkbox], label.case > input[type=radio] { flex: none; margin: 0; }
label.case > input.court { flex: none; }
/* Case à cocher, puis champ et unité : sur une ligne, centrés (R21) */
.ligne-form.entier-active { align-items: center; }
fieldset { border: 1px solid var(--bord); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .4rem 1rem;
  margin: 0; }
fieldset .aide { flex-basis: 100%; margin: 0; }
.pile { display: flex; flex-direction: column; gap: .7rem; }
.ligne-form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; }
.ligne-form label:not(.case) { flex: 1 1 10rem; }
.ligne-form label:not(.case):has(> input[type=date]) { flex: 0 1 12rem; }
#rappels label { flex: 0 1 auto; }     /* onglet Saisie : champ court, bouton à côté */
.ligne-form + .ligne-form { margin-top: .8rem; }
.ligne-form.groupe { padding: .5rem 0; border-bottom: 1px solid var(--bord); align-items: center; }
.ligne-form.groupe label:not(.case) { flex: 0 1 10rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }  /* V45 : à la ligne sur téléphone */
.actions form { margin: 0; }

button:hover { filter: brightness(.95); }
button { background: var(--bouton); color: var(--bouton-texte); border: 0; border-radius: 6px;
  padding: .45rem 1rem; cursor: pointer; }
button.secondaire { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.lien { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button.danger { background: var(--erreur); color: var(--erreur-bord); border: 1px solid var(--erreur-bord); }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .8rem; }
details.danger summary { color: var(--erreur-bord); }
ul.paires { padding-left: 1.2rem; }
ul.paires li form { display: inline; margin-left: .6rem; }

.etat { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px;
  background: var(--we); vertical-align: middle; }
.etat.ouverte { background: var(--vert); color: var(--sur-couleur); }
.etat.close { background: var(--ferie); }
.etat.generee, .etat.publiee { background: var(--bouton); color: var(--bouton-texte); }

/* Grille de vœux */
.mois-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
table.mois { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; table-layout: fixed; }
table.mois caption { font-weight: 600; text-align: left; padding: .4rem 0; text-transform: capitalize; }
table.mois th { text-align: center; padding: .2rem; }
table.mois td { padding: 2px; border: none; }

@media (max-width: 600px) {
  main { padding: 1rem 16px 3rem; }
  .carte { padding: .9rem; }
  .mois-grille { grid-template-columns: 1fr; }
}

fieldset.nu { border: 0; padding: 0; margin: 0; display: block; min-width: 0; }
/* Formulaire en pile dont le contenu est dans un fieldset.nu (lecture seule
   possible) : l'espacement de la pile vaut aussi à l'intérieur */
.pile > fieldset.nu { display: flex; flex-direction: column; flex-wrap: nowrap; gap: .7rem; }
/* Largeur définie : sans elle, Chrome mesure la hauteur d'une rangée de
   champs comme si elle passait à la ligne (vide au-dessus des champs) */
.pile > .ligne-form, .pile > fieldset.nu > .ligne-form { width: 100%; }
fieldset.nu[disabled] input, fieldset.nu[disabled] select { opacity: .7; }
label.case.en-ligne { display: inline-flex; margin-right: .6rem; }
select.moyen { max-width: 22rem; }
table.formulaires td { vertical-align: middle; }
table.formulaires .actions { gap: .6rem; }
caption .discret { font-weight: 400; font-size: .8rem; margin-left: .4rem; text-transform: none; }

/* Planning */
a.bouton { display: inline-block; background: var(--bouton); color: var(--bouton-texte);
  padding: .45rem 1rem; border-radius: 6px; text-decoration: none; }
.mois-planning { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
table.planning { font-size: .85rem; border: 1px solid var(--bord); border-radius: 10px; background: var(--carte); }
table.planning caption { font-weight: 600; text-align: left; padding: .4rem 0; text-transform: capitalize; }
table.planning th, table.planning td { padding: .15rem .4rem; }
table.planning tbody th { font-weight: 400; white-space: nowrap; color: var(--discret); }
table.planning tr.lundi td, table.planning tr.lundi th { border-top: 2px solid var(--bord); }
table.planning tr.we { background: var(--we); }
table.planning tr.ferie { background: var(--ferie); }
table.planning td.ferme { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--bord) 4px 5px); }
.vide { color: var(--erreur-bord); font-weight: 600; background: var(--erreur); padding: 0 .2rem; border-radius: 3px; }
.ferme { color: var(--discret); font-size: .75rem; }
.nom.surligne { background: var(--bouton); color: var(--bouton-texte); font-weight: 600; padding: 0 .2rem; border-radius: 3px; }
td.ecart { color: var(--accent); font-weight: 600; }
#ical input { font-size: .8rem; }

@media print {
  .barre, .non-imprime, #diagnostic, .message { display: none !important; }
  body { background: #fff; color: #000; }
  .carte { border: 0; padding: 0; }
  table.planning { break-inside: avoid; }
}

/* Calendrier de vœux à pinceaux */
.barre-saisie { position: sticky; top: 0; background: var(--fond); padding: .5rem 0; z-index: 2; }
.pinceaux { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.resume-geste { margin: 0; font-size: .9rem; }
@media (max-width: 640px) {
  /* A14 : couleurs et portée tiennent en deux rangées qui défilent de côté */
  .barre-saisie .pinceaux, .barre-saisie .portees, .barre-saisie .portees-code { flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: .2rem; }
  .barre-saisie .pinceau, .barre-saisie .portee, .barre-saisie .portee-code { flex: none; }
  .barre-saisie .portees .aide { display: none; }
}
.pinceau { background: var(--carte); color: var(--texte); border: 2px solid var(--bord);
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; }
.pinceau[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; font-weight: 600; }
.pastille { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; border: 1px solid var(--bord); vertical-align: -.15rem; margin-right: .3rem; }
.compteurs { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.etat-saisie { min-height: 1.5em; font-size: .9rem; }
.etat-saisie.erreur { color: var(--erreur-bord); font-weight: 600; }
.etat-saisie.ok { color: var(--ok-texte); }  /* 6:1 sur le fond (A14) */
table.cal td { padding: 2px; }
table.cal td.we .jour.v-dispo { background: var(--we); }
table.cal td.ferie .jour.v-dispo { background: var(--ferie); }
.jour { width: 100%; min-height: 2.6rem; padding: .2rem; border-radius: 6px; font-weight: 600;
  border: 1px solid var(--bord); cursor: pointer; user-select: none; touch-action: manipulation; position: relative; }
.jour:disabled { cursor: default; }
.jour::after { position: absolute; right: 3px; bottom: 1px; font-size: .7rem; font-weight: 400; }
.v-dispo { background: var(--gris); color: var(--texte); }
.v-indispo { background: var(--rouge); color: var(--sur-couleur); }
.v-indispo.jour::after { content: "✕"; }
.v-non { background: var(--orange); color: var(--sur-couleur); }
.v-non.jour::after { content: "−"; }
.v-oui { background: var(--vert); color: var(--sur-couleur); }
.v-oui.jour::after { content: "✓"; }
.jour:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
form.periode { margin-top: 1rem; align-items: center; }
form.periode label.case input[type=date] { width: auto; }

/* Vue d'ensemble des vœux */
.legende-cal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.defile { overflow-x: auto; }
table.ensemble { width: auto; font-size: .78rem; border-collapse: separate; border-spacing: 0; }
table.ensemble th, table.ensemble td { padding: 1px; border-bottom: 0; text-align: center; }
table.ensemble tbody th, table.ensemble tfoot th { text-align: left; white-space: nowrap; padding-right: .6rem;
  position: sticky; left: 0; background: var(--carte); z-index: 1; font-weight: 400; }
table.ensemble thead th { font-weight: 600; line-height: 1.1; min-width: 1.5rem; }
table.ensemble thead th.we { background: var(--we); }
table.ensemble thead th.ferie { background: var(--ferie); }
/* Vacances scolaires (E2) : un ruban nommé au-dessus des jours (le nom
   s'il tient ; largeur nulle : il n'élargit jamais les colonnes), bouts
   arrondis au premier et au dernier jour, droits si la période continue
   sur le mois voisin ; dans la grille, un filet borde la période jusqu'en
   bas, sans rien colorer dedans. */
table.ensemble tr.ruban-vacances th { padding: 0 0 2px; min-width: 0; font-size: .68rem; line-height: 1.1rem; }
table.ensemble tr.ruban-vacances th.vac span { display: block; width: 0; min-width: 100%; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; text-align: left; padding: 0 .3rem;
  height: 1.1rem; background: var(--vacances); color: var(--vacances-texte); }
table.ensemble tr.ruban-vacances th.vac-debut span { border-radius: 99px 0 0 99px; padding-left: .5rem; }
table.ensemble tr.ruban-vacances th.vac-fin span { border-top-right-radius: 99px; border-bottom-right-radius: 99px; }
table.ensemble tbody td.vac-debut { border-left: 2px solid var(--vacances-filet); }
table.ensemble tbody td.vac-fin { border-right: 2px solid var(--vacances-filet); }
table.ensemble tbody tr:last-child td.vac { border-bottom: 2px solid var(--vacances-filet); }
.pastille.vacances-pastille { width: 1.6rem; border-color: transparent; border-radius: 99px;
  background: var(--vacances); }
table.ensemble .lundi { border-left: 2px solid var(--bord); }
table.ensemble tr.groupe th { text-transform: capitalize; font-weight: 600; color: var(--accent); padding-top: .5rem; }
table.ensemble .case { display: block; width: 1.3rem; height: 1.1rem; border-radius: 3px; margin: auto; }
table.ensemble .case.v-dispo { background: var(--gris); }
table.ensemble tfoot td { font-weight: 600; }
table.ensemble tfoot tr:first-child th, table.ensemble tfoot tr:first-child td { border-top: 2px solid var(--bord); }
table.ensemble td.ferme { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--bord) 3px 4px); }
.critique-0 { background: var(--rouge); color: var(--sur-couleur); border-radius: 3px; padding: 0 .3rem; }
.critique-1 { background: var(--orange); color: var(--sur-couleur); border-radius: 3px; padding: 0 .3rem; }

/* Planning en calendrier : léger, une ligne par colonne d'affichage */
.onglets { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.onglets a { padding: .25rem .8rem; border-radius: 99px; border: 1px solid var(--bord); text-decoration: none; }
.onglets a.actif { background: var(--bouton); color: var(--bouton-texte); border-color: var(--bouton); }
/* Praticiens de la campagne : le nom sur une ligne, la fiche résumée à côté (ergonomie, étape 7) */
.praticiens-campagne td:first-child { white-space: nowrap; }
table.planning-cal { table-layout: fixed; margin-bottom: 1.6rem; font-size: .8rem; border-collapse: separate; border-spacing: 3px; }
table.planning-cal caption { font-weight: 600; text-align: left; padding: .4rem 0; font-size: 1rem; text-transform: capitalize; }
table.planning-cal caption .discret { text-transform: none; font-weight: 400; font-size: .8rem; }
table.planning-cal th { text-align: center; font-weight: 500; color: var(--discret); border: 0; }
table.planning-cal td { vertical-align: top; border: 0; border-radius: 6px; padding: .3rem .35rem .35rem;
  background: var(--carte); box-shadow: 0 0 0 1px var(--bord) inset; }
table.planning-cal td.we { background: var(--we); }
table.planning-cal td.ferie { background: var(--ferie); }
table.planning-cal td.hors { background: transparent; box-shadow: none; }
table.planning-cal .num { font-weight: 600; font-size: .75rem; color: var(--discret); margin-bottom: .1rem; }
.tag-ferie { font-size: .7rem; font-weight: 400; background: var(--carte); border-radius: 99px; padding: 0 .35rem; }
table.planning-cal .col { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; line-height: 1.3;
  padding-left: .4rem; margin: .1rem 0; border-left: 3px solid var(--c); }
table.planning-cal .col .groupe { display: flex; align-items: baseline; gap: .15rem; min-width: 0; }
table.planning-cal .col .groupe .nom, table.planning-cal .col .groupe a.edit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.planning-cal .col a.edit { display: inline; }
.icone { color: var(--discret); font-size: .8rem; line-height: 1; flex: none; }
a.edit.icone { padding: 0 .1rem; }
.partie { font-size: .7rem; color: var(--discret); margin-right: .15rem; text-transform: uppercase; letter-spacing: .02em; }
.nom { white-space: nowrap; }
.nom.verrou { font-style: italic; }   /* poste verrouillé : décision manuelle */
table.planning .sous { line-height: 1.35; }
table.planning .sous + .sous { border-top: 1px dashed var(--bord); }
@media (max-width: 700px) {
  table.planning-cal { font-size: .72rem; border-spacing: 2px; }
  table.planning-cal td { padding: .15rem .2rem; }
  .nom { white-space: normal; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  /* un mois sur une page A4, six semaines comprises (V53) : plus haut, il
     partait seul sur la page suivante et laissait la première blanche */
  table.planning-cal { break-inside: avoid; break-after: page; font-size: .6rem; border-spacing: 1px; margin: 0; }
  table.planning-cal td { padding: .05rem .2rem; }
  table.planning-cal .col { line-height: 1.1; }
  table.planning-cal .num { font-size: .6rem; margin: 0; }
  table.planning-cal .col.sep-plan { margin-top: .1rem; padding-top: .1rem; }
  table.planning-cal caption { padding: 0 0 .2rem; }
  table.planning-cal:last-of-type { break-after: auto; }   /* pas de page blanche à la fin */
  /* une semaine ne se coupe pas ; deux par page (tailles plus bas) */
  table.planning-sem { break-inside: avoid; font-size: .85rem; }
}

/* Vue semaine */
table.planning-sem { table-layout: fixed; margin-bottom: 1.6rem; border-collapse: separate; border-spacing: 3px; }
table.planning-sem caption { font-weight: 600; text-align: left; padding: .4rem 0; font-size: 1.05rem; }
table.planning-sem th { font-weight: 600; font-size: .85rem; border: 0; }
table.planning-sem thead th { text-align: center; color: var(--discret); }
table.planning-sem thead th.we, table.planning-sem td.we { background: var(--we); }
table.planning-sem thead th.ferie, table.planning-sem td.ferie { background: var(--ferie); }
table.planning-sem tbody th { width: 9rem; padding-left: .5rem; background: var(--carte); border-radius: 6px; }
table.planning-sem td { border: 0; border-radius: 6px; padding: .45rem .5rem; background: var(--carte);
  box-shadow: 0 0 0 1px var(--bord) inset; text-align: center; }
table.planning-sem td.ferme { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--bord) 6px 7px); box-shadow: none; }
table.planning-sem td.hors { background: transparent; box-shadow: none; }
table.planning-sem tr.sep-plan > * { border-top: 3px solid var(--texte, #444); }
table.planning-sem .partie { display: block; margin: 0; }
@media (max-width: 700px) { table.planning-sem { font-size: .7rem; border-spacing: 2px; } table.planning-sem tbody th { width: 4.5rem; } table.planning-sem td { padding: .2rem; } }

.pastille-ligne { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: .05rem; }

/* Campagne choisie : en-tête et onglets */
.campagne-barre { background: var(--carte); border-bottom: 1px solid var(--bord); padding: .6rem 0 0; }
.campagne-titre { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.campagne-titre a { text-decoration: none; }
.onglets-campagne { display: flex; gap: .2rem; overflow-x: auto; max-width: 1100px; margin: .5rem auto 0; padding: 0 .1rem; }
.onglets-campagne a { padding: .5rem .9rem; text-decoration: none; color: var(--texte); border-bottom: 3px solid transparent; white-space: nowrap; }
.onglets-campagne a[aria-current="page"] { border-bottom-color: var(--bouton); font-weight: 600; }
.onglets-campagne a:hover { background: var(--fond); }
/* Synthèse : phases de la campagne en ligne, puis la liste « À faire » */
.phases { list-style: none; padding: 0; margin: .4rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; color: var(--discret); }
.phases li { display: flex; align-items: center; gap: .4rem; }
.phases .num { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--gris); font-weight: 700; font-size: .85rem; color: var(--texte); }
.phases li.faite .num { background: var(--vert); color: var(--sur-couleur); }
.phases li.encours { color: var(--texte); font-weight: 600; }
.phases li.encours .num { background: var(--bouton); color: var(--bouton-texte); }
.ou-en-est .ligne-form { justify-content: space-between; }
.ou-en-est p { margin: 0; flex: 1 1 24rem; }
.a-faire { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.a-faire li { display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: space-between; align-items: baseline;
  padding: .5rem .8rem; border: 1px solid var(--bord); border-left: 5px solid var(--gris); border-radius: 6px; }
.a-faire li.rouge { border-left-color: var(--erreur-bord); background: var(--erreur); }
.a-faire li.orange { border-left-color: var(--alerte-bord); }
.a-faire .quoi { flex: 1 1 20rem; }
.a-faire .ou { white-space: nowrap; font-weight: 600; }
.choix-campagnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
a.carte.choix { display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: var(--texte);
  margin: 0; padding: 1.3rem 1.4rem; min-height: 9rem; border-left: 5px solid var(--bord); }
a.carte.choix:hover { border-color: var(--bouton); box-shadow: 0 0 0 1px var(--bouton) inset; }
a.carte.choix strong { font-size: 1.3rem; line-height: 1.25; }
a.carte.choix .pied { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; }
/* Période : en cours (mise en avant), à venir, passée (atténuée) */
a.carte.choix.en_cours { border-left-color: var(--ok-bord); }
a.carte.choix.a_venir { border-left-color: var(--bouton); }
a.carte.choix.passee { opacity: .75; }
span.periode { align-self: flex-start; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--discret); }
span.periode.en_cours { color: var(--ok-texte); }
/* Jours fériés de la campagne : une puce par jour, décochable */
.liste-feries { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-bottom: .5rem; }
label.ferie-puce { display: inline-flex; padding: .25rem .6rem; border-radius: 99px;
  background: var(--ferie); font-size: .9rem; white-space: nowrap; }
label.ferie-puce:has(input:not(:checked)) { opacity: .5; text-decoration: line-through; }
label.vacances-puce { background: var(--vacances); }   /* le bleu des vues des vœux (le vert était celui de « Volontaire ») */
fieldset.dates-campagne { display: block; border: none; padding: 0; margin: .4rem 0 .6rem; }
fieldset.dates-campagne .ajout-date { margin-top: .5rem; }
#horizon form.en-edition select { width: auto; }
fieldset.dates-campagne legend { font-weight: 600; }
fieldset.dates-campagne > .aide { margin: 0 0 .4rem; }
.ajout-date { display: flex; flex-direction: row; align-items: center; gap: .5rem; }
.ajout-date input { width: auto; }
/* Lecture par défaut : ni cases, ni ajout ; « Modifier ces dates » les montre */
#horizon .ferie-puce input, #horizon .ajout-date, #horizon .en-edition { display: none; }
/* En lecture, un clic sur la puce ne doit pas décocher la case cachée */
#horizon .ferie-puce { pointer-events: none; cursor: default; }
#horizon:has(.basculer:checked) .ferie-puce { pointer-events: auto; cursor: pointer; }
#horizon:has(.basculer:checked) .ferie-puce input { display: inline-block; }
#horizon:has(.basculer:checked) .ajout-date, #horizon:has(.basculer:checked) .en-edition { display: flex; }
#horizon:has(.basculer:checked) p.en-edition { display: block; }
label.basculer-dates { display: inline-flex; width: auto; font-size: .9rem; color: var(--accent); }
details.campagnes-passees > summary { cursor: pointer; font-weight: 600; margin: .5rem 0 1rem; color: var(--discret); }

/* Retouches manuelles */
.retouches { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; }
table.compact td { padding: .15rem .4rem; }
.barre-ecart { width: 40%; }
.barre-ecart span { display: block; height: .55rem; border-radius: 3px; }
.barre-ecart .moins { background: var(--orange); }
.barre-ecart .plus { background: var(--rouge); }
ul.modifs { padding-left: 1.1rem; max-height: 16rem; overflow-y: auto; margin: 0; }
/* Guide d'équité : trois pastilles, une liste à la fois (ergonomie, étape 8 ;
   retouches.js) ; sans script, les trois listes sous leur titre */
.pastilles-guide { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .7rem; }
.pastilles-guide[hidden] { display: none; }
button.pastille-guide { background: transparent; color: var(--texte); border: 1px solid var(--bord);
  border-radius: 99px; padding: .2rem .75rem; font-weight: 600; }
button.pastille-guide[aria-pressed="true"] { background: var(--bouton); color: var(--bouton-texte); border-color: var(--bouton); }
.pastille-guide .compte { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; margin-left: .25rem;
  border-radius: 99px; background: var(--gris); color: var(--texte); font-size: .85em; text-align: center; }
.pastille-guide.orange .compte { background: var(--alerte); border: 1px solid var(--alerte-bord); }
.pastille-guide.rouge .compte { background: var(--erreur); color: var(--erreur-bord); border: 1px solid var(--erreur-bord); }
.guide .titre-guide { font-weight: 700; margin: .8rem 0 .2rem; }
.guide.bascule .titre-guide { display: none; }
.guide h3 { font-size: .95rem; margin: .5rem 0 .2rem; }
a.edit { color: inherit; text-decoration: none; display: block; border-radius: 3px; }
a.edit:hover { background: var(--bouton); color: var(--bouton-texte); }
table.planning-cal td:target, table.planning tr:target { outline: 3px solid var(--bouton); }
dialog.editeur { max-width: min(900px, 95vw); width: 100%; border: 1px solid var(--bord); border-radius: 12px;
  background: var(--carte); color: var(--texte); padding: 1rem 1.2rem; }
dialog.editeur::backdrop { background: rgb(0 0 0 / .35); }
table.candidats { font-size: .88rem; }
table.candidats tr.deconseille td { color: var(--discret); }
table.candidats tr.titulaire { background: var(--we); }
table.candidats td.petit { font-size: .78rem; max-width: 22rem; }
.ok-texte { color: var(--ok-texte); font-weight: 700; }
form.en-ligne { display: inline; margin-left: .5rem; }
#competences form.en-ligne { display: flex; gap: .5rem; align-items: center; margin: 0; }
#competences form.en-ligne input.moyen { width: 12rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

.actions.envois { flex-wrap: wrap; }
td.petit { font-size: .82rem; }

/* Calendrier de vœux : cases plus grandes, numéros discrets (la couleur prime) */
.calendrier .mois-grille { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 1.4rem; }
.calendrier table.mois caption { font-size: 1.05rem; padding: .5rem 0; }
.calendrier table.mois th { font-weight: 500; color: var(--discret); font-size: .85rem; }
.calendrier table.cal td { padding: 3px; }
.calendrier .jour { min-height: 3.4rem; font-size: .95rem; font-weight: 400; letter-spacing: .01em;
  color: var(--discret); text-align: left; vertical-align: top; padding: .35rem .45rem; }
.calendrier .jour.v-indispo, .calendrier .jour.v-non, .calendrier .jour.v-oui {
  color: color-mix(in srgb, var(--sur-couleur) 62%, transparent); }
.calendrier .jour::after { right: 6px; bottom: 4px; font-size: .95rem; color: var(--sur-couleur); opacity: .75; }
.calendrier .pinceau { padding: .6rem 1rem; font-size: .95rem; }
.calendrier .pinceau .pastille { width: 1.1rem; height: 1.1rem; }
@media (max-width: 600px) {
  .calendrier .jour { min-height: 2.9rem; font-size: .85rem; padding: .25rem .3rem; }
  .calendrier .jour::after { right: 3px; bottom: 2px; font-size: .8rem; }
  .calendrier table.cal td { padding: 2px; }
}
.calendrier .mois-grille, .mois-grille.mon-cal { align-items: start; }  /* mois non étirés (V56 : Firefox étirait l'en-tête) */
.calendrier .jour { display: flex; align-items: flex-start; justify-content: flex-start; }

/* Règles du service : document long, lu d'une traite */
.document { max-width: 52rem; line-height: 1.55; margin-left: auto; margin-right: auto; }
.document h1 { margin-top: 0; }
.document h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bord); font-size: 1.25rem; }
.document h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.document hr { display: none; }
.document table { margin: .6rem 0 1rem; font-size: .92rem; }
.document td, .document th { vertical-align: top; }
@media (max-width: 700px) { .document table { display: block; overflow-x: auto; } }

/* Profil : indisponibilités récurrentes, retirables une à une */
ul.recurrents { padding-left: 1.2rem; }
ul.recurrents li form { display: inline; margin-left: .6rem; }
form.enchainement { padding: .6rem 0 1rem; border-bottom: 1px solid var(--bord); margin-bottom: .6rem; }
form.enchainement .actions { display: flex; gap: 1rem; align-items: center; }
table.ensemble .case.demi { display: flex; flex-direction: column; overflow: hidden; }
table.ensemble .case.demi > span { flex: 1; }
table.ensemble .case.demi > .v-dispo { background: var(--gris); }
table.ensemble .case.demi > span + span { border-top: 1px solid var(--carte); }

/* Calendrier de vœux : une case = ses unités (R9) : quatre quarts (matin |
   après-midi en haut, soirée | nuit en bas), ou jour et nuit, ou la journée
   entière ; colorées chacune, séparées seulement si leurs couleurs diffèrent
   (calendrier.js) ; le numéro et le code par-dessus. */
.calendrier .jour { overflow: hidden; background: var(--gris); }
.calendrier .moitie { position: absolute; }
.calendrier .u-mat-apm-soir-nuit { inset: 0; }
.calendrier .u-mat-apm { top: 0; left: 0; right: 0; height: 50%; }
.calendrier .u-soir-nuit { bottom: 0; left: 0; right: 0; height: 50%; }
.calendrier .u-mat { top: 0; left: 0; width: 50%; height: 50%; }
.calendrier .u-apm { top: 0; right: 0; width: 50%; height: 50%; }
.calendrier .u-soir { bottom: 0; left: 0; width: 50%; height: 50%; }
.calendrier .u-nuit { bottom: 0; right: 0; width: 50%; height: 50%; }
.calendrier .moitie.coupe-g { border-left: 1px dashed color-mix(in srgb, var(--texte) 25%, transparent); }
.calendrier .moitie.coupe-h { border-top: 1px dashed color-mix(in srgb, var(--texte) 25%, transparent); }
.calendrier .u-mat::after, .calendrier .u-soir::after { right: 3px; }
.portees .plus-fin { margin-left: .6rem; }
.portee.fine { font-size: .85rem; padding: .25rem .55rem; }
table.cal td.we .moitie.v-dispo { background: var(--we); }
table.cal td.ferie .moitie.v-dispo { background: var(--ferie); }
/* Vacances scolaires (C4) : une période, pas une nature de jour. Le
   week-end et le férié remplissent la case ; la période l'entoure d'un
   halo pâle, une bande par semaine, qui se lit aussi autour d'un férié ou
   d'un week-end de vacances (Noël). Bouts arrondis au bord de la semaine
   et de la période ; forme distincte du férié, que l'œil deutéranope
   confond avec le bleu. */
table.cal td.vac { position: relative; isolation: isolate; }
table.cal td.vac::before { content: ""; position: absolute; inset: 1px 0; z-index: -1;
  background: var(--vacances-halo); }
table.cal td.vac:is(:first-child, .vac-debut, td:not(.vac) + td)::before {
  left: 1px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
table.cal td.vac:is(:last-child, .vac-fin, :not(:has(+ td.vac)))::before {
  right: 1px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
/* Sous le jour, le fond de la carte : un jour estompé (saisie close,
   button:disabled) laisserait sinon voir le halo à travers toute la case */
table.cal td.vac::after { content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: 6px;
  background: var(--carte); }
@media (max-width: 600px) { table.cal td.vac::after { inset: 2px; } }
.calendrier .num { position: relative; z-index: 1; }
/* Férié : un « F » en bas à gauche, le seul coin libre (les signes ✕ − ✓
   sont à droite de chaque unité, le numéro en haut à gauche) ; foncé dès
   que l'unité qui le porte est colorée, comme le numéro (A14). */
.calendrier .marque-ferie { position: absolute; left: 6px; bottom: 3px; z-index: 1; font-size: .7rem;
  font-weight: 700; line-height: 1; color: var(--discret); pointer-events: none; }
@media (max-width: 600px) { .calendrier .marque-ferie { left: 3px; bottom: 2px; } }
.calendrier .jour:has(> .moitie:is(.u-soir, .u-soir-nuit, .u-mat-apm-soir-nuit):not(.v-dispo)) .marque-ferie {
  color: var(--sur-couleur); }
.pastille.ferie-pastille { background: var(--ferie); font-size: .7rem; font-weight: 700; line-height: 1rem;
  text-align: center; color: var(--discret); }
.calendrier .moitie::after { position: absolute; right: 6px; bottom: 1px; font-size: .8rem;
  color: var(--sur-couleur); opacity: .75; }
.calendrier .moitie.v-indispo::after { content: "✕"; }
.calendrier .moitie.v-non::after { content: "−"; }
.calendrier .moitie.v-oui::after { content: "✓"; }
.calendrier .moitie.code::after { content: none; }
.calendrier .moitie.rec::after { content: "⟳"; }
.calendrier .etiquette { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .9rem; color: var(--sur-couleur);
  z-index: 1; pointer-events: none; }
.calendrier .jour[data-verrou] { outline: 2px solid var(--sur-couleur); outline-offset: -2px; }
/* R12 (19/11/2026) : week-end ou férié couvert d'office entre deux jours
   de CA, CF, EXT (data-couvert, calendrier.js) : hachures du rouge
   par-dessus les unités (un vert posé ne le rouvre pas), sous le numéro et
   le code ; numéro, « F » et code, foncés et détourés du fond de la carte,
   se lisent sur les deux (contrôle du 19/11/2026 : le numéro, discret,
   disparaissait dans les hachures en sombre). */
.calendrier .jour[data-couvert]::before { content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--rouge) 0 4px, transparent 4px 9px); }
.calendrier .jour[data-couvert] :is(.etiquette, .num, .marque-ferie) { z-index: 2; color: var(--texte);
  text-shadow: 0 0 2px var(--carte), 0 0 3px var(--carte), 0 0 5px var(--carte); }
.calendrier .jour[data-couvert] .etiquette { font-weight: 600; font-style: italic; }
.code-pastille { width: auto; min-width: 1rem; padding: 0 .25rem; font-size: .7rem; font-weight: 700;
  line-height: 1rem; text-align: center; color: var(--sur-couleur); }
.portees, .portees-code { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .5rem; }
.portee, .portee-code { background: var(--carte); color: var(--texte); border: 2px solid var(--bord); padding: .3rem .7rem; }
.portee[aria-pressed="true"], .portee-code[aria-pressed="true"] { border-color: var(--accent); font-weight: 600; }

/* Planning de service : choix du plan, tableau praticiens × jours */
.onglets.plans a { font-weight: 600; }
/* Postes doubles coupés après « + » (<wbr>) : Firefox ignore <wbr> sous nowrap (V46) */
table.tableau-service td { min-width: 1.7rem; font-size: .72rem; }
table.tableau-service td.we { background: var(--we); }
table.tableau-service .poste { display: block; border-radius: 3px; padding: 1px 2px; font-weight: 600; }
table.tableau-service .poste-jour { background: color-mix(in srgb, var(--vert) 55%, transparent); }
table.tableau-service .poste-garde { background: color-mix(in srgb, var(--bouton) 60%, transparent); }
table.tableau-service .absence { color: var(--erreur-bord); font-weight: 600; }
table.tableau-service tr.surligne-ligne th { color: var(--accent); }
.tableau-mois h3 { margin: 1.2rem 0 .4rem; }
/* Planning de service : les gardes sous les journées, séparées d'un trait */
.planning-cal .col.sep-plan { margin-top: .25rem; padding-top: .25rem;
  border-top: 1px dashed color-mix(in srgb, var(--texte) 30%, transparent); }

/* Téléphone (A13) : la colonne des dates, ou des noms, reste visible quand
   un tableau large défile ; encadrés repliables avant le planning. */
table.planning tbody th, table.planning thead th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--carte); }
table.planning tr.we > th { background: var(--we); }
table.planning tr.ferie > th { background: var(--ferie); }
.defile > table:not(.ensemble):not(.planning) tr > :first-child {
  position: sticky; left: 0; z-index: 1; background: var(--carte); }
:is(main, main > form) > .defile > table:not(.ensemble):not(.planning) tr > :first-child { background: var(--fond); }
details.carte > summary { list-style: none; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary h2 { display: inline; }
fieldset.enchainements table { width: auto; }
fieldset.enchainements th, fieldset.enchainements td { text-align: center; padding: .25rem .6rem; }
fieldset.enchainements tbody th { text-align: left; font-weight: 400; color: var(--texte); font-size: .9rem; }
details.carte > summary h2 .discret { font-weight: 400; font-size: .75em; }
details.carte > summary h2::after { content: " ▾"; color: var(--discret); font-size: .8em; }
details.carte:not([open]) > summary h2::after { content: " ▸"; }
details.carte[open] > summary { margin-bottom: .6rem; }
@media (max-width: 640px) {
  .mois-planning { grid-template-columns: minmax(0, 1fr); }
  table.planning { font-size: .9rem; }
}

/* A14 : le numéro d'un jour prend la couleur du texte « sur couleur » dès
   que l'unité qui le porte (en haut à gauche : matin, jour, journée entière)
   est colorée : 7,5:1 au moins. Le code (.etiquette) l'a toujours. */
.calendrier .jour:has(> .moitie:is(.u-mat, .u-mat-apm, .u-mat-apm-soir-nuit):not(.v-dispo)) .num {
  color: var(--sur-couleur); }

/* Vue présence (inspirée du tableur du service) : une couleur par praticien */
table.presence { table-layout: fixed; border-collapse: collapse; margin-bottom: 2rem; font-size: .78rem;
  background: var(--carte); }
table.presence caption { font-weight: 600; text-align: left; padding: .4rem 0; font-size: 1.1rem; text-transform: capitalize; }
table.presence caption .discret { text-transform: none; font-weight: 400; font-size: .8rem; }
table.presence col.c-jour { width: 3.2rem; } table.presence col.c-tranche { width: 2.4rem; }
table.presence col.c-abs { width: 16rem; }
table.presence th, table.presence td { border: 1px solid var(--bord); padding: .12rem .3rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 1.35rem; }
table.presence thead th { font-size: .78rem; color: var(--texte); background: var(--we); }
table.presence th.jour { background: var(--we); font-weight: 400; line-height: 1.2; }
table.presence th.tranche { font-size: .7rem; color: var(--discret); font-weight: 600; }
table.presence tr.debut-jour > * { border-top: 2px solid var(--texte); }
table.presence tr.we > th, table.presence tr.we > td:not(.tenu):not(.vide) { background: var(--we); }
table.presence tr.ferie > th, table.presence tr.ferie > td:not(.tenu):not(.vide) { background: var(--ferie); }
table.presence td.tenu, table.presence td.plusieurs span[data-p] { background: hsl(var(--h) 65% 86%); color: #2b2118; }
table.presence td.tenu.nuit { font-weight: 700; }
table.presence td.verrou, table.presence span.verrou { font-style: italic; }
table.presence td.vide, table.presence span.vide { background: var(--erreur); color: var(--erreur-bord); font-weight: 600; }
table.presence td.plusieurs { padding: 0; } table.presence td.plusieurs span { display: block; padding: 0 .3rem; }
table.presence .sep-abs { border-left: 3px double var(--texte); }
table.presence td.absence-jour { vertical-align: top; font-size: .72rem; text-align: left; white-space: normal; }
table.presence td.absence-jour { line-height: 1.35; padding: .2rem .4rem; }
table.presence td.absence-jour .code-abs { color: var(--discret); font-size: .7rem; }
/* Planning calculé : toute la case pose une absence (R44, retouches.js) */
table.presence td.absence-jour[data-absence] { cursor: pointer; }
table.presence td.absence-jour[data-absence]:hover { background: var(--ok); }
table.presence td.absence-jour.ouverture { opacity: .6; }
table.presence a.ajout-absence { color: var(--discret); text-decoration: none; font-weight: 600; padding: 0 .2rem; }
table.presence td.absence-jour:hover a.ajout-absence, table.presence a.ajout-absence:focus-visible { color: var(--texte); }
table.presence td.surligne, table.presence span.surligne { outline: 3px solid var(--texte); outline-offset: -3px; }
/* Retouche depuis la présence (gestionnaire) : toute la case ouvre la fenêtre
   des candidats, comme au calendrier */
table.presence td > a.edit { margin: -.12rem -.3rem; padding: .12rem .3rem; border-radius: 0;
  overflow: hidden; text-overflow: ellipsis; }
table.presence td.plusieurs > a.edit { margin: 0; padding: 0; }
table.presence td a.edit:hover > span, table.presence td a.edit:focus-visible > span {
  background: var(--bouton); color: var(--bouton-texte); }
table.presence a.edit:hover, table.presence a.edit:focus-visible { outline: 2px solid var(--texte); outline-offset: -2px; }
@media (prefers-color-scheme: dark) {
  table.presence td.tenu, table.presence td.plusieurs span[data-p] { background: hsl(var(--h) 30% 30%); color: #f1e8dc; }
}
@media print { table.presence { font-size: .62rem; break-after: page; } table.presence th, table.presence td { height: auto; padding: 0 .2rem; }
  table.presence td.tenu { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Enveloppe sans boîte (lecture seule par `disabled`) : un fieldset en
   bloc gonfle la hauteur des .ligne-form qu'il contient */
fieldset.transparent { display: contents; }
fieldset.transparent[disabled] input, fieldset.transparent[disabled] select { opacity: .7; }

/* Fiche praticien : ce qui vaut pour toutes les campagnes, puis pour celle-ci */
.bloc { margin: 1.6rem 0; }
.bloc-titre { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--discret); margin: 0 0 .3rem; }
.bloc.campagne { border-left: 4px solid var(--accent); padding-left: 1rem; }
.bloc.campagne > .bloc-titre { color: var(--accent); }
.habilitations { display: flex; flex-direction: column; gap: .6rem; }
.habilitations .intitule { font-weight: 600; margin: 0; }
.habilitations fieldset.plan { flex-direction: column; align-items: start; }
.habilitations label.case[hidden], .habilitations fieldset[hidden] { display: none; }

/* Retouches sans rechargement (retouches.js) */
.message.flottant { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 50;
  max-width: min(40rem, calc(100vw - 2rem)); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.provisoire { opacity: .6; font-style: italic; }
a.ouverture { cursor: progress; opacity: .6; }

/* Jours posés par le gestionnaire (IND), grisés chez le praticien */
.calendrier .jour[data-verrou] { background: repeating-linear-gradient(135deg, var(--bord) 0 4px, transparent 4px 9px); opacity: .55; }
.calendrier .jour[data-verrou] .moitie { background: transparent; }
/* R12 : demi-journée posée par le gestionnaire, son quart seul fermé */
.calendrier .moitie.ferme { background: repeating-linear-gradient(135deg, var(--bord) 0 4px, transparent 4px 9px); }
.barre nav a.qui { font-weight: 600; }
.deux-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.mon-cal td { vertical-align: top; height: 3.2rem; }
.mon-cal td.occupe { background: var(--ok, #eef5ea); }
.mon-cal table { table-layout: fixed; }
.mon-cal .poste { display: block; font-size: .75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Vue présence : couleur choisie par le gestionnaire (--fond), vie du service */
table.presence td.tenu, table.presence td.plusieurs span[data-p] { background: var(--coul, hsl(var(--h) 65% 86%)); }
table.presence col.c-abs { width: 11rem; }
table.presence col.c-note { width: 9rem; }
table.presence .sep-note { border-left: 2px solid var(--texte); }
table.presence td.note-jour { vertical-align: top; text-align: left; white-space: pre-line; font-size: .72rem; line-height: 1.3; padding: .2rem .35rem; }
table.presence td.note-jour[data-note] { cursor: text; }
table.presence td.note-jour[data-note]:hover { background: var(--ok); }
table.presence td.note-jour textarea { width: 100%; min-height: 4.5rem; font: inherit; font-size: .72rem; padding: .1rem; }
@media print { table.presence col.c-abs { width: 9rem; } table.presence col.c-note { width: 7rem; } }

/* Couleurs des praticiens (_couleurs.html, couleurs.js) : un cadre à part,
   reconnaissable fermé à sa bande de couleurs de l'équipe ; palettes, noms,
   couleur de chacun. Couleur automatique : bordure en pointillés. */
details.couleurs { border: 1px solid var(--bord); border-left: 4px solid var(--accent); border-radius: 8px;
  background: var(--fond); padding: .45rem .9rem; margin: 0 0 1rem; }
details.couleurs > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; }
details.couleurs > summary::before { content: "▸"; color: var(--accent); }
details.couleurs[open] > summary::before { content: "▾"; }
details.couleurs > summary::-webkit-details-marker { display: none; }
details.couleurs > summary { list-style: none; }
.titre-couleurs { font-weight: 700; font-size: 1.02rem; }
.bande-equipe { display: inline-flex; flex-wrap: wrap; max-width: 24rem; border-radius: 3px; overflow: hidden; }
.bande-equipe i { width: .6rem; height: .9rem; background: var(--coul, var(--gris)); }
details.couleurs[open] .bande-equipe { display: none; }
/* Extérieurs sans couleur (option) : le nom seul, sur le fond de la rangée */
table.presence td.tenu.sans-couleur, table.presence td.plusieurs span.sans-couleur { background: transparent; }
table.presence tr.we > td.tenu.sans-couleur { background: var(--we); }
table.presence tr.ferie > td.tenu.sans-couleur { background: var(--ferie); }
.couleurs .pastille-p.sans-couleur { background: transparent; border-style: dotted; color: var(--discret); cursor: default; }
.couleurs fieldset.palettes { display: block; border: 1px solid var(--bord); border-radius: 6px; padding: .3rem .7rem .1rem; margin: .5rem 0; }
.liste-palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .4rem 1rem; }
.couleurs label.palette { display: flex; flex-direction: row; gap: .45rem; align-items: start; cursor: pointer; font-size: .85rem; line-height: 1.3; }
.couleurs label.palette input { margin-top: .2rem; }
.palette .bande { display: flex; flex-wrap: wrap; margin-top: .2rem; width: 16rem; max-width: 100%; }
.palette .bande i { width: calc(100% / 24); height: .8rem; background: var(--coul); }
.couleurs .actions-palette { margin: .5rem 0 .2rem; align-items: center; }  /* V51 : message de l'aperçu sur la ligne des boutons */
.couleurs-praticiens { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: .6rem 0; }
.couleurs .pastille-p { border: 1px solid var(--bord); border-radius: 4px; padding: .1rem .45rem; font-size: .8rem; cursor: pointer; background: var(--coul, var(--gris)); color: #2b2118; }
.couleurs .pastille-p.auto { border: 1px dashed var(--discret); }
.couleurs .pastille-p.grande { font-size: 1rem; padding: .25rem .9rem; cursor: default; font-weight: 600; }
.couleurs .pastille-p[aria-pressed="true"] { outline: 2px solid var(--texte); outline-offset: 1px; }
.editeur-couleur { border-left: 4px solid var(--accent); padding: .2rem 0 .2rem .8rem; margin: .4rem 0 .8rem; }
.nuancier { display: grid; grid-template-columns: repeat(auto-fill, 1.6rem); gap: .25rem; max-width: 24rem; margin: .4rem 0; }
.nuancier button { width: 1.6rem; height: 1.6rem; border-radius: 4px; border: 1px solid var(--bord); padding: 0; cursor: pointer; color: #2b2118; font-size: 1rem; line-height: 1; }
.nuancier button[aria-pressed="true"] { outline: 2px solid var(--texte); outline-offset: 1px; }
.ligne-form.saisie-couleur label:not(.case) { flex: none; }
.saisie-couleur input.court { width: 6.5rem; }
.saisie-couleur input.mini { width: 4.2rem; }
.saisie-couleur input[type="color"] { width: 2.8rem; padding: .1rem; border: 1px solid var(--bord); border-radius: 4px; background: var(--carte); cursor: pointer; vertical-align: middle; }
.alerte-couleur { min-height: 1.4em; margin: .3rem 0; font-size: .85rem; }
@media (prefers-color-scheme: dark) {
  table.presence td.tenu, table.presence td.plusieurs span[data-p], .couleurs .pastille-p {
    background: color-mix(in srgb, var(--coul, hsl(var(--h) 65% 70%)) 45%, #241e18); color: #f1e8dc; }
  /* Échantillons des palettes et bande de l'équipe : assombris comme le planning (V34) */
  .palette .bande i, .bande-equipe i { background: color-mix(in srgb, var(--coul, var(--gris)) 45%, #241e18); }
}
table.presence td.note-jour.erreur-note { outline: 2px solid var(--erreur-bord); }

/* Planning en ligne (sans connexion) */
.public-entete h1 { margin-bottom: .4rem; }
.public-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: .4rem 0 .6rem; }
.public-nav select { font-size: 1rem; text-transform: capitalize; }
/* Groupes : journées et permanence des soins, distingués */
th.plan-jour, td.plan-jour { background: color-mix(in srgb, var(--ok) 55%, transparent); }
th.plan-garde, td.plan-garde { background: color-mix(in srgb, var(--we) 70%, transparent); }
/* Enchaînements : cases de départ et d'arrivée rangées par plan */
.cases-plan { padding: .25rem .5rem; border-radius: 6px; margin: .2rem 0; }
.cases-plan.plan-jour { background: color-mix(in srgb, var(--ok) 55%, transparent); }
.cases-plan.plan-garde { background: color-mix(in srgb, var(--we) 70%, transparent); }

/* Bulle d'aide ⓘ (_aide.html) */
/* En ligne (pas inline-block) : collé au mot qui le précède, sans retour à
   la ligne entre les deux */
.bulle { position: relative; display: inline; white-space: nowrap; margin-left: .2rem; color: var(--accent); cursor: help;
  font-size: .85em; font-weight: 400; line-height: 1; }
.bulle:hover::after, .bulle:focus::after { content: attr(data-bulle); position: absolute; z-index: 40; left: 50%;
  top: 1.4em; transform: translateX(-50%); width: max-content; max-width: 18rem; white-space: normal;
  background: var(--texte); color: var(--carte); padding: .45rem .6rem; border-radius: 6px; font-size: .8rem;
  line-height: 1.35; text-align: left; font-weight: 400; text-transform: none; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
/* Vue d'ensemble des vœux : quatre quarts par case, hachurés sans poste possible */
table.ensemble .case.quarts { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; }
table.ensemble .case.quarts > .v-dispo { background: var(--gris); }
table.ensemble .case.quarts > .ferme, .case.ferme-ex { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--discret) 45%, transparent) 0 1.5px, var(--carte) 1.5px 4px); }
.case.ferme-ex { display: inline-block; width: .9rem; height: .9rem; vertical-align: middle; border-radius: 2px; }
.calendrier .moitie.sans-signe::after { content: none; }
/* Pastille d'un code dans un pinceau : rectangle à la taille du code (IND, EXT) */
.calendrier .pinceau .pastille.code-pastille { width: auto; min-width: 1.1rem; padding: 0 .3rem;
  box-sizing: border-box; line-height: 1.1rem; }
/* Bulle dans un tableau défilant (vue d'ensemble des vœux) : sa cellule
   figée passe devant les voisines pendant l'affichage, et la bulle s'ouvre
   vers le haut et la droite, pour ne pas être rognée par le cadre défilant */
th:has(> .bulle:hover), th:has(> .bulle:focus) { z-index: 30; }
.defile .bulle:hover::after, .defile .bulle:focus::after { left: 0; transform: none; top: auto; bottom: 1.5em; }
/* Pied du tableau (lignes « Dispo. ») : ouverte à droite et vers le bas, où
   suivent les autres lignes de dispo ; vers le haut, elle était rognée
   quand le tableau n'a aucun praticien (saisie pas encore ouverte) */
.defile tfoot .bulle:hover::after, .defile tfoot .bulle:focus::after { left: 1.4em; top: -.2em; bottom: auto; }
/* Avec JavaScript (bulles.js) : une bulle flottante, en position fixe sur la
   page, dessous ou au-dessus du ⓘ selon la place et toujours dans la
   fenêtre, jamais rognée par une carte ni un tableau défilant ; la bulle
   en CSS ci-dessus n'est plus que le repli sans JavaScript */
html.bulles-js .bulle:hover::after, html.bulles-js .bulle:focus::after { content: none; }
.bulle-flottante { position: fixed; z-index: 60; top: 0; left: 0; width: max-content;
  max-width: min(18rem, calc(100vw - 16px)); pointer-events: none; white-space: normal;
  background: var(--texte); color: var(--carte); padding: .45rem .6rem; border-radius: 6px; font-size: .8rem;
  line-height: 1.35; text-align: left; font-weight: 400; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* Ressenti : barre d'attente (attente.js), après 150 ms seulement, pour
   qu'une page rapide ne clignote pas. */
html.attente::before {
  content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 1000;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: attente-apparait 0s linear .15s both, attente-glisse 1.1s ease-in-out .15s infinite;
}
@keyframes attente-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes attente-glisse { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) {
  html.attente::before { animation: attente-apparait 0s linear .15s both; background: var(--accent); opacity: .6; }
}

/* Planning : option « un mois à la fois » et choix du mois */
.choix-mois { display: inline-flex; align-items: center; gap: .4rem; margin-left: 1rem; }
.choix-mois a { text-decoration: none; font-size: 1.2em; padding: 0 .3rem; }
.choix-mois label { display: inline-flex; flex-direction: row; align-items: center; gap: .35rem; margin: 0; }
.choix-mois input[type=checkbox] { width: auto; margin: 0; }

/* Équité : graphique fait / attendu de gardes (total UG), colonnes « Total »
   mises en avant ; les tuiles : plus bas, « Tuiles de synthèse » */
.graphe-ug { display: flex; flex-direction: column; gap: 2px; margin-bottom: 1.4rem; }
.legende-ug { display: flex; gap: 1.2rem; font-size: .8rem; color: var(--discret); }
.legende-ug > span { display: inline-flex; align-items: center; gap: .4rem; }
.cle-barre { display: inline-block; width: 1.2rem; height: .6rem; border-radius: 0 3px 3px 0; background: var(--barre-ug); }
.cle-trait { display: inline-block; width: 2px; height: .9rem; background: var(--texte); }
.rangee-ug { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr 3rem 4rem 3.2rem; align-items: center; gap: .6rem;
  padding: .2rem .3rem; border-radius: 6px; }
.rangee-ug:hover { background: var(--gris); }
.rangee-ug .ug-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.rangee-ug .ug-piste { position: relative; height: 1.1rem; border-left: 1px solid var(--bord); }
.rangee-ug .ug-barre { position: absolute; left: 0; top: .2rem; height: .7rem; border-radius: 0 4px 4px 0; background: var(--barre-ug); }
.rangee-ug .ug-trait { position: absolute; top: 0; height: 1.1rem; width: 2px; margin-left: -1px; background: var(--texte); }
.rangee-ug.sans-attendu .ug-barre { opacity: .45; }
.rangee-ug .ug-reel, .rangee-ug .ug-attendu, .rangee-ug .ug-sans { font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rangee-ug .ug-reel { text-align: right; font-weight: 700; }
.rangee-ug .ug-sans { grid-column: span 2; font-size: .8rem; }
.rangee-ug.entete-ug { font-size: .75rem; color: var(--discret); padding-bottom: .3rem; border-bottom: 1px solid var(--bord); margin-bottom: .2rem; }
.rangee-ug.entete-ug:hover { background: none; }
.rangee-ug.entete-ug .legende-ug { grid-column: span 2; margin: 0; }
.rangee-ug.entete-ug .ug-reel, .rangee-ug.entete-ug .ug-attendu { font-size: .75rem; font-weight: 400; }
.rangee-ug.entete-ug .ug-attendu { white-space: normal; line-height: 1.1; }
.ecart-ug { display: inline-block; text-align: right; font-weight: 600; color: var(--discret); }
.ecart-ug.hors { color: var(--accent); }
:root { --barre-ug: #4f86c0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --barre-ug: #5b97dc; } }
:root[data-theme="dark"] { --barre-ug: #5b97dc; }
.repartition th.total, .repartition td.total { background: color-mix(in srgb, var(--barre-ug) 14%, transparent); }
.repartition td.total { font-weight: 600; }
.repartition th.groupe-col.total { color: var(--texte); }
details.periode-temps { border: 1px solid var(--bord); border-radius: 8px; padding: .5rem .8rem; margin: .5rem 0; }
details.periode-temps > summary { cursor: pointer; }
details.periode-temps .resume { color: var(--discret); font-size: .9rem; margin-left: .6rem; }
details.periode-temps[open] > summary { margin-bottom: .5rem; }
/* Statuts des urgentistes : tableau large (temps, périodes, congés) */
#statuts table.formulaires td, #statuts table.formulaires th { padding-left: .25rem; padding-right: .25rem; }
#statuts input.court { width: 3.4rem; }
#statuts input[name=label] { min-width: 8rem; }
#statuts select { width: auto; max-width: 8.5rem; }
/* Poids de l'objectif : règles dures en rouge */
.regles-dures { border-left: 4px solid var(--erreur-bord); background: var(--erreur); border-radius: 6px; padding: .5rem .9rem; margin: .8rem 0; }
.regles-dures h3 { color: var(--erreur-bord); margin: .2rem 0 .4rem; }
.regles-dures ul { margin: 0; padding-left: 1.2rem; }
table.poids tr.dure td { color: var(--erreur-bord); }
table.poids tr.seuil th { padding-top: .9rem; text-align: left; border-bottom: 1px solid var(--bord); }
.intro-poids p { margin: .3rem 0 .6rem; }
/* Saisie des vœux : directe (toucher une moitié fait tourner sa couleur) ou
   au pinceau (curseur à la couleur du pinceau, retour par ✕ ou Échap) */
.calendrier .jour:not([disabled]) { cursor: pointer; }
.calendrier.mode-pinceau .jour:not([disabled]) { cursor: crosshair; }
.calendrier.mode-pinceau.c-indispo .jour:not([disabled]) { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle cx='11' cy='11' r='8' fill='%23eea79f' stroke='%232b2118' stroke-width='2'/></svg>") 11 11, crosshair; }
.calendrier.mode-pinceau.c-non .jour:not([disabled]) { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle cx='11' cy='11' r='8' fill='%23f6d29c' stroke='%232b2118' stroke-width='2'/></svg>") 11 11, crosshair; }
.calendrier.mode-pinceau.c-oui .jour:not([disabled]) { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle cx='11' cy='11' r='8' fill='%23b9ddb2' stroke='%232b2118' stroke-width='2'/></svg>") 11 11, crosshair; }
.calendrier.mode-pinceau.c-dispo .jour:not([disabled]) { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle cx='11' cy='11' r='8' fill='%23f1ece5' stroke='%232b2118' stroke-width='2'/></svg>") 11 11, crosshair; }
.calendrier.mode-pinceau.c-code .jour:not([disabled]) { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22'><circle cx='11' cy='11' r='8' fill='%23a83b2e' stroke='%232b2118' stroke-width='2'/></svg>") 11 11, crosshair; }
.calendrier.mode-pinceau .barre-saisie { box-shadow: 0 2px 0 var(--accent); }
.quitter-pinceau { margin-top: .4rem; }
.quitter-pinceau[hidden], .portees[hidden], .portees-code[hidden] { display: none; }

/* Impression (passe visuelle du 22/10/2026) : ni en-tête de campagne ni
   encadrés ; un titre reste avec son tableau ; un jour de la vue présence ne
   se coupe pas entre deux pages ; le tableau de service tient la largeur de
   la page (il était rogné à droite) ; deux semaines par page. */
@media print {
  /* Pas de page perdue (V53) : ni titre ni ligne du solveur avant le premier
     mois ; Mon planning : le bilan seul, puis le planning sur une page neuve */
  .campagne-barre, section.controles, .entete { display: none !important; }
  .saut-impression { break-before: page; }
  main { padding-top: 0; padding-bottom: 0; }
  main > .carte { margin-top: 0; }
  #grille { margin-bottom: 0; }   /* la marge du bas faisait une page blanche après le dernier mois */
  h2, h3, caption { break-after: avoid; }
  .defile { overflow: visible; }
  table.presence tbody { break-inside: avoid; }
  .tableau-mois { break-after: page; }
  table.tableau-service { width: 100%; table-layout: fixed; font-size: .55rem; }
  table.tableau-service thead th:first-child { width: 8.5rem; }
  table.tableau-service thead th:nth-last-child(-n+2) { width: 1.6rem; }
  table.tableau-service thead th { min-width: 0; font-size: .55rem; }
  table.tableau-service td { min-width: 0; padding: 0 1px; font-size: .55rem; white-space: normal; }
  table.tableau-service .poste { padding: 0; }
  table.tableau-service tbody th { font-size: .62rem; padding: 0 .3rem 0 0; }
  table.planning-sem { font-size: .62rem; border-spacing: 1px; margin-bottom: .4rem; }
  table.planning-sem td, table.planning-sem tbody th { padding: .05rem .2rem; }
  table.planning-sem .partie { font-size: .55rem; }
  table.planning-sem caption { padding: .1rem 0; font-size: .85rem; }
}

/* Tableaux de formulaires (paramètres, modèle du service) : un champ garde
   une largeur lisible, la carte défile si besoin, le code reste en vue ; les
   boutons d'une rangée restent dans leur cellule (passe visuelle, V13, V14) */
table.formulaires td.actions { display: table-cell; white-space: nowrap; }
table.formulaires td.actions form { display: block; margin: .15rem 0; }
table.formulaires input:where(:not([type=checkbox], [type=radio], .court)) { min-width: 9rem; }
table.formulaires input.moyen { min-width: 7rem; }
table.formulaires select { width: auto; }
table.formulaires tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--carte); }
table.formulaires td.reglages label.case { font-size: .85rem; white-space: nowrap; }
#statuts .paire { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; margin: .1rem 0; }
/* Vœux d'ensemble : cases agrandies pour y écrire le code d'absence
   (demande du 02/11/2026) ; cases espacées de 2 px dans les deux sens, et
   la page s'élargit, pour qu'un mois de planning de 5 semaines (35 jours,
   « premier lundi ») tienne sans défiler sur un écran de bureau (V07) ; le
   tableau défile au-dessous */
main:has(table.ensemble) { max-width: 1400px; }
table.ensemble thead th { min-width: 1.75rem; }
table.ensemble .case { width: 1.75rem; height: 1.45rem; }
table.ensemble .case.quarts { position: relative; }
/* Le code sur la rangée de quarts qu'il prend (haut : matin | après-midi ;
   bas : soirée | nuit), ou sur toute la case ; un halo rouge le garde
   lisible quand l'autre quart de sa rangée n'est pas rouge */
table.ensemble .case > .etiq { position: absolute; left: 0; right: 0; display: flex;
  align-items: center; justify-content: center; font-size: .6rem; font-weight: 700;
  line-height: 1; letter-spacing: -.02em; color: var(--sur-couleur); pointer-events: none;
  text-shadow: 0 0 2px var(--rouge), 0 0 2px var(--rouge); }
table.ensemble .case > .etiq.plein { top: 0; bottom: 0; font-size: .66rem; }
table.ensemble .case > .etiq.haut { top: 0; height: 50%; }
table.ensemble .case > .etiq.bas { bottom: 0; height: 50%; }
table.ensemble .case > .etiq.long { font-size: .52rem; letter-spacing: -.05em; }
.legende-codes .code-pastille { height: auto; }
/* Équité : noms sur une ligne dans le détail (V25) */
.repartition .defile td:first-child { white-space: nowrap; }
/* Vue liste : un mois par rangée au bureau, ses quatre colonnes en entier (V21) */
.mois-planning { grid-template-columns: repeat(auto-fill, minmax(min(100%, 640px), 1fr)); }
/* Vue semaine et calendrier : un nom long passe à la ligne au lieu de
   déborder ou d'être tronqué (V20, V22) */
table.planning-sem td .nom { white-space: normal; }
table.planning-sem td { overflow-wrap: anywhere; }
table.planning-cal .col .groupe .nom { white-space: normal; }
#absences input[name=code] { width: 4.5rem; }
#absences select { max-width: 12rem; }
#absences td.reglages label.case { white-space: normal; }
#absences td.reglages { min-width: 10.5rem; }
#statuts select { max-width: 7.6rem; }
#statuts input.court { width: 3.2rem; }

/* Téléphone et tablette (passe visuelle, lot 3) */
/* « Enregistré. » dans la barre de saisie collante, sans la faire grandir (V12) */
.barre-saisie .etat-saisie { position: absolute; right: 0; bottom: .15rem; margin: 0; min-height: 0;
  font-size: .85rem; background: var(--fond); padding: 0 .3rem; border-radius: 4px; }
.barre-saisie .resume-geste { padding-right: 7rem; }
@media (max-width: 640px) {
  /* Barre de saisie plus basse : la consigne en une phrase (V40) */
  .barre-saisie { padding: .35rem 0; }
  .barre-saisie .pinceaux { margin-bottom: .3rem; }
  .barre-saisie .pinceau { padding: .35rem .65rem; }
  .barre-saisie .resume-geste { font-size: .82rem; line-height: 1.3; padding-right: 5.5rem; }
  .barre-saisie .resume-geste .suite { display: none; }
}
/* Vue présence étroite : colonnes annexes réduites ; en dessous, le tableau
   garde une largeur lisible et défile de côté, date et tranche en vue (V35) */
@media (max-width: 850px) {
  table.presence col.c-abs { width: 8rem; }
  table.presence col.c-note { width: 6rem; }
  table.presence { min-width: 44rem; }
  table.presence th.jour { position: sticky; left: 0; z-index: 2; }
  table.presence th.tranche { position: sticky; left: 3.2rem; z-index: 2; background: var(--carte); }
}
table.ensemble tfoot td { font-size: .7rem; }
details.suite-liste > summary { font-weight: 400; margin: .2rem 0 .4rem 1.2rem; color: var(--accent); }

/* Page du membre (chantier « Un Effectif lisible », 28/10/2026) : en-tête,
   synthèse en tuiles (chacune vers son détail), détail replié, fiche en
   volets (le résumé en lecture, le formulaire à l'ouverture) */
.entete-membre { font-size: 1.05rem; font-weight: 600; margin: -.4rem 0 .2rem; }
/* Arrivée et départ, dans l'en-tête (étape 3) : en lecture, le formulaire à l'ouverture */
details.presence-membre { margin: 0 0 1rem; }
details.presence-membre > summary { list-style: none; cursor: pointer; color: var(--discret); font-size: .9rem;
  font-weight: 400; }
details.presence-membre > summary::-webkit-details-marker { display: none; }
/* « Modifier » : un bouton secondaire, comme « Voir » (demande du 07/11/2026) */
details.presence-membre > summary .modifier { display: inline-block; margin-left: .5rem; padding: .1rem .6rem;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; font-size: .85rem; }
details.presence-membre#presence, details.presence-membre#identite { margin-bottom: .4rem; }
/* Ses campagnes pas finies, sous l'en-tête (ergonomie, étape 1) */
.campagne-membre { margin: 0 0 .4rem; font-size: .9rem; }
details.presence-membre#connexion > form, details.presence-membre#connexion > p,
details.presence-membre#connexion > input { margin-top: .5rem; }
details.presence-membre[open] > summary .modifier { display: none; }
details.presence-membre > form { margin-top: .5rem; align-items: center; }
.presence-date { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; white-space: nowrap; }
.presence-date .titre { font-weight: 600; }
.presence-date label.case { display: inline-flex; }
.presence-date input[type=date] { width: auto; }
.presence-date [hidden] { display: none; }
details.detail-bilan > summary, details.toutes-periodes > summary, details.liste-parcours > summary { color: var(--accent); }
/* « Où en est X ? » (ergonomie, étape 4 ; app/templates/_etat_personne.html) :
   l'année en tuiles, ses périodes côte à côte (celle en cours encadrée), le
   tableau de toutes ses périodes replié ; .pj : avec le projet */
.pj { font-style: italic; color: var(--discret); }
.moins { color: var(--accent); font-weight: 600; }
.gestes-membre { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .6rem; }
.annees-etat { margin: 0 0 .8rem; }
.annees-etat .discret { font-size: .8rem; }
/* Tuiles de synthèse : un seul composant (ergonomie, étape 9 ; § 4.7 : il y
   en avait trois), partout où une page résume avant le détail (Effectif,
   À faire, Équité, page de la personne, Mon planning). Un chiffre
   (.valeur, son unité en <small>), ce qu'il compte (.libelle) ; ou un
   .titre en tête et une phrase (<p>) dessous. a.tuile : mène au détail ;
   .alerte : à regarder ; .pj : avec le projet ; .tuiles.larges : des
   tuiles de phrases (l'état d'une personne). */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin: .5rem 0 1.2rem; }
.tuiles.larges { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 0; }
.tuile { display: flex; flex-direction: column; gap: .25rem; padding: .8rem 1rem; border: 1px solid var(--bord);
  border-radius: 10px; background: var(--fond); font-style: normal; color: var(--texte); }
.tuile .titre { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--discret); }
.tuile .valeur { font-size: 1.7rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tuile .valeur small { font-size: .85rem; font-weight: 400; color: var(--discret); }
.tuile .valeur.petite { font-size: 1.15rem; }
.tuile .libelle { font-size: .85rem; color: var(--discret); }
.tuile p { margin: 0; font-size: .9rem; }
.tuile p.suite { color: var(--discret); border-top: 1px dashed var(--bord); padding-top: .3rem; margin-top: .2rem; }
.tuile.alerte { border-color: var(--accent); }
.tuile.alerte .valeur { color: var(--accent); }
.tuile.pj .valeur, .tuile.pj p { font-style: italic; }
a.tuile { text-decoration: none; }
a.tuile:hover, a.tuile:focus-visible { border-color: var(--bouton); box-shadow: 0 0 0 1px var(--bouton) inset; }
.sous-titre-etat { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--discret); margin: 1.2rem 0 .5rem; }
.periodes-etat { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.periode-etat { border: 1px solid var(--bord); border-radius: 10px; padding: .7rem .9rem; background: var(--carte); }
.periode-etat.en_cours { outline: 2px solid var(--accent); outline-offset: 2px; }
.periode-etat.passe { background: var(--fond); }
.periode-etat h3 { margin: 0; font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.periode-etat h3 span { font-size: .75rem; font-weight: 400; color: var(--discret); }
.periode-etat .dates { font-size: .75rem; color: var(--discret); margin: 0 0 .5rem; }
.periode-etat .legende { font-size: .75rem; color: var(--discret); margin: .25rem 0 0; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: .1rem .5rem; }
.periode-etat dl { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; margin: .5rem 0 0; font-size: .9rem; }
.periode-etat dt { color: var(--discret); }
.periode-etat dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.periode-etat .sep { border-top: 1px dashed var(--bord); padding-top: .3rem; margin-top: .2rem; }
.jauge { position: relative; height: 10px; border-radius: 5px; background: var(--gris); }
.jauge i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ok-bord); border-radius: 5px 0 0 5px; }
.jauge i.pj { border-radius: 0; background: repeating-linear-gradient(135deg, var(--ok-bord) 0 4px, transparent 4px 8px); }
.jauge b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--texte); }
details.toutes-periodes > summary { margin: 1rem 0 .5rem; }
/* Décompte du service, par période (ergonomie, étape 6 : maquette A) */
.outils-decompte { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.4rem; margin: .4rem 0 1rem; }
.outils-decompte .onglets a.pj { font-style: italic; }
.filtres-decompte { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin: 0; }
.filtres-decompte label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.filtres-decompte select, .filtres-decompte input { width: auto; margin: 0; }
table.synthese-periode { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem;
  font-variant-numeric: tabular-nums; }
table.synthese-periode th, table.synthese-periode td { padding: .35rem .5rem; border-bottom: 1px solid var(--bord);
  text-align: right; white-space: nowrap; font-weight: 400; }
table.synthese-periode tr > :first-child { text-align: left; }
table.synthese-periode thead th { font-size: .78rem; font-weight: 600; color: var(--discret); white-space: normal;
  vertical-align: bottom; }
table.synthese-periode thead tr.groupes th { text-transform: uppercase; letter-spacing: .04em; text-align: center;
  border-left: 1px solid var(--bord); }
table.synthese-periode thead tr.groupes th:first-child { border-left: 0; }
table.synthese-periode .g1 { border-left: 1px solid var(--bord); }
table.synthese-periode tr.statut td, table.avant-outil tr.statut td { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--discret); background: var(--fond); padding-top: .8rem; }
table.synthese-periode td.ailleurs { text-align: left; white-space: normal; }
table.synthese-periode .moins, td.bilan-resume .moins { color: var(--erreur-bord); font-weight: 700; }
table.synthese-periode .non-juge, td.bilan-resume .non-juge { color: var(--discret); opacity: .75; }
table.synthese-periode .souhait, table.classeur .souhait, td.bilan-resume .souhait,
table.synthese-periode td.sans-conges > span { background: var(--alerte);
  border: 1px solid var(--alerte-bord); border-radius: 3px; padding: 0 .3rem; }
#synthese h2 .precision, #classeur h2 .precision { font-size: .85rem; font-weight: 400; margin-left: .4rem; }
/* Sous la synthèse, repliés : la vue classeur, « Avant l'outil », la référence
   (_classeur_decompte.html). Dans le classeur, seul l'écart du temps rougit,
   comme dans la synthèse : rouge strict, gris quand il est provisoire. */
table.classeur { font-size: .9rem; font-variant-numeric: tabular-nums; }
table.classeur thead th { font-size: .78rem; font-weight: 600; color: var(--discret); vertical-align: bottom; }
table.classeur .moins { color: inherit; font-weight: inherit; }
table.classeur td.c-ecart .moins { color: var(--erreur-bord); font-weight: 700; }
table.classeur tr.non-juge td.c-ecart .moins { color: var(--discret); font-weight: 400; opacity: .75; }
#classeur details.periode-temps h4 { margin: .8rem 0 .3rem; }
details#avant > summary, details#reference > summary { cursor: pointer; }
details#avant > summary .resume, details#reference > summary .resume { font-size: .9rem; margin-left: .6rem; }
table.avant-outil th[scope=row] { font-weight: 400; text-align: left; white-space: nowrap; }
table.avant-outil th[scope=row] .discret { display: block; font-size: .8rem; }
table.avant-outil form.en-ligne { margin: 0; }
.jauge.mini { display: inline-block; width: 48px; height: 6px; vertical-align: middle; margin-right: .5rem; }
table.axe-etat { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
table.axe-etat th, table.axe-etat td { padding: .3rem .7rem; border-bottom: 1px solid var(--bord); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 400; }
table.axe-etat tr > :first-child { text-align: left; }
table.axe-etat thead th { font-weight: 600; vertical-align: bottom; }
table.axe-etat thead .dates { display: block; font-weight: 400; font-size: .72rem; color: var(--discret); }
table.axe-etat tr.groupe th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--discret);
  padding-top: .9rem; border-bottom-color: var(--discret); }
table.axe-etat .annee { background: var(--gris); }
table.axe-etat tr.fort td, table.axe-etat tr.fort th { font-weight: 700; }
table.axe-etat .ici { border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
table.axe-etat thead .ici { border-top: 2px solid var(--accent); border-radius: 8px 8px 0 0; }
table.axe-etat tbody:last-child tr:last-child .ici { border-bottom: 2px solid var(--accent); border-radius: 0 0 8px 8px; }
.sous-partie { margin: .4rem 0 1.4rem; }
.sous-partie > h3 { margin: 0 0 .5rem; }
details.volet { border: 1px solid var(--bord); border-radius: 8px; padding: .6rem .9rem; margin: .7rem 0; }
details.volet > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
details.volet > summary::-webkit-details-marker { display: none; }
details.volet > summary::before { content: "▸"; color: var(--accent); }
details.volet[open] > summary::before { content: "▾"; }
details.volet > summary h3 { margin: 0; font-size: 1rem; }
details.volet > summary .resume { font-weight: 400; color: var(--discret); font-size: .9rem; }
.actions-fiche { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; padding-top: .7rem;
  border-top: 1px solid var(--bord); }
.actions-fiche > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.actions-fiche label { flex-direction: row; align-items: center; gap: .4rem; white-space: nowrap; }

/* Frise chronologique (_frise.html, app/frise.py). Statuts : palette
   catégorielle validée (dataviz, scripts/validate_palette.js) sur le fond
   des cartes, en clair et en sombre ; une teinte par statut, dans l'ordre
   du modèle. Texte toujours à l'encre du texte, sur une teinte lavée ; la
   teinte pleine est le trait du bas. Quotité : hauteur selon l'ETP. */
:root { --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a; --serie-4: #eda100;
  --serie-5: #e87ba4; --serie-6: #008300; --serie-7: #6250d6; --serie-8: #e34948; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500;
  --serie-5: #d55181; --serie-6: #008300; --serie-7: #9085e9; --serie-8: #e66767; } }
:root[data-theme="dark"] { --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500;
  --serie-5: #d55181; --serie-6: #008300; --serie-7: #9085e9; --serie-8: #e66767; }
.t1 { --serie: var(--serie-1); } .t2 { --serie: var(--serie-2); } .t3 { --serie: var(--serie-3); }
.t4 { --serie: var(--serie-4); } .t5 { --serie: var(--serie-5); } .t6 { --serie: var(--serie-6); }
.t7 { --serie: var(--serie-7); } .t8 { --serie: var(--serie-8); } .neutre { --serie: var(--discret); }
.frise { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: 3px .6rem; align-items: center; margin: .8rem 0 .5rem; }
.frise-nom { font-size: .82rem; color: var(--discret); text-align: right; white-space: nowrap; }
.frise svg { display: block; }
/* --fond-segment : la teinte du segment, et le halo de son texte (un repère
   qui le traverse passe sous le texte) */
.frise .segment { --fond-segment: color-mix(in srgb, var(--serie) 26%, var(--carte)); }
/* Frise de l'équipe : statut et quotité ensemble, le niveau à la teinte du
   statut (avant .neutre et .sans, qui le remplacent) */
.frise .segment.membre { --fond-segment: color-mix(in srgb, var(--serie) 8%, var(--carte));
  --niveau: color-mix(in srgb, var(--serie) 30%, var(--carte)); }
.frise .segment.neutre { --fond-segment: var(--gris); }
.frise .segment.sans { --fond-segment: var(--fond); --serie: var(--bord); }
.frise .segment.quotite { --fond-segment: color-mix(in srgb, var(--discret) 8%, var(--carte));
  --niveau: color-mix(in srgb, var(--discret) 32%, var(--carte)); }
.frise .segment.campagne { --fond-segment: color-mix(in srgb, var(--accent) 13%, var(--carte)); }
.frise .segment.campagne.avec-planning { --fond-segment: color-mix(in srgb, var(--accent) 32%, var(--carte)); }
.frise .segment.campagne.absent { --fond-segment: var(--gris); }
.frise .segment .fond { fill: var(--fond-segment); }
.frise .segment .trait { fill: var(--serie); }
.frise .segment .niveau { fill: var(--niveau); }
.frise .segment .espace { fill: var(--carte); }
.frise .segment .texte { fill: var(--texte); font-size: 12px; paint-order: stroke; stroke: var(--fond-segment);
  stroke-width: 4px; stroke-linejoin: round; }
.frise .segment .texte.sur-niveau { stroke: var(--niveau); }
.frise .segment.sans .texte, .frise .segment.absent .texte { fill: var(--discret); }
.frise .segment:hover .fond { filter: brightness(.94); }
.frise .segment:focus-visible { outline: none; }
.frise .segment:focus-visible .fond { stroke: var(--accent); stroke-width: 4px; }
.frise .hors { pointer-events: none; }
#frise-hachures rect { fill: color-mix(in srgb, var(--discret) 55%, transparent); }
.frise line.marque { stroke-width: 2px; pointer-events: none; }
.frise line.marque.auj { stroke: var(--texte); }
.frise line.marque.fiche { stroke: var(--accent); }
.frise line.marque.presence { stroke: var(--discret); stroke-width: 1px; }
.frise-axe line.annee { stroke: var(--bord-champ); }
.frise-axe line.mois { stroke: var(--bord); }
.frise-axe text { font-size: 11px; fill: var(--discret); }
.frise-axe text.annee { fill: var(--texte); font-weight: 600; }
.frise-axe text.marque { font-weight: 600; fill: var(--texte); }
.frise-axe text.marque.fiche { fill: var(--accent); }
.frise-legende { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.frise-legende .cle { display: inline-block; width: .95rem; height: .7rem; border-radius: 2px; margin-right: .35rem;
  vertical-align: -1px; background: color-mix(in srgb, var(--serie) 26%, var(--carte)); border-bottom: 3px solid var(--serie); }
.frise-legende .cle.auj { width: 2px; height: .95rem; background: var(--texte); border: 0; }
.frise-legende .cle.hors { border: 0; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--discret) 55%, transparent) 0 2px, transparent 2px 4.2px); }
.frise-legende .cle.campagne { border: 0; background: color-mix(in srgb, var(--accent) 13%, var(--carte)); }
.frise-legende .cle.campagne.avec-planning { background: color-mix(in srgb, var(--accent) 32%, var(--carte)); }
.frise-legende .cle.campagne.absent { background: var(--gris); }
.frise-legende .cle.quotite { border: 0; background: linear-gradient(to top,
  color-mix(in srgb, var(--discret) 32%, var(--carte)) 55%, color-mix(in srgb, var(--discret) 8%, var(--carte)) 55%); }
/* Frise de l'équipe (étape 3) : noms en liens, un intertitre par groupe,
   l'axe reste en haut de l'écran */
.frise-equipe { grid-template-columns: minmax(5rem, 10rem) minmax(0, 1fr); }
.frise-equipe .frise-nom { overflow: hidden; text-overflow: ellipsis; }
.frise-equipe a.frise-nom { color: var(--texte); text-decoration: none; }
.frise-equipe a.frise-nom:hover, .frise-equipe a.frise-nom:focus-visible { color: var(--accent); text-decoration: underline; }
.frise-equipe .frise-axe, .frise-equipe .frise-coin { position: sticky; top: 0; z-index: 1; background: var(--carte);
  align-self: stretch; }
.frise-section { grid-column: 1 / -1; margin: .7rem 0 .1rem; font-size: .95rem; }
.carte.frise-carte { overflow: visible; }   /* sinon l'axe ne colle pas en haut */
@media (max-width: 600px) {
  .frise { grid-template-columns: 5.6rem minmax(0, 1fr); column-gap: .4rem; }
  .frise-nom { font-size: .74rem; }
}
@media print { .frise .segment .espace { fill: #fff; } }

/* Praticien dans une campagne (étape 2) : la fiche en lecture, l'exception
   pour cette campagne seule marquée */
dl.fiche-lecture { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.2rem; margin: .6rem 0; }
dl.fiche-lecture dt { color: var(--discret); font-size: .88rem; }
dl.fiche-lecture dd { margin: 0; }
.exception { color: var(--accent); font-weight: 600; font-size: .85em; text-decoration: none; white-space: nowrap; }
details.volet h4 { margin: 1rem 0 .4rem; }
.ligne-form.serree label:not(.case) { flex: 0 1 auto; }
@media (max-width: 600px) {
  dl.fiche-lecture { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  dl.fiche-lecture dd { margin-bottom: .4rem; }
}

/* Onglet Décompte (demande du 03/11/2026) : écart et reste à faire */
.manque { color: var(--erreur-bord); font-weight: 700; }
.manque-souple { background: var(--alerte); border: 1px solid var(--alerte-bord); border-radius: 3px; padding: 0 .3rem; }
td.tenu { color: var(--ok-texte); }
table.decompte .sep { border-left: 2px solid var(--bord); }
table.decompte th[scope=row], table.decompte-detail th[scope=row] { font-weight: 400; white-space: nowrap; text-align: left; }
table.decompte th[scope=row] .discret { display: block; font-size: .8rem; }
table.decompte tfoot > tr > * { font-weight: 600; border-top: 2px solid var(--bord); }
ul.colonnes-liste { columns: 2 16rem; margin-top: .3rem; }
ul.colonnes-liste li { break-inside: avoid; }
