/* Portail du Centre Social Projet — app.css (direction artistique 2026)
   Remplace assets/app.css. Polices dans assets/fonts/, logo dans assets/logo-projet.png. */
@font-face{font-family:"Fraunces";src:url("fonts/Fraunces-latin-variable.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("fonts/AtkinsonHyperlegibleNext-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("fonts/AtkinsonHyperlegibleNext-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("fonts/AtkinsonHyperlegibleNext-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("fonts/AtkinsonHyperlegibleNext-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
:root{
  --papier:#faf6f1;
  --blanc:#ffffff;
  --creme:#f3eee7;
  --encre:#28303d;
  --encre-douce:#5a6270;
  --trait:#e4ddd3;
  --trait-fort:#8c929c;
  --bleu:#044988;
  --bleu-fonce:#03396b;
  --bleu-clair:#e1eef7;
  --orange:#e74e20;
  --orange-texte:#b83a12;
  --orange-clair:#fbe4dc;
  --soleil:#f6b740;
  --soleil-clair:#fdf0d3;
  --soleil-texte:#7a4d00;
  --ciel:#90cfe3;
  --ciel-clair:#e1f2f8;
  --rose:#e9bac2;
  --rose-clair:#f9e0e2;
  --rouge:#b3261e;
  --rouge-clair:#fbe3e1;
  --gris-clair:#eeebe6;
  --espace-1:4px;
  --espace-2:8px;
  --espace-3:12px;
  --espace-4:16px;
  --espace-5:24px;
  --espace-6:32px;
  --espace-7:48px;
  --espace-8:64px;
  --rayon-champ:10px;
  --rayon-bloc:16px;
  --rayon-tuile:24px;
  --rayon-pilule:999px;
  --ombre-bloc:0 1px 2px rgba(40, 48, 61, 0.06), 0 2px 8px rgba(40, 48, 61, 0.04);
  --ombre-tuile:0 10px 28px rgba(40, 48, 61, 0.12);
  --ombre-message:0 10px 30px rgba(40, 48, 61, 0.22);
  --cible:48px;
  --cible-petite:40px;
  --largeur-page:1120px;
  --largeur-lecture:66ch;
  --font-titre:Fraunces, Georgia, "Times New Roman", serif;
  --font-texte:"Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
/* ==========================================================================
   Portail du Centre Social Projet — feuille de style des composants
   Mêmes noms de classes que le portail actuel (assets/app.css) :
   ce fichier + les variables de tokens.css = la nouvelle app.css.
   ========================================================================== */

:root {
  /* Pictogrammes (masques SVG, prennent la couleur du texte) */
  --picto-horloge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  --picto-coche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --picto-croix: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --picto-crayon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E");
  --picto-alerte: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5L2.5 20h19z'/%3E%3Cpath d='M12 10v4.5M12 17.4v.1'/%3E%3C/svg%3E");
  --picto-trait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
  --picto-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --picto-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.4v.1'/%3E%3C/svg%3E");
  --forme-nuage-orange: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cg fill='%23e74e20'%3E%3Ccircle cx='62' cy='74' r='38'/%3E%3Ccircle cx='104' cy='50' r='46'/%3E%3Ccircle cx='146' cy='76' r='34'/%3E%3Crect x='24' y='74' width='156' height='46' rx='23'/%3E%3C/g%3E%3C/svg%3E");
  --forme-nuage-soleil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cg fill='%23f6b740'%3E%3Ccircle cx='62' cy='74' r='38'/%3E%3Ccircle cx='104' cy='50' r='46'/%3E%3Ccircle cx='146' cy='76' r='34'/%3E%3Crect x='24' y='74' width='156' height='46' rx='23'/%3E%3C/g%3E%3C/svg%3E");
  --forme-toit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24' fill='none' stroke='%23e74e20' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20L56 5.5Q60 4.4 64 5.5L116 20'/%3E%3C/svg%3E");

  color: var(--encre);
  background: var(--papier);
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.53;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--papier); }
img { max-width: 100%; }
a { color: var(--bleu); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); text-decoration-thickness: 2.5px; }

/* Focus clavier : anneau orange plein, toujours visible, jamais supprimé */
:focus-visible { outline: 3px solid var(--orange-texte); outline-offset: 3px; border-radius: 6px; }

/* ---------- Titres ---------- */
h1, h2, .titre {
  font-family: var(--font-titre);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-optical-sizing: auto;
  color: var(--encre);
}
h1 { font-size: clamp(28px, 5vw, 34px); line-height: 1.18; font-weight: 700; letter-spacing: -0.3px; margin: 0 0 var(--espace-2); }
h2 { font-size: 24px; line-height: 30px; font-weight: 700; margin: var(--espace-6) 0 var(--espace-4); }
.bloc > h2:first-child { margin-top: 0; }
h3 { font-size: 19px; line-height: 26px; font-weight: 700; margin: var(--espace-5) 0 var(--espace-3); }
#bonjour, .affiche { font-size: clamp(34px, 7vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -0.5px; }

/* Petit toit du logo au-dessus d'un titre (décoratif) */
.toit::before {
  content: ""; display: block; width: 72px; height: 15px; margin: 0 0 var(--espace-3);
  background: var(--forme-toit) no-repeat left center / contain;
}
.surtitre {
  display: block; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--orange-texte); margin: 0 0 var(--espace-2);
}
.chapeau { color: var(--encre-douce); margin: 0 0 var(--espace-6); max-width: var(--largeur-lecture); font-size: 18px; }
.sous-titre {
  grid-column: 1 / -1; font-size: 19px; line-height: 26px; font-weight: 700; color: var(--encre);
  margin: var(--espace-4) 0 0; padding-top: var(--espace-4); border-top: 1px solid var(--trait);
}
.sous-titre:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* ---------- En-tête ---------- */
#entete {
  display: flex; align-items: center; justify-content: space-between; gap: var(--espace-3) var(--espace-5); flex-wrap: wrap;
  padding: var(--espace-3) clamp(16px, 4vw, 32px); background: var(--blanc); border-bottom: 1px solid var(--trait);
  position: sticky; top: 0; z-index: 5;
}
.marque { display: flex; align-items: center; gap: var(--espace-3); color: var(--encre); text-decoration: none; font-weight: 700; min-height: var(--cible); }
.marque:hover { color: var(--encre); }
.marque > span:last-child { font-size: 16px; line-height: 20px; }
.marque img, .marque .logo { display: block; height: 44px; width: auto; }
/* L'ancienne pastille « CSP » devient le logo (image hébergée avec le portail) */
.pastille {
  display: inline-block; flex: none; width: 57px; height: 44px; font-size: 0; color: transparent;
  background: url("logo-projet.png") no-repeat center / contain;
}
.qui { display: flex; align-items: center; gap: var(--espace-2) var(--espace-3); flex-wrap: wrap; font-size: 16px; }
.role {
  background: var(--bleu-clair); color: var(--bleu); padding: 2px 12px; border-radius: var(--rayon-pilule);
  font-size: 14px; line-height: 22px; font-weight: 700;
}

/* ---------- Mise en page ---------- */
main { max-width: var(--largeur-page); margin: 0 auto; padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px) var(--espace-8); }
.bloc {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon-bloc);
  padding: clamp(16px, 3vw, 24px); margin-bottom: var(--espace-5); box-shadow: var(--ombre-bloc);
}
.retour { display: inline-flex; align-items: center; gap: var(--espace-2); min-height: var(--cible); margin-bottom: var(--espace-2); font-weight: 600; }
.retour::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--picto-fleche) center / contain no-repeat; mask: var(--picto-fleche) center / contain no-repeat; transform: scaleX(-1); }
.info {
  display: flex; gap: var(--espace-3); align-items: flex-start; background: var(--ciel-clair); color: var(--encre);
  border-radius: var(--rayon-bloc); padding: var(--espace-4) var(--espace-5); margin: 0 0 var(--espace-5);
}
.info::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; background: var(--bleu); -webkit-mask: var(--picto-info) center / contain no-repeat; mask: var(--picto-info) center / contain no-repeat; }

