/* Suivi : feuille de style unique (maquette validée maquette/Final.dc.html et Mobile-sombre.dc.html).
   Thème clair « Sauge » et sombre gris neutre : toutes les couleurs viennent de renderVals() de la maquette.
   CSP stricte : aucun style en ligne ; valeurs dynamiques en data-* (lues par app.js) ou en classes (dl-N).
   Vocabulaire commun (aussi utilisé par css/notifications.css) : .carte .carte__titre .pile .ligne .muted .bouton
   .bouton--principal .bouton--discret .interrupteur .pastille(--ok|--attention|--info) .champ .page-titre. */

/* --- Polices (SIL OFL 1.1, voir static/fonts/) ------------------------------------------------------ */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); }

/* --- Thème ---------------------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --fond: #F4F3EE;
  --bord-lateral: #E2E1D9;
  --surface: #FFFFFF;
  --bord: #ECEBE4;
  --ligne-fine: #F0EFE9;
  --texte: #1F2A26;
  --texte-doux: #5B6661;
  --doux: #EFEEE8;
  --doux-texte: #4A5551;
  --accent: #3F6B5A;
  --accent-texte: #FFFFFF;
  --accent-doux: #E3ECE6;
  --accent-doux-texte: #2F4A40;
  --ok: #2F5A4B;
  --attention: #8A4A12;
  --info: #2B5179;
  --critique: #9E3426;
  --violet: #4A3470;
  --barre: #6E9C88;
  --colonne: #EBEAE4;
  --nav-actif: #FFFFFF;
  --ok-point: #4F8A70;
  --attention-point: #D9A055;
  --info-point: #5F86AE;
  --critique-point: #C8553F;
  --violet-point: #8A6BBE;
  --doux-point: #8C9590;
  --ok-fond: #E3ECE6;
  --attention-fond: #FBEEDF;
  --info-fond: #E4ECF4;
  --critique-fond: #F8E1DD;
  --violet-fond: #ECE6F5;
  --lien: #2F5A4B;
  --lien-survol: #1F3F34;
  --ombre: 0 10px 24px rgba(0, 0, 0, .08);
  --ombre-nav: 0 1px 2px rgba(0, 0, 0, .06);
  --pastille-badge: #1A1206;
  /* Étiquettes de type (Kanban) */
  --tag-projet-fond: #E3EAF4; --tag-projet: #2B4A73;
  --tag-appli-fond: #E2EFE8; --tag-appli: #2C5A45;
  --tag-demande-fond: #F8EBDC; --tag-demande: #7E4612;
  /* Barres de la feuille de route */
  --frise-sauge-fond: #CFE3D8; --frise-sauge: #23463A;
  --frise-bleu-fond: #D6E4F2; --frise-bleu: #1F3F63;
  --frise-ambre-fond: #F6E3C9; --frise-ambre: #6B3A0C;
  --frise-gris-fond: #E6E5DF; --frise-gris: #3A4541;
  --frise-rouge-fond: #F4D9D5; --frise-rouge: #7A2A1E;
  --frise-violet-fond: #E6DEF2; --frise-violet: #4A3470;

  --rayon: 16px;
  --rayon-moyen: 12px;
  --rayon-petit: 10px;
  --titres: "Manrope", "Segoe UI", system-ui, sans-serif;
  --texte-police: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --courbe: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --fond: #18191B;
  --bord-lateral: #2A2C2F;
  --surface: #212225;
  --bord: #2C2E31;
  --ligne-fine: #2C2E31;
  --texte: #E8E8E6;
  --texte-doux: #A3A5A8;
  --doux: #2C2E31;
  --doux-texte: #C4C6C8;
  --accent: #8DBFA6;
  --accent-texte: #10261C;
  --accent-doux: #23302A;
  --accent-doux-texte: #B9DCC9;
  --ok: #A9D3BD;
  --attention: #E6BD86;
  --info: #A9C7E6;
  --critique: #F0A196;
  --violet: #C9B8EC;
  --barre: #8DBFA6;
  --colonne: #1D1E20;
  --nav-actif: #2A2C2F;
  --ok-point: #8DBFA6;
  --attention-point: #E0B074;
  --info-point: #8FB3D9;
  --critique-point: #E07A68;
  --violet-point: #B3A2D9;
  --doux-point: #7D8084;
  --ok-fond: #23302A;
  --attention-fond: #3A2E1D;
  --info-fond: #1F2B38;
  --critique-fond: #3A2220;
  --violet-fond: #2B2538;
  --lien: #A9D3BD;
  --lien-survol: #CBE6D7;
  --ombre: 0 10px 24px rgba(0, 0, 0, .35);
  --ombre-nav: 0 1px 2px rgba(0, 0, 0, .3);
  --tag-projet-fond: #1F2B38; --tag-projet: #A9C7E6;
  --tag-appli-fond: #23302A; --tag-appli: #A9D3BD;
  --tag-demande-fond: #3A2E1D; --tag-demande: #E6BD86;
  --frise-sauge-fond: #8DBFA6; --frise-sauge: #10261C;
  --frise-bleu-fond: #8FB3D9; --frise-bleu: #0F2236;
  --frise-ambre-fond: #E0B074; --frise-ambre: #33210A;
  --frise-gris-fond: #34363A; --frise-gris: #D8D8D6;
  --frise-rouge-fond: #D99085; --frise-rouge: #2E0F0A;
  --frise-violet-fond: #B3A2D9; --frise-violet: #221737;
}

