/* 1Licence : interface selon le guide BIOS « Glass Corporate » (v3.1). Toile gris clair avec halos
   fixes (orange, bleu nuit, vert d'eau, bleu) et quadrillage léger ; cartes en verre dépoli (rayon
   10 px), contrôles au rayon 6 px ; police Schibsted Grotesk, chiffres en IBM Plex Mono ; titres
   bleu nuit, un seul bouton orange par écran. Thème clair et sombre par jetons ; le choix manuel
   (data-theme) l'emporte sur le réglage du système.

   data-glass="off" ou « réduire la transparence » du système rendent tout opaque et sans flou.
   Animations : uniquement transform et opacity (composées par la carte graphique, sans saccade). */

:root {
  color-scheme: light;
  --paper: #eef0ec;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-2: rgba(255, 255, 255, 0.45);
  --glass-float: rgba(255, 255, 255, 0.82);
  --glass-bar: rgba(255, 255, 255, 0.35);
  --glass-hi: #ffffff;
  --glass-edge: rgba(255, 255, 255, 0.85);
  --field: rgba(255, 255, 255, 0.85);
  --blur: blur(20px) saturate(150%);
  --blur-float: blur(24px) saturate(170%);
  --sand: rgba(20, 32, 29, 0.06);
  --sand-2: rgba(20, 32, 29, 0.035);
  --line: rgba(20, 32, 29, 0.08);
  --line-strong: rgba(20, 32, 29, 0.12);
  --grid: rgba(20, 32, 29, 0.035);
  --ink: #14201d;
  --ink-2: #3a4744;
  --muted: #5e6b67;
  --faint: #8a9592;
  --navy: #193357;
  --navy-deep: #0e1d33;
  --pill: #14201d;
  --on-pill: #ffffff;
  --pill-icon: #f59c36;
  --accent: #e8702a;
  --accent-2: #ef8445;
  --accent-hover: #d4601d;
  --accent-text: #b8520f;
  --overline: #ad5b0e;
  --accent-soft: #fdf0e7;
  --accent-strong: #e8702a;
  --accent-strong-hover: #d4601d;
  --focus: #e8702a;
  --focus-ring: #fbe0cc;
  --on-tone: #ffffff;
  --accent-glow: rgba(232, 112, 42, 0.35);
  --ok: #1f7a55;
  --ok-soft: #e6f3ec;
  --warn: #93590a;
  --warn-soft: #fbf1df;
  --ko: #b42323;
  --ko-soft: #fbeaea;
  --ko-line: #efc9c9;
  --info: #1f5fae;
  --info-soft: #e7effa;
  --bar: #193357;
  /* Répartition des sièges (contrôlée daltonisme et contraste). */
  --seat-used: #3d8cef;
  --seat-free: #e8702a;
  --seat-idle: #a879d8;
  /* Courbe des coûts : coût et coût avec économies (contrôlés en clair et en sombre). */
  --c-cost: #2f6fd6;
  --c-save: #1f9d63;
  /* Séries d'un camembert, dans cet ordre (contrôlées daltonisme et contraste), puis « Autres ». */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-other: #8a918e;
  /* Fond de page : halos fixes. */
  --glow-1: rgba(232, 112, 42, 0.24);
  --glow-2: rgba(25, 51, 87, 0.13);
  --glow-3: rgba(20, 160, 143, 0.12);
  --glow-4: rgba(61, 140, 239, 0.1);
  --shadow-1: 0 0 0 1px rgba(20, 32, 29, 0.06), 0 1px 2px rgba(20, 32, 29, 0.04), 0 12px 32px -12px rgba(20, 32, 29, 0.16);
  --shadow-2: 0 0 0 1px rgba(20, 32, 29, 0.08), 0 2px 4px rgba(20, 32, 29, 0.05), 0 18px 40px -14px rgba(20, 32, 29, 0.22);
  --shadow-float: 0 0 0 1px rgba(20, 32, 29, 0.08), 0 20px 48px -12px rgba(20, 32, 29, 0.24);
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #0c1312;
    --surface: #18221f;
    --glass: rgba(30, 42, 39, 0.58);
    --glass-2: rgba(24, 34, 31, 0.5);
    --glass-float: rgba(22, 32, 29, 0.88);
    --glass-bar: rgba(12, 19, 18, 0.55);
    --glass-hi: rgba(255, 255, 255, 0.06);
    --glass-edge: rgba(255, 255, 255, 0.08);
    --field: rgba(255, 255, 255, 0.05);
    --sand: rgba(255, 255, 255, 0.07);
    --sand-2: rgba(255, 255, 255, 0.04);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --grid: rgba(255, 255, 255, 0.025);
    --ink: #eef1ee;
    --ink-2: #c7cfcc;
    --muted: #96a39f;
    --faint: #75827e;
    --navy: #e3eaf4;
    --pill: #eef1ee;
    --on-pill: #14201d;
    --pill-icon: #d4601d;
    --accent-hover: #f08c40;
    --accent-text: #f5a462;
    --overline: #f0a565;
    --focus: #f5a462;
    --focus-ring: rgba(232, 112, 42, 0.32);
    --on-tone: #0c1312;
    --accent-soft: rgba(232, 112, 42, 0.16);
    --ok: #63c99a;
    --ok-soft: rgba(99, 201, 154, 0.13);
    --warn: #f0c062;
    --warn-soft: rgba(240, 192, 98, 0.13);
    --ko: #ff8f84;
    --ko-soft: rgba(255, 143, 132, 0.12);
    --ko-line: rgba(255, 143, 132, 0.35);
    --info: #94b8f2;
    --info-soft: rgba(148, 184, 242, 0.13);
    --bar: #6f9be6;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-other: #7d8784;
    --glow-1: rgba(232, 112, 42, 0.16);
    --glow-2: rgba(61, 140, 239, 0.12);
    --glow-3: rgba(20, 160, 143, 0.1);
    --glow-4: rgba(61, 140, 239, 0.08);
    --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
    --shadow-2: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.25), 0 20px 44px -14px rgba(0, 0, 0, 0.65);
    --shadow-float: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #0c1312;
  --surface: #18221f;
  --glass: rgba(30, 42, 39, 0.58);
  --glass-2: rgba(24, 34, 31, 0.5);
  --glass-float: rgba(22, 32, 29, 0.88);
  --glass-bar: rgba(12, 19, 18, 0.55);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --glass-edge: rgba(255, 255, 255, 0.08);
  --field: rgba(255, 255, 255, 0.05);
  --sand: rgba(255, 255, 255, 0.07);
  --sand-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --grid: rgba(255, 255, 255, 0.025);
  --ink: #eef1ee;
  --ink-2: #c7cfcc;
  --muted: #96a39f;
  --faint: #75827e;
  --navy: #e3eaf4;
  --pill: #eef1ee;
  --on-pill: #14201d;
  --pill-icon: #d4601d;
  --accent-hover: #f08c40;
  --accent-text: #f5a462;
  --overline: #f0a565;
  --focus: #f5a462;
  --focus-ring: rgba(232, 112, 42, 0.32);
  --on-tone: #0c1312;
  --accent-soft: rgba(232, 112, 42, 0.16);
  --ok: #63c99a;
  --ok-soft: rgba(99, 201, 154, 0.13);
  --warn: #f0c062;
  --warn-soft: rgba(240, 192, 98, 0.13);
  --ko: #ff8f84;
  --ko-soft: rgba(255, 143, 132, 0.12);
  --ko-line: rgba(255, 143, 132, 0.35);
  --info: #94b8f2;
  --info-soft: rgba(148, 184, 242, 0.13);
  --bar: #6f9be6;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-other: #7d8784;
  --glow-1: rgba(232, 112, 42, 0.16);
  --glow-2: rgba(61, 140, 239, 0.12);
  --glow-3: rgba(20, 160, 143, 0.1);
  --glow-4: rgba(61, 140, 239, 0.08);
  --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-2: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.25), 0 20px 44px -14px rgba(0, 0, 0, 0.65);
  --shadow-float: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
}

/* Transparence coupée (préférence de l'outil ou du système) : surfaces pleines, aucun flou. */
:root[data-glass='off'] {
  --glass: var(--surface);
  --glass-2: var(--surface);
  --glass-float: var(--surface);
  --glass-bar: var(--paper);
  --field: var(--surface);
  --blur: none;
  --blur-float: none;
}
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-glass='on']) {
    --glass: var(--surface);
    --glass-2: var(--surface);
    --glass-float: var(--surface);
    --glass-bar: var(--paper);
    --field: var(--surface);
    --blur: none;
    --blur-float: none;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Fond : halos et quadrillage sur un calque fixe, peint une fois, jamais repeint au défilement. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 90% 0%, var(--glow-1), transparent 60%),
    radial-gradient(1000px 800px at -6% 4%, var(--glow-2), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, var(--glow-3), transparent 60%),
    radial-gradient(700px 500px at 60% 100%, var(--glow-4), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, auto, auto, 56px 56px, 56px 56px, auto;
  transform: translateZ(0);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
b, strong { font-weight: 600; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--focus-ring); color: var(--ink); }

/* Barres de défilement fines, discrètes sur le verre. */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.small { font-size: 13px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.accent { color: var(--accent-text); }
.nowrap { white-space: nowrap; }
/* Chiffres : dates, effectifs, montants, durées. */
.mono, .date, td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--field);
  font: 500 11px/1 var(--mono); color: var(--ink-2);
}
.overline, .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--overline);
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; height: 34px; width: auto; }
.logo.sm img { height: 26px; }
.logo.lg img { height: 52px; }
.logo .logo-dark { display: none; }
:root[data-theme='dark'] .logo .logo-light { display: none; }
:root[data-theme='dark'] .logo .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo .logo-light { display: none; }
  :root:not([data-theme='light']) .logo .logo-dark { display: block; }
}