/* ---------- Accueil : tuiles (les « portes ») ---------- */
.portes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--espace-4); }
.porte {
  position: relative; display: flex; flex-direction: column; gap: var(--espace-2);
  padding: var(--espace-5); padding-top: 88px; min-height: 196px;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon-tuile);
  color: var(--encre); text-decoration: none; box-shadow: var(--ombre-bloc);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.porte::before {
  content: ""; position: absolute; top: var(--espace-5); left: var(--espace-5);
  width: 48px; height: 48px; border-radius: var(--rayon-pilule); background: var(--orange);
}
.porte::after {
  content: ""; position: absolute; top: calc(var(--espace-5) + 13px); left: calc(var(--espace-5) + 13px);
  width: 22px; height: 22px; background: var(--encre);
  -webkit-mask: var(--picto-fleche) center / contain no-repeat; mask: var(--picto-fleche) center / contain no-repeat;
  transition: transform .15s ease;
}
.porte:nth-child(5n+2)::before { background: var(--soleil); }
.porte:nth-child(5n+3)::before { background: var(--ciel); }
.porte:nth-child(5n+4)::before { background: var(--rose); }
.porte:nth-child(5n+5)::before { background: var(--bleu); }
.porte:nth-child(5n+5)::after { background: var(--blanc); }
.porte:hover { border-color: var(--bleu); box-shadow: var(--ombre-tuile); transform: translateY(-2px); color: var(--encre); }
.porte:hover::after { transform: translateX(3px); }
.porte:focus-visible { border-radius: var(--rayon-tuile); }
.porte strong {
  font-family: var(--font-titre); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: 21px; line-height: 26px; font-weight: 700;
}
.porte span { color: var(--encre-douce); font-size: 16px; line-height: 23px; }

/* ---------- Tableaux ---------- */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * clamp(16px, 3vw, 24px)); padding: 0 clamp(16px, 3vw, 24px); }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 23px; }
th {
  text-align: left; font-weight: 700; color: var(--encre-douce); background: var(--creme);
  padding: 10px 12px; white-space: nowrap; font-size: 15px;
}
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
td { border-bottom: 1px solid var(--trait); padding: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .bouton + .bouton { margin-left: var(--espace-2); }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td, tr.cliquable:focus-visible td { background: var(--bleu-clair); }
tr.cliquable:focus-visible { outline: 3px solid var(--orange-texte); outline-offset: -3px; }
tr.cliquable td:first-child strong { color: var(--bleu); }
.vide {
  color: var(--encre-douce); font-style: italic; margin: 0; padding: var(--espace-4);
  background: var(--papier); border: 1.5px dashed var(--trait); border-radius: var(--rayon-champ); text-align: center;
}

/* ---------- Étiquettes d'état : couleur + pictogramme + mot ---------- */
.etat {
  font-family: var(--font-texte); letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 9px; border-radius: var(--rayon-pilule);
  font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; vertical-align: middle;
  background: var(--gris-clair); color: var(--encre-douce);
}
.etat::before {
  content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--picto-trait) center / contain no-repeat; mask: var(--picto-trait) center / contain no-repeat;
}
/* En attente */
.etat.attente, .etat.nouvelle, .etat.en_cours, .etat.en_attente_validation, .etat.a_signer, .etat.candidat {
  background: var(--soleil-clair); color: var(--soleil-texte);
}
.etat.attente::before, .etat.nouvelle::before, .etat.en_cours::before, .etat.en_attente_validation::before, .etat.a_signer::before, .etat.candidat::before {
  -webkit-mask-image: var(--picto-horloge); mask-image: var(--picto-horloge);
}
/* Validé */
.etat.ok, .etat.signe, .etat.traitee, .etat.actif, .etat.envoye, .etat.valide {
  background: var(--bleu-clair); color: var(--bleu);
}
.etat.ok::before, .etat.signe::before, .etat.traitee::before, .etat.actif::before, .etat.envoye::before, .etat.valide::before {
  -webkit-mask-image: var(--picto-coche); mask-image: var(--picto-coche);
}
/* Refusé */
.etat.refusee, .etat.refuse { background: var(--rouge-clair); color: var(--rouge); }
.etat.refusee::before, .etat.refuse::before { -webkit-mask-image: var(--picto-croix); mask-image: var(--picto-croix); }
/* Brouillon */
.etat.brouillon { background: var(--blanc); color: var(--encre-douce); box-shadow: inset 0 0 0 1.5px var(--trait-fort); }
.etat.brouillon::before { -webkit-mask-image: var(--picto-crayon); mask-image: var(--picto-crayon); }
/* Sorti, terminé : neutre (trait) */
.etat.sorti, .etat.termine { background: var(--gris-clair); color: var(--encre-douce); }
/* Expire bientôt, fin proche (nouveau) */
.etat.bientot { background: var(--orange-clair); color: var(--orange-texte); }
.etat.bientot::before { -webkit-mask-image: var(--picto-alerte); mask-image: var(--picto-alerte); }

/* ---------- Fiches de lecture ---------- */
.fiche { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--espace-4) var(--espace-5); margin: 0; }
.fiche div { min-width: 0; }
.fiche dt { font-size: 15px; line-height: 22px; color: var(--encre-douce); }
.fiche dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Formulaires ---------- */
form.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--espace-4) var(--espace-5); }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.champ.large { grid-column: 1 / -1; }
.champ > span { color: var(--encre); font-weight: 600; line-height: 22px; }
.champ small, .aide { color: var(--encre-douce); font-size: 15px; line-height: 22px; }
.champ.case { flex-direction: row; align-items: center; gap: var(--espace-3); min-height: var(--cible); }
.champ.case > span { font-weight: 400; }
input, select, textarea {
  font: inherit; font-size: 17px; color: var(--encre); width: 100%; min-height: var(--cible);
  padding: 10px 14px; border: 1.5px solid var(--trait-fort); border-radius: var(--rayon-champ); background: var(--blanc);
}
textarea { min-height: 120px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328303d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
}
input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; min-height: 0; padding: 0; accent-color: var(--bleu); flex: none; }
input[type="file"] { padding: 10px; background: var(--creme); border-style: dashed; cursor: pointer; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; font-size: 15px; margin-right: 12px; padding: 8px 16px; border-radius: var(--rayon-pilule);
  border: 1.5px solid var(--bleu); background: var(--blanc); color: var(--bleu); cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--encre-douce); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--encre-douce); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--orange-texte); outline-offset: 2px; border-color: var(--bleu); border-radius: var(--rayon-champ);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rouge); background-color: var(--rouge-clair); }
input:disabled, select:disabled, textarea:disabled { background: var(--gris-clair); color: var(--encre-douce); cursor: not-allowed; }
.actions { grid-column: 1 / -1; display: flex; gap: var(--espace-3); flex-wrap: wrap; margin-top: var(--espace-2); }
.erreur-texte { color: var(--rouge); font-weight: 600; min-height: 1.5em; margin: 0; }
.erreur-texte:not(:empty)::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin: 0 8px -3px 0; background: currentColor;
  -webkit-mask: var(--picto-alerte) center / contain no-repeat; mask: var(--picto-alerte) center / contain no-repeat;
}

/* ---------- Boutons ---------- */
.bouton {
  font: inherit; font-family: var(--font-texte); font-size: 16px; line-height: 20px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-2);
  min-height: var(--cible); padding: 12px 24px; border-radius: var(--rayon-pilule);
  border: 2px solid var(--bleu); background: var(--bleu); color: var(--blanc);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); color: var(--blanc); }
