/* Maquette « Planning gériatrie » — couleurs relevées sur le logo et le site du CHU de Poitiers. */
/* Police Montserrat hébergée avec les écrans (licence SIL OFL 1.1 : fonts/OFL-Montserrat.txt),
   reprise de Google Fonts le 28/11/2026 : police variable, un fichier par sous-ensemble pour les graisses 400 à 700. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/montserrat-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/montserrat-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bleu: #05506D;        /* « CHU Poitiers » du logo */
  --nuit: #0F374E;        /* titres du site */
  --ardoise: #344C60;
  --orange: #E95A0C;
  --ciel: #44B4E7;
  --vert: #23AF92;
  --rose: #E61B72;
  --prune: #A2195B;
  --jaune: #FBD600;

  --fond: #F2F5F7;
  --carte: #FFFFFF;
  --trait: #E1E7EC;
  --trait-fort: #CBD5DD;
  --texte: #1D2B36;
  --gris: #5F6F7C;
  --gris-clair: #8D9BA6;

  --p-vert-fond: #E2F5EF; --p-vert: #0F7A60;
  --p-rose-fond: #FCE3ED; --p-rose: #B10F4F;
  --p-orange-fond: #FDEADB; --p-orange: #AE4408;
  --p-ciel-fond: #E1F2FB; --p-ciel: #0A6A97;
  --p-ardoise-fond: #EBEFF2; --p-ardoise: #44586A;

  --rayon: 14px;
  --ombre: 0 1px 2px rgba(15, 55, 78, .05), 0 4px 14px rgba(15, 55, 78, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px; line-height: 1.45; color: var(--texte); background: var(--fond);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: var(--bleu); text-decoration: none; }