/* Tuile d'application : dégradé orange, icône blanche au trait. */
.app-tile {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #fff;
  background: linear-gradient(155deg, #f3a06f, #e8702a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px -4px rgba(232, 112, 42, 0.45);
}
.app-tile svg { width: 17px; height: 17px; stroke-width: 1.9; }
.app-tile.lg { width: 56px; height: 56px; border-radius: 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -8px rgba(232, 112, 42, 0.55); }
.app-tile.lg svg { width: 28px; height: 28px; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns 0.28s var(--ease); }

.sidebar {
  position: sticky; top: 0; height: 100vh; overscroll-behavior: contain;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--glass-2); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-right: 1px solid var(--glass-edge);
}
:root[data-glass='off'] .sidebar { -webkit-backdrop-filter: none; backdrop-filter: none; }
.switcher { padding: 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; color: inherit; transition: background-color 0.16s; }
.brand:hover { background: var(--glass); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.brand-text b { font-size: 14px; font-weight: 700; color: var(--ink); }
.brand-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-name { font-weight: 700; letter-spacing: -0.02em; }
.app-name .one { color: var(--accent); }
.site-foot { width: 100%; max-width: 1360px; margin: auto auto 0; padding: 18px 32px 26px; display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-foot b { color: var(--ink-2); font-weight: 600; }
.login .site-foot { position: absolute; left: 0; right: 0; bottom: 0; border-top: 0; justify-content: center; }
.tenant { font-size: 12px; color: var(--muted); }

.nav { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 18px; padding: 12px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: 6px; color: var(--ink-2); font-size: 14px; font-weight: 400;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav a:hover { background: var(--glass); color: var(--ink); text-decoration: none; }
.nav a svg { color: var(--muted); transition: color 0.18s var(--ease); }
.nav a.active, .nav a.active:hover { color: var(--on-pill); font-weight: 600; background: none; }
.nav a.active svg { color: var(--pill-icon); stroke-width: 1.9; }
.nav .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Page active : pilule d'encre pleine qui glisse d'un lien à l'autre (transform seulement). */
.nav-indicator {
  position: absolute; left: 12px; right: 12px; top: 0; height: 36px; z-index: 0; pointer-events: none;
  border-radius: 6px; background: var(--pill); box-shadow: 0 8px 18px rgba(20, 32, 29, 0.22);
  transition: transform 0.38s var(--ease), height 0.38s var(--ease), opacity 0.2s;
  will-change: transform;
}
.nav-indicator.instant { transition: none; }
.count-badge {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 8px;
  background: var(--accent); color: #fff; font: 600 11px/18px var(--mono); text-align: center;
}
.nav a.active .count-badge { background: var(--accent); }

.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.collapse-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); font-size: 13px; cursor: pointer; transition: background-color 0.16s, color 0.16s;
}
.collapse-btn:hover { background: var(--glass); color: var(--ink); }
.collapse-btn span { white-space: nowrap; }

/* Menu réduit : 64 px, icônes seules (le nom de chaque page reste en info-bulle). */
.app.nav-mini { grid-template-columns: 64px minmax(0, 1fr); }
.app.nav-mini .brand-text, .app.nav-mini .nav .label, .app.nav-mini .collapse-btn span { display: none; }
.app.nav-mini .brand { justify-content: center; padding: 6px 0; }
.app.nav-mini .nav-title { height: 1px; padding: 0; margin: 0 10px 6px; overflow: hidden; color: transparent; background: var(--line); }
.app.nav-mini .nav a { justify-content: center; padding: 0; }
.app.nav-mini .count-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
.app.nav-mini .collapse-btn { justify-content: center; padding: 0; }
.app.nav-mini .collapse-btn svg { transform: scaleX(-1); }

.main { min-width: 0; display: flex; flex-direction: column; }
/* Le flou de la barre est porté par un calque : ses menus (compte, notifications) floutent à leur tour la page. */
.topbar {
  position: sticky; top: 0; z-index: 20; isolation: isolate;
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--glass-bar); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
:root[data-glass='off'] .topbar::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar .menu-btn, .topbar .top-logo { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.crumbs a { color: inherit; }
.crumbs svg { width: 12px; height: 12px; stroke-width: 2; }
.crumbs b { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.updated { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.updated > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.updated time { font-family: var(--mono); }
.live-dot { position: relative; display: block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); }
.live-dot::after { content: ''; position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: live 2.4s var(--ease) infinite; }
.live-dot.off { background: var(--muted); }
.live-dot.off::after { display: none; }
@keyframes live { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* Recherche rapide (palette de commandes) dans la barre du haut. */
.quick-search {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; width: 280px; padding: 0 8px 0 10px; margin-right: 8px;
  border: 1px solid transparent; border-radius: 6px; background: var(--glass); color: var(--faint);
  font-size: 13px; cursor: pointer; transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
.quick-search svg { width: 15px; height: 15px; }
.quick-search:hover { border-color: var(--line-strong); background: var(--field); }
.quick-search .qs-label { flex: 1; text-align: left; }

.icon-btn {
  position: relative; width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s;
}
.icon-btn:hover { background: var(--sand); color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
/* Pastille de la cloche : petite et posée sur le coin du bouton, la cloche reste visible. */
.dot-badge {
  position: absolute; top: -2px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; box-sizing: border-box;
  background: var(--accent); color: #fff; font: 600 9.5px/13px var(--mono); text-align: center; pointer-events: none;
  border: 1.5px solid var(--surface); animation: pop 0.4s var(--spring);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.menu-wrap { position: relative; }
.bell.unread svg { transform-origin: 50% 12%; animation: ring 2.8s ease-in-out infinite; }
@keyframes ring {
  0%, 52%, 100% { transform: rotate(0); }
  4% { transform: rotate(16deg); } 10% { transform: rotate(-14deg); } 16% { transform: rotate(11deg); }
  22% { transform: rotate(-8deg); } 28% { transform: rotate(5deg); } 34% { transform: rotate(-3deg); } 40% { transform: rotate(1deg); }
}
.notif.unread .notif-text b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; vertical-align: 2px; border-radius: 50%; background: var(--accent); }
.notif-head .notif-tools { display: flex; gap: 12px; align-items: center; }
.notif-head .link-btn { padding: 0; border: 0; background: none; color: var(--accent-text); font-size: 13px; font-weight: 500; cursor: pointer; }
.notif-head .link-btn:hover { text-decoration: underline; }
.mobile-search { display: none; }
svg.flip { transform: rotate(180deg); }

/* Avatar de la personne connectée : rond d'encre, initiales ; ouvre le menu du compte. */
.me-btn {
  position: relative; overflow: hidden; width: 34px; height: 34px; margin-left: 4px; border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--pill); color: var(--on-pill); font-size: 12px; font-weight: 600;
  transition: box-shadow 0.18s;
}
.me-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s var(--ease); }
.me-btn.has-photo img { opacity: 1; }
.me-btn.has-photo .initials { visibility: hidden; }
.me-btn:hover, .me-btn[aria-expanded='true'] { box-shadow: 0 0 0 3px var(--focus-ring); }

.setup-banner { width: 100%; max-width: 1360px; margin: 0 auto; padding: 20px 32px 0; }
.net-banner { position: sticky; top: 56px; z-index: 19; display: flex; justify-content: center; gap: 10px; align-items: center; padding: 8px 16px; background: var(--warn-soft); color: var(--ink); font-size: 13px; font-weight: 500; }
.net-banner svg { color: var(--warn); }
#view { width: 100%; max-width: 1360px; margin: 0 auto; padding: 32px 32px 64px; }
#view:focus { outline: none; }
#view > .page > * + * { margin-top: 18px; }
#view > .page > .page-head + * { margin-top: 24px; }

/* Arrivée sur un écran : les blocs montent l'un après l'autre (une fois, pas à l'actualisation). */
.page.enter > :not(.skeleton) { animation: rise 0.5s var(--ease) both; }
.page.enter > :nth-child(2) { animation-delay: 0.04s; }
.page.enter > :nth-child(3) { animation-delay: 0.08s; }
.page.enter > :nth-child(4) { animation-delay: 0.12s; }
.page.enter > :nth-child(5) { animation-delay: 0.16s; }
.page.enter > :nth-child(n + 6) { animation-delay: 0.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--field); color: var(--ink); font-weight: 500; font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s, color 0.18s, box-shadow 0.18s, filter 0.18s;
}
.btn:hover { background: var(--surface); border-color: color-mix(in srgb, var(--ink) 22%, transparent); text-decoration: none; }
.btn.primary {
  background: linear-gradient(180deg, #ef8445, #e2661f); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px -3px rgba(232, 112, 42, 0.5);
}
.btn.primary:hover { background: linear-gradient(180deg, #ec7a38, #d4601d); border-color: transparent; }
.btn.danger { background: var(--surface); border-color: var(--ko-line); color: var(--ko); font-weight: 600; }
.btn.danger:hover { background: var(--ko-soft); border-color: var(--ko); }
.btn.ghost { background: var(--sand); border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.btn.ghost.del { color: var(--ko); }
.btn.ghost.del:hover { background: var(--ko-soft); color: var(--ko); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
/* Appui sur n'importe quel bouton (souris, doigt ou clavier) : il grandit un instant puis revient (app.js). */
@keyframes press { 40% { transform: scale(var(--press, 1.05)); } }
.pressed { animation: press 0.26s var(--spring); }
button, .btn, .seg-tabs, .check, .nav a, .cal-day, kbd { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.refresh.busy svg { animation: spin 0.9s linear infinite; }

.act {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--field); color: var(--ink-2); cursor: pointer;
  transition: background-color 0.16s, color 0.16s, border-color 0.16s;
}
.act:hover { background: var(--surface); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.act.del:hover { background: var(--ko-soft); color: var(--ko); border-color: var(--ko-line); }
.act svg { width: 16px; height: 16px; }

/* ---------- En-tête de page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap; }
.page-title { min-width: 0; max-width: 760px; }
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.page-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-title .eyebrow { margin-bottom: 8px; }
.eyebrow svg { width: 14px; height: 14px; }

.search {
  display: flex; align-items: center; gap: 8px; height: 36px; min-width: 280px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); color: var(--faint);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; color: var(--ink); }

.pill-select {
  height: 30px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9592' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 14px;
  appearance: none; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.pill-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.pill-select option { background: var(--surface); color: var(--ink); }

/* Contrôle segmenté : rail teinté, choix actif en blanc. */
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 8px; background: var(--sand); }
.seg-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 28px; border: 0; background: none; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s, box-shadow 0.2s; }
.seg-tabs button:hover { color: var(--ink); }
.seg-tabs button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 32, 29, 0.12); }
.seg-tabs .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 8px; background: var(--sand); font: 500 11px/18px var(--mono); text-align: center; }
.seg-tabs button.on .n { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Panneaux (verre) ---------- */
.panel {
  position: relative; min-width: 0;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-hi);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 22px 14px; }
.panel-head:has(.panel-sub) { align-items: flex-start; }
.panel-head:has(.panel-sub) .panel-tools { min-height: 32px; }
.panel-head h2 { font-size: 15px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.panel-sub { margin-top: 0; font-size: 13px; color: var(--muted); max-width: 720px; }
.panel-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 0 22px 20px; }
.panel-more { padding: 10px 22px 16px; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.grid-2 > .panel, .grid-2 > div > .panel, .grid-3 > .panel { height: 100%; }
.prose p + p { margin-top: 10px; }
.prose p { color: var(--ink-2); }
.foot-note { margin-top: 14px; }
.fix { margin-top: 4px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th {
  height: 36px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap;
  padding: 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--glass-2);
}
table.t th.sortable { cursor: pointer; user-select: none; transition: color 0.15s; }
table.t th.sortable:hover { color: var(--ink); }
table.t th.sortable:hover .sort-ico, table.t th.sortable:focus-visible .sort-ico { opacity: 0.45; }
table.t th .sort-ico { display: inline-block; width: 12px; margin-left: 4px; opacity: 0; transition: transform 0.2s var(--ease), opacity 0.15s; }
table.t th.sorted { color: var(--ink); }
table.t th.sorted .sort-ico { opacity: 1; color: var(--accent-text); }
table.t th.sorted.desc .sort-ico { transform: rotate(180deg); }
table.t td { height: 44px; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background-color 0.15s; }
table.t th:first-child, table.t td:first-child { padding-left: 22px; }
table.t th:last-child, table.t td:last-child { padding-right: 22px; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: var(--sand-2); }
table.t td.num, table.t th.num { text-align: right; }
table.t td.num b { font-weight: 500; }
table.t td.actions { text-align: right; white-space: nowrap; }
table.t td.actions > * + * { margin-left: 6px; }
:root[data-density='compact'] table.t td { padding-top: 7px; padding-bottom: 7px; }
:root[data-density='compact'] table.t th { padding-top: 7px; padding-bottom: 7px; }
:root[data-density='compact'] .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 34px 22px; color: var(--muted); text-align: center; }
.empty > svg { width: 44px; height: 44px; padding: 11px; border-radius: 10px; background: var(--sand); color: var(--muted); }
.empty.ok > svg { background: var(--ok-soft); color: var(--ok); }

/* ---------- Personnes, licences, étiquettes ---------- */
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-text { min-width: 0; line-height: 1.3; }
.who b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.who small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
button.who-link { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
button.who-link:hover b { color: var(--accent-text); }

.avatar {
  position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(135deg, color-mix(in srgb, var(--av, #5d6b80) 26%, transparent), color-mix(in srgb, var(--av, #5d6b80) 12%, transparent));
  color: color-mix(in srgb, var(--av, #5d6b80) 70%, var(--ink));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av, #5d6b80) 20%, transparent);
}
.avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.avatar.xl { width: 120px; height: 120px; font-size: 34px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av, #5d6b80) 20%, transparent), 0 6px 18px rgba(20, 32, 29, 0.14); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s var(--ease); }
.avatar.has-photo img { opacity: 1; }
.avatar.has-photo .initials { visibility: hidden; }

.sku-chip { width: 36px; height: 36px; flex: none; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sku-chip svg { width: 18px; height: 18px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 8px;
  font-size: 12px; font-weight: 500; background: var(--sand); color: var(--ink-2); white-space: nowrap;
}
.tag.solid { background: var(--pill); color: var(--on-pill); }
.tag svg { width: 13px; height: 13px; stroke-width: 2; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn, .tag.important { background: var(--warn-soft); color: var(--warn); }
.tag.ko, .tag.critique { background: var(--ko-soft); color: var(--ko); }
.tag.info, .tag.type.in { background: var(--info-soft); color: var(--info); }
.tag.type.out { background: var(--accent-soft); color: var(--accent-text); }
.tag.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.lics { display: flex; flex-wrap: wrap; gap: 5px; }
.lic { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: var(--info-soft); color: var(--info); font-size: 12px; font-weight: 500; }
.lic.free { background: var(--sand); color: var(--muted); }

.meter { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.meter-track { flex: 1; height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--bar) 75%, transparent), var(--bar)); transform-origin: left center; }
.meter-fill.over { background: var(--ko); }
.meter-txt { font-size: 12px; font-weight: 500; color: var(--ink-2); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.page.enter .meter-fill { animation: bar-grow 0.9s var(--ease) 0.15s both; }

.anom-cell { display: grid; justify-items: start; gap: 4px; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); background: var(--info-soft); color: var(--ink); font-size: 14px; border: 1px solid color-mix(in srgb, var(--info) 14%, transparent); }
.banner svg { color: var(--info); margin-top: 2px; }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 18%, transparent); }
.banner.warn svg { color: var(--warn); }
.banner.ko { background: var(--ko-soft); border-color: color-mix(in srgb, var(--ko) 18%, transparent); }
.banner.ko svg { color: var(--ko); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 18%, transparent); }
.banner.ok svg { color: var(--ok); }
.banner .grow { flex: 1; min-width: 0; }
.banner .btn { margin-left: auto; flex: none; }
.banner > div:has(> .grow) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: 1; min-width: 0; }

/* ---------- Accueil du tableau de bord ---------- */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.greet h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; color: var(--navy); }
.greet h1 .end, .login-card h1 .end { color: var(--accent); }
.greet h1 .wave { display: inline-block; transform-origin: 70% 80%; }
.greet .page-sub b { color: var(--ink); font-weight: 600; }

/* ---------- Tableau de bord : bandeau bleu nuit ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 36px;
  --on-navy: var(--ink); --on-navy-muted: var(--muted); --navy-line: var(--line); --accent-on-navy: var(--accent-text);
  padding: 26px 28px; border-radius: var(--radius); color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-hi);
}
.hero-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: start; }
.hero-main > :not(.ring) { grid-column: 1; }
.hero-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; font-weight: 500; }
.hero-big { font-size: 52px; line-height: 1; font-weight: 500; letter-spacing: -0.04em; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--navy); }
.hero-line { margin-top: 12px; color: var(--ink-2); font-size: 14px; max-width: 560px; }
.hero-note { margin-top: 14px; color: var(--on-navy-muted); font-size: 12.5px; }
.seat-wrap { margin-top: 22px; grid-column: 1 / -1 !important; }
.seatbar { display: flex; gap: 3px; height: 12px; }
.seatbar .seat { min-width: 6px; border-radius: 4px; transform-origin: left center; }
.page.enter .seatbar .seat { animation: bar-grow 0.9s var(--ease) both; }
.page.enter .seatbar .seat:nth-child(2) { animation-delay: 0.12s; }
.page.enter .seatbar .seat:nth-child(3) { animation-delay: 0.24s; }
.seat.used { background: var(--seat-used); }
.seat.free { background: var(--seat-free); }
.seat.idle { background: var(--seat-idle); }
.seat-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, max-content)); gap: 8px 24px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--on-navy-muted); font-size: 13px; }
.seat-legend li { display: flex; align-items: center; gap: 8px; }
.seat-legend i { width: 12px; height: 12px; border-radius: 3px; }
.seat-legend b { color: var(--ink); font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hero-side { margin: 0; display: grid; align-content: center; gap: 20px; padding-left: 32px; border-left: 1px solid var(--navy-line); }
.hero-stat dt { color: var(--muted); font-size: 13px; font-weight: 400; }
.hero-stat dd { margin: 2px 0 0; display: grid; }
.hero-num { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--on-navy); }
.hero-stat small { color: var(--on-navy-muted); font-size: 12.5px; }
.hero-stat.alert .hero-num { color: var(--accent-on-navy); }

/* Anneau de taux d'utilisation. */
.ring { position: relative; width: 112px; height: 112px; grid-column: 2; grid-row: 1 / span 2; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .ring-track { stroke: var(--sand); }
.ring .ring-val { stroke: var(--seat-used); transition: stroke-dashoffset 1.2s var(--ease); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-label b { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ring-label small { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* ---------- Priorités et activité ---------- */
.todo-list { list-style: none; margin: 0; padding: 0 10px 12px; display: grid; gap: 2px; }
.todo-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; transition: background-color 0.16s, transform 0.2s var(--ease); }
.todo-item:hover { background: var(--sand-2); }
.todo-item:hover .todo-go { transform: translateX(3px); color: var(--accent-text); }
.todo-go { margin-left: auto; color: var(--muted); transition: transform 0.2s var(--ease), color 0.16s; }
.feed { list-style: none; margin: 0; padding: 0 22px 18px; display: grid; }
.feed li { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; }
.feed li::before { content: ''; position: absolute; left: 6px; top: 26px; bottom: -9px; width: 2px; border-radius: 2px; background: var(--line); }
.feed li:last-child::before { display: none; }
.feed .dotm { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 3px solid var(--ok); background: var(--surface); }
.feed .dotm.ko { border-color: var(--ko); }
.feed .dotm.warn { border-color: var(--warn); }
.feed b { font-size: 13px; }
.feed .feed-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Stock ---------- */
.stock { list-style: none; margin: 0; padding: 0 22px 18px; display: grid; gap: 18px; }
.stock-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 7px; }
.stock-top b { font-size: 14px; }
.stock-sub { margin-top: 5px; }

/* ---------- Qui a quelle licence ---------- */
.holder { scroll-margin-top: 84px; }
.holder-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.holder-head .who b { font-size: 16px; max-width: 420px; }
.holder-figures { display: flex; gap: 28px; flex-wrap: wrap; }
.holder-figures > div { display: grid; line-height: 1.25; }
.holder-figures b { font-size: 17px; font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.holder-figures b.fig { font-size: 26px; letter-spacing: -0.02em; }
.holder-figures span { font-size: 12.5px; color: var(--muted); }
.holder-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 18px 22px 20px; }
.holder-body h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.holder-body h3 svg { color: var(--muted); width: 16px; height: 16px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 34px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bars li.none .bar-label { color: var(--muted); font-weight: 500; }
.bar-track { height: 10px; border-radius: 5px; background: var(--sand); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--bar); transform-origin: left center; }
.page.enter .bar-fill { animation: bar-grow 0.8s var(--ease) 0.2s both; }
.bars li.none .bar-fill { background: var(--line-strong); }
.bar-val { text-align: right; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.holder-list { border-top: 1px solid var(--line); }
.holder-list summary { display: flex; align-items: center; gap: 8px; padding: 14px 22px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-text); list-style: none; }
.holder-list summary::-webkit-details-marker { display: none; }
.holder-list summary .chev, details .chev { transition: transform 0.25s var(--ease); }
.holder-list[open] summary .chev { transform: rotate(90deg); }
.holder-list[open] summary { border-bottom: 1px solid var(--line); }
.holder-list table.t th { border-top: 0; }
details[open] > :not(summary) { animation: fade-in 0.25s var(--ease); }

/* ---------- Analyse et budget ---------- */
.figures { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); overflow: hidden; }
.figure-hero { position: relative; display: grid; align-content: center; gap: 4px; padding: 26px 28px; border-right: 1px solid var(--line); background: radial-gradient(90% 120% at 0% 0%, var(--ok-soft), transparent 70%); }
.figure-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.figure-big { font-size: 40px; line-height: 1.05; font-weight: 500; letter-spacing: -0.04em; color: var(--ok); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.figure-sub { font-size: 13px; color: var(--muted); }
.figure-list { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figure { display: grid; align-content: start; gap: 6px; padding: 26px 24px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; }
.figure dt { font-size: 13px; font-weight: 400; color: var(--muted); }
.figure dd { margin: 0; display: grid; gap: 2px; }
.figure-num { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.figure dd small { font-size: 12.5px; color: var(--muted); }

.chart { position: relative; }
.cost-chart { min-height: 240px; }
.cost-chart svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.cost { stroke: var(--c-cost); }
.chart .line.save { stroke: var(--c-save); }
.chart .line.forecast { stroke-dasharray: 6 5; }
.chart .band-save { fill: var(--c-save); opacity: 0.12; }
.chart .today { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .today-label { fill: var(--ink-2); font-weight: 600; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.cost { fill: var(--c-cost); }
.chart .dot.save { fill: var(--c-save); }
.chart .dot.missing { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.seats-chart svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.chart .bar.seats { fill: var(--c-cost); opacity: 0.78; }
.chart .bar-value { fill: var(--ink); font-size: 11.5px; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.key.missing { width: 10px; height: 10px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.key.seats { width: 12px; height: 12px; border: 0; border-radius: 3px; background: var(--c-cost); opacity: 0.78; }

/* Licences par société : camembert, légende cliquable et détail à côté. */
.sw.s1 { --sw: var(--series-1); }
.sw.s2 { --sw: var(--series-2); }
.sw.s3 { --sw: var(--series-3); }
.sw.s4 { --sw: var(--series-4); }
.sw.s5 { --sw: var(--series-5); }
.sw.s6 { --sw: var(--series-6); }
.sw.s-other { --sw: var(--series-other); }
.key.sw { width: 12px; height: 12px; border: 0; border-radius: 3px; background: var(--sw); }
.society { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
.society-chart { display: grid; justify-items: center; gap: 14px; min-width: 0; }
.donut { width: 228px; }
.donut svg { display: block; overflow: visible; }
.donut .slice { fill: var(--sw); stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; cursor: pointer; transition: transform 0.25s var(--ease), opacity 0.2s; }
.donut .slice:hover { opacity: 0.88; }
.donut .slice:focus-visible { outline: none; stroke: var(--ink); stroke-width: 2.5; }
.donut .center-num { fill: var(--ink); font-size: 30px; font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.donut .center-sub { fill: var(--muted); font-size: 12px; font-weight: 600; }
.society-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2px; }
.society-legend button {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; width: 100%;
  padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.society-legend button:hover { background: var(--sand-2); }
.society-legend button[aria-pressed='true'] { background: var(--sand-2); border-color: var(--line-strong); font-weight: 600; }
.society-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.society-n { font-weight: 600; }
.society-pct { color: var(--muted); text-align: right; }
.society-detail { display: grid; gap: 8px; min-width: 0; align-content: start; }
.society-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.society-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); overflow-wrap: anywhere; }
.society-skus { display: grid; gap: 8px; margin-top: 6px; }
.society-sku { border: 1px solid var(--line); border-radius: 6px; background: var(--sand-2); }
.society-sku > summary { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.society-sku > summary::-webkit-details-marker { display: none; }
.society-sku > summary .chev { width: 16px; height: 16px; color: var(--muted); }
.society-sku[open] > summary .chev { transform: rotate(90deg); }
.society-sku-name { display: grid; gap: 1px; min-width: 0; }
.society-sku-name b { font-size: 13.5px; overflow-wrap: anywhere; }
.society-sku-name small { font-size: 12px; }
.society-sku-count { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.society-people { list-style: none; margin: 0; padding: 4px 12px 10px 38px; display: grid; gap: 6px; }
.society-people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.society-people .who-link { min-width: 0; }
@media (max-width: 900px) { .society { grid-template-columns: minmax(0, 1fr); } }
.chart .crosshair { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .end-label { fill: var(--ink); font-size: 13px; font-family: var(--font); }
.chart .end-label .v { font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart-tip {
  position: absolute; z-index: 5; min-width: 180px; max-width: 280px; padding: 10px 12px; pointer-events: none;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); border-radius: 6px; box-shadow: var(--shadow-float); font-size: 13px;
  transition: left 0.12s var(--ease), top 0.12s var(--ease);
}
.chart-tip > b { display: block; margin-bottom: 6px; text-transform: none; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row strong { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tip-row span { color: var(--muted); }
.tip-note { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.panel > .chart-legend { padding: 0 22px 12px; }
.chart-legend li { display: flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 18px; height: 0; border-top: 2px solid; flex: none; }
.key.cost { border-color: var(--c-cost); }
.key.save { border-color: var(--c-save); }
.key.dashed { border-top-style: dashed; }
.key.box { width: 12px; height: 12px; border: 0; border-radius: 3px; }
.key.used { background: var(--seat-used); border-color: var(--seat-used); }
.key.free { background: var(--seat-free); border-color: var(--seat-free); }
.key.idle { background: var(--seat-idle); border-color: var(--seat-idle); }
.key.single { background: var(--bar); }
.panel-note { padding: 0 22px 16px; font-size: 12.5px; color: var(--muted); max-width: 900px; }
details.numbers { border-top: 1px solid var(--line); }
details.numbers > summary, .proposal-items > summary { display: flex; align-items: center; gap: 8px; padding: 14px 22px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-text); list-style: none; }
details.numbers > summary::-webkit-details-marker, .proposal-items > summary::-webkit-details-marker { display: none; }
details.numbers[open] .chev, .proposal-items[open] .chev { transform: rotate(90deg); }
/* Factures des 12 derniers mois : numéro (avoir signalé en texte), ligne de total. */
.invoice-id { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.invoice-id small { flex-basis: 100%; font-size: 12px; }
.invoice-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; white-space: nowrap; }
.invoice-link svg { width: 13px; height: 13px; flex: none; }
/* Le tableau tient dans sa carte sans défiler : Date et TVA (le mois, la période, HT et TTC restent)
   et la colonne « Consulter » (le numéro reste le lien vers le PDF) cèdent la place sous 1400 px ;
   l'échéance aussi quand la carte est étroite (menu latéral affiché, ou tablette). Sur papier, tout. */
@media (max-width: 1400px) { .invoices .inv-wide { display: none; } }
@media (min-width: 641px) and (max-width: 900px), (min-width: 1025px) and (max-width: 1180px) { .invoices .inv-mid { display: none; } }
@media print { .invoices th.inv-wide:not(.actions), .invoices td.inv-wide:not(.actions), .invoices .inv-mid { display: table-cell; } }
.invoice-note { padding-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 641px) { .invoices table.t th:not(:first-child):not(:last-child), .invoices table.t td:not(:first-child):not(:last-child) { padding-left: 9px; padding-right: 9px; } }
table.t tfoot td { height: 44px; padding: 10px 14px; border-top: 1px solid var(--line-strong); background: var(--glass-2); font-weight: 500; }
table.t tfoot td b { font-weight: 600; }

.hbar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hbar-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; font-size: 13px; }
.hbar-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.hbar-track { grid-column: 1 / -1; display: block; min-width: 0; }
.hbar-fill { display: flex; gap: 2px; height: 16px; min-width: 6px; }
.hbar-fill .seg { min-width: 3px; border-radius: 3px; outline-offset: 1px; transition: filter 0.15s; }
.hbar-fill .seg:hover { filter: brightness(1.12) saturate(1.1); }
.hbar-fill .seg:last-child { border-radius: 3px 5px 5px 3px; }

/* Apparition des graphiques, à la première ouverture de l'écran seulement (pas à l'actualisation) :
   les courbes se dessinent de gauche à droite, les barres poussent l'une après l'autre. */
.chart.reveal .plot { animation: chart-reveal 1.3s var(--ease) 0.1s both; }
.hbars.reveal .hbar-fill { transform-origin: left center; animation: bar-grow 0.75s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 0.1s); }
.hbars.reveal .hbar-value { animation: fade-in 0.4s ease-out both; animation-delay: calc(var(--i, 0) * 70ms + 0.5s); }
@keyframes chart-reveal { from { clip-path: inset(-20px 100% -20px -20px); } to { clip-path: inset(-20px -200px -20px -20px); } }
@keyframes bar-grow { from { transform: scaleX(0); } }
.seg.used { background: var(--seat-used); }
.seg.free { background: var(--seat-free); }
.seg.idle { background: var(--seat-idle); }
.seg.single { background: var(--bar); }
.hbar-value { text-align: right; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

.proposals { list-style: none; margin: 0; padding: 0; }
.proposals > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 16px 22px; border-top: 1px solid var(--line); transition: background-color 0.16s; }
.proposals > li:hover { background: var(--sand-2); }
.proposal-main { display: grid; gap: 4px; min-width: 0; }
.proposal-main > b { font-size: 14px; }
.proposal-side { display: grid; justify-items: end; align-content: start; gap: 4px; text-align: right; }
.proposal-amount { font-size: 17px; font-weight: 600; color: var(--ok); white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.proposal-side .btn { margin-top: 6px; }
.proposal-items > summary { padding: 4px 0; font-size: 13px; }
.proposal-items ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.proposal-items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--sand-2); }
.budget { display: grid; gap: 12px; }
.budget-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.budget .meter-track { height: 12px; border-radius: 6px; }
.meter-fill.warn { background: var(--warn); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.grid-2.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

/* ---------- Rôles ---------- */
.count-pill { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 8px; margin-left: 4px; border-radius: 8px; background: var(--sand); font-size: 12.5px; font-weight: 600; vertical-align: 2px; }
.role-list { list-style: none; margin: 0; padding: 0; }
.role-list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); animation: fade-in 0.25s var(--ease); }
.role-list > li.removing .who { opacity: 0.55; }
.role-list > li.removing .who b { text-decoration: line-through; }
.role-list > li.adding { background: var(--ok-soft); }
.role-list > li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.role-list > li.empty-row { justify-content: flex-start; }
.role-row-side { display: flex; align-items: center; gap: 8px; flex: none; }
.form-grid.one { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.pending-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 18px 22px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); animation: rise 0.35s var(--ease); }
.pending-text { display: grid; gap: 6px; min-width: 0; max-width: 760px; }
.pending-text ul { margin: 0; padding-left: 18px; }
.pending-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Utilisateurs : groupes repliables ---------- */
.toolbar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-group > summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 18px 22px; cursor: pointer; list-style: none; border-radius: var(--radius);
}
.user-group > summary::-webkit-details-marker { display: none; }
.user-group > summary:hover h2 { color: var(--accent-text); }
.user-group > summary h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; transition: color 0.15s; }
.user-group > summary .chev { width: 26px; height: 26px; padding: 4px; border-radius: 8px; background: var(--sand); color: var(--ink-2); }
.user-group[open] > summary .chev { transform: rotate(90deg); }
.user-group > summary .count {
  min-width: 26px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--sand);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.user-group > summary .group-help { flex-basis: 100%; padding-left: 36px; font-size: 13px; color: var(--muted); }
.user-group[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- Formulaires ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.form-panel { padding: 26px 28px; }
.form-section { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.form-section + .form-section { padding-top: 22px; border-top: 1px solid var(--line); }
.form-section legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.form-section > .form-grid { clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--accent-text); }
.field input, .field select, .field textarea, .upn-row input, .upn-row select {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--field); color: var(--ink); font-size: 14px; font-weight: 400;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
.field select option, .upn-row select option { background: var(--surface); color: var(--ink); }
.field textarea { height: auto; padding: 8px 12px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 26%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus, .upn-row input:focus, .upn-row select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); background: var(--surface);
}
.field input[disabled], .upn-row select[disabled], .upn-row input[disabled] { background: var(--sand-2); color: var(--muted); }
.help { font-size: 12.5px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 6px; }
.form-actions .draft-note { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form-actions .draft-note svg { width: 15px; height: 15px; color: var(--ok); }
.upn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.upn-row .at { color: var(--muted); font-weight: 600; }

.next-steps { padding: 24px; position: sticky; top: 90px; }
.next-steps h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.next-steps ol { list-style: none; counter-reset: step; margin: 0 0 16px; padding: 0; display: grid; gap: 16px; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.next-steps li::before {
  content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 500 13px/1 var(--mono);
}
.next-steps li b { font-size: 14px; }
.next-steps li span { font-size: 13px; color: var(--muted); }

.checks { display: grid; gap: 8px; }
.check {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--field); cursor: pointer; transition: border-color 0.16s, background-color 0.16s, box-shadow 0.16s;
}
.check:hover { border-color: var(--line-strong); }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.check input, .check-input {
  -webkit-appearance: none; appearance: none; position: relative; display: grid; place-items: center;
  width: 18px; min-width: 18px; max-width: 18px; height: 18px; flex: none; margin: 0; padding: 0; border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 5px; box-shadow: none;
  background: var(--surface); cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.check input[type='radio'] { border-radius: 50%; }
.check input:hover { border-color: var(--accent); }
.check input:checked { border-color: var(--accent); background: var(--accent); }
.check input[type='checkbox']:checked::after { content: ''; width: 10px; height: 5px; margin-top: -3px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.check input[type='radio']:checked { background: var(--surface); }
.check input[type='radio']:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.check input:focus { outline: none; }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: inherit; }
.check input[type='radio']:focus-visible { border-radius: 50%; }
.check.confirm input:checked { border-color: var(--ko); background: var(--ko); }
.check input:disabled { cursor: not-allowed; }
.check ::selection, .seg-tabs ::selection { background: transparent; }
.check .grow { flex: 1; min-width: 0; }
.check.disabled { opacity: 0.55; cursor: not-allowed; }
.check.confirm { margin-top: 14px; border-color: var(--ko); }
.check.confirm:has(input:checked) { background: var(--ko-soft); border-color: var(--ko); box-shadow: none; }

.picker { position: relative; }
.picker-field { position: relative; display: flex; align-items: center; }
.picker-field svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.picker-field input {
  width: 100%; height: 36px; padding: 0 12px 0 38px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--field); color: var(--ink); font-size: 14px; transition: border-color 0.18s, box-shadow 0.18s;
}
.picker-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; max-height: 320px; overflow-y: auto;
  padding: 6px; background: var(--glass-float); -webkit-backdrop-filter: var(--blur-float); backdrop-filter: var(--blur-float);
  border: 1px solid var(--glass-edge); border-radius: 10px; box-shadow: var(--shadow-float);
  animation: drop 0.2s var(--ease); transform-origin: top center;
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.picker-list button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.picker-list button:hover, .picker-list button.focus { background: var(--sand); }
.picker-list .empty { padding: 16px; font-size: 13px; }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 10px; background: var(--accent-soft); animation: fade-in 0.25s var(--ease); }
.person-card { padding: 16px; border-radius: 10px; background: var(--sand-2); border: 1px solid var(--line); }

/* ---------- Demande (fenêtre) ---------- */
.request > * + * { margin-top: 18px; }
.request-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.request-top .who b { font-size: 17px; }
.section-title { font-size: 14px; font-weight: 600; margin: 20px 0 10px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 24px; margin: 0; }
.kv dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kv dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; }
.steps li.ok svg { color: var(--ok); }
.steps li.ko svg { color: var(--ko); }
.steps li.warn svg { color: var(--warn); }

/* Étapes d'une demande : pastilles reliées, l'étape en cours pulse doucement. */
.stepper { list-style: none; margin: 0; padding: 4px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.stepper li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ''; position: absolute; top: 13px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; border-radius: 2px; background: var(--line-strong); }
.stepper li:first-child::before { display: none; }
.stepper .st-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--muted); border: 2px solid transparent; }
.stepper .st-dot svg { width: 15px; height: 15px; stroke-width: 2.6; }
.stepper li.done { color: var(--ink-2); }
.stepper li.done::before, .stepper li.current::before { background: var(--ok); }
.stepper li.done .st-dot { background: var(--ok); color: var(--on-tone); }
.stepper li.current { color: var(--ink); }
.stepper li.current .st-dot { background: var(--surface); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper li.failed .st-dot { background: var(--ko); color: var(--on-tone); }
.stepper li.failed { color: var(--ko); }
.stepper li.stopped .st-dot { background: var(--sand); color: var(--muted); }

/* Historique d'une demande (frise verticale). */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.timeline li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .tl-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); }
.timeline .tl-ico svg { width: 14px; height: 14px; stroke-width: 2.2; }
.timeline li.ok .tl-ico { background: var(--ok-soft); color: var(--ok); }
.timeline li.ko .tl-ico { background: var(--ko-soft); color: var(--ko); }
.timeline li.accent .tl-ico { background: var(--accent-soft); color: var(--accent-text); }
.timeline .tl-text { display: grid; padding-top: 3px; }
.timeline .tl-text b { font-size: 13px; }
.timeline .tl-text span { font-size: 12.5px; color: var(--muted); }

/* Échanges RH / administrateur. */
.thread { display: grid; gap: 10px; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; animation: rise 0.3s var(--ease); }
.msg .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.msg-bubble { padding: 10px 14px; border-radius: 4px 10px 10px 10px; background: var(--sand-2); border: 1px solid var(--line); }
.msg.mine { grid-template-columns: minmax(0, 1fr) 32px; }
.msg.mine .avatar { order: 2; }
.msg.mine .msg-bubble { border-radius: 10px 4px 10px 10px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.msg-head b { color: var(--ink); font-size: 13px; }
.msg-text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.composer textarea { width: 100%; min-height: 40px; max-height: 160px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink); resize: none; line-height: 1.45; transition: border-color 0.18s, box-shadow 0.18s; }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }

.seats-box, .teams-box { padding: 18px 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--sand-2); }
.seats-box.todo { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.seats-box > * + *, .teams-box > * + * { margin-top: 12px; }
.seats-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seats-head h4, .teams-box h4 { font-size: 15px; font-weight: 600; }
.seats-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.seats-items li { display: flex; justify-content: space-between; gap: 12px; }
.howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
.seats-actions, .teams-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Fenêtres flottantes : notifications, préférences ---------- */
.notif-panel, .pop {
  position: absolute; right: -8px; top: calc(100% + 10px); z-index: 40; width: 400px; max-width: calc(100vw - 24px);
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur-float); backdrop-filter: var(--blur-float);
  border: 1px solid var(--glass-edge); border-radius: 10px; box-shadow: var(--shadow-float); overflow: hidden;
  transform-origin: top right; animation: pop-in 0.22s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.notif-head h2 { font-size: 15px; font-weight: 600; }
.notif-list { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.notif { display: flex; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; align-items: flex-start; transition: background-color 0.15s; }
.notif:hover { background: var(--sand); }
.notif-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.notif.ko .notif-icon { background: var(--ko-soft); color: var(--ko); }
.notif.money .notif-icon { background: var(--accent-soft); color: var(--accent-text); }
.notif.ok .notif-icon { background: var(--ok-soft); color: var(--ok); }
.notif.msg .notif-icon { background: var(--accent-soft); color: var(--accent-text); }
.notif-text { min-width: 0; display: grid; line-height: 1.35; }
.notif-text b { font-size: 13px; }
.notif-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-empty { display: grid; justify-items: center; gap: 8px; padding: 30px 20px; color: var(--muted); }
.notif-empty svg { color: var(--ok); width: 24px; height: 24px; }

/* Menu du compte : identité, réglages en lignes compactes, raccourcis et déconnexion. */
.pop.account { right: 0; top: calc(100% + 10px); width: 300px; z-index: 70; }
.acct-head { display: grid; gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--line); line-height: 1.35; }
.acct-head b { font-size: 14px; font-weight: 600; }
.acct-head small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head .acct-role { margin-top: 4px; justify-self: start; padding: 0 8px; line-height: 20px; border-radius: 8px; background: var(--sand); color: var(--ink-2); }
.acct-rows { display: grid; gap: 2px; padding: 6px; }
.acct-rows + .acct-rows { border-top: 1px solid var(--line); }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 0 4px 0 10px; font-size: 13px; }
.acct-row .seg-tabs { flex-wrap: nowrap; padding: 2px; border-radius: 6px; }
.acct-row .seg-tabs button { height: 22px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.acct-row .seg-tabs button.on { background: var(--field); }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.acct-item:hover { background: var(--sand); text-decoration: none; }
.acct-item svg { width: 15px; height: 15px; color: var(--muted); }

/* ---------- Messages éphémères ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; width: min(420px, calc(100vw - 40px)); pointer-events: none; }
.toast {
  position: relative; overflow: hidden; pointer-events: auto;
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 16px 16px; border-radius: 10px;
  background: rgba(20, 32, 29, 0.9); -webkit-backdrop-filter: var(--blur-float); backdrop-filter: var(--blur-float);
  color: #fff; box-shadow: var(--shadow-float); font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.1);
  animation: toast-in 0.45s var(--spring);
}
:root[data-glass='off'] .toast { background: #14201d; }
.toast svg { color: #f59c36; margin-top: 1px; }
.toast.ok svg { color: #63c99a; }
.toast.ko { background: rgba(143, 29, 20, 0.9); }
.toast.ko svg { color: #fff; }
.toast .toast-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.toast .toast-x:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.toast .toast-x svg { margin: 0; color: inherit; width: 15px; height: 15px; }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.35); transform-origin: left center; animation: toast-bar linear both; animation-duration: var(--t, 5s); }
.toast:hover .toast-bar { animation-play-state: paused; }
.toast.out { animation: toast-out 0.28s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(28px) scale(0.96); } }
@keyframes toast-bar { to { transform: scaleX(0); } }

/* ---------- Fenêtre modale ---------- */
dialog.modal {
  width: min(640px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--glass-edge); border-radius: 10px;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--ink); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-float);
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in 0.32s var(--ease); }
dialog.modal.wide { width: min(880px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(12, 19, 18, 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in 0.3s var(--ease); }
:root[data-glass='off'] dialog.modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
dialog.modal.closing { animation: modal-out 0.18s var(--ease) both; }
dialog.modal.closing::backdrop { animation: fade-out 0.18s var(--ease) both; }
dialog.modal.swap .modal-body, dialog.modal.swap .modal-head { animation: fade-in 0.25s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade-out { to { opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.modal-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.modal-body { padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body > * + * { margin-top: 14px; }
.modal-body p + p, .modal-body p + .banner, .modal-body .banner + p { margin-top: 10px; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--sand-2); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Fiche d'une personne (volet latéral) ---------- */
dialog.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; height: 100vh; max-height: 100vh; width: min(520px, 100vw); max-width: 100vw;
  padding: 0; border: 0; border-left: 1px solid var(--glass-edge); border-radius: var(--radius) 0 0 var(--radius);
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--ink); box-shadow: var(--shadow-float);
}
dialog.drawer[open] { display: flex; flex-direction: column; animation: drawer-in 0.4s var(--ease); }
dialog.drawer::backdrop { background: rgba(12, 19, 18, 0.32); animation: fade-in 0.3s var(--ease); }
dialog.drawer.closing { animation: drawer-out 0.22s var(--ease) both; }
dialog.drawer.closing::backdrop { animation: fade-out 0.22s var(--ease) both; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes drawer-out { to { transform: translateX(40px); opacity: 0; } }
.drawer-head { position: relative; display: grid; justify-items: center; gap: 10px; padding: 30px 24px 22px; text-align: center; border-bottom: 1px solid var(--line); background: radial-gradient(80% 100% at 50% 0%, var(--accent-soft), transparent 75%); }
.drawer-head .icon-btn { position: absolute; top: 14px; right: 14px; }
.drawer-head > div { min-width: 0; max-width: 100%; }
.drawer-head h3 { overflow-wrap: anywhere; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.drawer-head .sub { font-size: 13px; color: var(--muted); }
.drawer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.drawer-body { flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
/* Une adresse ou un nom trop long passe à la ligne au lieu d'élargir la fiche. */
.drawer-section, .drawer-section .lic-rows li > * { min-width: 0; }
.drawer-section .lic-rows b, .drawer-section .lic-rows .small { overflow-wrap: anywhere; }
.drawer-section .lic-rows li > b:last-child { text-align: right; }
.mini-stat b { overflow-wrap: anywhere; }
.drawer-section > p + .people-chips { margin-top: 8px; }
.drawer-section .people-chips + p { margin-top: 14px; }
.drawer-section h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.drawer-section h4 svg { width: 15px; height: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-stat { padding: 12px 14px; border-radius: 10px; background: var(--sand-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.mini-stat b { font-size: 17px; font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mini-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.lic-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lic-rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; background: var(--sand-2); font-size: 13px; }
.people-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.person-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.person-chip .avatar { width: 36px; height: 36px; font-size: 12.5px; }

/* ---------- Palette de commandes (Ctrl K) ---------- */
dialog.palette {
  top: 12vh; margin: 0 auto; width: min(640px, calc(100vw - 24px)); max-height: 70vh; padding: 0;
  border: 1px solid var(--glass-edge); border-radius: 10px; overflow: hidden;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--ink); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-float);
}
dialog.palette[open] { display: flex; flex-direction: column; animation: palette-in 0.24s var(--ease); }
dialog.palette::backdrop { background: rgba(12, 19, 18, 0.36); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in 0.2s; }
:root[data-glass='off'] dialog.palette::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
dialog.palette.closing { animation: modal-out 0.14s var(--ease) both; }
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pal-input svg { width: 20px; height: 20px; color: var(--muted); }
.pal-input input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; font-weight: 500; color: var(--ink); }
.pal-input input::placeholder { color: var(--muted); font-weight: 500; }
.pal-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px; }
.pal-group { padding: 10px 12px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 7px 12px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.pal-item .pal-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sand); color: var(--ink-2); }
.pal-item .pal-ico svg { width: 17px; height: 17px; }
.pal-item .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.pal-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pal-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-text small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .pal-hint { font-size: 12px; color: var(--muted); display: flex; gap: 4px; }
.pal-item.on { background: var(--accent-soft); }
.pal-item.on .pal-ico { background: var(--pill); color: var(--pill-icon); }
.pal-item mark { background: none; color: var(--accent-text); font-weight: 600; }
.pal-empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--sand-2); }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.shortcuts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.shortcuts kbd + kbd { margin-left: 4px; }

/* ---------- Agenda ---------- */
.agenda { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cal { padding: 18px 18px 20px; position: sticky; top: 90px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { font-size: 15px; font-weight: 600; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 4px 0 6px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-day {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 3px;
  border: 0; border-radius: 6px; background: none; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  font-family: var(--mono); font-variant-numeric: tabular-nums; transition: background-color 0.15s, transform 0.15s var(--ease);
}
.cal-day:hover { background: var(--sand); }
.cal-day.out { color: var(--muted); opacity: 0.45; }
.cal-day.today { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.cal-day.sel { background: var(--pill); color: var(--on-pill); }
.cal-day.weekend:not(.today):not(.sel) { color: var(--muted); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; }
.ev-in { background: var(--info); }
.ev-out { background: var(--accent); }
.ev-renew { background: var(--seat-idle); }
.ev-late { background: var(--ko); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; }
.agenda-list { display: grid; gap: 20px; }
.ag-day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
.ag-date { display: grid; justify-items: center; align-content: start; padding-top: 4px; line-height: 1.1; }
.ag-date b { font-size: 24px; font-weight: 500; letter-spacing: -0.04em; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ag-date span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.ag-items { display: grid; gap: 8px; }
.ag-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--glass-edge); border-radius: 10px; background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-1); text-align: left; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.ag-item:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-2); }
.ag-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.ag-item .grow { flex: 1; min-width: 0; }
.ag-item b { display: block; font-size: 14px; }
.ag-item small { display: block; font-size: 12.5px; color: var(--muted); }
.jx { flex: none; padding: 2px 8px; border-radius: 8px; background: var(--sand); font-size: 12px; font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.jx.soon { background: var(--accent-soft); color: var(--accent-text); }
.jx.late { background: var(--ko-soft); color: var(--ko); }
.ag-month { margin: 6px 0 -6px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Chargement : squelettes ---------- */
.skeleton { display: grid; gap: 20px; }
.sk { position: relative; overflow: hidden; border-radius: 6px; background: var(--sand); }
.sk::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent);
  animation: shimmer 1.4s var(--ease) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-title { width: 280px; max-width: 70%; height: 30px; }
.sk-line { width: 440px; max-width: 90%; height: 14px; margin-top: 10px; }
.sk-hero { height: 210px; border-radius: 10px; }
.sk-panel { height: 260px; border-radius: var(--radius); }
.sk-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: var(--muted); }
.loading.boot { min-height: 100vh; flex-direction: column; gap: 16px; font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--sand); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Aide ---------- */
.help-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.help-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; }
.help-steps li::before { content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 500 13px/1 var(--mono); }
.help-steps li span { color: var(--ink-2); font-size: 13px; }

/* ---------- Connexion ---------- */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.login::before, .login::after {
  content: ''; position: absolute; z-index: -1; width: 46vmax; height: 46vmax; border-radius: 50%; pointer-events: none;
  filter: blur(10px); opacity: 0.9; will-change: transform;
}
.login::before { top: -18vmax; right: -12vmax; background: radial-gradient(closest-side, var(--glow-1), transparent); animation: drift 22s ease-in-out infinite alternate; }
.login::after { bottom: -20vmax; left: -14vmax; background: radial-gradient(closest-side, var(--glow-2), transparent); animation: drift 26s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); } }
.login-card {
  width: min(460px, 100%); padding: 40px 36px; border-radius: 10px; display: grid; gap: 18px; justify-items: center; text-align: center;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-float);
  animation: modal-in 0.6s var(--ease);
}
.login-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; color: var(--navy); }
.login-card p { color: var(--muted); max-width: 36ch; }
.login-card .btn { width: 100%; }
.login-card .banner { text-align: left; width: 100%; }
.login-foot { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); }
.login-foot svg { width: 15px; height: 15px; color: var(--ok); }

/* Logo Microsoft : quatre carrés aux couleurs officielles. « enter » : ils s'assemblent un à un dans
   le sens des aiguilles d'une montre ; « busy » : ils s'allument à tour de rôle pendant la connexion. */
.ms-logo { --ms: 20px; display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: calc(var(--ms) * 0.08); width: var(--ms); height: var(--ms); flex: none; }
.ms-logo.lg { --ms: 44px; }
.ms-logo i { display: block; background: #F25022; }
.ms-logo i:nth-child(2) { background: #7FBA00; }
.ms-logo i:nth-child(3) { background: #00A4EF; }
.ms-logo i:nth-child(4) { background: #FFB900; }
.login-btn .ms-logo { padding: 1px; box-sizing: content-box; background: #fff; border-radius: 3px; }
.ms-logo.enter i { animation: ms-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.ms-logo.enter i:nth-child(1) { animation-delay: 0.25s; }
.ms-logo.enter i:nth-child(2) { animation-delay: 0.4s; }
.ms-logo.enter i:nth-child(4) { animation-delay: 0.55s; }
.ms-logo.enter i:nth-child(3) { animation-delay: 0.7s; }
.login-btn:hover .ms-logo.enter i, .login-btn:focus-visible .ms-logo.enter i { animation: ms-wave 0.6s ease-in-out both; }
.login-btn:hover .ms-logo.enter i:nth-child(2), .login-btn:focus-visible .ms-logo.enter i:nth-child(2) { animation-delay: 0.08s; }
.login-btn:hover .ms-logo.enter i:nth-child(4), .login-btn:focus-visible .ms-logo.enter i:nth-child(4) { animation-delay: 0.16s; }
.login-btn:hover .ms-logo.enter i:nth-child(3), .login-btn:focus-visible .ms-logo.enter i:nth-child(3) { animation-delay: 0.24s; }
.ms-logo.busy i { animation: ms-turn 1.2s ease-in-out infinite; }
.ms-logo.busy i:nth-child(2) { animation-delay: 0.3s; }
.ms-logo.busy i:nth-child(4) { animation-delay: 0.6s; }
.ms-logo.busy i:nth-child(3) { animation-delay: 0.9s; }
@keyframes ms-in { from { opacity: 0; transform: scale(0.2) rotate(-45deg); } }
@keyframes ms-wave { 50% { transform: scale(0.72); } }
@keyframes ms-turn { 0%, 60%, 100% { opacity: 1; transform: scale(1); } 30% { opacity: 0.35; transform: scale(0.7); } }

/* Changement de thème : le nouveau thème s'ouvre en cercle depuis le bouton (navigateurs récents). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal 0.6s var(--ease); }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 50%)); } }

.scrim { display: none; }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 1180px) {
  .grid-2, .grid-2.wide-left, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figure-hero { border-right: 0; border-bottom: 1px solid var(--line); }
  .figure-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(odd) { border-left: 0; }
  .figure:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .next-steps { position: static; }
  .agenda { grid-template-columns: minmax(0, 1fr); }
  .cal { position: static; }
  .quick-search { width: 200px; }
  .hide-md { display: none !important; }
}

@media (max-width: 1024px) {
  .site-foot { padding: 16px 20px 22px; }
  .app, .app.nav-mini { grid-template-columns: minmax(0, 1fr); }
  .app.nav-mini .brand-text, .app.nav-mini .nav .label { display: flex; }
  .app.nav-mini .nav-title { height: auto; margin: 0; padding: 0 10px 6px; color: var(--muted); background: none; }
  .app.nav-mini .nav a, .app.nav-mini .brand { justify-content: flex-start; padding: 0 10px; }
  .app.nav-mini .count-badge { position: static; }
  .side-foot { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 264px; height: 100%;
    background: var(--glass-float); -webkit-backdrop-filter: var(--blur-float); backdrop-filter: var(--blur-float);
    transform: translateX(-104%); transition: transform 0.32s var(--ease); box-shadow: var(--shadow-float);
    visibility: hidden;
  }
  .app.menu-open .sidebar { transform: none; visibility: visible; }
  .app.menu-ready .sidebar { visibility: visible; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(12, 19, 18, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); }
  .app.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar .menu-btn, .topbar .mobile-search { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .quick-search { display: none; }
  #view { padding: 24px 20px 56px; }
  .setup-banner { padding: 16px 20px 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 26px 24px; }
  .hero-side { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--navy-line); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .holder-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .net-banner { top: 56px; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .topbar { padding: 0 10px; gap: 4px; }
  .topbar .btn { padding: 0 12px; }

  #view { padding: 20px 16px 48px; }
  .setup-banner { padding: 14px 16px 0; }
  .page-head h1 { font-size: 22px; }
  .greet h1 { font-size: 26px; }
  .search { min-width: 0; width: 100%; }
  .page-actions { width: 100%; }
  .form-panel { padding: 20px 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .upn-row { grid-template-columns: minmax(0, 1fr); }
  .upn-row .at { display: none; }
  .hero-big { font-size: 44px; }
  .hero-num { font-size: 21px; }
  .hero-main { grid-template-columns: minmax(0, 1fr); }
  .ring { display: none; }
  .panel-head { padding: 16px 16px 12px; }
  .panel-body { padding: 0 16px 16px; }
  table.t th:first-child, table.t td:first-child { padding-left: 16px; }
  table.t th:last-child, table.t td:last-child { padding-right: 16px; }
  .stock { padding: 0 16px 16px; }
  .holder-head, .holder-body { padding-left: 16px; padding-right: 16px; }
  .holder-list summary { padding-left: 16px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .who b, .who small { max-width: 240px; }
  .notif-panel, .pop.account { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; }
  .role-list > li { flex-wrap: wrap; padding: 12px 16px; }
  .pending-bar { padding: 16px; }
  .figure-hero { padding: 20px 18px; }
  .figure-big { font-size: 34px; }
  .figure { padding: 16px 18px; }
  .figure-num { font-size: 19px; }
  .proposals > li { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .proposal-side { justify-items: start; text-align: left; }
  .panel > .chart-legend, .panel-note { padding-left: 16px; padding-right: 16px; }
  details.numbers > summary { padding-left: 16px; }
  dialog.drawer { border-radius: 0; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shortcuts { grid-template-columns: minmax(0, 1fr); }
  .stepper li { font-size: 11px; }
  .ag-day { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .sk-row { grid-template-columns: minmax(0, 1fr); }
  .feed { padding: 0 16px 16px; }

  /* Tableaux en fiches : une ligne = un bloc, chaque valeur précédée du titre de sa colonne. */
  table.t thead { display: none; }
  table.t, table.t tbody, table.t tfoot, table.t tr, table.t td { display: block; width: 100%; }
  table.t tfoot td, table.t tfoot td:first-child, table.t tfoot td:last-child { height: auto; padding: 3px 0; border: 0; background: none; text-align: left; }
  table.t tfoot td:empty, table.t td.hide-sm { display: none; }
  table.t tfoot tr { background: var(--glass-2); }
  table.t tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  table.t td, table.t td:first-child, table.t td:last-child { height: auto; padding: 3px 0; border: 0; text-align: left; }
  table.t td.num, table.t td.actions { text-align: left; }
  table.t td.actions { padding-top: 10px; }
  table.t td.actions:empty { display: none; }
  table.t td:not(:first-child):not([data-label=""])::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
  table.t tr.clickable:hover td { background: none; }
  .meter { min-width: 0; }
}

/* ---------- Impression (rapport PDF) ---------- */
@media print {
  @page { margin: 14mm; }
  /* Toujours sur papier blanc, quel que soit le thème affiché à l'écran. */
  :root:not(.print), :root[data-theme] {
    color-scheme: light;
    --paper: #fff; --surface: #fff; --glass: #fff; --glass-2: #fff; --glass-float: #fff; --field: #fff; --blur: none; --glass-hi: transparent;
    --sand: #eef0ec; --sand-2: #f5f6f3; --line: #e2e5e2; --line-strong: #cdd2ce;
    --ink: #14201d; --ink-2: #3a4744; --muted: #5e6b67; --navy: #193357; --pill: #14201d; --on-pill: #fff;
    --accent-text: #b8520f; --accent-soft: #fdf0e7;
    --ok: #1f7a55; --ok-soft: #e6f3ec; --warn: #93590a; --warn-soft: #fbf1df; --ko: #b42323; --ko-soft: #fbeaea; --info: #1f5fae; --info-soft: #e7effa;
    --bar: #193357;
  }
  .logo .logo-light { display: block !important; }
  .logo .logo-dark { display: none !important; }
  body { background: #fff; color: #14201d; font-size: 12px; }
  body::before { display: none; }
  .sidebar, .topbar, .setup-banner, .pop, .net-banner, #toasts, .scrim, .page-actions, .panel-tools, .actions, .panel-more, .btn, .act, .quick-search, .print-hide { display: none !important; }
  .app { display: block; }
  #view { max-width: none; padding: 0; }
  .panel, .hero, .hr-tile { box-shadow: none !important; break-inside: avoid; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .panel, .hero, .hr-tile { border: 1px solid #e2e5e2; }
  .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grid-2, .grid-2.wide-left { grid-template-columns: 1fr 1fr; }
  details > summary { display: none !important; }
  details > :not(summary) { display: block !important; }
  .page.enter > * { animation: none !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* Animations réduites : préférence du système ou de l'outil (data-motion="reduce"). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  /* Sans délai non plus : rien ne reste masqué en attendant une animation qui ne joue pas. */
  .toast-bar { animation: none !important; }
  .bell.unread svg, .pressed { animation: none !important; }
  .ms-logo i, .chart.reveal .plot, .hbars.reveal .hbar-fill, .hbars.reveal .hbar-value, .page.enter > *, .page.enter .meter-fill, .page.enter .bar-fill, .page.enter .seatbar .seat { animation: none !important; }
  ::view-transition-new(root) { animation: none !important; }
}
:root[data-motion='reduce'] *, :root[data-motion='reduce'] *::before, :root[data-motion='reduce'] *::after { animation: none !important; transition: none !important; }

@media (forced-colors: active) {
  .seat, .meter-fill, .bar-fill { forced-color-adjust: none; }
}

/* ---------- Demandes en colonnes (étapes) ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.kb-col { --tone: var(--muted); display: flex; flex-direction: column; min-height: 220px; padding: 12px; border-radius: var(--radius); background: var(--glass-2); border: 1px solid var(--glass-edge); scroll-snap-align: start; }
.kb-col.warn { --tone: var(--warn); }
.kb-col.ko { --tone: var(--ko); }
.kb-col.info { --tone: var(--info); }
.kb-col.accent { --tone: var(--accent); }
.kb-col.ok { --tone: var(--ok); }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.kb-head::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); }
.kb-head h2 { flex: 1; font-size: 14px; font-weight: 600; }
.kb-list { display: grid; gap: 10px; align-content: start; }
.kb-card {
  display: grid; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--glass-edge); border-radius: 10px; text-align: left; cursor: pointer;
  background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); animation: rise 0.35s var(--ease) both;
}
.kb-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-2); }
.kb-card .who b, .kb-card .who small { max-width: none; }
.kb-card .who-text { flex: 1; }
.kb-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kb-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.kb-msgs { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--accent-text); }
.kb-msgs svg { width: 14px; height: 14px; }
.kb-empty { padding: 18px 6px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Annuaire ---------- */
.people-group + .people-group { margin-top: 26px; }
.people-group .ag-month { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.person-card-t {
  display: grid; justify-items: center; align-content: start; gap: 4px; padding: 18px 14px 16px; text-align: center; cursor: pointer;
  border: 1px solid var(--glass-edge); border-radius: 10px; background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-1);
  transition: border-color 0.18s, background-color 0.18s;
}
.person-card-t:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--surface); }
.person-card-t .avatar { margin-bottom: 6px; }
.pc-name { font-size: 14px; font-weight: 600; }
.pc-job { font-size: 13px; color: var(--ink-2); }
.pc-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.pc-meta svg { width: 13px; height: 13px; }
.contact { display: grid; gap: 16px; }
.contact-head { display: grid; justify-items: center; gap: 12px; }

/* ---------- Suivi RH d'une demande ---------- */
.checklist { display: grid; gap: 8px; }
.checklist-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.progress { flex: 1; max-width: 220px; height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--ok); transform-origin: left center; transition: transform 0.4s var(--ease); }
.check .who-did { font-size: 12px; color: var(--muted); }
.kb-progress { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ok); }
.kb-progress svg { width: 14px; height: 14px; }
.kb-late { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ko); }
.kb-late svg { width: 14px; height: 14px; }
.kb-col.info { --tone: var(--info); }
/* Responsable et échéance de chaque étape ; une étape en retard est bordée de rouge. */
.step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.step-meta .owner { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.step-meta .owner svg { width: 13px; height: 13px; }
.due.late { color: var(--ko); font-weight: 600; }
.check.late { border-color: color-mix(in srgb, var(--ko) 45%, transparent); }
.check.late:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.checklist-head .tag { margin-right: auto; }
.reply-box { display: grid; gap: 8px; }
.reply-box textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink); line-height: 1.5; resize: vertical; }
.reply-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }

/* ---------- Indicateurs RH ---------- */
.hr-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .hr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 220px; padding-top: 20px; }
.col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-width: 0; }
.col-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line-strong); }
.col-bar { position: relative; width: min(18px, 42%); border-radius: 4px 4px 0 0; transform-origin: bottom; }
.page.enter .col-bar { animation: col-grow 0.7s var(--ease) 0.15s both; }
@keyframes col-grow { from { transform: scaleY(0); } }
.col-bar.in { background: var(--c-cost); }
.col-bar.out { background: var(--seat-free); }
.col-bar i { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 2px; font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-2); }
.col-label { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
@media (max-width: 640px) { .col:nth-child(even) .col-label { visibility: hidden; } .cols { gap: 3px; } }
.late-meta { display: grid; justify-items: end; gap: 3px; margin-left: auto; text-align: right; white-space: nowrap; }
.late-meta + .todo-go { margin-left: 4px; }
.hr-tile {
  --tone: var(--ink); display: grid; align-content: start; gap: 4px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.hr-tile.ok { --tone: var(--ok); }
.hr-tile.warn { --tone: var(--warn); }
.hr-tile.ko { --tone: var(--ko); }
.hr-tile-label { font-size: 13px; font-weight: 400; color: var(--muted); }
.hr-tile-num { font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -0.03em; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--tone); }
.hr-tile small { font-size: 12px; color: var(--muted); }
.seg.in, .key.in { background: var(--c-cost); border-color: var(--c-cost); }
.seg.out, .key.out { background: var(--seat-free); border-color: var(--seat-free); }
.who-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-line > .tag { flex: none; }

/* ---------- Modèles de suivi ---------- */
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tpl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sand-2); }
.tpl-num { width: 28px; height: 28px; margin-top: 4px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font: 500 13px/1 var(--mono); color: var(--ink-2); }
.tpl-fields { display: grid; gap: 8px; min-width: 0; }
.tpl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl-fields input, .tpl-fields select {
  height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; font-size: 14px;
}
.tpl-fields input[type='text'] { width: 100%; font-weight: 500; }
.tpl-fields input[type='number'] { width: 76px; font-family: var(--mono); }
.tpl-fields input:focus, .tpl-fields select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.tpl-when { color: var(--muted); font-size: 12.5px; }
.tpl-acts { display: flex; gap: 4px; margin-top: 4px; }
.tpl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.tpl-foot .grow { flex: 1; }
@media (max-width: 640px) {
  .tpl-row { grid-template-columns: minmax(0, 1fr); }
  .tpl-num { display: none; }
  .tpl-acts { justify-content: flex-end; }
}