.bouton:focus-visible { border-radius: var(--rayon-pilule); }
.bouton.second { background: var(--blanc); color: var(--bleu); }
.bouton.second:hover { background: var(--bleu-clair); color: var(--bleu-fonce); }
.bouton.discret { background: transparent; border: 1.5px solid var(--trait-fort); color: var(--encre); font-weight: 600; }
.bouton.discret:hover { background: var(--creme); border-color: var(--encre-douce); color: var(--encre); }
.bouton.danger { background: var(--rouge); border-color: var(--rouge); color: var(--blanc); }
.bouton.danger:hover { background: #8f1e18; border-color: #8f1e18; }
.bouton.petit { min-height: var(--cible-petite); padding: 8px 16px; font-size: 15px; }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.bouton[aria-busy="true"] { cursor: wait; }

/* ---------- Barre de filtres ---------- */
.filtres {
  display: flex; flex-wrap: wrap; gap: var(--espace-3) var(--espace-4); align-items: end;
  margin-bottom: var(--espace-5); padding: var(--espace-4); background: var(--creme); border-radius: var(--rayon-bloc);
}
.filtres .champ { min-width: min(100%, 200px); flex: 1; }
.filtres .bouton { flex: none; }

/* ---------- Onglets ---------- */
.onglets {
  display: flex; gap: var(--espace-1); border-bottom: 1.5px solid var(--trait); margin: var(--espace-5) 0 var(--espace-5);
  overflow-x: auto; scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; background: none; border: none;
  border-bottom: 4px solid transparent; margin-bottom: -1.5px; min-height: var(--cible); padding: 10px 16px;
  cursor: pointer; color: var(--encre-douce); border-radius: 10px 10px 0 0;
}
.onglets button:hover { color: var(--encre); background: var(--creme); }
.onglets button[aria-selected="true"] { color: var(--bleu); border-bottom-color: var(--bleu); font-weight: 700; }
.onglets button:focus-visible { outline-offset: -3px; }

/* ---------- Messages (bas d'écran) ---------- */
#messages {
  position: fixed; bottom: var(--espace-4); right: var(--espace-4); left: auto; z-index: 10;
  display: flex; flex-direction: column; gap: var(--espace-2); max-width: min(440px, calc(100vw - 32px));
}
.message {
  display: flex; align-items: flex-start; gap: var(--espace-3);
  padding: 14px 20px 14px 16px; border-radius: var(--rayon-bloc); background: var(--bleu); color: var(--blanc);
  font-weight: 600; line-height: 24px; box-shadow: var(--ombre-message);
}
.message::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; background: currentColor;
  -webkit-mask: var(--picto-coche) center / contain no-repeat; mask: var(--picto-coche) center / contain no-repeat;
}
.message.erreur { background: var(--rouge); }
.message.erreur::before { -webkit-mask-image: var(--picto-alerte); mask-image: var(--picto-alerte); }
@media (max-width: 600px) { #messages { left: var(--espace-4); right: var(--espace-4); max-width: none; } }

/* ---------- Connexion, activation, mot de passe oublié ---------- */
.connexion {
  min-height: 100vh; display: grid; place-items: center; padding: var(--espace-5) var(--espace-4);
  background:
    var(--forme-nuage-orange) no-repeat left -60px top 24px / 300px auto,
    var(--forme-nuage-soleil) no-repeat right -70px bottom 32px / 340px auto,
    var(--papier);
}
.carte-connexion {
  width: min(440px, 100%); background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon-tuile);
  padding: clamp(24px, 6vw, 40px); box-shadow: var(--ombre-tuile); margin: 0;
}
.carte-connexion .pastille { width: 118px; height: 90px; margin-bottom: var(--espace-5); background-position: left center; }
.carte-connexion h1 { font-size: 30px; line-height: 36px; }
.carte-connexion .chapeau { font-size: 17px; margin-bottom: 0; }
.carte-connexion form { display: grid; gap: var(--espace-4); margin-top: var(--espace-5); }
.carte-connexion form .bouton { width: 100%; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .porte:hover { transform: none; } }
@media print { #entete, #messages, .actions, .bouton { display: none !important; } body { background: #fff; } .bloc { box-shadow: none; } }

/* Bloc qui contient directement un tableau défilant : garde les marges et le cadre d'un bloc normal */
.bloc.defile { margin: 0 0 var(--espace-5); padding: clamp(16px, 3vw, 24px); }
td .bouton + .bouton { margin-left: 4px; }
/* Une étiquette d'état dans une fiche peut passer à la ligne au lieu de déborder sur la colonne voisine */
.fiche dd .etat { white-space: normal; max-width: 100%; }

/* ---------- Vues compactes (parc matériel) ---------- */
.resume { color: var(--encre-douce); font-size: 15px; margin: 0 0 var(--espace-3); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--espace-3); }
.puce { font: inherit; font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--trait); background: var(--blanc); color: var(--encre); cursor: pointer; min-height: 38px; }
.puce span { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--creme); font-size: 13px; }
.puce[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.puce[aria-pressed="true"] span { background: rgba(255,255,255,.2); }
.barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 var(--espace-3); }
.barre input[type="search"] { flex: 1 1 260px; }
.barre select { flex: 0 1 200px; width: auto; }
.barre input, .barre select { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.compacte table { font-size: 15px; line-height: 20px; }
.compacte th { padding: 7px 10px; font-size: 14px; }
.compacte td { padding: 6px 10px; }
.compacte .etat { font-size: 13px; padding: 1px 8px; }
.bloc.compacte { padding: 8px clamp(8px, 2vw, 16px); }

/* Fenêtre par-dessus la page (détail, formulaires) */
dialog.fenetre { width: min(920px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--trait); border-radius: var(--rayon-bloc); background: var(--blanc); color: var(--encre); box-shadow: 0 20px 60px rgba(20, 30, 45, .28); overflow: hidden; }
dialog.fenetre::backdrop { background: rgba(20, 30, 45, .45); }
dialog.fenetre[open] { display: flex; flex-direction: column; }
.fenetre-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--trait); background: var(--papier); }
.fenetre-tete h2 { margin: 0; font-size: 20px; line-height: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fenetre-corps { padding: 16px 20px 20px; overflow-y: auto; }
.fenetre-corps .sous-titre { margin-top: 14px; }
.fiche-serree { gap: 10px 20px; }
.fiche-serree dt { font-size: 13px; line-height: 18px; }
.fiche-serree dd { font-size: 15px; }
.note { white-space: pre-line; background: var(--papier); border-radius: 8px; padding: 8px 12px; margin: 12px 0 0; font-size: 15px; }
.encart { border: 1px dashed var(--trait); border-radius: 10px; padding: 12px; margin-top: 12px; }
/* Ligne de séparation par secteur dans les listes */
tr.groupe th { background: var(--papier); color: var(--encre); font-size: 14px; font-weight: 700; text-align: left; padding: 10px 10px 6px; border-top: 2px solid var(--trait); }
tr.groupe th span { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--creme); color: var(--encre-douce); font-size: 12px; font-weight: 700; }
tbody:first-of-type tr.groupe th { border-top: 0; }
/* Liste de cases à cocher défilante (choix du matériel remis) */
.liste-choix { max-height: 260px; overflow-y: auto; border: 1px solid var(--trait); border-radius: 8px; padding: 6px 10px; margin-top: 6px; display: grid; gap: 2px; }
.liste-choix label { display: flex; align-items: baseline; gap: 8px; font-size: 15px; padding: 4px 0; cursor: pointer; color: var(--encre); }
.liste-choix label small { color: var(--encre-douce); }
.liste-choix input { width: auto; }