/* --- Base ------------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--fond); color: var(--texte);
  font-family: var(--texte-police); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; transition: background-color .4s ease, color .4s ease;
}
h1, h2, h3 { font-family: var(--titres); letter-spacing: -0.01em; line-height: 1.25; }
a { color: var(--lien); text-underline-offset: 2px; }
a:hover { color: var(--lien-survol); }
img, svg { max-width: 100%; }
.icone { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.evitement { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px;
  background: var(--accent); color: var(--accent-texte); font-weight: 600; }
.evitement:focus { top: 12px; }
.muted { color: var(--texte-doux); }
.petit { font-size: 12.5px; }
.gras { font-weight: 600; }
.nowrap { white-space: nowrap; }
.coupe { overflow-wrap: anywhere; }
.vide { margin: 0; }
.ton-ok, .ton-sauge { color: var(--ok); }
.ton-attention, .ton-ambre { color: var(--attention); }
.ton-info, .ton-bleu { color: var(--info); }
.ton-critique, .ton-rouge { color: var(--critique); }
.ton-violet { color: var(--violet); }
.ton-doux, .ton-gris { color: var(--texte-doux); }
.ton-barre { color: var(--texte-doux); }

/* --- Animations (maquette) : coupées par prefers-reduced-motion ----------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ring { from { stroke-dasharray: 0 100; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--halo, var(--ok-point)); }
  70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.rise { animation: rise .6s var(--courbe) both; }
.fade, .contenu { animation: fade .4s ease both; }
.grow { transform-origin: left center; animation: grow 1s var(--courbe) both; }
.ring { animation: ring 1.2s var(--courbe) both; }
.pulse { animation: pulse 2.4s ease-out infinite; }
.clignote { animation: blink 2s ease-in-out infinite; }
.lift { transition: transform .2s ease, box-shadow .2s ease, background-color .4s ease, border-color .4s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.dl-0{animation-delay:0ms}.dl-1{animation-delay:40ms}.dl-2{animation-delay:80ms}.dl-3{animation-delay:120ms}
.dl-4{animation-delay:160ms}.dl-5{animation-delay:200ms}.dl-6{animation-delay:240ms}.dl-7{animation-delay:280ms}
.dl-8{animation-delay:320ms}.dl-9{animation-delay:360ms}.dl-10{animation-delay:400ms}.dl-11{animation-delay:440ms}
.dl-12{animation-delay:480ms}.dl-13{animation-delay:520ms}.dl-14{animation-delay:560ms}.dl-15{animation-delay:600ms}
.dl-16{animation-delay:640ms}.dl-17{animation-delay:680ms}.dl-18{animation-delay:720ms}.dl-19{animation-delay:760ms}
.dl-20{animation-delay:800ms}.dl-21{animation-delay:840ms}.dl-22{animation-delay:880ms}.dl-23{animation-delay:920ms}
.dl-24{animation-delay:960ms}.dl-25{animation-delay:1000ms}.dl-26{animation-delay:1040ms}.dl-27{animation-delay:1080ms}
.dl-28{animation-delay:1120ms}.dl-29{animation-delay:1160ms}.dl-30{animation-delay:1200ms}.dl-31{animation-delay:1240ms}
.dl-32{animation-delay:1280ms}.dl-33{animation-delay:1320ms}.dl-34{animation-delay:1360ms}.dl-35{animation-delay:1400ms}
.dl-36{animation-delay:1440ms}.dl-37{animation-delay:1480ms}.dl-38{animation-delay:1520ms}.dl-39{animation-delay:1560ms}
.dl-40{animation-delay:1600ms}
/* Transition du thème (classe posée quelques centaines de ms par app.js au changement) */
.theme-transition, .theme-transition *, .theme-transition *::before, .theme-transition *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease,
    box-shadow .4s ease !important;
}
/* Fondu entre les pages (Edge, Chrome, Safari récents) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
  .rise, .fade, .contenu, .grow, .ring, .pulse, .clignote { animation: none !important; }
  .lift:hover { transform: none; }
  body, .theme-transition, .theme-transition * { transition: none !important; }
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* --- Briques communes ------------------------------------------------------------------------------ */
.pile { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; }
.pile--large { gap: 22px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ligne--droite { margin-left: auto; justify-content: flex-end; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px 24px;
  min-width: 0;
}
.carte--etroite { max-width: 640px; }
.carte--tableau { padding: 6px 0; }
.carte--attention { background: var(--attention-fond); border-color: transparent; }
.carte__titre { margin: 0; font-family: var(--titres); font-size: 17px; font-weight: 700; }
.carte__titre a { color: inherit; text-decoration: none; }
.carte__titre a:hover { text-decoration: underline; }
.carte__entete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.carte__note { margin-left: auto; font-size: 12.5px; color: var(--texte-doux); }
.carte__lien-droite { margin-left: auto; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.carte__lien-droite:hover { text-decoration: underline; }
.page-titre { margin: 0; font-family: var(--titres); font-weight: 700; font-size: 28px; letter-spacing: -0.01em; }
.rangee { display: flex; flex-wrap: wrap; gap: 20px; }
.rangee > * { flex: 1 1 360px; }
.defile { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--rayon-moyen); border: 1px solid var(--bord); background: var(--surface); color: var(--texte);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, transform .1s ease;
}
.bouton:hover { color: var(--texte); background: var(--doux); }
.bouton:active { transform: translateY(1px); }
.bouton--principal { border-color: transparent; background: var(--accent); color: var(--accent-texte); }
.bouton--principal:hover { color: var(--accent-texte); background: var(--accent); filter: brightness(1.08); }
.bouton--discret { background: transparent; border-color: transparent; color: var(--doux-texte); }
.bouton--discret:hover { background: var(--doux); color: var(--texte); }
.bouton--danger { color: var(--critique); }
.bouton--danger:hover { color: var(--critique); background: var(--critique-fond); }
.bouton--large { width: 100%; }
.bouton-icone {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  flex: none; border-radius: var(--rayon-moyen); border: 1px solid var(--bord); background: var(--surface);
  color: var(--texte); text-decoration: none; cursor: pointer;
}
.bouton-icone:hover { color: var(--texte); background: var(--doux); }
.bouton-icone--ok { color: var(--ok); }
.retour { display: inline-flex; align-items: center; gap: 6px; color: var(--texte-doux); text-decoration: none;
  min-height: 24px; }
.retour:hover { color: var(--texte); text-decoration: underline; }

.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--doux);
  color: var(--doux-texte);
}
.pastille--ok, .statut--sauge { background: var(--ok-fond); color: var(--ok); }
.pastille--attention, .statut--ambre { background: var(--attention-fond); color: var(--attention); }
.pastille--info, .statut--bleu { background: var(--info-fond); color: var(--info); }
.pastille--critique, .statut--rouge { background: var(--critique-fond); color: var(--critique); }
.statut--violet { background: var(--violet-fond); color: var(--violet); }
.pastille--doux, .statut--gris { background: var(--doux); color: var(--doux-texte); }
.etiquette {
  display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--doux); color: var(--doux-texte);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.etiquette--ligne { margin-left: 8px; vertical-align: 1px; }