/* ---------- Fiche imprimable (accueil, récapitulatif de départ) ---------- */
.print-sheet { display: none; }
@media print {
  body.sheet-on > :not(.print-sheet) { display: none !important; }
  body.sheet-on .print-sheet { display: block; color: #14201d; font-size: 12.5px; line-height: 1.5; }
  .sheet-head { display: flex; gap: 22px; align-items: center; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 3px solid #e8702a; }
  .sheet-head img { width: 150px; height: auto; }
  .sheet-kicker { margin: 0; font: 600 10.5px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #ad5b0e; }
  .sheet-head h1 { margin: 2px 0; font-size: 24px; font-weight: 700; color: #193357; letter-spacing: -0.02em; }
  .sheet-sub { margin: 0; color: #5d6b80; }
  .sheet-block { margin-bottom: 16px; break-inside: avoid; }
  .sheet-block h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #193357; }
  .sheet-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; margin: 0; }
  .sheet-kv dt { font-size: 10.5px; color: #5d6b80; font-weight: 600; }
  .sheet-kv dd { margin: 0; font-weight: 600; }
  .sheet-steps { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 5px; }
  .sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
  .sheet-list li { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e3ddd2; padding: 3px 0; }
  .sheet-muted { color: #5d6b80; }
  .sheet-table { width: 100%; border-collapse: collapse; }
  .sheet-table th, .sheet-table td { padding: 5px 6px; border-bottom: 1px solid #e3ddd2; text-align: left; vertical-align: top; }
  .sheet-table th { font-size: 10.5px; color: #5d6b80; }
  .sheet-box { width: 16px; text-align: center; font-weight: 600; border: 1px solid #cfc6b8 !important; }
  .sheet-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; break-inside: avoid; }
  .sheet-sign div { display: grid; gap: 4px; height: 90px; padding: 10px 12px; border: 1px solid #cfc6b8; border-radius: 8px; }
  .sheet-sign span { font-size: 10.5px; color: #5d6b80; }
  .sheet-foot { margin-top: 20px; font-size: 10.5px; color: #5d6b80; }
}

/* ---------- Utilisateurs externes par société ---------- */
.company-group > summary { display: flex; align-items: center; gap: 10px; padding: 12px 22px; cursor: pointer; list-style: none; border-top: 1px solid var(--line); background: var(--sand-2); }
.company-group > summary::-webkit-details-marker { display: none; }
.company-group > summary b { font-size: 14px; }
.company-group > summary .domain { font-size: 12.5px; color: var(--muted); }
.company-group[open] > summary .chev { transform: rotate(90deg); }
.company-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--co, var(--navy)); flex: none; }
.login-tag { margin-top: -10px; font-weight: 500; }
.login-card h1 .app-name { font-size: 32px; }