/* Outils internes (liens de l'accueil) */
.outils { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: var(--espace-3); }
.outil { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; color: var(--encre); text-decoration: none; min-height: 64px; }
.outil:hover { border-color: var(--bleu); }
.outil strong { display: block; font-size: 16px; }
.outil small { display: block; color: var(--encre-douce); font-size: 14px; line-height: 18px; }
.outil-lettre { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--bleu-clair); color: var(--bleu); font-weight: 800; font-size: 18px; }
/* Cases à cocher multiples (ex. : autres secteurs) */
fieldset.cases-multiples { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.cases-multiples legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
fieldset.cases-multiples > div { display: flex; flex-wrap: wrap; gap: 6px 18px; }
small.aussi { color: var(--encre-douce); }

/* ---------- Thème sobre : fond blanc, gris neutres ---------- */
:root {
  --papier: #ffffff;      /* fond des pages */
  --creme: #f4f5f7;       /* en-têtes de tableaux, zones secondaires */
  --gris-clair: #eef0f3;
  --trait: #e2e5ea;       /* bordures */
  --ombre-bloc: none;
  --ombre-tuile: 0 4px 14px rgba(40, 48, 61, 0.08);
}
html, body { background: #ffffff; }
.bloc, .porte, .outil { box-shadow: none; }
#entete { border-bottom-color: var(--trait); }
/* Connexion : on garde l'ancienne présentation (fond beige et nuages) */
.connexion {
  background:
    var(--forme-nuage-orange) no-repeat left -60px top 24px / 300px auto,
    var(--forme-nuage-soleil) no-repeat right -70px bottom 32px / 340px auto,
    #faf6f1;
}
/* Zones « aucun élément » plus discrètes */
.vide { background: #fafbfc; }

/* ---------- Agenda ---------- */
.semaine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.jour { border: 1px solid var(--trait); border-radius: 12px; padding: 10px; min-height: 120px; background: #fff; }
.jour.aujourdhui { border-color: var(--bleu); box-shadow: inset 0 0 0 1px var(--bleu); }
.jour h2 { font-family: var(--font-texte); font-size: 14px; line-height: 20px; margin: 0 0 8px; text-transform: capitalize; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jour .rien { color: var(--encre-douce); margin: 0; }
.evenement { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 1px solid var(--trait); border-left: 4px solid var(--couleur); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; cursor: pointer; color: var(--encre); }
.evenement:hover { background: var(--creme); }
.evenement .evt-heure { display: block; font-size: 12px; color: var(--encre-douce); }
.evenement strong { display: block; font-size: 14px; line-height: 18px; }
.evenement small { display: block; font-size: 12px; color: var(--encre-douce); }
.pastille-agenda { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.prochains { display: grid; gap: 8px; margin-top: var(--espace-3); }
.prochain { display: flex; gap: 12px; align-items: baseline; padding: 8px 12px; border: 1px solid var(--trait); border-left: 4px solid var(--couleur); border-radius: 10px; color: var(--encre); text-decoration: none; }
.prochain time { flex: none; min-width: 150px; font-size: 14px; color: var(--encre-douce); }
@media (max-width: 640px) { .semaine { grid-template-columns: 1fr; } .jour { min-height: 0; } .prochain { flex-direction: column; gap: 2px; } .prochain time { min-width: 0; } }

/* ---------- Agenda façon Google Agenda ---------- */
main.main-agenda { max-width: 1440px; padding-top: 16px; }
.cal-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-barre .retour { margin: 0 8px 0 0; }
.cal-barre h1 { font-size: 24px; line-height: 32px; margin: 0 12px 0 0; }
.cal-barre #titre-periode { font-size: 20px; font-weight: 500; text-transform: capitalize; margin-left: 6px; }
.cal-fleche { font: inherit; font-size: 22px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--encre); cursor: pointer; }
.cal-fleche:hover { background: var(--gris-clair); }
.cal-vues { margin-left: auto; display: inline-flex; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.cal-vues button { font: inherit; font-size: 14px; padding: 7px 14px; border: 0; background: #fff; cursor: pointer; color: var(--encre); }
.cal-vues button + button { border-left: 1px solid var(--trait); }
.cal-vues button[aria-pressed="true"] { background: var(--bleu-clair); color: var(--bleu); font-weight: 700; }

.cal { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.cal-cote h2 { font-family: var(--font-texte); font-size: 14px; margin: 4px 0 8px; }
.cal-agenda { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.cal-agenda:hover { background: var(--gris-clair); }
.cal-agenda input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 3px; border: 2px solid var(--couleur); background: #fff; display: grid; place-content: center; cursor: pointer; flex: none; }
.cal-agenda input:checked { background: var(--couleur); }
.cal-agenda input:checked::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.cal-note { font-size: 12px; line-height: 16px; color: var(--encre-douce); margin-top: 14px; }

.cal-grille { border: 1px solid var(--trait); border-radius: 12px; background: #fff; overflow: hidden; min-width: 0; }
.cal-gouttiere { width: 52px; flex: none; font-size: 11px; color: var(--encre-douce); position: relative; }
.cal-tete, .cal-bandeau { display: grid; grid-template-columns: 52px repeat(var(--jours), minmax(0, 1fr)); border-bottom: 1px solid var(--trait); }
.cal-jour-tete { text-align: center; padding: 8px 0 6px; border-left: 1px solid var(--trait); }
.cal-jour-tete span { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-douce); }
.cal-jour-tete b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; font-weight: 500; color: var(--encre); }
.cal-jour-tete.auj span { color: var(--bleu); }
.cal-jour-tete.auj b { background: var(--bleu); color: #fff; }
.cal-bandeau > div { border-left: 1px solid var(--trait); padding: 3px 2px; min-width: 0; }
.cal-bandeau .cal-gouttiere { padding: 6px 4px; text-align: right; border: 0; }
.cal-evt-jour { display: block; width: 100%; text-align: left; font: inherit; font-size: 12px; font-weight: 600; color: #fff; background: var(--couleur); border: 0; border-radius: 4px; padding: 2px 6px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-corps { max-height: calc(100vh - 230px); min-height: 420px; overflow-y: auto; }
.cal-heures { display: grid; grid-template-columns: 52px repeat(var(--jours), minmax(0, 1fr)); position: relative;
  background-image: linear-gradient(to bottom, var(--trait) 1px, transparent 1px); background-size: 100% 48px; }
.cal-heures .cal-gouttiere { background: #fff; }
.cal-heures .cal-gouttiere span { position: absolute; right: 8px; transform: translateY(-50%); }
.cal-col { position: relative; border-left: 1px solid var(--trait); min-width: 0; }
.cal-col.auj { background: rgba(4, 73, 136, 0.03); }
.cal-evt { position: absolute; display: block; text-align: left; font: inherit; font-size: 12px; line-height: 15px; color: #fff; background: var(--couleur); border: 1px solid #fff; border-radius: 6px; padding: 3px 6px; overflow: hidden; cursor: pointer; z-index: 1; }
.cal-evt:hover, .cal-evt:focus-visible { z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.cal-evt strong { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-evt span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .95; }
.cal-evt.court { padding: 1px 6px; display: flex; gap: 2px; }
.cal-evt.court strong, .cal-evt.court span { display: inline; }
.cal-maintenant { position: absolute; left: -6px; right: 0; height: 2px; background: #ea4335; z-index: 4; pointer-events: none; }
.cal-maintenant::before { content: ""; position: absolute; left: 0; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #ea4335; }

@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; }
  .cal-cote h2, .cal-note { display: none; }
  #liste-agendas { display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .cal-agenda { font-size: 13px; padding: 3px 2px; }
  .cal-barre h1 { display: none; }
  .cal-vues { margin-left: 0; }
  .cal-corps { max-height: none; }
}

/* Agenda : lisibilité (nom de la salle, vue Salles, texte sur couleurs claires) */
.cal-evt, .cal-evt-jour { color: var(--texte, #fff); }
.cal-evt em, .cal-evt-jour em { font-style: normal; font-weight: 600; font-size: 11px; opacity: .9; }
.cal-evt em { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .02em; }
.cal-evt.court em { display: inline; margin-left: 4px; }
.cal-defile-x { overflow-x: auto; }
.cal-tete, .cal-bandeau, .cal-heures { grid-template-columns: 52px repeat(var(--jours), minmax(var(--min-col, 0px), 1fr)); }
.cal-defile-x > .cal-corps { overflow-x: visible; }
.cal-salle-tete { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 12px 4px; text-align: center; line-height: 16px; }
.cal-salle-tete i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--couleur); }
.cal-evt { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.cal-evt.court { flex-direction: row; align-items: baseline; }
.cal-maintenant.sans-point { left: 0; } .cal-maintenant.sans-point::before { display: none; }
/* Superposition décalée : liseré blanc pour séparer les événements empilés */
.cal-evt { border: 1px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Parcours d'arrivée */
.grille-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grille-actions > div { border: 1px solid var(--trait); border-radius: 10px; padding: 12px; }
.grille-actions .resume { font-size: 14px; margin: 4px 0 8px; }
.grille-actions .bouton { margin: 2px 4px 2px 0; }
select.statut-tache { min-width: 130px; }
.rappel { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; border-left: 4px solid var(--bleu); margin-bottom: var(--espace-4); }

/* Parcours d'arrivée en étapes */
.parcours { display: grid; gap: 12px; }
.etape { border: 1px solid var(--trait); border-radius: 12px; background: #fff; }
.etape > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; font-size: 17px; }
.etape > summary::-webkit-details-marker { display: none; }
.etape-num { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bleu); color: #fff; font-size: 15px; }
.etape.faite .etape-num { background: #0b8043; }
.etape.faite > summary { color: var(--encre-douce); }
.etape-corps { padding: 0 16px 16px 58px; }
.choix-dossier { display: grid; gap: 4px; margin: 8px 0 12px; }
.ligne-mutuelle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.ligne-mutuelle select { width: auto; max-width: 100%; }
.progression { margin: 12px 0 0; padding-left: 20px; font-size: 15px; }
.progression li.ok { color: #0b8043; } .progression li.ko { color: var(--rouge, #a4262c); }
.taches { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.taches li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--trait); }
.lien { font: inherit; background: none; border: 0; padding: 0; color: var(--bleu); text-decoration: underline; cursor: pointer; }
.manque { color: var(--encre-douce); }
@media (max-width: 640px) { .etape-corps { padding-left: 16px; } }

/* Espace RH : tableau de bord et fiche simplifiée */
.tdb { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: var(--espace-4); }
.carte-tdb { border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; background: #fff; border-top: 4px solid var(--bleu); }
.carte-tdb.urgent { border-top-color: #d50000; } .carte-tdb.attention { border-top-color: #f6bf26; } .carte-tdb.calme { border-top-color: var(--trait); opacity: .75; }
.carte-tdb h3 { font-family: var(--font-texte); font-size: 16px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.carte-tdb h3 span { min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--creme); font-size: 14px; }
.carte-tdb ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.carte-tdb small, .carte-tdb .rien { color: var(--encre-douce); font-size: 13px; }
.carte-tdb p { margin: 0 0 8px; }
details.section-form { grid-column: 1 / -1; border: 1px solid var(--trait); border-radius: 10px; padding: 0 14px; }
details.section-form > summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details.section-form[open] > summary { border-bottom: 1px solid var(--trait); margin-bottom: 12px; }
details.section-form .section-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--espace-4) var(--espace-5); padding-bottom: 14px; }
details.section-acces > summary { cursor: pointer; font-weight: 700; }
details.section-acces[open] > summary { margin-bottom: 12px; }
/* Menu « ⋯ » des documents */
details.menu-doc { display: inline-block; position: relative; }
details.menu-doc > summary { list-style: none; display: inline-flex; }
details.menu-doc > summary::-webkit-details-marker { display: none; }
details.menu-doc > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 230px; background: #fff; border: 1px solid var(--trait); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; display: grid; gap: 2px; }
details.menu-doc > div > button, details.menu-doc > div > label { font: inherit; font-size: 14px; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--encre); display: flex; gap: 8px; align-items: center; }
details.menu-doc > div > button:hover, details.menu-doc > div > label:hover { background: var(--gris-clair); }
details.menu-doc > div > .danger { color: #a4262c; }
details.menu-doc select { width: auto; min-height: 32px; padding: 2px 6px; }
.cal-col.inscriptible { cursor: cell; }

/* Espace RH v2 : boîte de réception, fiche sur une page */
.barre-rh { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 20px; }
.recherche-rh { position: relative; flex: 1 1 320px; }
.recherche-rh input { width: 100%; min-height: 46px; font-size: 17px; }
.recherche-rh ul { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--trait); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.recherche-rh li button { width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 9px 10px; border-radius: 6px; cursor: pointer; color: var(--encre); }
.recherche-rh li button:hover, .recherche-rh li button:focus { background: var(--gris-clair); }
.recherche-rh li small, .recherche-rh .rien { color: var(--encre-douce); }
.titre-boite { font-size: 20px; margin: 0 0 10px; }
ul.boite { list-style: none; margin: 0; padding: 0; border: 1px solid var(--trait); border-radius: 12px; background: #fff; }
ul.boite li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-top: 1px solid var(--trait); }
ul.boite li:first-child { border-top: 0; }
ul.boite .txt { flex: 1 1 320px; font-size: 15px; }
ul.boite .txt small { color: var(--encre-douce); }
ul.boite .act { display: flex; gap: 6px; flex-wrap: wrap; }
.puce-niv { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #d50000; }
li.niv2 .puce-niv { background: #f6bf26; }
.entete-salarie { border-bottom: 1px solid var(--trait); padding-bottom: 6px; margin-bottom: 8px; }
.entete-salarie h2 { margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.entete-salarie .sous-ligne { color: var(--encre-douce); margin: 0 0 6px; font-size: 15px; }
.ancres { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 14px; }
.ancres a { color: var(--bleu); text-decoration: none; font-weight: 600; }
.sec { margin-top: 26px; scroll-margin-top: 16px; }
.sec > h3 { font-family: var(--font-texte); font-size: 18px; margin: 0 0 10px; }
.infos-lecture { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; background: #fff; }
.infos-lecture h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--encre-douce); }
.infos-lecture dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 15px; }
.infos-lecture dt { color: var(--encre-douce); }
.infos-lecture dd { margin: 0; }
.segment { display: inline-flex; border: 1px solid var(--trait); border-radius: 999px; overflow: hidden; }
.segment button { font: inherit; font-size: 13px; padding: 4px 10px; border: 0; background: #fff; cursor: pointer; color: var(--encre-douce); }
.segment button + button { border-left: 1px solid var(--trait); }
.segment button[aria-pressed="true"] { background: var(--bleu); color: #fff; font-weight: 700; }
#sal-fenetre { width: min(1000px, 96vw); }
.segment { white-space: nowrap; }
.segment button { white-space: nowrap; padding: 3px 9px; }
.vide-action { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.actions-emplacement { white-space: normal; }
.onglets .compteur { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #d50000; color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

/* Documents du salarié : 3 blocs */
.doc-bloc { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 12px 16px; margin-bottom: 12px; }
.doc-tete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.doc-tete h4 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.doc-tete .nb { min-width: 24px; text-align: center; padding: 0 8px; border-radius: 999px; background: var(--creme, #f3f4f6); font-size: 13px; }
.doc-liste { list-style: none; margin: 0; padding: 0; }
.doc-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--trait); }
.doc-liste li:first-child { border-top: 0; }
.doc-nom { flex: 1 1 260px; display: flex; flex-direction: column; }
.doc-nom small { color: var(--encre-douce); font-size: 13px; }
.doc-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.doc-bloc .rien { color: var(--encre-douce); font-size: 14px; margin: 4px 0; }
.pieces { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.piece { display: inline-flex; align-items: center; border-radius: 999px; font-size: 14px; border: 1px solid var(--trait); overflow: hidden; }
.piece button, .piece label { font: inherit; background: none; border: 0; padding: 6px 12px; cursor: pointer; color: inherit; }
.piece.ok { background: #e6f4ea; border-color: #b7dfc3; color: #0b5d2e; }
.piece.ok label { border-left: 1px solid #b7dfc3; padding: 6px 9px; }
.piece.ok.verif { background: #fff4e0; border-color: #f3d39b; color: #7a4b00; }
.piece.manque { padding: 6px 12px; color: var(--encre-douce); border-style: dashed; cursor: pointer; }
.piece.manque:hover, .piece button:hover { text-decoration: underline; }
.choix-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 16px; }
.sous-choix { display: flex; gap: 12px; padding-left: 28px; }
.choix-docs { grid-template-columns: 1fr; gap: 0; }
.choix-docs > div { padding: 4px 0; border-bottom: 1px solid var(--trait); }
.choix-docs label span small { display: block; color: var(--encre-douce); font-size: 13px; }
.sous-choix { padding: 2px 0 6px 36px; }

/* Infos utiles */
.infos-tete { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rubrique { margin-top: 28px; }
.rubrique h2 { font-size: 20px; margin: 0 0 12px; }
.cartes-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.carte-info { border: 1px solid var(--trait); border-radius: 14px; background: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.carte-info.brouillon { border-style: dashed; opacity: .85; }
.carte-info-tete { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.carte-info h3 { margin: 0; font-size: 18px; }
.carte-info .maj { margin: 0; font-size: 13px; color: var(--encre-douce); }
.texte-info { margin: 0; }
table.horaires { width: 100%; border-collapse: collapse; font-size: 15px; }
table.horaires th { text-align: left; font-weight: 600; padding: 6px 8px 6px 0; width: 40%; }
table.horaires td { padding: 6px 0; }
table.horaires tr + tr th, table.horaires tr + tr td { border-top: 1px solid var(--trait); }
table.horaires tr.ferme td { color: var(--encre-douce); }
table.horaires tr.auj th, table.horaires tr.auj td { color: var(--bleu); font-weight: 700; }
table.horaires tr.auj small { font-weight: 400; font-size: 12px; }
table.horaires.saisie th { width: 110px; } table.horaires.saisie input { width: 100%; }
.image-info { padding: 0; border: 0; background: none; cursor: zoom-in; }
.image-info img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; background: var(--gris-clair); }
.types-info { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.types-info legend { font-weight: 700; margin-bottom: 6px; }
table.horaires th, table.horaires td { background: none; }
.carte-info > .bouton, .carte-info > a.bouton { align-self: flex-start; }
.grille > .large, .grille > .bloc-type { grid-column: 1 / -1; }
.types-info { flex-direction: row; }
.types-info label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.types-info input { width: auto; }
/* Planning par demi-journée */
table.planning-dj { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 14px; }
table.planning-dj th { background: none; text-align: left; font-weight: 600; padding: 4px 6px 4px 0; vertical-align: middle; }
table.planning-dj thead th { text-align: center; font-size: 13px; color: var(--encre-douce); }
table.planning-dj thead th small { display: block; font-weight: 400; }
table.planning-dj td { padding: 0; background: none; }
table.planning-dj tr.auj th { color: var(--bleu); } table.planning-dj tr.auj th small { font-weight: 400; font-size: 12px; display: block; }
table.planning-dj tr.auj .dj { box-shadow: 0 0 0 2px var(--bleu) inset; }
.dj { display: flex; flex-direction: column; justify-content: center; min-height: 40px; border-radius: 8px; padding: 4px 8px; text-align: center; font-weight: 600; font-size: 13px; }
.dj small { font-weight: 400; font-size: 12px; }
.dj-libre { background: #e6f4ea; color: #0b5d2e; }
.dj-atelier { background: #e8eefc; color: #1a3d8f; }
.dj-ferme { background: #eef0f2; color: #6b7280; }
.legende-dj { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.legende-dj .dj { min-height: 0; padding: 2px 10px; font-size: 12px; display: inline-flex; }
table.planning-dj.saisie td { vertical-align: top; padding: 4px 0; }
table.planning-dj.saisie td input { width: 100%; margin-top: 4px; font-size: 14px; min-height: 36px; }
table.planning-dj.saisie .segment button[data-etat="libre"][aria-pressed="true"] { background: #0b8043; }
table.planning-dj.saisie .segment button[data-etat="atelier"][aria-pressed="true"] { background: #1a3d8f; }
table.planning-dj.saisie .segment button[data-etat="ferme"][aria-pressed="true"] { background: #6b7280; }
.plages-dj { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
@media (min-width: 760px) { .carte-info.carte-large { grid-column: span 2; } }
.dj-alpha { background: #fff1d6; color: #8a4b00; }
table.planning-dj.saisie .segment button[data-etat="alpha"][aria-pressed="true"] { background: #b45309; }

/* Annuaire des collègues */
.annuaire-outils { display: grid; gap: 10px; margin: 16px 0; }
.annuaire-outils input[type=search] { min-height: 44px; font-size: 16px; }
.filtres-secteurs { display: flex; flex-wrap: wrap; gap: 6px; }
.puce-filtre { font: inherit; font-size: 14px; border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--encre); }
.puce-filtre[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: #fff; font-weight: 700; }
.groupe-annuaire { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 10px 16px; margin-bottom: 12px; }
.groupe-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; border-bottom: 1px solid var(--trait); padding-bottom: 6px; }
.groupe-tete small { color: var(--encre-douce); margin-left: 4px; }
.groupe-annuaire ul { list-style: none; margin: 0; padding: 0; }
.groupe-annuaire li { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.3fr) auto; align-items: center; gap: 6px 14px; padding: 6px 0; border-top: 1px solid var(--trait); }
.groupe-annuaire li:first-child { border-top: 0; }
.groupe-annuaire li a { color: var(--bleu); word-break: break-all; }
@media (max-width: 640px) { .groupe-annuaire li { grid-template-columns: 1fr auto; } .groupe-annuaire li a { grid-column: 1 / -1; order: 3; } }
.barre-selection { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; padding: 10px 14px; background: #fff; border: 1px solid var(--trait); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.barre-selection #ann-nb { font-weight: 700; margin-right: auto; }
.groupe-annuaire .poste { display: block; color: var(--encre-douce); font-size: 13px; }

/* Projets */
.projets-grille { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; margin-top: 12px; }
@media (max-width: 800px) { .projets-grille { grid-template-columns: 1fr; } }
.liste-projets { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 10px; display: grid; gap: 8px; }
.liste-projets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.liste-projets li button { width: 100%; text-align: left; font: inherit; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--encre); display: flex; flex-direction: column; }
.liste-projets li button:hover { background: var(--gris-clair); }
.liste-projets li button[aria-current="true"] { background: #e8eefc; color: var(--bleu); font-weight: 700; }
.liste-projets small { color: var(--encre-douce); font-weight: 400; font-size: 13px; }
.detail-projet { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 14px 18px; display: grid; gap: 12px; }
.detail-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-tete h2 { margin: 0 0 4px; font-size: 20px; }
.depot-zone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border: 2px dashed var(--trait); border-radius: 12px; cursor: pointer; text-align: center; color: var(--encre-douce); }
.depot-zone strong { color: var(--bleu); }
.depot-zone.survol, .depot-zone:hover { border-color: var(--bleu); background: #f3f6fd; }
#pj-recherche { min-height: 40px; }

/* Plannings des vacances */
.cartes-vac { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.carte-vac { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--trait); border-radius: 12px; background: #fff; cursor: pointer; color: var(--encre); }
.carte-vac:hover { border-color: var(--bleu); }
.carte-vac strong { font-size: 17px; } .carte-vac small { color: var(--encre-douce); }
.etapes-vac { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 12px; counter-reset: e; }
.etapes-vac li { counter-increment: e; padding: 5px 12px; border-radius: 999px; background: var(--gris-clair, #f3f4f6); color: var(--encre-douce); font-size: 13px; }
.etapes-vac li::before { content: counter(e) ". "; }
.etapes-vac li.fait { background: #e6f4ea; color: #0b5d2e; } .etapes-vac li.actuel { background: var(--bleu); color: #fff; font-weight: 700; }
.actions-vac { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-vac .resume { flex-basis: 100%; margin: 0; }
.grille-vac { display: grid; gap: 12px; margin-top: 12px; }
.jour-vac { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 10px 14px; }
.jour-vac h3 { margin: 0 0 8px; font-size: 16px; }
.deux-moments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .deux-moments { grid-template-columns: 1fr; } }
.moment-vac { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.moment-vac.journee { margin-bottom: 10px; }
.moment-vac > span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-douce); font-weight: 700; }
.act-vac { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 0; border-left: 4px solid var(--bleu); background: #f3f6fd; cursor: pointer; color: var(--encre); }
.act-vac:disabled { cursor: default; }
.act-vac small { color: var(--encre-douce); font-size: 12px; }
.act-vac.type-sortie { border-left-color: #0b8043; background: #eef8f1; } .act-vac.type-grand_jeu { border-left-color: #f6bf26; background: #fff8e1; }
.act-vac.type-sport { border-left-color: #d50000; background: #fdeeee; } .act-vac.type-spectacle { border-left-color: #8e24aa; background: #f6edf8; }
.ajout-act { font: inherit; font-size: 13px; border: 1px dashed var(--trait); background: none; border-radius: 8px; padding: 6px; color: var(--encre-douce); cursor: pointer; }
.ajout-act:hover { border-color: var(--bleu); color: var(--bleu); }
.visuel-vac img { max-height: 560px; }
@media print { header#entete, .retour, .actions, .actions-vac, .etapes-vac, .ajout-act, #messages { display: none !important; } .jour-vac { break-inside: avoid; } }
.jour-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; } .jour-tete .lien { font-size: 13px; }
/* Plannings des activités : vue calendrier */
.ligne-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-type { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eef0f2; color: var(--encre-douce); font-weight: 600; }
.nav-semaine { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.nav-semaine small { color: var(--encre-douce); }
.cal-vac { border: 1px solid var(--trait); border-radius: 12px; background: #fff; overflow-x: auto; }
.cal-vac-tete, .cal-vac-corps { display: grid; grid-template-columns: 50px repeat(var(--nb), minmax(130px, 1fr)); min-width: calc(50px + var(--nb) * 130px); }
.cal-vac-tete span { padding: 10px 6px; text-align: center; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--trait); text-transform: capitalize; }
.cal-vac-corps { position: relative; }
.cal-vac-heures { position: relative; }
.cal-vac-heures span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 12px; color: var(--encre-douce); }
.cal-vac-heures span:first-child { transform: none; }
.cal-vac-col { position: relative; border-left: 1px solid var(--trait); }
.cal-vac-col i { position: absolute; left: 0; right: 0; border-top: 1px solid #f0f1f3; }
.cal-vac-col.inscriptible { cursor: cell; } .cal-vac-col.inscriptible:hover { background: #fafbff; }
.evt-vac { position: absolute; font: inherit; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border: 1px solid #fff; border-radius: 6px; cursor: pointer; color: #fff; background: #1a3d8f; box-shadow: 0 1px 2px rgba(0,0,0,.12); z-index: 1; }
.evt-vac strong { font-size: 13px; line-height: 1.2; } .evt-vac small { font-size: 11px; opacity: .9; }
.evt-vac.type-sortie, .evt-legende.type-sortie { background: #0b8043; } .evt-vac.type-grand_jeu, .evt-legende.type-grand_jeu { background: #b45309; }
.evt-vac.type-sport, .evt-legende.type-sport { background: #c62828; } .evt-vac.type-spectacle, .evt-legende.type-spectacle { background: #7b1fa2; }
.evt-vac.type-autre, .evt-legende.type-autre { background: #546e7a; } .evt-legende.type-atelier { background: #1a3d8f; }
.evt-legende { color: #fff !important; }
.legende-dj { margin-top: 10px; }

/* Annonces : colonne de côté sur l'accueil (seulement s'il y en a) */
.accueil-mise.avec-annonces { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .accueil-mise.avec-annonces { grid-template-columns: 1fr; } .annonces-accueil { order: -1; } }
.annonces-accueil { position: sticky; top: 16px; border: 1px solid var(--trait); border-radius: 14px; background: #fff; padding: 14px 16px; display: grid; gap: 10px; }
.annonces-accueil h2 { margin: 0; font-size: 18px; }
.annonce { border-left: 4px solid var(--bleu); padding: 2px 0 2px 10px; }
.annonce.cat-date { border-left-color: #f6bf26; } .annonce.cat-evenement { border-left-color: #0b8043; }
.annonce h3 { margin: 2px 0; font-size: 16px; font-family: var(--font-texte); }
.annonce-cat { margin: 0; font-size: 13px; color: var(--encre-douce); }
.annonce-texte { margin: 2px 0 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.annonce-texte.ouvert { -webkit-line-clamp: unset; display: block; }
.annonce .lien { font-size: 13px; }
.annonce-attente { display: block; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #7a4b00; font-weight: 700; text-decoration: none; }
.annonce-pied { margin: 0; font-size: 14px; }
.liste-annonces { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.annonce-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 12px 16px; }
.annonce-ligne h3 { margin: 4px 0; font-size: 17px; }
.annonce-ligne > div:first-child { flex: 1 1 380px; }

/* Projets : éditeurs de documents et de tableaux */
.creer-pages { display: flex; flex-wrap: wrap; gap: 8px; }
.pages-projet .titre-page { font-weight: 600; text-decoration: none; text-align: left; }
.editeur { display: grid; gap: 10px; }
.editeur-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.editeur-titre { flex: 1 1 260px; font: inherit; font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; min-height: 0; }
.editeur-titre:hover, .editeur-titre:focus { border-color: var(--trait); }
.etat-enreg { font-size: 13px; color: var(--encre-douce); } .etat-enreg.ok { color: #0b8043; } .etat-enreg.ko { color: #a4262c; font-weight: 700; }
.editeur-export { display: flex; gap: 4px; margin-left: auto; }
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--trait); border-radius: 10px; background: var(--gris-clair, #f6f7f9); position: sticky; top: 8px; z-index: 5; }
.barre-outils button { font: inherit; font-size: 14px; background: #fff; border: 1px solid var(--trait); border-radius: 6px; padding: 4px 10px; cursor: pointer; color: var(--encre); }
.barre-outils button:hover { border-color: var(--bleu); }
.barre-outils span { width: 1px; height: 22px; background: var(--trait); margin: 0 4px; }
.barre-outils small { color: var(--encre-douce); margin-left: 8px; }
.feuille { min-height: 420px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; padding: 28px 32px; line-height: 1.6; font-size: 16px; outline: none; }
.feuille:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px #e8eefc; }
.feuille h2 { font-size: 22px; margin: 18px 0 8px; } .feuille h3 { font-size: 18px; margin: 14px 0 6px; } .feuille p { margin: 0 0 10px; }
.feuille a { color: var(--bleu); }
.grille-tableau { overflow: auto; border: 1px solid var(--trait); border-radius: 10px; background: #fff; max-height: 70vh; }
.grille-tableau table { border-collapse: collapse; min-width: 100%; }
.grille-tableau td, .grille-tableau th { border: 1px solid #e5e7eb; padding: 0; background: #fff; }
.grille-tableau th.num { width: 36px; font-size: 12px; color: var(--encre-douce); background: #f6f7f9; text-align: center; position: sticky; left: 0; }
.grille-tableau input { width: 100%; min-width: 120px; border: 0; border-radius: 0; padding: 6px 8px; font: inherit; font-size: 14px; min-height: 34px; background: transparent; }
.grille-tableau input:focus { outline: 2px solid var(--bleu); outline-offset: -2px; background: #f3f6fd; }
.grille-tableau tr.entete input { font-weight: 700; background: #f3f6fd; }
.grille-tableau tr.entete td { position: sticky; top: 0; z-index: 1; }
.projets-grille.edition { grid-template-columns: 1fr; } .projets-grille.edition .liste-projets { display: none; }
/* Document au format A4 (21 cm de large, marges de 2 cm, repères de fin de page) */
.feuille.a4 { width: 794px; max-width: 100%; margin: 0 auto; min-height: 1123px; padding: 76px; box-sizing: border-box; font-size: 16px;
  background-color: #fff; background-image: linear-gradient(to bottom, transparent calc(100% - 2px), #c9ced6 calc(100% - 2px));
  background-size: 100% 971px; background-position: 0 0; background-repeat: repeat-y; background-origin: content-box; background-clip: content-box;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.editeur:has(.feuille.a4) { background: #eef0f3; border-radius: 12px; padding: 10px; }
.feuille hr.saut-page { border: 0; border-top: 2px dashed var(--bleu); margin: 18px -76px; position: relative; overflow: visible; }
.feuille hr.saut-page::after { content: "Saut de page"; position: absolute; left: 50%; top: -11px; transform: translateX(-50%); background: #fff; color: var(--bleu); font-size: 11px; padding: 0 8px; }
.nb-pages { margin-left: 6px; }
/* Images dans les documents */
.feuille img { max-width: 100%; height: auto; border-radius: 4px; cursor: pointer; }
.feuille img.img-moyenne { width: 60%; } .feuille img.img-petite { width: 30%; }
.feuille img:hover { outline: 2px solid var(--bleu); }
.barre-outils .bouton-outil { font-size: 14px; background: #fff; border: 1px solid var(--trait); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.barre-outils .bouton-outil:hover { border-color: var(--bleu); }
/* Tableaux : lettres de colonnes, formules */
.grille-tableau tr.lettres th { background: #f6f7f9; font-size: 12px; color: var(--encre-douce); font-weight: 600; padding: 3px; text-align: center; position: sticky; top: 0; z-index: 2; }
.grille-tableau tr.entete td { top: 22px; }
.grille-tableau input.formule { background: #eef8f1; text-align: right; }
.grille-tableau input.formule:focus { text-align: left; font-family: ui-monospace, monospace; }
.grille-tableau input.erreur-formule { color: #a4262c; font-weight: 700; }
.barre-outils code { background: #fff; border: 1px solid var(--trait); border-radius: 4px; padding: 0 4px; font-size: 12px; }
/* page A4 blanche jusqu'aux bords (marges comprises), repères de fin de page seulement dans la zone de texte */
.feuille.a4 { background-color: transparent;
  background-image: linear-gradient(to bottom, transparent calc(100% - 2px), #c9ced6 calc(100% - 2px)), linear-gradient(#fff, #fff);
  background-size: 100% 971px, 100% 100%; background-repeat: repeat-y, no-repeat;
  background-origin: content-box, border-box; background-clip: content-box, border-box; }
/* Stockage */
.liste-stockage { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.liste-stockage button { width: 100%; font: inherit; display: grid; grid-template-columns: minmax(160px, 1.2fr) 2fr 90px 90px; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; cursor: pointer; color: var(--encre); }
.liste-stockage button:hover { border-color: var(--bleu); }
.liste-stockage .jauge { height: 10px; border-radius: 999px; background: #eef0f2; overflow: hidden; } .liste-stockage .jauge i { display: block; height: 100%; background: var(--bleu); border-radius: 999px; }
.liste-stockage .taille { font-weight: 700; text-align: right; } .liste-stockage small { color: var(--encre-douce); text-align: right; }
@media (max-width: 640px) { .liste-stockage button { grid-template-columns: 1fr auto; } .liste-stockage .jauge { grid-column: 1 / -1; order: 3; } }

/* Plannings : échéances et discussion */
.echeance { display: inline-block; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: #eef0f2; color: var(--encre-douce); font-weight: 600; margin-right: 6px; }
.echeance.bientot { background: #fff4e0; color: #7a4b00; } .echeance.retard { background: #fde8e8; color: #a4262c; }
.discussion { margin-top: 16px; }
#fil { max-height: 340px; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 10px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--gris-clair, #f3f4f6); justify-self: start; }
.msg.moi { background: #e8eefc; justify-self: end; }
.msg-tete { margin: 0 0 2px; font-size: 12px; color: var(--encre-douce); } .msg-tete .lien { font-size: 12px; margin-left: 6px; }
.msg-texte { margin: 0; font-size: 15px; }
.form-msg { display: flex; gap: 8px; align-items: flex-end; } .form-msg textarea { flex: 1; min-height: 44px; }
.alerte-planning { display: block; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #7a4b00; text-decoration: none; font-size: 14px; }
.alerte-planning.retard { background: #fde8e8; color: #a4262c; } .alerte-planning strong { display: block; }
.discussion .fil { max-height: 340px; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 10px; }
.discussion.compacte, .fil-annonce.discussion { padding: 10px 12px; margin-top: 8px; }
.fil-annonce { flex-basis: 100%; }
.compte-test { background: #fffaf0; }
.comptes-test { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0; } .comptes-test small { flex-basis: 100%; }
/* Gestion des accès : l'interrupteur des comptes de test n'apparaît que dans leur onglet */
#comptes-test:not(.visible-onglet) { display: none; }
.compteur-gris { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #eef0f2; color: var(--encre-douce); font-size: 12px; line-height: 20px; text-align: center; }
/* Suivi des secteurs */
.suivi-secteur { border: 1px solid var(--trait); border-radius: 14px; background: #fff; padding: 14px 18px; }
.suivi-secteur h2 { margin: 0 0 8px; font-size: 19px; display: flex; gap: 10px; align-items: center; }
.suivi-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 760px) { .suivi-colonnes { grid-template-columns: 1fr; } }
.suivi-colonnes h3 { font-family: var(--font-texte); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-douce); margin: 0 0 4px; }
.suivi-secteur a.doc-nom { text-decoration: none; color: var(--encre); } .suivi-secteur a.doc-nom:hover span { color: var(--bleu); text-decoration: underline; }
.suivi-secteur small { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Parc : tableau modifiable sur place */
.onglets-types { flex-wrap: wrap; }
.aide-grille { font-size: 13px; color: var(--encre-douce); margin: 6px 0; } .aide-grille kbd { font: inherit; font-size: 12px; border: 1px solid var(--trait); border-radius: 4px; padding: 0 4px; background: #fff; }
.grille-parc table { width: 100%; border-collapse: collapse; }
.grille-parc thead th { position: sticky; top: 0; z-index: 2; background: #1f4e8c; color: #fff; text-align: left; font-size: 13px; padding: 8px 10px; }
.grille-parc tr.groupe th { background: #111827; color: #fff; text-align: left; padding: 6px 10px; font-size: 14px; }
.grille-parc tr.groupe th span { opacity: .7; font-weight: 400; margin-left: 6px; }
.grille-parc td { border-bottom: 1px solid #eceff3; padding: 0; vertical-align: middle; }
.grille-parc td.cellule { padding: 7px 10px; cursor: text; min-width: 90px; }
.grille-parc tbody tr:nth-child(even) td.cellule { background: #fafbfc; }
.grille-parc td.cellule:hover { outline: 1px solid #b9c7dd; outline-offset: -1px; background: #f5f8fd; }
.grille-parc td.cellule[data-champ="utilisateur"] { font-weight: 600; background: #fbf3f6; }
.grille-parc td.cellule.en-edition { padding: 2px; outline: 2px solid var(--bleu); outline-offset: -2px; background: #fff; }
.grille-parc td.cellule.en-edition input, .grille-parc td.cellule.en-edition select { width: 100%; min-height: 34px; border: 0; padding: 4px 8px; font: inherit; background: #fff; }
.grille-parc td.cellule.enregistre { animation: enregistre .9s ease; }
@keyframes enregistre { from { background: #dff3e6; } to { background: transparent; } }
.grille-parc .vide-case { color: #9aa3ae; font-weight: 400; }
.grille-parc .col-ouvrir { width: 34px; text-align: center; }
.ouvrir-ligne { border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--encre-douce); padding: 6px; }
.panneau-ligne td { background: #f6f8fb; padding: 12px 16px; }
.panneau-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 800px) { .panneau-grille { grid-template-columns: 1fr; } }
.mini-fiche { width: 100%; border-collapse: collapse; } .mini-fiche th { text-align: left; font-weight: 600; font-size: 13px; color: var(--encre-douce); padding: 6px 8px 6px 0; width: 40%; }
.mini-fiche td.cellule { background: #fff; border: 1px solid #e5e7eb; }
.historique { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #d5dbe3; display: grid; gap: 10px; }
.historique li { position: relative; } .historique li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #c3ccd8; }
.historique li.actuel::before { background: var(--bleu); } .historique small { display: block; color: var(--encre-douce); }

/* Fiche salarié : onglets et documents simplifiés */
.onglets-fiche { margin-top: 12px; }
.compteur-orange { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #fff1dc; color: #8a4b00; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.panneau-fiche { padding-top: 16px; }
.resume-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; } @media (max-width: 760px) { .resume-grille { grid-template-columns: 1fr; } }
.liste-a-faire { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste-a-faire li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.docs-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.filtres-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.filtre { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--trait); background: #fff; color: var(--encre); cursor: pointer; }
.filtre span { color: var(--encre-douce); margin-left: 4px; }
.filtre[aria-pressed="true"] { background: #e8eefc; border-color: var(--bleu); color: var(--bleu); font-weight: 700; }
.doc-zone { border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 6px 16px 12px; margin-top: 10px; }
.titre-zone { margin: 10px 0 2px; font-size: 15px; }
.doc-lignes { list-style: none; margin: 0; padding: 0; }
.doc-lignes li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.doc-lignes li:last-child { border-bottom: 0; }
.doc-lignes .doc-nom small { display: block; color: var(--encre-douce); font-size: 13px; }
@media (max-width: 640px) { .doc-lignes li { grid-template-columns: minmax(0, 1fr) auto; } .doc-lignes .etat { display: none; } }
.zone-danger { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--trait); }

.doc-lignes li { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.doc-lignes li .doc-nom { flex: 1 1 260px; }
.entete-salarie { position: relative; }
.entete-salarie .entete-supprimer { position: absolute; top: 0; right: 0; }
@media (max-width: 640px) { .entete-salarie .entete-supprimer { position: static; margin-top: 6px; } }

/* RH : menu à grosses cases et écrans guidés */
.cases-rh { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
@media (max-width: 640px) { .cases-rh { grid-template-columns: 1fr; } }
.case-rh { font: inherit; text-align: left; display: grid; gap: 6px; padding: 24px; border: 1px solid var(--trait); border-radius: 16px; background: #fff; cursor: pointer; color: var(--encre); min-height: 150px; align-content: start; }
.case-rh:hover, .case-rh:focus-visible { border-color: var(--bleu); box-shadow: 0 0 0 3px #e8eefc; }
.case-afaire { border: 2px solid #f0b35a; }
.case-ico { font-size: 30px; line-height: 1; }
.case-titre { font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.case-texte { color: var(--encre-douce); font-size: 15px; }
.liens-bas { margin-top: 20px; }
.ecran-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.ecran-tete h2 { margin: 0; }
.etape-guide { color: var(--encre-douce); font-size: 15px; margin: 4px 0 14px; }
.grande-recherche { width: 100%; font-size: 17px; min-height: 52px; padding: 0 16px; }
.liste-choix { display: grid; gap: 8px; margin-top: 12px; }
.choix-ligne { font: inherit; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; cursor: pointer; color: var(--encre); }
.choix-ligne:hover { border-color: var(--bleu); } .choix-ligne small { color: var(--encre-douce); }
.cases-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.case-doc { font: inherit; font-size: 16px; text-align: left; padding: 18px; border: 1px solid var(--trait); border-radius: 12px; background: #fff; cursor: pointer; color: var(--encre); display: grid; gap: 4px; }
.case-doc:hover:not(:disabled) { border-color: var(--bleu); } .case-doc:disabled { opacity: .55; cursor: wait; }
.case-doc small { color: var(--encre-douce); font-size: 13px; }
.bloc.succes { border-color: #7cc49a; background: #f1faf4; margin-top: 16px; }
/* « À faire » : une tâche à la fois */
.une-a-la-fois #rh-embaucher { display: none; }
.une-a-la-fois .actions:first-child { display: none; }
.une-a-la-fois ul.boite > li:not(:first-child) { display: none; }
.une-a-la-fois ul.boite > li { font-size: 17px; padding: 22px; border: 2px solid var(--trait); border-radius: 14px; background: #fff; }
.case-titre .compteur { background: #e8590c; color: #fff; border-radius: 999px; font-size: 14px; padding: 2px 10px; font-weight: 700; }