.point { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--doux-point); --halo: var(--doux-point); }
.point--petit { width: 6px; height: 6px; }
.point--ok, .point--sauge { background: var(--ok-point); --halo: var(--ok-point); }
.point--attention, .point--ambre { background: var(--attention-point); --halo: var(--attention-point); }
.point--info, .point--bleu { background: var(--info-point); --halo: var(--info-point); }
.point--critique, .point--rouge { background: var(--critique-point); --halo: var(--critique-point); }
.point--violet { background: var(--violet-point); --halo: var(--violet-point); }
.point--gris, .point--doux { background: var(--doux-point); --halo: var(--doux-point); }
.carre { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--doux-point); }
.carre--sauge { background: var(--ok-point); }
.carre--ambre { background: var(--attention-point); }
.carre--bleu { background: var(--info-point); }
.carre--rouge { background: var(--critique-point); }
.carre--violet { background: var(--violet-point); }
.carre--gris { background: var(--doux-point); }

.barre { display: block; height: 6px; border-radius: 999px; background: var(--doux); overflow: hidden; }
.barre--fine { height: 5px; }
.barre--grande { height: 12px; }
.barre__remplie { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--barre);
  transition: width .5s var(--courbe); }

/* --- Formulaires ------------------------------------------------------------------------------------ */
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ > label, .puces legend { font-size: 13.5px; font-weight: 600; color: var(--texte); }
.champ__facultatif { font-weight: 400; color: var(--texte-doux); font-size: 12.5px; }
.champ__aide { margin: 0; font-size: 12.5px; color: var(--texte-doux); }
.saisie, .champ input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .champ select, .champ textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--rayon-petit); border: 1px solid var(--bord);
  background: var(--surface); color: var(--texte); font-size: 15px; line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease;
}
[data-theme="dark"] .saisie, [data-theme="dark"] .champ input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[data-theme="dark"] .champ select, [data-theme="dark"] .champ textarea { background: var(--fond); border-color: #3A3C40; }
textarea.saisie, .champ textarea { min-height: 96px; resize: vertical; }
select.saisie, .champ select { padding-right: 32px; }
.saisie:focus, .champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux);
}
.saisie[aria-invalid="true"] { border-color: var(--critique); }
.saisie--petite { min-height: 36px; padding: 4px 28px 4px 10px; font-size: 13px; }
.saisie--code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; flex: 1 1 280px; }
.erreur { margin: 0; color: var(--critique); font-size: 13px; font-weight: 600; }
.erreurs-formulaire { padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--critique-fond);
  color: var(--critique); font-weight: 600; font-size: 14px; }
.erreurs-formulaire p { margin: 0; }
.grille-formulaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.champ--large { grid-column: 1 / -1; }
.formulaire { max-width: 860px; }
.formulaire__actions { padding-top: 4px; }

/* Interrupteur : case à cocher stylée (input[type=checkbox].interrupteur) */
.interrupteur {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0;
  border-radius: 999px; background: var(--doux); border: 1px solid var(--bord); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
[data-theme="dark"] .interrupteur { background: #3A3C40; border-color: #4A4C50; }
.interrupteur::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--courbe);
}
[data-theme="dark"] .interrupteur::before { background: #E8E8E6; }
.interrupteur:checked { background: var(--accent); border-color: var(--accent); }
.interrupteur:checked::before { transform: translateX(18px); }
[data-theme="dark"] .interrupteur:checked::before { background: var(--accent-texte); }
.interrupteur:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.case { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 600;
  font-size: 14px; }
.champ--case { justify-content: center; }

.puces { border: 0; margin: 0; padding: 0; min-width: 0; }
.puces legend { padding: 0; margin-bottom: 6px; }
.puces__liste { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--bord); background: var(--surface); font-size: 13.5px; cursor: pointer;
}
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-texte);
  font-weight: 600; }
.puce:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- Structure : menu à gauche, en-tête, contenu ------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.menu { position: relative; flex: 0 0 248px; align-self: stretch; border-right: 1px solid var(--bord-lateral);
  background: var(--fond); }
.menu__interieur { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 18px 16px;
  display: flex; flex-direction: column; gap: 2px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.marque__logo {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none;
  border-radius: 10px; background: var(--accent); color: var(--accent-texte);
}
.marque__logo:hover { color: var(--accent-texte); }
.marque__texte { display: flex; flex-direction: column; min-width: 0; }
.marque__nom { font-family: var(--titres); font-weight: 700; font-size: 17px; }
.marque__org { font-size: 12px; color: var(--texte-doux); }
.menu__fermer { display: none; margin-left: auto; }
.menu__liste { display: flex; flex-direction: column; gap: 2px; }
.menu__lien {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--doux-texte); text-decoration: none; font-size: 14px;
  transition: background-color .2s ease, color .2s ease;
}
.menu__lien:hover { color: var(--texte); background: var(--doux); }
.menu__lien[aria-current="page"] { background: var(--nav-actif); color: var(--texte); font-weight: 600;
  box-shadow: var(--ombre-nav); }