button { font: inherit; color: inherit; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cache { display: none !important; }

/* ---------- Charpente ---------- */
.app { display: flex; min-height: 100vh; }
.barre {
  width: 236px; flex: none; overflow-y: auto; background: #fff; border-right: 1px solid var(--trait);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px 14px;
}
.barre-logo { padding: 4px 8px 14px; border-bottom: 1px solid var(--trait); }
.barre-logo img { width: 150px; display: block; }
.barre-service { padding: 14px 10px 10px; }
.barre-service b { display: block; font-size: 13px; color: var(--nuit); }
.barre-service span { font-size: 12px; color: var(--gris); }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; border-radius: 10px;
  color: var(--ardoise); font-weight: 500; position: relative;
}
.nav a:hover { background: #F2F6F8; }
.nav a.actif { background: #E6F1F6; color: var(--bleu); font-weight: 600; }
.nav a.actif::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bleu); }
.nav .pastille { margin-left: auto; }
.pastille {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--gris-clair);
}
.pastille.alerte { background: var(--rose); }
.pastille.attente { background: var(--orange); }
.pastille.info { background: var(--ciel); }
.barre-bas { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--trait); }
.voir-comme { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); margin: 0 4px 8px; font-weight: 600; }
.bascule { display: grid; grid-template-columns: 1fr 1fr; background: var(--fond); border-radius: 10px; padding: 3px; gap: 3px; }
.bascule button { border: 0; background: transparent; border-radius: 8px; padding: 7px 4px; font-size: 12px; font-weight: 600; color: var(--gris); cursor: pointer; }
.bascule button.actif { background: #fff; color: var(--bleu); box-shadow: 0 1px 2px rgba(15,55,78,.12); }
.demo-note { margin: 12px 4px 0; font-size: 11px; color: var(--gris); line-height: 1.4; }
.demo-note button { border: 0; background: none; padding: 0; color: var(--bleu); font-weight: 600; cursor: pointer; font-size: 11px; }

main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.contenu { max-width: 1340px; margin: 0 auto; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.entete h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--nuit); letter-spacing: -.01em; }
.entete p { margin: 4px 0 0; color: var(--gris); }
.etiquette { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 600; }
.fil { font-size: 13px; color: var(--gris); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.fil a { color: var(--gris); }
.fil a:hover { color: var(--bleu); }

/* ---------- Éléments communs ---------- */
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 22px; }
.carte > h2, .carte-titre { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--nuit); display: flex; align-items: center; gap: 10px; }
.carte-titre .etiquette { margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--p-ardoise-fond); color: var(--p-ardoise);
}
.pill .ic { width: 14px; height: 14px; stroke-width: 2; }
.pill.vert { background: var(--p-vert-fond); color: var(--p-vert); }
.pill.rose { background: var(--p-rose-fond); color: var(--p-rose); }
.pill.orange { background: var(--p-orange-fond); color: var(--p-orange); }
.pill.ciel { background: var(--p-ciel-fond); color: var(--p-ciel); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--trait-fort); background: #fff; color: var(--nuit); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--bleu); color: var(--bleu); }
.btn.primaire { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.btn.primaire:hover { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.btn.discret { border-color: transparent; background: transparent; color: var(--bleu); padding: 0 8px; }
.btn.discret:hover { background: #EEF4F7; }
.btn.refus { color: var(--p-rose); }
.btn.refus:hover { border-color: var(--rose); color: var(--rose); }
.btn.petit { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.lien-fleche { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--bleu); white-space: nowrap; }
.lien-fleche .ic { width: 16px; height: 16px; transition: transform .15s; }
.lien-fleche:hover .ic { transform: translateX(3px); }
.vide { color: var(--gris); padding: 14px 0; }
.note { font-size: 12px; color: var(--gris); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--bleu); background: #E3F0F6;
}
.avatar.AS { color: #0E6E58; background: #E0F4EE; }
.avatar.ASH { color: #7A1A4B; background: #F4E4EC; }
.avatar.grand { width: 54px; height: 54px; font-size: 17px; }

/* ---------- Tableau de bord ---------- */
.bandeau {
  position: relative; overflow: hidden; border-radius: 18px; padding: 26px 30px 24px; color: #fff;
  background: linear-gradient(115deg, var(--bleu) 0%, #0A4560 45%, var(--nuit) 100%);
}
.bandeau::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 330px; height: 330px; opacity: .09; background: #fff;
  -webkit-mask: url(../assets/symbole-chu.svg) center / contain no-repeat; mask: url(../assets/symbole-chu.svg) center / contain no-repeat;
}
.bandeau .etiquette { color: rgba(255,255,255,.72); }
.bandeau h1 { margin: 6px 0 18px; font-size: 27px; font-weight: 700; letter-spacing: -.01em; }
.bandeau-infos { display: flex; flex-wrap: wrap; position: relative; z-index: 1; }
.bandeau-infos > div { padding: 2px 26px 2px 0; margin-right: 26px; border-right: 1px solid rgba(255,255,255,.22); }
.bandeau-infos > div:last-child { border-right: 0; }
.bandeau-infos b { display: block; font-size: 18px; font-weight: 700; }
.bandeau-infos span { font-size: 12.5px; color: rgba(255,255,255,.78); }
.bandeau-infos .alerte b { color: #FFC2D9; }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }
.chiffre { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px 14px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 6px; color: inherit; }
a.chiffre:hover { border-color: #B7CBD7; }
.chiffre .valeur { font-size: 32px; font-weight: 700; color: var(--nuit); line-height: 1.05; letter-spacing: -.02em; }
.chiffre .valeur small { font-size: 14px; font-weight: 600; color: var(--gris); letter-spacing: 0; margin-left: 4px; }
.chiffre .detail { font-size: 12px; color: var(--gris); }
.chiffre.alerte .valeur { color: var(--rose); }
.postes-jour { display: flex; gap: 10px; font-size: 13px; font-weight: 600; color: var(--nuit); }
.postes-jour span.manque { color: var(--rose); }
.barres { display: flex; align-items: flex-end; gap: 5px; height: 30px; margin-top: 2px; }
.barres i { flex: 1; border-radius: 3px; background: #DCE6EC; min-height: 3px; display: block; }
.barres i.manque { background: var(--rose); }
.barres-jours { display: flex; gap: 5px; font-size: 10px; color: var(--gris-clair); }
.barres-jours span { flex: 1; text-align: center; }

.grille-tdb { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--trait); }
.liste > li:first-child { border-top: 0; padding-top: 2px; }
.puce { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--p-ardoise-fond); color: var(--p-ardoise); }
.puce.urgent { background: var(--p-rose-fond); color: var(--p-rose); }
.puce.attente { background: var(--p-orange-fond); color: var(--p-orange); }
.puce.info { background: var(--p-ciel-fond); color: var(--p-ciel); }
.puce.ok { background: var(--p-vert-fond); color: var(--p-vert); }
.liste .corps { flex: 1; min-width: 0; }
.liste .titre { font-weight: 600; color: var(--texte); }
.liste .sous { font-size: 12.5px; color: var(--gris); margin-top: 2px; }
.liste .action { align-self: center; }

.semaine { width: 100%; border-collapse: separate; border-spacing: 4px; margin: -4px; }
.semaine th { font-size: 11px; font-weight: 600; color: var(--gris); text-align: center; padding: 2px 0 4px; }
.semaine th.jour b { display: block; font-size: 13px; color: var(--nuit); }
.semaine th.jour.auj b { color: var(--bleu); }
.semaine th.poste { text-align: left; width: 54px; font-size: 12px; color: var(--ardoise); }
.semaine td a, .semaine td span { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--p-vert); background: var(--p-vert-fond); }
.semaine td .manque { color: #fff; background: var(--rose); }
.semaine td .juste { color: var(--ardoise); background: #EEF2F5; }
.journal li { font-size: 13px; }
.journal .heure { font-size: 11.5px; color: var(--gris-clair); white-space: nowrap; min-width: 70px; padding-top: 1px; }

/* ---------- Planning ---------- */
.barre-outils { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mois-nav { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--trait-fort); border-radius: 10px; overflow: hidden; }
.mois-nav a { padding: 0 12px; height: 38px; display: inline-flex; align-items: center; color: var(--ardoise); font-weight: 600; }
.mois-nav a:hover { background: #F2F6F8; }
.mois-nav b { padding: 0 14px; height: 38px; display: inline-flex; align-items: center; border-left: 1px solid var(--trait); border-right: 1px solid var(--trait); color: var(--nuit); min-width: 150px; justify-content: center; text-transform: capitalize; }
.filtres { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--trait-fort); border-radius: 10px; padding: 3px; }
.filtres a { padding: 0 11px; height: 30px; display: inline-flex; align-items: center; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--gris); }
.filtres a.actif { background: #E6F1F6; color: var(--bleu); }
.espace { flex: 1; }
.legende { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 12px; color: var(--gris); margin-top: 12px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

.cadre-grille { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: auto; max-height: calc(100vh - 220px); }
table.grille { border-collapse: separate; border-spacing: 0; font-size: 11px; }
.grille th, .grille td { border-bottom: 1px solid #EEF2F5; border-right: 1px solid #F1F4F6; padding: 0; text-align: center; }
.grille thead th { position: sticky; top: 0; z-index: 3; background: #fff; height: 44px; min-width: 31px; font-weight: 600; color: var(--gris); border-bottom: 1px solid var(--trait); }
.grille thead th span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.grille thead th b { display: block; font-size: 12.5px; color: var(--nuit); }
.grille thead th.we { background: #F6F8FA; }
.grille thead th.ferie b { color: var(--prune); }
.grille thead th.auj { background: #E6F1F6; }
.grille thead th.auj b { color: var(--bleu); }
.grille .nom { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: 0 12px; min-width: 170px; max-width: 170px; border-right: 1px solid var(--trait); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grille thead .nom { z-index: 4; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.grille tbody .nom { font-size: 12.5px; font-weight: 600; color: var(--texte); height: 29px; }
.grille tbody .nom small { font-weight: 500; color: var(--gris-clair); margin-left: 4px; font-size: 11px; }
.grille tr.groupe th { position: sticky; left: 0; text-align: left; background: #F7F9FA; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); padding: 8px 12px 6px; height: auto; font-weight: 700; overflow: visible; z-index: 2; }
.grille tr.groupe th, .grille tr.couv-titre th { text-overflow: clip; }
.grille tr.groupe td { background: #F7F9FA; }
.grille td.c { height: 29px; min-width: 31px; font-weight: 700; cursor: pointer; position: relative; }
.grille td.c:hover { box-shadow: inset 0 0 0 2px var(--ciel); }
.grille td.total { font-weight: 600; color: var(--gris); padding: 0 10px; white-space: nowrap; min-width: 62px; }
.grille td.we { background-color: #FAFBFC; }
.grille td.auj { box-shadow: inset 1px 0 0 #9CC6DA, inset -1px 0 0 #9CC6DA; }
.c-M { background: #DDF0FA !important; color: #04577A; }
.c-S { background: #FCE3D2 !important; color: #9C3C05; }
.c-N { background: var(--nuit) !important; color: #fff; }
.c-RH { color: #B4C0C9; font-weight: 500 !important; font-size: 10px; }
.c-CA { background: #FFF4B8 !important; color: #6E5C00; }
.c-RTT { background: #E9EEF2 !important; color: var(--ardoise); }
.c-CM, .c-AT { background: #FBDCE8 !important; color: #A50E4B; }
.c-ENF { background: #FBDCE8 !important; color: #A50E4B; }
.c-FO { background: #EFE2EB !important; color: #7C1647; }
.grille td.rempl::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--orange) transparent transparent; }
.grille td.manuel::before { content: ''; position: absolute; left: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--prune); }
.case-leg { width: 22px; height: 18px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; position: relative; overflow: hidden; }
.grille tfoot th, .grille tfoot td { position: sticky; background: #fff; }
.grille tr.couv th { font-size: 11.5px; font-weight: 600; color: var(--ardoise); height: 26px; }
.grille tr.couv td { font-weight: 700; font-size: 11px; color: var(--p-vert); height: 26px; }
.grille tr.couv td.juste { color: var(--gris); }
.grille tr.couv td.manque { background: var(--rose); color: #fff; cursor: pointer; }
.grille tr.couv-titre th { text-align: left; padding: 10px 12px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); background: #F7F9FA; font-weight: 700; }
.grille tr.couv-titre td { background: #F7F9FA; }

/* Fenêtre d'une case */
.voile { position: fixed; inset: 0; z-index: 50; background: rgba(15, 55, 78, .18); }
.pop {
  position: fixed; z-index: 51; width: 380px; max-width: calc(100vw - 24px); background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(15,55,78,.25);
  padding: 18px 18px 14px; border: 1px solid var(--trait);
}
.pop h3 { margin: 0; font-size: 15px; color: var(--nuit); }
.pop .sous { font-size: 12.5px; color: var(--gris); margin: 2px 0 12px; }
.pop-codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pop-codes button { height: 40px; border-radius: 9px; border: 1px solid var(--trait); font-weight: 700; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.pop-codes button small { font-weight: 500; font-size: 9.5px; opacity: .8; }
.pop-codes button.choisi { box-shadow: 0 0 0 2px var(--bleu); border-color: var(--bleu); }
.pop-verif { margin-top: 12px; font-size: 12.5px; min-height: 40px; }
.pop-verif .ligne { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.pop-verif .ligne .ic { width: 16px; height: 16px; margin-top: 1px; }
.ok-txt { color: var(--p-vert); }
.ko-txt { color: var(--p-rose); }
.av-txt { color: var(--p-orange); }
.pop footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- Demandes ---------- */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 16px; }
.onglets a { padding: 10px 14px; font-weight: 600; color: var(--gris); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.onglets a.actif { color: var(--bleu); border-color: var(--bleu); }
.demandes-liste .ligne-demande { display: grid; grid-template-columns: 38px minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(170px, 1.3fr) minmax(170px, 1.2fr) 24px; gap: 14px; align-items: center; padding: 14px 6px; border-top: 1px solid var(--trait); color: inherit; }
.demandes-liste .ligne-demande:first-child { border-top: 0; }
.demandes-liste .ligne-demande:hover { background: #F7FAFB; border-radius: 10px; }
.ligne-demande b { display: block; font-weight: 600; }
.ligne-demande small { color: var(--gris); font-size: 12px; }

.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.personne { display: flex; gap: 14px; align-items: center; }
.personne h2 { margin: 0; font-size: 19px; color: var(--nuit); }
.personne p { margin: 2px 0 0; color: var(--gris); font-size: 13px; }
.citation { margin: 16px 0 0; padding: 12px 14px; background: var(--fond); border-radius: 10px; color: var(--ardoise); font-style: italic; }
.infos-demande { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.infos-demande div { background: var(--fond); border-radius: 10px; padding: 10px 12px; }
.infos-demande b { display: block; font-size: 14px; color: var(--nuit); margin-top: 2px; }
table.impact { width: 100%; border-collapse: collapse; font-size: 13px; }
.impact th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 0 10px 8px; border-bottom: 1px solid var(--trait); }
.impact td { padding: 10px; border-bottom: 1px solid #EEF2F5; vertical-align: middle; }
.impact tr.repos td { color: var(--gris-clair); }
.impact .case-leg { width: 30px; }
.alerte-regle { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--p-orange-fond); color: var(--p-orange); font-size: 13px; margin-bottom: 8px; }
.alerte-regle.rose { background: var(--p-rose-fond); color: var(--p-rose); }
.alerte-regle.vert { background: var(--p-vert-fond); color: var(--p-vert); }
.alerte-regle .ic { margin-top: 1px; }
.decision { display: flex; flex-direction: column; gap: 10px; }
.decision textarea, .champ textarea { width: 100%; min-height: 80px; resize: vertical; border: 1px solid var(--trait-fort); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--texte); }
.motifs { display: flex; flex-wrap: wrap; gap: 6px; }
.motifs button { border: 1px solid var(--trait-fort); background: #fff; border-radius: 16px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: var(--ardoise); }
.motifs button:hover { border-color: var(--bleu); color: var(--bleu); }
.bandeau-statut { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.bandeau-statut.vert { background: var(--p-vert-fond); color: var(--p-vert); }
.bandeau-statut.rose { background: var(--p-rose-fond); color: var(--p-rose); }
.bandeau-statut.ardoise { background: var(--p-ardoise-fond); color: var(--p-ardoise); }
.bandeau-statut small { display: block; font-weight: 500; opacity: .9; margin-top: 2px; }

/* ---------- Remplacement ---------- */
.poste-tete { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.poste-tete .grosse-date { font-size: 13px; color: var(--gris); }
.poste-tete .grosse-date b { display: block; font-size: 22px; color: var(--nuit); }
.poste-tete .sep { width: 1px; align-self: stretch; background: var(--trait); }
.cand { display: grid; grid-template-columns: 28px 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 4px; border-top: 1px solid var(--trait); }
.cand:first-child { border-top: 0; }
.cand .rang { font-size: 18px; font-weight: 700; color: var(--gris-clair); text-align: center; }
.cand.premier .rang { color: var(--bleu); }
.cand .nom-cand { font-weight: 700; font-size: 14.5px; }
.cand .raisons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cand .tel { font-size: 13px; font-weight: 600; color: var(--nuit); display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; }
.cand .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cand.refuse { opacity: .55; }
details.impossibles summary { cursor: pointer; font-weight: 600; color: var(--ardoise); padding: 6px 0; }
details.impossibles ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
details.impossibles li { padding: 7px 0; border-top: 1px solid #EEF2F5; font-size: 13px; display: flex; gap: 10px; }
details.impossibles li b { min-width: 150px; font-weight: 600; }
.methode ol { margin: 6px 0 0; padding-left: 18px; color: var(--ardoise); font-size: 13px; }
.methode ol li { margin: 4px 0; }

/* ---------- Formulaires ---------- */
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.champ { display: flex; flex-direction: column; gap: 5px; }
.champ.large { grid-column: 1 / -1; }
.champ label { font-size: 12px; font-weight: 600; color: var(--ardoise); }
.champ select, .champ input { height: 40px; border: 1px solid var(--trait-fort); border-radius: 10px; padding: 0 12px; font: inherit; color: var(--texte); background: #fff; }
.champ input[type=number] { width: 110px; }
.apercu { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--fond); font-size: 13px; }
.apercu ul { margin: 8px 0 0; padding-left: 18px; }
.apercu li { margin: 3px 0; }
.mail { border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.mail + .mail { margin-top: 8px; }
.mail .corps { flex: 1; min-width: 0; }
.mail b { display: block; font-size: 13px; }
.mail small { color: var(--gris); font-size: 12px; }
.lu { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; align-items: center; }
.lu dt { color: var(--gris); }
.lu dd { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: center; }
table.tableau { width: 100%; border-collapse: collapse; font-size: 13px; }
.tableau th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 0 10px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.tableau td { padding: 11px 10px; border-bottom: 1px solid #EEF2F5; vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .num { text-align: right; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.affiche { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.qr-attente { width: 150px; height: 150px; border: 2px dashed var(--trait-fort); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--gris); font-size: 11px; padding: 10px; gap: 6px; }
.qr-attente .ic { width: 34px; height: 34px; color: var(--gris-clair); }
.affiche ol { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ardoise); }

/* ---------- Règles ---------- */
.regle { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--trait); }
.regle:first-of-type { border-top: 0; }
.regle b { display: block; font-weight: 600; }
.regle small { color: var(--gris); font-size: 12px; }
.regle input, .regle select { height: 36px; border: 1px solid var(--trait-fort); border-radius: 9px; padding: 0 10px; font: inherit; width: 100%; }
.unite { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gris); }
.unite input { width: 80px; }
table.effectifs { border-collapse: collapse; font-size: 13px; }
.effectifs th { font-size: 11px; color: var(--gris); font-weight: 600; padding: 4px 8px; text-align: center; }
.effectifs th:first-child { text-align: left; }
.effectifs td { padding: 3px 6px; }
.effectifs input { width: 54px; height: 32px; text-align: center; border: 1px solid var(--trait-fort); border-radius: 8px; font: inherit; }

/* ---------- Vue soignant (téléphone) ---------- */
.scene-tel { flex: 1; width: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 18px 16px 40px; background: radial-gradient(circle at 30% 0%, #E4EFF5 0%, var(--fond) 55%); }
.scene-tel .bandeau-retour { width: 100%; max-width: 980px; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--gris); font-size: 13px; }
.scene-tel .bandeau-retour .espace { flex: 1; }
.tel-cadre { width: 390px; height: 800px; max-height: calc(100vh - 90px); border-radius: 46px; background: #0E1A22; padding: 12px; box-shadow: 0 30px 70px rgba(15,55,78,.28); flex: none; }
.tel-ecran { width: 100%; height: 100%; border-radius: 36px; background: #F5F8FA; overflow: auto; position: relative; }
.tel-haut { position: sticky; top: 0; z-index: 2; background: #fff; padding: 22px 20px 12px; border-bottom: 1px solid var(--trait); display: flex; align-items: center; justify-content: space-between; }
.tel-haut img { height: 30px; }
.tel-haut span { font-size: 11px; color: var(--gris); text-align: right; line-height: 1.3; }
.tel-corps { padding: 18px 18px 30px; }
.tel-corps h2 { margin: 4px 0 4px; font-size: 22px; color: var(--nuit); }
.tel-corps p { color: var(--gris); margin: 0 0 16px; font-size: 13.5px; }
.code-cases { display: flex; gap: 10px; justify-content: center; margin: 18px 0 10px; }
.code-cases input { width: 58px; height: 64px; border-radius: 14px; border: 1px solid var(--trait-fort); text-align: center; font-size: 26px; font-weight: 700; color: var(--nuit); font-family: inherit; background: #fff; }
.tel-btn { width: 100%; height: 52px; border-radius: 14px; border: 0; background: var(--bleu); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tel-btn.secondaire { background: #fff; color: var(--bleu); border: 1px solid var(--trait-fort); }
.tel-carte { background: #fff; border-radius: 16px; border: 1px solid var(--trait); padding: 14px 16px; margin-bottom: 12px; }
.tel-carte h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.tel-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #EEF2F5; font-size: 13.5px; }
.tel-ligne:first-of-type { border-top: 0; }
.tel-ligne .jour { width: 74px; color: var(--gris); font-size: 12.5px; }
.tel-ligne .espace { flex: 1; }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.choix button { min-height: 58px; border-radius: 14px; border: 1px solid var(--trait-fort); background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; padding: 8px; color: var(--nuit); }
.choix button.choisi { border-color: var(--bleu); box-shadow: 0 0 0 2px var(--bleu); color: var(--bleu); background: #F0F7FA; }
.tel-champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tel-champ label { font-size: 12.5px; font-weight: 600; color: var(--ardoise); }
.tel-champ input, .tel-champ textarea { height: 48px; border-radius: 12px; border: 1px solid var(--trait-fort); padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--texte); }
.tel-champ textarea { height: 84px; padding: 10px 12px; resize: none; }
.tel-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tel-succes { text-align: center; padding-top: 50px; }
.tel-succes .rond { width: 74px; height: 74px; border-radius: 50%; background: var(--p-vert-fond); color: var(--p-vert); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.tel-succes .rond .ic { width: 38px; height: 38px; }
.lien-demo { border: 0; background: none; color: var(--bleu); font-weight: 600; cursor: pointer; font-size: 12.5px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.explications-tel { max-width: 300px; font-size: 13px; color: var(--ardoise); }
.explications-tel h3 { color: var(--nuit); font-size: 15px; margin: 0 0 8px; }
.explications-tel li { margin: 6px 0; }

/* ---------- Message furtif ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; transition: all .25s; z-index: 60;
  background: var(--nuit); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 30px rgba(15,55,78,.3); display: flex; gap: 10px; align-items: center; max-width: 90vw; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Écrans plus étroits ---------- */
@media (max-width: 1180px) {
  .grille-tdb, .fiche, .deux-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .barre { width: 70px; padding: 18px 10px; }
  .barre-logo img { width: 46px; height: 46px; object-fit: cover; object-position: 0 50%; }
  .barre-service, .nav a span.txt, .voir-comme, .demo-note, .nav .pastille { display: none; }
  .nav a { justify-content: center; padding: 0; }
  .bascule { grid-template-columns: 1fr; }
  .bascule button { font-size: 10px; }
  main { padding: 20px 18px 50px; }
  .bandeau-infos { flex-direction: column; gap: 10px; }
  .bandeau-infos > div { border-right: 0; padding: 0; margin: 0; }
}

/* ---------- Impression du planning ---------- */
@media print {
  body { background: #fff; font-size: 9px; }
  .barre, .barre-outils, .legende-ecran, .toast, .entete .actions { display: none !important; }
  main { padding: 0; }
  .cadre-grille { border: 0; box-shadow: none; max-height: none; overflow: visible; }
  .grille thead th, .grille .nom, .grille tfoot th, .grille tfoot td { position: static; }
  .grille td.c { height: 18px; min-width: 22px; }
  .grille thead th { min-width: 22px; height: 30px; }
  .grille tbody .nom { height: 18px; min-width: 120px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ===================== Correctifs du 28/11 : débordements, petits écrans ===================== */
.bascule button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.bascule .ic { display: none; }
.fil { gap: 8px; }
.mois-nav a { padding: 0 16px; font-size: 17px; }
.mois-nav b { padding: 0 18px; }
.nowrap { white-space: nowrap; }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.defile > table { min-width: 100%; }
.carte, .col, .fiche > *, .deux-col > *, .grille-tdb > * { min-width: 0; }
.pill.long { white-space: normal; height: auto; min-height: 24px; padding: 3px 10px; line-height: 1.35; }
.impact .pill { white-space: normal; height: auto; min-height: 24px; padding: 3px 10px; }

/* Planning et trame : titres de groupe dans une ligne pleine largeur, étiquette collée à gauche */
.grille tr.groupe td, .grille tr.couv-titre td { background: #F7F9FA; padding: 0; height: 38px; text-align: left; border-right: 0; vertical-align: bottom; }
.etiq-groupe { position: sticky; left: 0; display: inline-block; padding: 14px 14px 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); font-weight: 700; white-space: nowrap; }
.grille td.echange::before { content: ''; position: absolute; left: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ciel); }
.grille td.role { box-shadow: inset 0 -3px 0 var(--orange); }
.c-RA { background: #ECEEF8 !important; color: #474C8E; }
.c-RC { background: #E3F4EE !important; color: #0F7A60; }
.c-JF { background: #F3EAF7 !important; color: #6E2A7F; }
.marque-rempl::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0; border-color: transparent var(--orange) transparent transparent; }
.marque-echange::before, .marque-manuel::before { content: ''; position: absolute; left: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; }
.marque-manuel::before { background: var(--prune); }
.marque-echange::before { background: var(--ciel); }

/* Demandes : la flèche respire, rien ne dépasse */
.demandes-liste .ligne-demande { grid-template-columns: 38px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) auto 30px; padding: 14px 12px; }
.ligne-demande .ld-fleche { justify-self: end; display: inline-flex; color: var(--gris-clair); }
.ligne-demande .ld-nom, .ligne-demande .ld-type, .ligne-demande .ld-dates { min-width: 0; overflow-wrap: anywhere; }

/* Remplacement : pool de suppléance, repos à rendre */
.pool { display: flex; gap: 14px; align-items: center; padding: 16px 4px 2px; border-top: 1px solid var(--trait); flex-wrap: wrap; }
.pool .corps { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.carte.rendu { border-color: #BFE3D6; background: #F6FCFA; }
.carte.rendu .btn { margin-top: 2px; }

/* Équipe */
.tableau .qui { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.tableau .qui b { display: block; }
.tableau .qui small { color: var(--gris); font-size: 12px; }
.tableau tr.sous-titre td { padding: 18px 10px 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--bleu); font-weight: 700; border-bottom: 1px solid var(--trait); }
.tableau.equipe { min-width: 980px; }
.titre-affiche { margin: 0 0 4px; font-size: 16px; color: var(--nuit); }
.boutons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Règles */
.regle { grid-template-columns: minmax(0, 1fr) 150px 120px; }
.regle .statut { justify-self: end; }
.effectifs-deux { display: flex; gap: 30px; flex-wrap: wrap; }

/* Téléphone */
.tel-demande { flex-wrap: wrap; }
.tel-txt { flex: 1; min-width: 150px; }
.tel-motif { width: 100%; }
.choix button.large { grid-column: 1 / -1; }
.tel-champ select { height: 48px; border-radius: 12px; border: 1px solid var(--trait-fort); padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--texte); }
.code-cases input { width: 100%; letter-spacing: .35em; }
.scene-tel .bandeau-retour { flex-wrap: wrap; }

@media (max-width: 1000px) {
  .bascule { grid-template-columns: 1fr; }
  .bascule .txt { display: none; }
  .bascule .ic { display: block; }
  .bascule button { height: 38px; padding: 0; font-size: 12px; }
}
@media (max-width: 900px) {
  .masquer-etroit { display: none; }
  .demandes-liste .ligne-demande { grid-template-columns: 38px minmax(0, 1fr) 30px; grid-template-areas: "av nom fl" "av type fl" "av dates fl" "av statut fl"; row-gap: 6px; }
  .ligne-demande > .avatar { grid-area: av; align-self: start; }
  .ld-nom { grid-area: nom; } .ld-type { grid-area: type; } .ld-dates { grid-area: dates; } .ld-statut { grid-area: statut; } .ld-fleche { grid-area: fl; align-self: center; }
}
@media (max-width: 760px) {
  .cand { grid-template-columns: 26px 38px minmax(0, 1fr); }
  .cand .actions { grid-column: 3 / -1; justify-content: flex-start; }
  .cand .tel { display: flex; margin: 4px 0 0; }
  .regle { grid-template-columns: 1fr; gap: 8px; }
  .regle .statut { justify-self: start; }
  .infos-demande { grid-template-columns: 1fr; }
  .poste-tete .sep { display: none; }
  .poste-tete { gap: 12px 18px; }
}
@media (max-width: 640px) {
  main { padding: 16px 12px 40px; }
  .carte { padding: 16px 16px; }
  .bandeau { padding: 22px 20px; }
  .bandeau h1 { font-size: 22px; }
  .liste > li { flex-wrap: wrap; }
  .liste .action { margin-left: 50px; }
  .affiche { grid-template-columns: 1fr; }
  .entete h1 { font-size: 21px; }
}

.tel-champ input, .tel-champ select, .tel-champ textarea { min-width: 0; width: 100%; box-sizing: border-box; }
.tel-champ input[type=date] { padding: 0 8px; font-size: 14px; }
.formulaire { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.champ select, .champ input { min-width: 0; width: 100%; box-sizing: border-box; }
.champ input[type=number] { width: 110px; }
.cand .raisons .pill { white-space: normal; height: auto; min-height: 24px; padding: 3px 10px; line-height: 1.35; }
@media (max-width: 640px) {
  .formulaire { grid-template-columns: minmax(0, 1fr); }
}

/* ===================== Trames : éditeur ===================== */
.onglets-defile { overflow-x: auto; scrollbar-width: none; }
.onglets-defile a { white-space: nowrap; }
.trame-fiche { grid-template-columns: minmax(0, 1fr) 380px; }
table.trame-grille { border-collapse: separate; border-spacing: 4px; margin: -4px; }
.trame-grille th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 4px 6px; text-align: center; }
.trame-grille th.ligne { text-align: left; color: var(--bleu); font-weight: 700; letter-spacing: .04em; padding-right: 10px; white-space: nowrap; }
.trame-grille th.we { color: var(--ardoise); }
.trame-grille td.c { width: 46px; min-width: 46px; height: 36px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 12px; cursor: pointer; border: 1px solid transparent; }
.trame-grille td.c:hover { box-shadow: 0 0 0 2px var(--ciel); }
.trame-grille td.c-RH { background: #F4F6F8; }
.trame-grille td.err { box-shadow: 0 0 0 2px var(--rose); }
.trame-grille td.av { box-shadow: 0 0 0 2px #F3B27E; }
.trame-grille td.num { font-size: 12.5px; font-weight: 600; color: var(--ardoise); padding: 0 8px; text-align: right; }
.trame-grille td.qui-ligne, .trame-grille th.qui-ligne { text-align: left; font-size: 12.5px; color: var(--texte); padding-left: 12px; min-width: 120px; }
.trame-grille tr.couv td { height: 30px; text-align: center; font-weight: 700; font-size: 12.5px; border-radius: 8px; color: var(--p-vert); background: var(--p-vert-fond); }
.trame-grille tr.couv td small { font-weight: 500; opacity: .75; }
.trame-grille tr.couv td.juste { color: var(--ardoise); background: #EEF2F5; }
.trame-grille tr.couv td.manque { color: #fff; background: var(--rose); }
.trame-grille tr.couv td:empty { background: none; }
.trame-grille tfoot tr:first-child th, .trame-grille tfoot tr:first-child td { border-top: 6px solid transparent; }
.outils-trame { margin-top: 16px; }
.liste-ctrl { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.liste-ctrl li { position: relative; padding: 6px 0 6px 18px; border-top: 1px solid #EEF2F5; }
.liste-ctrl li:first-child { border-top: 0; }
.liste-ctrl li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--gris-clair); }
.liste-ctrl.ko li::before, .liste-ctrl li.ko::before { background: var(--rose); }
.liste-ctrl.av li::before { background: var(--orange); }
.liste-ctrl li.ok::before { background: var(--vert); }
.liste-ctrl.ko li, .liste-ctrl li.ko { color: var(--p-rose); }
.sous-titre-carte { margin: 16px 0 6px; font-size: 13px; color: var(--nuit); display: flex; align-items: center; gap: 8px; }
.chiffres-trame { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.chiffres-trame div { background: var(--fond); border-radius: 10px; padding: 8px 10px; }
.chiffres-trame dt { font-size: 11px; color: var(--gris); }
.chiffres-trame dd { margin: 2px 0 0; font-weight: 700; color: var(--nuit); font-size: 15px; }
.chiffres-trame dd small { font-weight: 500; color: var(--gris); font-size: 12px; }
.liste-affect { list-style: none; margin: 0; padding: 0; }
.liste-affect li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #EEF2F5; flex-wrap: wrap; }
.liste-affect li:first-child { border-top: 0; }
.liste-affect .nom-affect { font-weight: 600; flex: 1; min-width: 140px; }
.liste-affect select, .unite select { height: 34px; border: 1px solid var(--trait-fort); border-radius: 9px; padding: 0 8px; font: inherit; background: #fff; }
.effectifs.lecture td { text-align: center; font-weight: 700; color: var(--nuit); padding: 6px 10px; }
.bandeau-statut.prop { flex-wrap: wrap; }
.bandeau-statut.prop > div:first-of-type { flex: 1; min-width: 220px; }
.bandeau-statut .boutons { margin: 0; }
.pop-trame .pop-codes { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1180px) { .trame-fiche { grid-template-columns: minmax(0, 1fr); } }
/* Choix de l'équipe : des pastilles qui passent à la ligne plutôt qu'une barre qui défile en cachette */
.onglets.onglets-defile { overflow: visible; flex-wrap: wrap; gap: 8px; border-bottom: 0; margin-bottom: 18px; }
.onglets.onglets-defile a { white-space: nowrap; border: 1px solid var(--trait-fort); border-radius: 20px; padding: 7px 14px; margin: 0; background: #fff; font-size: 13px; }
.onglets.onglets-defile a.actif { background: #E6F1F6; border-color: #B9D5E2; color: var(--bleu); }
.onglets.onglets-defile a:hover { border-color: var(--bleu); }

@media (max-width: 640px) {
  .trame-grille td.c { width: 36px; min-width: 36px; height: 32px; font-size: 11px; }
  table.trame-grille { border-spacing: 3px; margin: -3px; }
  .trame-grille th { padding: 3px 2px; font-size: 10px; letter-spacing: .04em; }
}
/* Cases RA : repos pour un 80 %, poste pour un temps plein */
.trame-grille td.ra { position: relative; }
.trame-grille .ra-poste { position: absolute; right: 4px; bottom: 2px; font-size: 9px; font-weight: 700; opacity: .7; }
.trame-grille td.sens { box-shadow: 0 0 0 2px var(--prune); }
.liste-ctrl.sens li::before { background: var(--prune); }
.pop-trame .pop-codes { grid-template-columns: repeat(3, 1fr); }
.chiffres-trame dd.deux-valeurs span { display: block; }

/* ===================== Impression du planning ===================== */
.outils-impression .barre-outils { margin-bottom: 10px; }
.filtres-pages { flex-wrap: wrap; margin-bottom: 16px; display: inline-flex; max-width: 100%; }
.case-option { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--trait-fort); border-radius: 10px; background: #fff; color: var(--ardoise); font-weight: 600; font-size: 13px; }
.case-option .coche-boite { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--trait-fort); display: inline-flex; align-items: center; justify-content: center; }
.case-option.coche .coche-boite { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.case-option .coche-boite .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.apercu-cadre { width: 100%; }
.apercu-feuilles { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding: 4px 0 40px; }
.feuille { background: #fff; box-shadow: 0 8px 30px rgba(15, 55, 78, .16); box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; color: #1D2B36; font-family: 'Montserrat', Arial, sans-serif; flex: none; }
.f-tete { display: flex; align-items: center; gap: 6mm; height: 22mm; margin-bottom: 2mm; flex: none; }
.f-logo { height: 15mm; width: auto; }
.f-titres { flex: 1; min-width: 0; }
.f-sur { font-size: 7.5pt; letter-spacing: .12em; text-transform: uppercase; color: #5F6F7C; font-weight: 600; }
.f-titres h1 { margin: 1mm 0; font-size: 15pt; color: #0F374E; font-weight: 700; letter-spacing: -.01em; }
.f-sous { font-size: 8pt; color: #5F6F7C; }
.f-visa { width: 60mm; border: .3mm solid #CBD5DD; border-radius: 2mm; padding: 2mm 3mm; font-size: 7.5pt; color: #44586A; flex: none; }
.f-visa-titre { font-weight: 600; }
.f-visa-ligne { height: 6mm; border-bottom: .3mm dotted #8D9BA6; margin-bottom: 1.5mm; }
.f-grille { table-layout: fixed; border-collapse: collapse; width: 100%; font-size: var(--police); flex: none; }
.f-grille col.col-nom { width: var(--col-nom); }
.f-grille col.col-jour { width: var(--col-jour); }
.f-grille col.col-total { width: var(--col-total); }
.f-grille th, .f-grille td { height: var(--h-ligne); border: .2mm solid #D3DCE3; text-align: center; padding: 0; font-weight: 700; line-height: 1; }
.f-grille thead th { font-weight: 600; color: #44586A; font-size: calc(var(--police) * .92); height: calc(var(--h-ligne) * 1.7); background: #fff; }
.f-grille thead th span { display: block; font-size: calc(var(--police) * .78); color: #8D9BA6; margin-bottom: .4mm; }
.f-grille thead th.we { background: #EEF2F5; }
.f-grille thead th.ferie { color: #A2195B; }
.f-grille .f-nom { text-align: left; padding: 0 1.5mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: #1D2B36; }
.f-grille .f-nom small { font-weight: 500; color: #8D9BA6; }
.f-grille .f-total { font-weight: 600; color: #44586A; font-size: calc(var(--police) * .9); }
.f-grille td.we { background-color: #F4F6F8; }
.f-grille td.c-RH { color: #B4C0C9; font-weight: 500; font-size: calc(var(--police) * .85); }
.f-grille td.change { position: relative; }
.f-grille td.change::after { content: ''; position: absolute; left: .5mm; top: .5mm; width: 1.1mm; height: 1.1mm; border-radius: 50%; background: #A2195B; }
.f-grille tr.f-groupe td { text-align: left; padding: 0 1.5mm; font-size: calc(var(--police) * .82); letter-spacing: .08em; text-transform: uppercase; color: #05506D; background: #F2F6F8; font-weight: 700; }
.f-grille .f-couv td { font-weight: 600; color: #0F7A60; }
.f-grille .f-couv td.manque { background: #E61B72 !important; color: #fff; }
.f-pied { margin-top: auto; padding-top: 2mm; display: flex; flex-direction: column; gap: 1.2mm; font-size: 7pt; color: #44586A; flex: none; }
.f-legende { display: flex; flex-wrap: wrap; gap: 1mm 4mm; }
.f-legende span { display: inline-flex; align-items: center; gap: 1.2mm; }
.f-legende b { display: inline-block; min-width: 6mm; text-align: center; border-radius: 1mm; padding: .3mm .8mm; font-size: 6.5pt; }
.f-mention { color: #8D9BA6; display: flex; align-items: center; gap: 1.2mm; }
.f-point { width: 1.6mm; height: 1.6mm; border-radius: 50%; background: #A2195B; display: inline-block; }

@media print {
  body.mode-impression { background: #fff; }
  body.mode-impression .barre, body.mode-impression .outils-impression, body.mode-impression .toast { display: none !important; }
  body.mode-impression main { padding: 0 !important; }
  body.mode-impression .contenu { max-width: none; margin: 0; }
  body.mode-impression .apercu-feuilles { zoom: 1 !important; display: block; padding: 0; }
  body.mode-impression .feuille { box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  body.mode-impression .feuille:last-child { break-after: auto; page-break-after: auto; }
}

/* ===================== Avec le serveur (28/11) : connexion, vraie page des soignant·es ===================== */
.page-connexion { flex: 1; width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at 30% 0%, #E4EFF5 0%, var(--fond) 55%); }
.connexion { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 4px; }
.connexion-logo { width: 170px; max-width: 100%; height: auto; margin: 0 0 14px; }
.connexion h1 { margin: 2px 0 14px; font-size: 22px; color: var(--nuit); }
.formulaire-connexion { display: flex; flex-direction: column; gap: 12px; }
.formulaire-connexion .btn { width: 100%; justify-content: center; height: 44px; }
.formulaire-connexion p { margin: 0; }
.connexion > .note { margin: 14px 0 0; }
.connexion > .btn { align-self: flex-start; margin-top: 10px; }
.page-soignant { flex: 1; width: 100%; min-height: 100vh; display: flex; justify-content: center; background: var(--fond); }
.page-soignant .tel-ecran { max-width: 520px; height: auto; min-height: 100vh; border-radius: 0; overflow: visible; box-shadow: 0 0 0 1px var(--trait); }
.page-soignant .tel-haut { padding-top: 16px; }
.case-leg.c-vide { background: #F4F6F8; color: var(--gris-clair); }
.toast.erreur { background: var(--p-rose); }
.bascule.seul { grid-template-columns: 1fr; }
.connexion > .note.connexion-aide { margin: -4px 0 16px; line-height: 1.5; }
#cx-code { letter-spacing: .3em; font-size: 18px; font-weight: 600; }
.boutons-saisie { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