.menu__lien .icone { opacity: .8; }
.menu__compte { margin-left: auto; font-size: 12px; color: var(--texte-doux); font-weight: 400; }
.menu__compte--attention { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--attention-point); color: var(--pastille-badge); font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; }
.menu__section { margin: 12px 12px 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--texte-doux); }
.menu__pied { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.bouton-theme {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--bord-lateral); background: transparent; color: var(--texte); font-size: 13.5px;
}
.bouton-theme:hover { background: var(--doux); }
.bouton-theme__soleil { display: none; }
[data-theme="dark"] .bouton-theme__soleil { display: inline-flex; }
[data-theme="dark"] .bouton-theme__lune { display: none; }
.bouton-theme__lune, .bouton-theme__soleil { align-items: center; }
.bouton-theme__lune { display: inline-flex; }
.synchro { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-doux); color: var(--accent-doux-texte); font-size: 12.5px; line-height: 1.5; }
.synchro__titre { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.synchro .point { width: 8px; height: 8px; }
.synchro__etat:empty { display: none; }
.compte { display: flex; align-items: center; gap: 8px; padding: 2px 0 0 4px; }
@media (min-width: 901px) and (pointer: fine) {
  .menu__lien, .bouton-theme { min-height: 38px; }
}
.compte__nom { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 13.5px; font-weight: 600; }
.compte__role { font-size: 12px; font-weight: 400; color: var(--texte-doux); }
.compte form { margin: 0; }
.recherche--menu { display: none; }

.cadre { flex: 1 1 auto; min-width: 0; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 26px; }
.entete { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.entete__titre { display: flex; flex-direction: column; gap: 4px; margin-right: auto; min-width: 0; flex: 1 1 320px; }
.entete__date { font-size: 13px; color: var(--texte-doux); }
.entete__theme { display: none; }
.recherche { margin: 0; }
.recherche__champ {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--bord); min-width: 220px; color: var(--texte-doux);
}
.recherche__champ:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.recherche__champ input { border: 0; outline: 0; background: transparent; font-size: 14px; flex: 1; min-width: 0;
  color: var(--texte); }
.cloche__compte {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--attention-point); color: var(--pastille-badge); font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nouveau { position: relative; }
.nouveau > summary { list-style: none; }
.nouveau > summary::-webkit-details-marker { display: none; }
.nouveau__liste {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-moyen); box-shadow: var(--ombre);
  animation: rise .25s var(--courbe) both;
}
.nouveau__liste a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  border-radius: 8px; color: var(--texte); text-decoration: none; font-size: 14px; }
.nouveau__liste a:hover, .nouveau__liste a:focus-visible { background: var(--doux); }
.contenu { min-width: 0; outline: none; }
.contenu:focus { outline: none; }

.messages { display: flex; flex-direction: column; gap: 8px; }
.message {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 8px 10px 16px; border-radius: 12px;
  background: var(--accent-doux); color: var(--accent-doux-texte); font-weight: 600; font-size: 14px;
  animation: rise .4s var(--courbe) both;
}
.message--error { background: var(--critique-fond); color: var(--critique); }
.message--warning { background: var(--attention-fond); color: var(--attention); }
.message__fermer { margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.message__fermer:hover { background: rgba(0, 0, 0, .06); }
.message.disparait { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }

.onglets, .voile { display: none; }
.details-bascule, .projets-compacts { display: none; }
.alertes-accueil__suite { align-self: flex-start; font-size: 13px; font-weight: 600; text-decoration: none; padding: 4px 2px; }
.alertes-accueil__suite:hover { text-decoration: underline; }
.liste-compacte { display: flex; flex-direction: column; }
.projet-compact { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 48px; padding: 6px 0;
  color: var(--texte); text-decoration: none; }
.projet-compact:hover { color: var(--texte); }
.projet-compact__ligne { display: flex; gap: 8px; font-size: 13.5px; }
.projet-compact__nom { flex: 1; min-width: 0; font-weight: 500; }
.projets-compacts__tous { margin-left: 0; align-self: flex-start; }
/* Zones cliquables agrandies sans changer le dessin (padding compensé par une marge négative, bordure transparente) */
.tableau tbody th a { display: inline-block; padding: 13px 0; margin: -13px 0; }


/* --- Vue d'ensemble -------------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: var(--rayon);
  background: var(--surface); border: 1px solid var(--bord); color: var(--texte); text-decoration: none; min-width: 0;
}
.kpi:hover { color: var(--texte); }
.kpi__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kpi__libelle { font-size: 13px; color: var(--texte-doux); }
.kpi__valeur { font-family: var(--titres); font-weight: 700; font-size: 30px; line-height: 1.1; }
.kpi__note { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kpi__anneau { flex: none; }
.anneau-fond { stroke: var(--doux); }
.anneau--barre { stroke: var(--barre); }
.anneau--ok { stroke: var(--ok-point); }
.anneau--info { stroke: var(--info-point); }
.anneau--attention { stroke: var(--attention-point); }
.segment--sauge { stroke: var(--ok-point); }
.segment--bleu { stroke: var(--info-point); }
.segment--ambre { stroke: var(--attention-point); }
.segment--gris { stroke: var(--doux-point); }
.segment--rouge { stroke: var(--critique-point); }
.segment--violet { stroke: var(--violet-point); }

.alertes-accueil { display: flex; flex-direction: column; gap: 10px; }
.alerte-bandeau {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: var(--attention-fond); color: var(--texte); text-decoration: none;
}
.alerte-bandeau:hover { color: var(--texte); filter: brightness(.98); }
.alerte-bandeau--critique { background: var(--critique-fond); }
.alerte-bandeau--info { background: var(--info-fond); }
.alerte-bandeau .point { width: 8px; height: 8px; margin-top: 7px; }
.alerte-bandeau__texte { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.alerte-bandeau__texte strong { font-weight: 600; }
.alerte-bandeau__texte span { font-size: 12.5px; color: var(--doux-texte); }

.repartition { display: flex; align-items: center; gap: 24px; flex: 1 1 320px; }
.quinzaine { flex: 2 1 560px; display: flex; flex-direction: column; gap: 14px; }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut__centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; }
.donut__total { font-family: var(--titres); font-weight: 700; font-size: 28px; line-height: 1.1; }
.donut__unite { font-size: 11.5px; color: var(--texte-doux); }
.repartition__legende { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.legende { display: flex; flex-direction: column; gap: 2px; }
.legende a { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 13.5px;
  color: var(--texte); text-decoration: none; border-radius: 6px; }
.legende a:hover .legende__libelle { text-decoration: underline; }
.legende__libelle { flex: 1; }
.legende__nombre { font-weight: 600; }

.jours { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; min-width: 560px; }
.jour { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; border-radius: 12px;
  background: var(--fond); min-width: 0; }
.jour--absence { background: var(--attention-fond); }
.jour__lettre { font-size: 11px; color: var(--texte-doux); }
.jour__num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; --halo: var(--ok-point); }
.jour--we .jour__num { color: var(--texte-doux); font-weight: 600; }
.jour--auj .jour__num { background: var(--accent); color: var(--accent-texte); }
.jour__points { display: flex; gap: 3px; height: 6px; }
.jour__libelle { font-size: 10.5px; color: var(--doux-texte); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%; padding: 0 3px; }

.liste-lignes > li { border-top: 1px solid var(--ligne-fine); }
.a-venir, .sante { display: flex; flex-direction: column; gap: 12px; }
.a-venir { flex: 1 1 420px; }
.ligne-rappel, .ligne-appli, .ligne-simple {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 9px 0; color: var(--texte);
  text-decoration: none;
}
a.ligne-rappel:hover .ligne-rappel__titre, a.ligne-appli:hover .ligne-appli__nom,
a.ligne-simple:hover .ligne-simple__nom { text-decoration: underline; }
.ligne-rappel:hover, .ligne-appli:hover, .ligne-simple:hover { color: var(--texte); }
.date-bloc { width: 50px; flex: none; text-align: center; display: flex; flex-direction: column; }
.date-bloc__jour { font-family: var(--titres); font-weight: 700; font-size: 18px; line-height: 1.2; }
.date-bloc__mois { font-size: 11.5px; color: var(--texte-doux); }
.ligne-rappel__texte, .ligne-appli__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ligne-rappel__titre, .ligne-appli__nom { font-size: 14px; font-weight: 500; }
.ligne-rappel__detail, .ligne-appli__url { font-size: 12.5px; color: var(--texte-doux); }
.ligne-appli__etat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right;
  font-size: 12.5px; }
.ligne-simple { gap: 12px; font-size: 13.5px; }
.ligne-simple__nom { flex: 1; min-width: 0; font-weight: 500; }
.ligne-rappel-action { display: flex; align-items: center; gap: 10px; }
.ligne-rappel-action .ligne-rappel { flex: 1; min-width: 0; }
.ligne-rappel-action form { margin: 0; }
.fait .ligne-rappel__titre { text-decoration: line-through; color: var(--texte-doux); }

.grille-projets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.projet-carte {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--rayon);
  background: var(--surface); border: 1px solid var(--bord); min-width: 0;
}
.projet-carte__haut { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.projet-carte__statut { margin-left: auto; font-size: 12px; font-weight: 600; }
.projet-carte__nom { margin: 0; font-size: 15.5px; font-weight: 700; }
.projet-carte__nom a { color: var(--texte); text-decoration: none; }
.lien-etendu::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lien-etendu:focus-visible { outline: none; }
.lien-etendu:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.projet-carte__meta { display: flex; flex-direction: column; gap: 6px; }
.projet-carte__etape { font-size: 13px; color: var(--doux-texte); line-height: 1.45; }
.projet-carte__bas { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--texte-doux); }
.projet-carte__note { font-size: 12px; color: var(--texte-doux); overflow-wrap: anywhere; }

.fil { display: flex; flex-direction: column; }
.fil__element { display: flex; gap: 14px; font-size: 13.5px; padding: 8px 0; border-top: 1px solid var(--ligne-fine); }
.fil__quand { width: 92px; flex: none; color: var(--texte-doux); }
.fil__source { width: 110px; flex: none; font-weight: 600; color: var(--ok); overflow: hidden; text-overflow: ellipsis; }
.fil__source--systeme { color: var(--texte-doux); }
.fil__source--appli { color: var(--info); }
.fil__texte { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fil__texte a { color: var(--texte); text-decoration: none; }
.fil__texte a:hover { text-decoration: underline; color: var(--texte); }
.journal-court { display: flex; flex-direction: column; gap: 10px; }

/* --- Barres d'outils et filtres -------------------------------------------------------------------- */
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.barre-outils > p { margin: 0; flex: 1 1 280px; }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.filtre {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font-size: 13.5px;
  text-decoration: none; white-space: nowrap;
}
.filtre:hover { color: var(--texte); background: var(--doux); }
.filtre[aria-current="true"] { border-color: transparent; background: var(--accent); color: var(--accent-texte);
  font-weight: 600; }
.filtre--petit { min-height: 34px; font-size: 12.5px; padding: 0 12px; }

/* --- Feuille de route ------------------------------------------------------------------------------ */
.frise { position: relative; min-width: 640px; display: flex; flex-direction: column; gap: 8px; --col-nom: 170px; }
.frise--large { min-width: 960px; }
.frise__graduations { position: relative; height: 20px; margin-left: var(--col-nom); }
.frise__graduation { position: absolute; top: 0; font-size: 12px; color: var(--texte-doux); white-space: nowrap; }
.frise__graduation--fin { transform: translateX(-100%); }
.frise__lignes { display: flex; flex-direction: column; }
.frise__ligne { display: flex; align-items: center; height: 44px; }
.frise__nom { width: var(--col-nom); flex: none; padding-right: 12px; font-size: 13.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.frise__piste { position: relative; flex: 1; height: 44px; border-top: 1px solid var(--ligne-fine); }
.frise__barre {
  position: absolute; top: -1px; height: 44px; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  background-clip: padding-box; border-radius: 8px / 17px; padding: 0 10px; display: flex; align-items: center;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; min-width: 12px; background-color: var(--frise-gris-fond); color: var(--frise-gris);
}
.frise__barre:hover { filter: brightness(.97); text-decoration: underline; }
.frise__texte { overflow: hidden; text-overflow: ellipsis; }
.frise__barre--courte { overflow: visible; }
/* Barre d'un jour : zone cliquable d'au moins 44 x 44 px, centrée sur la barre, sans élargir le dessin */
.frise__barre--courte { z-index: 1; }
.frise__barre--courte::before { content: ""; position: absolute; top: -9px; bottom: -9px; left: 50%;
  width: max(100%, 48px); transform: translateX(-50%); }
.frise__barre--courte .frise__texte { position: absolute; left: calc(100% + 8px); overflow: visible; color: var(--doux-texte); }
.frise__barre--sauge { background-color: var(--frise-sauge-fond); color: var(--frise-sauge); }
.frise__barre--bleu { background-color: var(--frise-bleu-fond); color: var(--frise-bleu); }
.frise__barre--ambre { background-color: var(--frise-ambre-fond); color: var(--frise-ambre); }
.frise__barre--gris { background-color: var(--frise-gris-fond); color: var(--frise-gris); }
.frise__barre--rouge { background-color: var(--frise-rouge-fond); color: var(--frise-rouge); }
.frise__barre--violet { background-color: var(--frise-violet-fond); color: var(--frise-violet); }
.frise__barre--sauge:hover, .frise__barre--bleu:hover, .frise__barre--ambre:hover, .frise__barre--gris:hover,
.frise__barre--rouge:hover, .frise__barre--violet:hover { color: inherit; }
.frise__auj { position: relative; height: 18px; margin-left: var(--col-nom); }
.frise__repere { position: absolute; transform: translateX(-6px); font-size: 11.5px; font-weight: 600;
  color: var(--attention); white-space: nowrap; }
.frise__trait { position: absolute; top: 24px; bottom: 26px; width: 0; border-left: 2px dashed var(--attention-point);
  opacity: .7; pointer-events: none; }

/* --- Kanban ------------------------------------------------------------------------------------------ */
.kanban-defile { padding-bottom: 8px; }
.kanban-cadre { position: relative; }
.kanban-cadre::before, .kanban-cadre::after { content: ""; position: absolute; top: 0; bottom: 8px; width: 28px; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.kanban-cadre::before { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .14), transparent); }
.kanban-cadre::after { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .14), transparent); }
[data-theme="dark"] .kanban-cadre::before { background: linear-gradient(to right, rgba(0, 0, 0, .55), transparent); }
[data-theme="dark"] .kanban-cadre::after { background: linear-gradient(to left, rgba(0, 0, 0, .55), transparent); }
.kanban-cadre.ombre-gauche::before, .kanban-cadre.ombre-droite::after { opacity: 1; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 8px; align-items: start; }
.kcol { background: var(--colonne); border-radius: var(--rayon); padding: 10px 8px; display: flex; flex-direction: column;
  gap: 10px; min-width: 0; transition: background-color .2s ease, box-shadow .2s ease; }
.kcol--survol { box-shadow: inset 0 0 0 2px var(--accent); }
.kcol__entete { display: flex; align-items: center; gap: 6px; padding: 2px 2px 4px 4px; min-height: 32px; }
.kcol__entete .point { width: 8px; height: 8px; }
.kcol__titre { margin: 0; min-width: 0; font-family: var(--texte-police); font-size: 13.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcol__compte { margin-left: auto; font-size: 12.5px; color: var(--texte-doux); }
.kcol__ajout { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 8px; color: var(--texte-doux); }
.kcol__ajout:hover { background: var(--surface); color: var(--texte); }
.kcol__cartes { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kcol__vide { padding: 16px 8px; text-align: center; font-size: 12.5px; color: var(--texte-doux);
  border: 1px dashed var(--bord-lateral); border-radius: 12px; }
.kcarte {
  position: relative; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-moyen);
  padding: 11px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
[data-kanban] .kcarte { cursor: grab; }
.kcarte__tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
[data-kanban] .kcarte__tags { padding-right: 24px; }
.tag { font-size: 11px; padding: 2px 6px; white-space: nowrap; border-radius: 6px; background: var(--doux); color: var(--doux-texte); }
.tag--projet { background: var(--tag-projet-fond); color: var(--tag-projet); font-weight: 600; }
.tag--appli { background: var(--tag-appli-fond); color: var(--tag-appli); font-weight: 600; }
.tag--demande { background: var(--tag-demande-fond); color: var(--tag-demande); font-weight: 600; }
.kcarte__poignee {
  position: absolute; top: 5px; right: 3px; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; color: var(--texte-doux); touch-action: none; cursor: grab;
}
.kcarte__poignee:hover { background: var(--doux); }
.kcarte__titre { margin: 0; font-family: var(--texte-police); font-size: 14px; font-weight: 600; line-height: 1.35; }
.kcarte__titre a { color: var(--texte); text-decoration: none; }
.kcarte__titre a:hover { text-decoration: underline; }
.kcarte__meta { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--texte-doux); }
.kcarte__info { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow-wrap: break-word; }
.kcarte__echeance { margin-left: auto; color: var(--attention); font-weight: 600; white-space: nowrap; }
/* Liste de statut. Souris : superposée en bas à droite, visible au survol ou au focus clavier, sans réserver de
   place ni faire bouger la carte. Tactile : ligne du bas, toujours visible (pas de survol). */
.kcarte__statut { display: flex; justify-content: flex-end; }
.kcarte__statut select { width: auto; max-width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .kcarte__statut { position: absolute; right: 6px; bottom: 6px; z-index: 1; opacity: 0; pointer-events: none;
    transition: opacity .15s ease; }
  .kcarte__statut select { box-shadow: var(--ombre); }
  .kcarte:hover .kcarte__statut, .kcarte:focus-within .kcarte__statut { opacity: 1; pointer-events: auto; }
}
.kcarte--fantome { position: fixed; z-index: 60; pointer-events: none; margin: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  transform: rotate(1.5deg); opacity: .96; }
.kcarte--source { opacity: .35; }
.kcarte--place { border: 2px dashed var(--accent); background: transparent; border-radius: var(--rayon-moyen);
  padding: 0; }
.kcarte--envoi { opacity: .7; }
.kcarte--erreur { animation: secousse .4s ease; border-color: var(--critique-point); }
@keyframes secousse { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
body.glisse .kanban-defile { scroll-snap-type: none; }
body.glisse .kcol { scroll-snap-align: none; }
body.glisse, body.glisse * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* --- Listes, tableaux, fiches ---------------------------------------------------------------------- */
.tableau { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau th, .tableau td { padding: 12px 16px; text-align: left; vertical-align: middle; border-top: 1px solid var(--ligne-fine); }
.tableau thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--texte-doux); white-space: nowrap; }
.tableau tbody th { font-weight: 600; min-width: 200px; }
.tableau tbody th a { color: var(--texte); text-decoration: none; }
.tableau tbody th a:hover { text-decoration: underline; }
.tableau tbody tr:hover { background: var(--fond); }
.tableau tr.archive { opacity: .7; }
.avancement-cellule { display: inline-flex; align-items: center; gap: 10px; min-width: 130px; }
.avancement-cellule .barre { flex: 1; min-width: 70px; }

.grille-applis { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.appli-carte { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
  border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.appli-carte__haut { display: flex; align-items: center; gap: 10px; }
.appli-carte__nom { margin: 0; flex: 1; font-size: 15.5px; font-weight: 700; min-width: 0; }
.appli-carte__nom a { color: var(--texte); text-decoration: none; }
.appli-carte.archive { opacity: .7; }

.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.fiche__principal, .fiche__cote { min-width: 0; }
.fiche__etape { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.fiche__etiquette { font-size: 12.5px; color: var(--texte-doux); }
.infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; margin: 0; }
.infos div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.infos dt { font-size: 12.5px; color: var(--texte-doux); }
.infos dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.texte-long { font-size: 14px; line-height: 1.6; color: var(--texte); }
.texte-long p { margin: 0 0 .6em; }
.statut-rapide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding-top: 4px;
  border-top: 1px solid var(--ligne-fine); }
.statut-rapide label { font-size: 13.5px; font-weight: 600; padding-top: 10px; }
.statut-rapide select { width: auto; min-width: 200px; margin-top: 10px; }
.statut-rapide .bouton { margin-top: 10px; }
.avancement__valeur { margin-left: auto; font-family: var(--titres); font-weight: 700; font-size: 22px; }
.paliers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.palier { min-width: 64px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bord);
  background: var(--surface); font-weight: 600; font-size: 13.5px; transition: background-color .2s, color .2s; }
.palier:hover { background: var(--doux); }
.palier[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.curseur { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.curseur label { font-size: 13.5px; color: var(--texte-doux); }
.curseur input[type="range"] { flex: 1 1 200px; min-height: 44px; accent-color: var(--accent); }
.curseur output { min-width: 48px; font-weight: 600; }
.js [data-sans-js] { display: none; }
.edition { padding: 0; }
.edition__titre { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 24px; cursor: pointer;
  font-weight: 600; list-style: none; border-radius: var(--rayon); }
.edition__titre::-webkit-details-marker { display: none; }
.edition__titre::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.edition[open] .edition__titre::after { transform: rotate(-135deg); }
.edition__titre:hover { background: var(--fond); }
.edition > form { padding: 4px 24px 24px; }
.edition[open] > form { animation: fade .3s ease both; }
.archiver { margin: 0; }

.alerte-carte { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 14px;
  background: var(--attention-fond); }
.alerte-carte--critique { background: var(--critique-fond); }
.alerte-carte--info { background: var(--info-fond); }
.alerte-carte--lue { background: var(--surface); border: 1px solid var(--bord); }
.alerte-carte .point { margin-top: 6px; }
.alerte-carte__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alerte-carte__texte p { margin: 0; font-size: 13.5px; color: var(--doux-texte); }
.alerte-carte__titre { margin: 0; font-family: var(--texte-police); font-size: 14.5px; font-weight: 600; }
.alerte-carte__titre a { color: var(--texte); }
.alerte-carte form { margin: 0; }

/* --- Pages hors session --------------------------------------------------------------------------- */
.simple { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.simple__marque { display: flex; align-items: center; gap: 10px; }
.simple__carte { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.simple__titre { margin: 0; font-size: 24px; font-weight: 700; }
.simple__carte p { margin: 0; }

/* --- Écrans moyens ------------------------------------------------------------------------------------ */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-projets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fiche { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .cadre { padding: 28px 24px 40px; }
  .menu { flex-basis: 220px; }
}

/* --- Téléphone et tablette : barre d'onglets en bas, menu en tiroir ---------------------------------- */
@media (max-width: 900px) {
  body { font-size: 15px; }
  .menu {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; height: auto; width: min(86vw, 320px); align-self: auto;
    background: var(--fond); border-right: 1px solid var(--bord-lateral); transform: translateX(-102%);
    visibility: hidden; transition: transform .3s var(--courbe), visibility 0s linear .3s;
  }
  .menu-ouvert .menu { transform: none; visibility: visible; transition: transform .3s var(--courbe); box-shadow: var(--ombre); }
  .menu__interieur { position: static; height: 100%;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .menu__fermer { display: inline-flex; }
  .recherche--menu { display: block; margin: 0 0 12px; }
  .recherche--menu .recherche__champ { min-width: 0; }
  .voile { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .35);
    animation: fade .2s ease both; }
  .cadre {
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
      calc(88px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    gap: 18px;
  }
  .entete { align-items: flex-start; gap: 8px; flex-wrap: nowrap; }
  .entete__titre { flex: 1 1 auto; gap: 2px; }
  .entete__date { font-size: 12.5px; }
  .page-titre { font-size: 21px; }
  .recherche--entete { display: none; }
  .entete__theme { display: inline-flex; }
  .nouveau__libelle { display: none; }
  .nouveau__bouton { width: 44px; padding: 0; }
  .onglets {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 30;
    left: 0; right: 0; bottom: 0; padding: 6px max(6px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
    background: var(--surface); border-top: 1px solid var(--bord);
  }
  .onglet {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 52px; border: 0; border-radius: 12px; background: transparent; color: var(--doux-texte);
    font-size: 12px; text-decoration: none;
  }
  .onglet:hover { color: var(--texte); }
  .onglet[aria-current="page"] { background: var(--accent-doux); color: var(--accent-doux-texte); font-weight: 600; }
  .onglet__compte { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--attention-point); color: var(--pastille-badge); font-size: 10.5px;
    font-weight: 700; display: flex; align-items: center; justify-content: center; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; gap: 8px; }
  .kpi__valeur { font-size: 24px; }
  .kpi__anneau { width: 44px; height: 44px; }
  .carte { padding: 16px; }
  .carte--tableau { padding: 4px 0; }
  .edition { padding: 0; }
  .edition__titre { padding: 0 16px; }
  .edition > form { padding: 4px 16px 18px; }
  .rangee { gap: 14px; }
  .rangee > * { flex-basis: 100%; }
  .repartition { gap: 16px; }
  .donut, .donut svg { width: 112px; height: 112px; }
  .grille-projets { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .grille-formulaire { grid-template-columns: minmax(0, 1fr); }
  .fil__element { flex-wrap: wrap; gap: 2px 10px; }
  .fil__quand { width: auto; }
  .fil__source { width: auto; }
  .fil__texte { flex-basis: 100%; }
  .kanban { min-width: 0; grid-auto-columns: minmax(78vw, 1fr); scroll-snap-type: x mandatory; }
  .kanban-defile { scroll-snap-type: x mandatory; margin: 0 calc(-1 * max(16px, env(safe-area-inset-right))) 0
    calc(-1 * max(16px, env(safe-area-inset-left))); padding: 0 16px 8px; scroll-padding: 0 16px; }
  .kcol { scroll-snap-align: start; }
  .kcarte__poignee { width: 44px; height: 44px; top: 0; right: 0; }
  [data-kanban] .kcarte__tags { padding-right: 34px; }
  /* Cibles tactiles d'au moins 44 px */
  .filtre, .filtre--petit { min-height: 44px; }
  .kcol__ajout { width: 44px; height: 44px; margin: -6px -8px -6px 0; }
  .saisie--petite, .kcarte__statut select { min-height: 44px; }
  .retour { padding: 13px 0; margin: -13px 0; }
  .carte__lien-droite, .carte__titre a, .kcarte__titre a, .fil__texte a, .alerte-carte__titre a, .infos dd a {
    display: inline-block; padding: 13px 0; margin: -13px 0; }
  .alertes-accueil__suite { display: inline-flex; align-items: center; min-height: 44px; }
  .puce { min-height: 44px; }
  .legende a { min-height: 44px; }
  .message__fermer { width: 44px; height: 44px; }
  .bouton { white-space: normal; text-align: center; }
  .barre-outils .ligne--droite { margin-left: 0; }
  .filtres { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; max-width: 100%; }
  .filtres::-webkit-scrollbar { display: none; }
  .statut-rapide select { min-width: 0; flex: 1; }
}
/* Accueil téléphone (maquette Mobile-sombre) : 2 indicateurs, alertes, À venir, projets compacts ; le reste
   sous « Plus de détails » (replié par défaut, état mémorisé par app.js). */
@media (max-width: 600px) {
  .accueil > .rangee { display: contents; }
  .accueil > .rangee > * { flex: none; }
  .accueil .kpis { order: 1; }
  .accueil .alertes-accueil { order: 2; }
  .accueil .a-venir { order: 3; }
  .accueil .projets-compacts { order: 4; display: flex; flex-direction: column; gap: 6px; }
  .accueil .details-bascule { order: 5; display: inline-flex; }
  .accueil .repartition { order: 6; }
  .accueil .quinzaine { order: 7; }
  .accueil .sante { order: 8; }
  .accueil .journal-court { order: 9; }
  .accueil .projets-grille { display: none; }
  .js .accueil:not(.details-ouverts) .detail-mobile { display: none; }
  .kpi--secondaire, .kpi__anneau { display: none; }
  .kpi__valeur { order: -1; }
  .kpi__libelle { font-size: 12.5px; }
  .ton-valeur-ok { color: var(--ok); }
  .ton-valeur-attention { color: var(--attention); }
  .a-venir .ligne-rappel__detail { display: none; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi__note { display: none; }
  .repartition { flex-direction: row; }
  .ligne-appli__etat .petit { display: none; }
}
