/* =========================================================================
   GESTION STOCK IT ASSALA (EIT GROUP) — Design system de l'application
   Charte : blanc, noir et niveaux de gris ; ORANGE ASSALA (--brand, #E84E10 : teinte exacte de la barre du logo)
   comme couleur d'accent ; VERT EIT (--signal / --success, #5EAD31) en touche secondaire (succès, détails,
   signature de l'éditeur). Les deux teintes se règlent dans Administration › Apparence (ui.primary, ui.accent).
   Police : Archivo (axe de largeur). Icônes : Phosphor (.ph / .ph-fill / .ph-bold).
   Thèmes : [data-theme="light"] / [data-theme="dark"] sur <html> (ou sur un îlot).
   Options : html[data-effects="on|off"] (animations), html[data-glass="on|off"] (verre dépoli).
   Guide de style vivant : /app/design · kit Stock IT : /app/composants · documentation : docs/DESIGN.md
   Règle d'or : ne jamais renommer une classe existante (utilisée par tous les modules).
   ========================================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../../vendor/fonts/Archivo-var.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* [data-theme="light"] : un îlot clair dans une page sombre retrouve toutes les valeurs claires */
:root, [data-theme="light"] {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --black: #000000;
  --white: #ffffff;
  /* Marque : seules --brand (accent principal) et --signal (couleur secondaire) sont saisies (Administration › Apparence) ;
     toutes les nuances en dérivent (calcul serveur AA : App\Modules\Design\Support\Palette, repli CSS ci-dessous). */
  --brand: #E84E10;
  --brand-hover: #EB632D;
  --brand-600: #C5420E;
  --brand-700: #A2370B;
  --on-brand: #0B0B0C;
  --brand-bright: #EA5A21;          /* orange lisible sur fond noir (menu, cartes sombres) */
  --brand-rgb: 232 78 16;
  --signal: #5EAD31;
  --signal-hover: #71B74A;
  --on-signal: #0B0B0C;
  --signal-ink: #417822;
  --signal-soft: #EAF4E4;
  --signal-line: #C2E0B1;
  --signal-bright: #5EAD31;
  --signal-rgb: 94 173 49;
  /* Couleurs des deux maisons (fixes : logos, signature, barre de co-marquage) */
  --assala: #E84E10; --assala-ink: #494949; --eit: #5EAD31;

  /* v2.0 : gris neutres (noir, blanc, gris + une touche de vert EIT) */
  --bg: #F6F6F4;
  --bg-elev: #FFFFFF;
  --bg-sunken: #F0F0EE;
  --bg-hover: #F2F2F0;
  --bg-inverse: #0B0B0C;
  --line: #E6E6E3;
  --line-strong: #D3D3CF;
  --text: #0B0B0C;
  --text-2: #4A4A4F;
  --text-3: #66666C;            /* AA (≥ 4,5:1) sur --bg-elev, --bg et --bg-sunken */
  --text-inverse: #FFFFFF;
  --brand-ink: #BB3F0D;
  --brand-soft: #FDEDE7;
  --brand-line: #F6BCA4;
  /* Succès = couleur secondaire (vert EIT) : texte / icône, fond doux, bordure, aplat */
  --success: var(--signal-ink); --success-soft: var(--signal-soft); --success-line: var(--signal-line); --success-strong: var(--signal); --on-success: var(--on-signal);

  /* Tons de STATUT (pastilles, icônes de cartes, répartitions) : texte AA sur leur fond doux dans les deux thèmes.
     success = vert EIT · info = bleu · warning = ambre · violet · orange · danger = framboise · teal (--c-teal). */
  --info: #1F5FBF;   --info-soft: #E9F0FB;
  --warning: #8A5A00; --warning-soft: #FBF2DC;
  --danger: #B4183A; --danger-soft: #FCECEF; --danger-strong: #C81E46;   /* rouge framboise : bien distinct de l'orange d'accent */
  --violet: #6941C6; --violet-soft: #F1ECFB;
  --orange: #A8500B; --orange-soft: #FCEEDF;
  /* Teintes de données (pastilles de statut du stock, répartitions) : texte AA sur leur fond doux, dans les deux thèmes */
  --c-blue: #1F5FBF;   --c-blue-soft: #E9F0FB;   --c-blue-strong: #2F74DD;
  --c-teal: #0B6E69;   --c-teal-soft: #E3F3F1;   --c-teal-strong: #14958E;
  --c-amber: #8A5A00;  --c-amber-soft: #FBF2DC;  --c-amber-strong: #E0A100;
  --c-violet: #6941C6; --c-violet-soft: #F1ECFB; --c-violet-strong: #7F56D9;
  --c-rose: #B4183A;   --c-rose-soft: #FCECEF;   --c-rose-strong: #D8355A;
  --c-slate: #4A4A4F;  --c-slate-soft: #EEEEEC;  --c-slate-strong: #7D7D86;
  --muted-soft: #F0F0EE;
  /* Surfaces « inverses » (toasts, barre d'actions groupées, infobulles) : toujours sombres */
  --surface-inverse: #111113; --on-surface-inverse: #F4F4F5;
  --glass: color-mix(in srgb, var(--bg-elev) 76%, transparent);
  --glass-blur: saturate(1.7) blur(18px);
  --backdrop: rgba(5, 7, 4, .52);

  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(12, 12, 14, .04);
  --shadow-2: 0 8px 28px -14px rgba(12, 12, 14, .22), 0 1px 2px rgba(12, 12, 14, .04);
  --shadow-pop: 0 22px 56px -20px rgba(12, 12, 14, .32), 0 2px 8px rgba(12, 12, 14, .06);
  --ring: 0 0 0 3px rgba(232, 78, 16, .42);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 42%, transparent); /* anneau de focus à la couleur d'accent paramétrée */

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --tabbar-h: 64px;
  --content-max: 1680px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --tap: 44px;                  /* cible tactile minimale */
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #08080A;
  --bg-elev: #111113;
  --bg-sunken: #0B0B0D;
  --bg-hover: #19191C;
  --bg-inverse: #F4F4F5;
  --line: #232327;
  --line-strong: #35353B;
  --text: #F4F4F5;
  --text-2: #B6B6BD;
  --text-3: #8E8E96;
  --text-inverse: #000000;
  --brand-ink: #F08C64;
  --brand-soft: #381C12;
  --brand-line: #702C12;
  --signal-ink: #7DBD59;
  --signal-soft: #1F2D18;
  --signal-line: #335620;
  --success: var(--signal-ink); --success-soft: var(--signal-soft); --success-line: var(--signal-line); --success-strong: var(--signal); --on-success: var(--on-signal);
  --info: #8FB8F6;   --info-soft: #121C2E;
  --warning: #F0C35A; --warning-soft: #2A2110;
  --danger: #F7A0B2; --danger-soft: #2A1218; --danger-strong: #D8355A;
  --violet: #BFA8F5; --violet-soft: #1F1830;
  --orange: #F2A766; --orange-soft: #2B1B0E;
  --c-blue: #8FB8F6;   --c-blue-soft: #121C2E;   --c-blue-strong: #4C8DEB;
  --c-teal: #6FD0C8;   --c-teal-soft: #0E2423;   --c-teal-strong: #2BB3AB;
  --c-amber: #F0C35A;  --c-amber-soft: #2A2110;  --c-amber-strong: #E0A100;
  --c-violet: #BFA8F5; --c-violet-soft: #1F1830;  --c-violet-strong: #9B7BEA;
  --c-rose: #F7A0B2;   --c-rose-soft: #2A1218;   --c-rose-strong: #E0516F;
  --c-slate: #B6B6BD;  --c-slate-soft: #1C1C20;  --c-slate-strong: #8E8E96;
  --muted-soft: #19191C;
  --surface-inverse: #1D1D21; --on-surface-inverse: #F4F4F5;
  --glass: color-mix(in srgb, var(--bg-elev) 72%, transparent);
  --backdrop: rgba(0, 0, 0, .66);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .6);
  --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .8);
  --shadow-pop: 0 30px 70px -20px rgba(0, 0, 0, .9), 0 0 0 1px #2A2A2F;
  color-scheme: dark;
}
/* Navigateurs sans color-mix() : verre dépoli opaque */
@supports not (color: color-mix(in srgb, red, blue)) {
  :root { --glass: rgba(255, 255, 255, .86); }
  [data-theme="dark"] { --glass: rgba(17, 17, 19, .88); }
}
/* Îlot de thème (guide de style, aperçus) : <div data-theme="dark" class="theme-island"> */
.theme-island { background: var(--bg); color: var(--text); color-scheme: inherit; }

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 1rem); }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; /* jamais de défilement horizontal de page */
  -webkit-tap-highlight-color: transparent;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: var(--brand); color: var(--on-brand); }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ Typography */
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; }
.display {
  font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; line-height: 1.02;
  font-size: clamp(2.3rem, 1.2rem + 4.6vw, 4.9rem);
}
.h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); font-stretch: 112%; font-weight: 800; letter-spacing: -0.02em; }
.h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.15rem); font-stretch: 110%; font-weight: 750; }
.h3 { font-size: 1.25rem; font-stretch: 105%; font-weight: 700; }
.h4 { font-size: 1.05rem; font-weight: 700; }
.lead { font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); color: var(--text-2); line-height: 1.55; max-width: 62ch; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.strong { font-weight: 700; }
.wide { font-stretch: 115%; }
.narrow { font-stretch: 85%; }
.tabular { font-variant-numeric: tabular-nums; }
.prose { max-width: 70ch; line-height: 1.7; }
.prose h2, .prose h3 { margin-top: 1.8em; font-stretch: 108%; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--brand); color: var(--text-2); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.text-brand { color: var(--brand-ink); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------- Layout */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.container-wide { max-width: 1480px; }
.container-narrow { max-width: 860px; }
@media (min-width: 768px) { .container { padding-inline: 28px; } }
@media (min-width: 1800px) { .container { max-width: 1440px; } .container-wide { max-width: 1720px; } html { font-size: 17px; } }
@media (min-width: 2400px) { html { font-size: 19px; } }

.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, .75rem); }
.row { display: flex; align-items: center; gap: var(--gap, .75rem); }
.between { justify-content: space-between; }
.center { justify-content: center; }
.end { justify-content: flex-end; }
.items-start { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }
.grid { display: grid; gap: var(--gap, 1.25rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(var(--min, 260px), 1fr)); }
.span-2 { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }
.gap-xs { --gap: .35rem; } .gap-sm { --gap: .6rem; } .gap-md { --gap: 1rem; } .gap-lg { --gap: 1.75rem; } .gap-xl { --gap: 3rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2.5rem; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
.hidden { display: none !important; }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .show-mobile { display: none !important; } }
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7.5rem); }
.section-tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }

/* ------------------------------------------------------------- Icons
   Les glyphes Phosphor sont dessinés au centre exact d'un carré de 1em (ascendante 960 +
   descendante 64 = 1024 unités) : avec line-height:1, la boîte de l'icône est un carré
   parfait et le glyphe y est centré. Dans un conteneur flex/grid centré, l'alignement est
   donc exact ; en ligne dans du texte, vertical-align aligne l'icône sur les capitales. */
.ph, .ph-fill, .ph-bold { line-height: 1; font-size: 1.15em; vertical-align: -0.16em; flex-shrink: 0; }
.ico { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; line-height: 1; flex-shrink: 0; }
.ico > .ph, .ico > .ph-fill, .ico > .ph-bold { font-size: 1em; }
.icon-box {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: var(--r);
  background: var(--brand-soft); color: var(--brand-ink); font-size: 1.25rem; flex-shrink: 0; line-height: 1;
}
.icon-box > .ph, .icon-box > .ph-fill, .icon-box > .ph-bold { font-size: 1em; }
.icon-box.is-dark { background: var(--bg-inverse); color: var(--text-inverse); }
.icon-box.is-sm { width: 2rem; height: 2rem; font-size: 1rem; border-radius: var(--r-sm); }
.icon-box.is-lg { width: 3.4rem; height: 3.4rem; font-size: 1.6rem; border-radius: var(--r-lg); }
.icon-box.is-round { border-radius: 50%; }
.icon-box[class*="tone-"] { background: var(--b-bg); color: var(--b-fg); }

/* ------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: var(--bg-elev); --btn-fg: var(--text); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.1rem; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 650; font-size: .95rem; line-height: 1.1; cursor: pointer; white-space: nowrap;
  text-decoration: none !important; transition: background .15s var(--ease), border-color .15s, transform .12s var(--ease), box-shadow .15s, filter .15s;
  -webkit-tap-highlight-color: transparent; position: relative; user-select: none; touch-action: manipulation;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .ph, .btn .ph-fill, .btn .ph-bold { font-size: 1.15rem; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-dark { --btn-bg: var(--bg-inverse); --btn-fg: var(--text-inverse); --btn-bd: var(--bg-inverse); }
.btn-dark:hover { background: var(--bg-inverse); opacity: .86; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-outline { --btn-bg: transparent; }
.btn-danger { --btn-bg: var(--danger-strong); --btn-fg: #fff; --btn-bd: var(--danger-strong); }
.btn-danger:hover { background: var(--danger-strong); filter: brightness(1.08); }
.btn-signal { --btn-bg: var(--signal); --btn-fg: var(--on-signal); --btn-bd: var(--signal); }
.btn-signal:hover { background: var(--signal); filter: brightness(1.06); }
.btn-soft { --btn-bg: var(--brand-soft); --btn-fg: var(--brand-ink); --btn-bd: transparent; }
.btn-soft:hover { background: var(--brand-soft); filter: brightness(.97); }
.btn-sm { min-height: 2.15rem; padding: .35rem .75rem; font-size: .85rem; border-radius: var(--r-xs); }
.btn-xs { min-height: 1.8rem; padding: .2rem .55rem; font-size: .78rem; border-radius: var(--r-xs); gap: .3rem; }
.btn-lg { min-height: 3.35rem; padding: .8rem 1.6rem; font-size: 1.05rem; border-radius: var(--r); }
.btn-xl { min-height: 3.9rem; padding: 1rem 2rem; font-size: 1.12rem; border-radius: var(--r); font-stretch: 108%; }
.btn-block { width: 100%; }
@media (max-width: 420px) { .btn-block, .form-actions > .btn, .action-bar > .btn, .panel-body > .btn { white-space: normal; text-align: center; } } /* libellés longs sur 360 px : retour à la ligne au lieu de déborder */
.btn-icon { padding: 0; width: 2.75rem; min-width: 2.75rem; }
.btn-icon.btn-sm { width: 2.15rem; min-width: 2.15rem; }
.btn-icon.btn-xs { width: 1.8rem; min-width: 1.8rem; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "" !important; position: absolute; inset: auto; width: 1.1rem; height: 1.1rem; border-radius: 50%; padding: 0; background: none; transform: none;
  border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: spin .7s linear infinite; vertical-align: middle; flex-shrink: 0; }
.spinner.is-lg { width: 2rem; height: 2rem; border-width: 3px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.label { font-weight: 650; font-size: .9rem; color: var(--text); display: flex; align-items: center; gap: .35rem; }
.label .req { color: var(--danger); font-weight: 700; }
.label .opt { color: var(--text-3); font-weight: 500; font-size: .8rem; }
.help { font-size: .8rem; color: var(--text-3); }
.error-text { font-size: .82rem; color: var(--danger); font-weight: 600; display: flex; gap: .3rem; align-items: center; }
.input, .select, .textarea {
  width: 100%; min-height: 2.9rem; padding: .65rem .9rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: .97rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input[type="search"]::-webkit-search-cancel-button, .input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input.is-valid { border-color: var(--success-strong); }
.input-sm { min-height: 2.3rem; padding: .4rem .7rem; font-size: .88rem; }
.textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 256 256'%3E%3Cpath fill='%237C8378' d='M213.7 101.7l-80 80a8 8 0 0 1-11.4 0l-80-80a8 8 0 0 1 11.4-11.4L128 164.7l74.3-74.4a8 8 0 0 1 11.4 11.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center;
}
.input-icon { position: relative; }
.input-icon > .ph { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; font-size: 1.1rem; display: grid; place-items: center; color: var(--text-3); pointer-events: none; }
.input-icon:focus-within > .ph { color: var(--brand-ink); }
.input-icon > .input { padding-left: 2.5rem; }
.input-icon > .input-action { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; }
.input-icon > .input-action ~ .input, .input-icon > .input:has(~ .input-action) { padding-right: 3.6rem; }
.input-group { display: flex; }
.input-group > .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group > .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -1px; }
.check { display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .93rem; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; width: 1.2rem; height: 1.2rem; margin: .12rem 0 0; flex-shrink: 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; transition: all .12s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: .35rem; height: .62rem; border: solid var(--on-brand); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check input[type="radio"]:checked::after { width: .45rem; height: .45rem; border: 0; border-radius: 50%; background: var(--on-brand); transform: none; }
.check input:indeterminate { background: var(--brand); border-color: var(--brand); }
.check input:indeterminate::after { content: ""; width: .6rem; height: 2px; background: var(--on-brand); border-radius: 2px; }
.check input:focus-visible { box-shadow: var(--ring); }
.switch { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; font-size: .93rem; }
.switch input { appearance: none; -webkit-appearance: none; width: 2.6rem; height: 1.5rem; border-radius: var(--r-pill); background: var(--line-strong); position: relative; cursor: pointer; transition: background .18s; flex-shrink: 0; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(1.1rem); }
.switch input:focus-visible { box-shadow: var(--ring); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min, 150px), 1fr)); gap: .6rem; }
.choice { position: relative; display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-elev); cursor: pointer; font-weight: 600; font-size: .92rem; transition: all .12s; }
.choice:hover { border-color: var(--text-3); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.segmented { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: var(--bg-sunken); border: 1px solid var(--line); gap: 2px; }
.segmented button, .segmented a { border: 0; background: transparent; padding: .38rem .8rem; border-radius: 7px; font-size: .85rem; font-weight: 650; line-height: 1.2; color: var(--text-2); cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; justify-content: center; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.segmented button:hover, .segmented a:hover { color: var(--text); text-decoration: none; }
.segmented .is-active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.form-section { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section-title { font-size: 1.05rem; font-weight: 750; margin: 0 0 .25rem; display: flex; gap: .55rem; align-items: center; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; padding-top: 1.25rem; border-top: 1px solid var(--line); margin-top: 1.5rem; }

/* Tags */
.tag-input { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-height: 2.9rem; padding: .4rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-elev); cursor: text; }
.tag-input:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.tag-input input { flex: 1 1 140px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .95rem; padding: .25rem .3rem; min-width: 120px; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .45rem .25rem .65rem; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-ink); font-size: .84rem; font-weight: 650; }
.tag button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; }
.tag button:hover { background: color-mix(in srgb, currentColor 16%, transparent); }
.suggestions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.suggestions button { border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--r-pill); padding: .2rem .6rem; font-size: .8rem; color: var(--text-2); cursor: pointer; }
.suggestions button:hover { border-color: var(--brand); color: var(--brand-ink); }

/* Dropzone */
.dropzone {
  position: relative; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--r);
  border: 1.5px dashed var(--line-strong); background: var(--bg-sunken); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--brand-line); background: var(--bg-elev); }
.dropzone.is-invalid { border-color: var(--danger); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 3rem; height: 3rem; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--bg-elev); color: var(--brand-ink); font-size: 1.5rem; flex-shrink: 0; border: 1px solid var(--line); overflow: hidden; }
.dropzone-icon img { width: 100%; height: 100%; object-fit: cover; }
.dropzone-title { display: block; font-weight: 700; font-size: .95rem; }
.dropzone-meta { display: block; font-size: .8rem; color: var(--text-3); }
.dropzone .btn { position: relative; z-index: 2; }
.file-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.file-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: var(--r-sm); background: var(--bg-elev); border: 1px solid var(--line); font-size: .87rem; }

/* ------------------------------------------------------------- Surfaces */
.panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-title { font-size: 1.02rem; font-weight: 750; margin: 0; display: flex; align-items: center; gap: .55rem; }
.panel-body { padding: 1.3rem; }
.panel-body.tight { padding: .8rem; }
.panel-footer { padding: .9rem 1.3rem; border-top: 1px solid var(--line); background: var(--bg-sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel.is-flat { box-shadow: none; }
.panel.is-inverse { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.box { padding: 1rem 1.1rem; border-radius: var(--r); background: var(--bg-sunken); border: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); margin-block: 1rem; }

/* ------------------------------------------------------------- Badges */
.badge {
  --b-fg: var(--text-2); --b-bg: var(--muted-soft);
  display: inline-flex; align-items: center; gap: .32rem; padding: .18rem .58rem; border-radius: var(--r-pill);
  font-size: .76rem; font-weight: 700; line-height: 1.45; color: var(--b-fg); background: var(--b-bg); white-space: nowrap; vertical-align: middle;
}
.badge::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; opacity: .85; flex-shrink: 0; }
.badge > .ph, .badge > .ph-fill, .badge > .ph-bold { font-size: 1.05em; }
.badge:has(> .ph, > .ph-fill, > .ph-bold)::before { display: none; }
.badge.is-solid { --b-bg: var(--b-fg); color: var(--bg-elev); }
.badge.is-outline { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b-fg) 40%, transparent); }
.badge.no-dot::before { display: none; }
/* Badge coloré par une donnée (couleur d'un type de contrat…) : style="--b-fg: #xxxxxx" → contraste AA garanti dans les deux thèmes */
.badge[style*="--b-fg"]:not([class*="tone-"]) { color: color-mix(in srgb, var(--b-fg) 70%, var(--text)); background: color-mix(in srgb, var(--b-fg) 13%, transparent); }
.tone-info { --b-fg: var(--info); --b-bg: var(--info-soft); }
.tone-warning { --b-fg: var(--warning); --b-bg: var(--warning-soft); }
.tone-danger { --b-fg: var(--danger); --b-bg: var(--danger-soft); }
.tone-brand { --b-fg: var(--brand-ink); --b-bg: var(--brand-soft); }
.tone-success { --b-fg: var(--success); --b-bg: var(--success-soft); }
.tone-violet { --b-fg: var(--violet); --b-bg: var(--violet-soft); }
.tone-orange { --b-fg: var(--orange); --b-bg: var(--orange-soft); }
.tone-muted { --b-fg: var(--text-2); --b-bg: var(--muted-soft); }
.tone-teal { --b-fg: var(--c-teal); --b-bg: var(--c-teal-soft); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg-elev); font-size: .82rem; font-weight: 600; line-height: 1.3; color: var(--text-2); white-space: nowrap; }
.chip .ph { color: var(--text-3); }
a.chip:hover, button.chip:hover { border-color: var(--text-3); text-decoration: none; color: var(--text); }
.chip.is-active { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.chip.is-active .ph { color: inherit; }
.chip.is-active :is(.subtle, .muted) { color: inherit; opacity: .78; } /* contraste AA sur la puce active (fond inversé) */
button.chip { cursor: pointer; }
.count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.count.is-danger { background: var(--danger-strong); color: #fff; }
.count.is-muted { background: var(--bg-sunken); color: var(--text-2); }

/* ------------------------------------------------------------- Alerts */
.notice { display: flex; gap: .85rem; padding: .95rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-elev); align-items: flex-start; }
.notice > .ph, .notice > .ph-fill, .notice > .ph-bold { font-size: 1.35rem; flex-shrink: 0; margin-top: .125rem; /* centré sur la 1re ligne (1,6rem) */ }
.notice-title { font-weight: 750; margin-bottom: .1rem; }
.notice.tone-info { background: var(--info-soft); border-color: transparent; color: var(--text); } .notice.tone-info > .ph { color: var(--info); }
.notice.tone-success { background: var(--success-soft); border-color: var(--success-line); color: var(--text); } .notice.tone-success > .ph, .notice.tone-success > .ph-fill { color: var(--success); }
.notice.tone-warning { background: var(--warning-soft); border-color: transparent; color: var(--text); } .notice.tone-warning > .ph { color: var(--warning); }
.notice.tone-danger { background: var(--danger-soft); border-color: transparent; color: var(--text); } .notice.tone-danger > .ph { color: var(--danger); }
.notice ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* ------------------------------------------------------------- Avatars */
.avatar { --s: 2.4rem; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg-inverse); color: var(--text-inverse); font-weight: 750; font-size: calc(var(--s) * .38); line-height: 1; flex-shrink: 0; overflow: hidden; letter-spacing: .02em; text-indent: .02em; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-brand { background: var(--brand); color: var(--on-brand); }
.avatar-xs { --s: 1.5rem; } .avatar-sm { --s: 1.9rem; } .avatar-md { --s: 2.4rem; } .avatar-lg { --s: 3.5rem; } .avatar-xl { --s: 5.5rem; } .avatar-2xl { --s: 8rem; }
.avatar.has-ring { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--brand); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack > .avatar { box-shadow: 0 0 0 2px var(--bg-elev); }
.avatar-stack > .avatar + .avatar { margin-left: calc(var(--s) * -.3); }
.avatar.is-square { border-radius: var(--r); }
button.avatar, a.avatar { border: 0; cursor: zoom-in; padding: 0; }

/* ------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.table th { position: sticky; top: 0; z-index: 2; text-align: left; font-size: .78rem; font-weight: 700; color: var(--text-2); padding: .7rem 1rem; background: var(--bg-sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-selected { background: var(--brand-soft); }
.table .col-check { width: 2.6rem; padding-right: 0; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table a.row-link { color: var(--text); font-weight: 650; }
.table-compact td { padding: .5rem .8rem; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: .25rem; align-items: center; text-transform: inherit; line-height: 1.2; }
.th-sort:hover { color: var(--text); }
.th-sort.is-active { color: var(--text); }
/* Ordinateur 1024–1599 px (menu latéral ouvert) : cellules plus serrées et en-têtes sur deux lignes si besoin,
   pour que les listes tiennent dans la largeur sans défilement horizontal interne */
@media (min-width: 1024px) and (max-width: 1599px) {
  .table th, .table td { padding-left: .5rem; padding-right: .5rem; }
  .table th, .table .dv-th { white-space: normal; }
}

/* Description lists */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .55rem 1rem; margin: 0; font-size: .93rem; }
.dl dt { color: var(--text-3); font-weight: 600; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; } /* « Vues / téléchargements » dans une colonne de 120 px */
.dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; gap: .1rem; } .dl dd { margin-bottom: .6rem; } }

/* ------------------------------------------------------------- Tabs */
.tabs { position: relative; display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .8rem .95rem; border: 0; background: transparent; color: var(--text-2); font-weight: 650; font-size: .92rem; line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none !important; flex-shrink: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; transition: color .15s, background .15s; }
.tab.is-active { color: var(--text); }

/* ------------------------------------------------------------- Menus */
.dropdown { position: relative; display: inline-block; }
.menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 220px; padding: .35rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop);
  transform-origin: top right;
}
.menu.left { right: auto; left: 0; }
.menu.up { top: auto; bottom: calc(100% + 6px); }
.menu-item { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 2.4rem; padding: .5rem .7rem; border-radius: var(--r-xs); border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; font-weight: 550; line-height: 1.3; text-align: left; cursor: pointer; text-decoration: none !important; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-hover); }
.menu-item.is-active { background: var(--brand-soft); color: var(--text); }
.menu-item.is-active > .ph, .menu-item.is-active > .ph-fill { color: var(--brand-ink); }
.menu-item > .ph, .menu-item > .ph-fill, .menu-item > .ph-bold, .menu-item .ph { color: var(--text-3); font-size: 1.1rem; }
.menu-item > .menu-end { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--text-3); font-size: .8rem; }
.menu-item.is-danger { color: var(--danger); } .menu-item.is-danger .ph { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: .3rem 0; }
.menu-label { padding: .5rem .7rem .25rem; font-size: .75rem; color: var(--text-3); font-weight: 650; }

/* ------------------------------------------------------------- Modals */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: var(--backdrop); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.modal { width: 100%; max-width: 560px; background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); border: 1px solid var(--line); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1120px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.modal-title { font-size: 1.1rem; font-weight: 750; margin: 0; }
.modal-body { padding: 1.3rem; overflow-y: auto; }
.modal-footer { display: flex; gap: .6rem; justify-content: flex-end; padding: 1rem 1.3rem; border-top: 1px solid var(--line); flex-wrap: wrap; flex-shrink: 0; }
/* Tiroir latéral (<x-drawer side="right|left" width="440px">) */
.drawer-backdrop { position: fixed; inset: 0; z-index: 190; background: var(--backdrop); }
.drawer { position: fixed; z-index: 191; top: 0; bottom: 0; right: 0; width: min(var(--drawer-w, 520px), 100vw); background: var(--bg-elev); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
.drawer-right { right: 0; left: auto; border-left: 1px solid var(--line); }
.drawer-left { left: 0; right: auto; border-right: 1px solid var(--line); }
.drawer.is-wide { --drawer-w: 880px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.1rem 1.25rem; overscroll-behavior: contain; }
.fade-enter { transition: opacity .18s var(--ease); } .fade-from { opacity: 0; } .fade-to { opacity: 1; }
.pop-enter { transition: opacity .2s var(--ease), transform .2s var(--ease); } .pop-from { opacity: 0; transform: translateY(10px) scale(.98); } .pop-to { opacity: 1; transform: none; }
.slide-enter { transition: transform .25s var(--ease); } .slide-from { transform: translateX(100%); } .slide-to { transform: none; }

/* ------------------------------------------------------------- Toasts (toujours sur surface sombre) */
.toasts { position: fixed; z-index: 400; right: calc(16px + var(--safe-right)); bottom: calc(16px + var(--safe-bottom)); display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: .75rem; align-items: flex-start; padding: .85rem .8rem .85rem 1rem; border-radius: var(--r); background: var(--surface-inverse); color: var(--on-surface-inverse); box-shadow: var(--shadow-pop); border: 1px solid rgba(255, 255, 255, .06); animation: toast-in .32s var(--ease-out); font-size: .92rem; line-height: 1.45; }
.toast > .ph, .toast > .ph-fill { font-size: 1.3rem; flex-shrink: 0; color: color-mix(in srgb, var(--signal) 78%, #fff); margin-top: .02rem; }
.toast.tone-notify > .ph, .toast.tone-notify > .ph-fill { color: color-mix(in srgb, var(--brand) 80%, #fff); }
.toast.tone-danger > .ph, .toast.tone-danger > .ph-fill { color: #FF8FA6; } .toast.tone-warning > .ph, .toast.tone-warning > .ph-fill { color: #F0C35A; } .toast.tone-info > .ph, .toast.tone-info > .ph-fill { color: #9CC0FF; }
.toast-title { font-weight: 750; }
.toast-msg { color: color-mix(in srgb, var(--on-surface-inverse) 82%, transparent); }
.toast-title + .toast-msg { font-size: .87rem; }
.toast-close { margin: -.3rem -.2rem -.3rem auto; display: grid; place-items: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 50%; background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
.toast-close:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .25; transform-origin: left; animation: toast-bar linear forwards; }
.toast.tone-success .toast-bar { color: var(--signal-bright); opacity: .8; }
.toast:hover .toast-bar { animation-play-state: paused; }
.toast.is-leaving { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 767px) {
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(16px + var(--safe-bottom)); }
  .has-tabbar ~ .toasts, body:has(.has-tabbar) .toasts { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }
}

/* ------------------------------------------------------------- KPI tiles */
.kpi { display: flex; flex-direction: column; gap: .3rem; padding: 1.15rem 1.25rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; overflow: hidden; min-width: 0; box-shadow: var(--shadow-1); transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; }
.kpi-label { font-size: .84rem; color: var(--text-2); font-weight: 600; display: flex; gap: .45rem; align-items: center; line-height: 1.3; }
.kpi-label > .ph, .kpi-label > .ph-fill { font-size: 1.1rem; color: var(--brand-ink); }
.kpi-value { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.35rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: .8rem; color: var(--text-3); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.trend-up { color: var(--brand-ink); font-weight: 700; display: inline-flex; align-items: center; gap: .2rem; } .trend-down { color: var(--danger); font-weight: 700; display: inline-flex; align-items: center; gap: .2rem; }
a.kpi:hover { border-color: var(--line-strong); text-decoration: none; }
a.kpi { color: inherit; }

/* Progress */
.progress { height: .5rem; border-radius: var(--r-pill); background: var(--bg-sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .5s var(--ease); }
.ring { --p: 0; --s: 4.2rem; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-sunken) 0); position: relative; flex-shrink: 0; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg-elev); }
.ring > span { position: relative; font-weight: 800; font-size: calc(var(--s) * .24); font-variant-numeric: tabular-nums; }

/* Empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 3rem 1.5rem; color: var(--text-2); }
.empty .icon-box { width: 3.6rem; height: 3.6rem; font-size: 1.7rem; border-radius: var(--r-lg); position: relative; margin-bottom: .35rem; box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-soft) 55%, transparent), 0 0 0 16px color-mix(in srgb, var(--brand-soft) 25%, transparent); }
.empty-title { font-weight: 750; color: var(--text); font-size: 1.05rem; line-height: 1.3; }
.empty.is-compact { padding: 1.6rem 1rem; gap: .4rem; }
.empty.is-compact .icon-box { width: 2.6rem; height: 2.6rem; font-size: 1.25rem; box-shadow: none; margin-bottom: 0; }

/* Skeleton (squelettes de chargement) : <div class="skeleton sk-line"></div>, .sk-title, .sk-circle, .sk-block, .sk-card */
.skeleton { background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg-hover) 37%, var(--bg-sunken) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--r-xs); color: transparent !important; user-select: none; }
.sk-line { height: .8rem; width: var(--w, 100%); margin: .35rem 0; border-radius: 6px; }
.sk-title { height: 1.3rem; width: var(--w, 55%); margin: .2rem 0 .6rem; border-radius: 8px; }
.sk-circle { width: var(--s, 2.4rem); height: var(--s, 2.4rem); border-radius: 50%; flex-shrink: 0; }
.sk-block { height: var(--h, 7rem); border-radius: var(--r); }
.sk-card { padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); display: flex; flex-direction: column; gap: .5rem; }
[aria-busy="true"] { cursor: progress; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Pagination */
.pagination { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding: 0 .6rem; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font-weight: 650; font-size: .87rem; line-height: 1; font-variant-numeric: tabular-nums; text-decoration: none !important; }
.pagination a:hover { border-color: var(--text-3); }
.pagination .is-active { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.pagination .is-disabled { opacity: .45; }

/* Stepper (formulaire en étapes) */
.stepper { display: flex; gap: .4rem; counter-reset: step; }
.stepper-item { flex: 1; display: flex; flex-direction: column; gap: .45rem; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text-3); }
.stepper-item:disabled { cursor: default; }
.stepper-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.stepper-bar > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .35s var(--ease); }
.stepper-item.is-done .stepper-bar > i, .stepper-item.is-current .stepper-bar > i { width: 100%; }
.stepper-label { font-size: .8rem; font-weight: 650; display: flex; gap: .35rem; align-items: center; }
.stepper-label b { counter-increment: step; }
.stepper-label b::before { content: counter(step); display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .7rem; line-height: 1; background: var(--bg-sunken); color: var(--text-2); }
.stepper-item.is-current { color: var(--text); }
.stepper-item.is-current .stepper-label b::before { background: var(--bg-inverse); color: var(--text-inverse); }
.stepper-item.is-done .stepper-label b::before { content: "✓"; background: var(--success-strong); color: var(--on-success); }
@media (max-width: 680px) { .stepper-item:not(.is-current) .stepper-label span { display: none; } }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li { position: relative; padding: 0 0 1.25rem 1.9rem; }
.timeline > li::before { content: ""; position: absolute; left: .45rem; top: 1.3rem; bottom: 0; width: 2px; background: var(--line); }
.timeline > li:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--bg-elev); border: 2px solid var(--line-strong); }
.timeline-dot.is-done { background: var(--success-strong); border-color: var(--success-strong); }
.timeline-dot.is-current { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.steps-track { display: flex; align-items: flex-start; gap: 0; }
.steps-track > div { flex: 1; text-align: center; position: relative; font-size: .78rem; font-weight: 650; color: var(--text-3); padding-top: 1.6rem; }
.steps-track > div::before { content: ""; position: absolute; top: .45rem; left: 0; right: 0; height: 3px; background: var(--line); }
.steps-track > div:first-child::before { left: 50%; } .steps-track > div:last-child::before { right: 50%; }
.steps-track > div::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--bg-elev); border: 3px solid var(--line-strong); }
.steps-track > div.is-done { color: var(--text); }
.steps-track > div.is-done::before { background: var(--success-strong); }
.steps-track > div.is-done::after { background: var(--success-strong); border-color: var(--success-strong); }
.steps-track > div.is-current::after { box-shadow: 0 0 0 5px var(--brand-soft); }

/* Tooltip : data-tip="Texte" (data-tip-pos="right|bottom|left" facultatif).
   eit.js affiche une infobulle flottante (jamais coupée par un conteneur défilant) et pose
   html.has-tips ; la version CSS ci-dessous ne sert que si le JS n'est pas chargé. */
[data-tip] { position: relative; }
html:not(.has-tips) [data-tip]:not(.is-loading):hover::after, html:not(.has-tips) [data-tip]:not(.is-loading):focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--surface-inverse); color: var(--on-surface-inverse); font-size: .74rem; font-weight: 600; line-height: 1.3; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; pointer-events: none;
}
.tip-float { position: fixed; z-index: 500; top: 0; left: 0; max-width: min(280px, calc(100vw - 16px)); padding: .35rem .6rem; border-radius: 7px; background: var(--surface-inverse); color: var(--on-surface-inverse); font-size: .76rem; font-weight: 600; line-height: 1.35; pointer-events: none; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .12s; white-space: normal; text-align: center; }
.tip-float.is-on { opacity: 1; }

/* ------------------------------------------------------------- Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: .8rem; align-items: start; }
.kanban-col { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100dvh - 260px); min-height: 220px; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem .95rem; font-weight: 750; font-size: .9rem; line-height: 1.3; }
.kanban-head .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--b-fg, var(--text-3)); flex-shrink: 0; }
.kanban-list { padding: 0 .6rem .7rem; display: flex; flex-direction: column; gap: .55rem; overflow-y: auto; flex: 1; min-height: 80px; }
.kanban-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r); padding: .75rem .8rem; cursor: grab; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: .45rem; }
.kanban-card:hover { border-color: var(--line-strong); }
.kanban-card.sortable-ghost { opacity: .4; border-style: dashed; }
.kanban-card.sortable-chosen { box-shadow: var(--shadow-2); }

/* ------------------------------------------------------------- Viewer (PDF, Word, images) */
.viewer { display: flex; flex-direction: column; height: 100%; min-height: 420px; background: var(--bg-sunken); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.viewer-toolbar { display: flex; align-items: center; gap: .35rem; padding: .5rem .6rem; background: var(--bg-elev); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer-title { font-weight: 700; font-size: .88rem; margin-right: auto; min-width: 0; display: flex; gap: .45rem; align-items: center; }
.viewer-stage { flex: 1; overflow: auto; position: relative; padding: 1rem; display: flex; flex-direction: column; align-items: safe center; gap: 1rem; }
.viewer-stage canvas { box-shadow: var(--shadow-2); background: #fff; border-radius: 2px; }
.viewer-stage .docx-wrapper { background: transparent !important; padding: 0 !important; }
.viewer-stage .docx-wrapper > section.docx { box-shadow: var(--shadow-2) !important; margin-bottom: 1rem !important; }
.viewer-stage.is-image { align-items: center; justify-content: center; cursor: grab; overflow: hidden; }
.viewer-stage.is-image img { max-width: none; transform-origin: center; transition: transform .12s; user-select: none; -webkit-user-drag: none; }
.viewer-zoom { font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700; min-width: 3.2rem; text-align: center; }
.viewer-full { position: fixed; inset: 0; z-index: 300; border-radius: 0; border: 0; }
.viewer-msg { margin: auto; text-align: center; color: var(--text-2); display: flex; flex-direction: column; gap: .6rem; align-items: center; padding: 2rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 320; background: rgba(0,0,0,.94); display: flex; flex-direction: column; color: #fff; }
.lightbox-top { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; }
.lightbox-top .btn { --btn-bg: rgba(255,255,255,.08); --btn-fg: #fff; --btn-bd: transparent; }
.lightbox-stage { flex: 1; display: grid; place-items: center; overflow: hidden; position: relative; touch-action: none; cursor: grab; }
.lightbox-stage img { max-width: 92vw; max-height: 80dvh; object-fit: contain; transition: transform .15s; user-select: none; -webkit-user-drag: none; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; background: rgba(255,255,255,.1); border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.lightbox-nav:hover { background: rgba(255,255,255,.2); }
.lightbox-caption { text-align: center; padding: .8rem 1rem 1.2rem; font-size: .92rem; color: rgba(255,255,255,.8); }

/* Split pane redimensionnable */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 8px minmax(0, var(--split-right, 46%)); gap: 0; align-items: stretch; }
.split-handle { cursor: col-resize; position: relative; }
.split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 2px; background: var(--line); transition: background .15s; }
.split-handle:hover::before, .split.is-dragging .split-handle::before { background: var(--brand); }
.split.is-dragging { user-select: none; cursor: col-resize; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } .split-handle { display: none; } }
.is-expanded-panel { position: fixed !important; inset: 12px; z-index: 250; max-height: none !important; box-shadow: var(--shadow-pop); }

/* (Coque de l'application : voir la section « COQUE » plus bas.) */

/* ------------------------------------------------------------- Carrière shell */
.cshell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; }
.cside { position: sticky; top: 0; height: 100dvh; padding: 1.1rem .9rem; border-right: 1px solid var(--line); background: var(--bg-elev); display: flex; flex-direction: column; gap: 1rem; }
.cside .nav-link { color: var(--text-2); }
.cside .nav-link .ph { color: var(--text-3); }
.cside .nav-link:hover { background: var(--bg-hover); color: var(--text); }
.cside .nav-link.is-active { background: var(--brand-soft); color: var(--text); }
.cside .nav-link.is-active .ph { color: var(--brand-ink); }
.cside .nav-link.is-active::before { left: -.9rem; }
.cside .nav-group-label { color: var(--text-3); }
.ctop { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cbottom { display: none; }
@media (max-width: 1023px) {
  .cshell { grid-template-columns: minmax(0, 1fr); }
  .cside { display: none; }
  .cbottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--bg-elev); border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
  .cbottom a { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem 0; font-size: .68rem; font-weight: 650; color: var(--text-3); text-decoration: none !important; position: relative; }
  .cbottom a .ph { font-size: 1.4rem; }
  .cbottom a.is-active { color: var(--brand-ink); }
  .cbottom .count { position: absolute; top: 0; left: 55%; min-width: 1.1rem; height: 1.1rem; font-size: .62rem; }
  .cmain { padding-bottom: 80px; }
}
.freeze-bar { display: flex; gap: .8rem; align-items: center; padding: .85rem 1.1rem; border-radius: var(--r); background: var(--info-soft); color: var(--text); border: 1px solid transparent; margin-bottom: 1.25rem; }
.freeze-bar .ph { font-size: 1.4rem; color: var(--info); }

/* ------------------------------------------------------------- Auth pages */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-visual { position: sticky; top: 0; height: 100dvh; background: #000; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 2.2rem; }
.auth-visual img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.auth-visual > * { position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: calc(2rem + var(--safe-top)) 16px calc(2rem + var(--safe-bottom)); background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-divider { display: flex; align-items: center; gap: .8rem; color: var(--text-3); font-size: .82rem; margin: 1.2rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { --btn-bg: var(--bg-elev); width: 100%; }
.btn-google svg { width: 1.2rem; height: 1.2rem; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-visual { position: relative; height: auto; min-height: 220px; padding: 1.4rem; } .auth-visual .hide-sm { display: none; } }

/* ------------------------------------------------------------- Public site */
.site-top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-top-inner { height: 72px; display: flex; align-items: center; gap: 1.5rem; }
.site-logo { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.site-logo img { width: 2.6rem; height: 2.6rem; }
.site-logo b { font-stretch: 118%; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1; }
.site-logo small { display: block; font-size: .72rem; color: var(--text-3); font-weight: 600; font-stretch: 100%; margin-top: .2rem; }
.site-nav { display: flex; gap: .2rem; margin-left: auto; }
.site-nav a { white-space: nowrap; padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--text-2); font-weight: 620; font-size: .93rem; text-decoration: none !important; }
.site-nav a:hover { color: var(--text); background: var(--bg-hover); }
.site-nav a.is-active { color: var(--text); }
.site-nav a.is-active::after { content: ""; display: block; height: 2px; background: var(--brand); border-radius: 2px; margin-top: 2px; }
.site-actions { display: flex; align-items: center; gap: .5rem; }
/* Petits téléphones (≤ 420 px) : l'en-tête public tient dans la largeur (nom paramétrable long → points de suspension) */
@media (max-width: 420px) {
  .site-top-inner { gap: .6rem; }
  .site-top .site-logo { flex-shrink: 1; min-width: 0; }
  .site-top .site-logo > span { min-width: 0; }
  .site-top .site-logo :is(b, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-top .site-actions { flex-shrink: 0; gap: .35rem; }
}
@media (max-width: 1240px) { .site-nav { display: none; } .site-actions { margin-left: auto; } }
.mobile-nav { position: fixed; inset: 72px 0 0; z-index: 49; background: var(--bg); padding: 1.2rem 16px 2rem; overflow-y: auto; display: flex; flex-direction: column; gap: .2rem; }
.mobile-nav a.nav-item { padding: .95rem .5rem; font-size: 1.15rem; font-weight: 700; font-stretch: 108%; color: var(--text); border-bottom: 1px solid var(--line); text-decoration: none !important; display: flex; gap: .7rem; align-items: center; }

.annonce-bar { background: var(--bg-inverse); color: var(--text-inverse); font-size: .88rem; }
.annonce-bar-inner { display: flex; align-items: center; gap: .75rem; min-height: 42px; padding-block: .4rem; }
.annonce-bar a { color: var(--brand); font-weight: 700; }
.annonce-bar.tone-urgent { background: var(--signal); color: var(--on-signal); } .annonce-bar.tone-urgent a { color: var(--on-signal); text-decoration: underline; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 1rem + 5vw, 5.5rem) clamp(3rem, 1rem + 6vw, 6.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 3vw, 4.5rem); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-title { margin: 0 0 1.4rem; text-wrap: balance; font-size: clamp(2.6rem, 1.2rem + 4.4vw, 5.4rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta b { font-size: 1.7rem; font-weight: 800; font-stretch: 115%; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-meta span { font-size: .84rem; color: var(--text-2); }

/* Bandeau « plus de CV par email » : panneau de signalisation */
.mailban { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1.15rem 1.35rem; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); position: relative; overflow: hidden; }
.mailban::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: repeating-linear-gradient(-45deg, var(--signal) 0 10px, #000 10px 20px); }
.mailban-icon { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: var(--on-signal); font-size: 1.6rem; margin-left: .4rem; }
.mailban-title { font-weight: 800; font-stretch: 108%; font-size: 1.05rem; line-height: 1.25; }
.mailban-text { color: var(--text-2); font-size: .92rem; margin-top: .15rem; }
.mailban s { text-decoration-thickness: 2px; text-decoration-color: var(--signal); color: var(--text); }
@media (max-width: 760px) { .mailban { grid-template-columns: auto minmax(0, 1fr); } .mailban > .btn { grid-column: 1 / -1; } }

/* Lecteur vidéo guide */
.player { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #000; box-shadow: var(--shadow-pop); aspect-ratio: 16 / 9; isolation: isolate; border: 1px solid var(--line); }
.player video { width: 100%; height: 100%; object-fit: cover; }
.player-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.3rem; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.85)); color: #fff; cursor: pointer; border: 0; text-align: left; width: 100%; }
.player-play { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 5.4rem; height: 5.4rem; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 2.2rem; box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 25%, transparent); transition: transform .2s var(--ease); }
.player-poster:hover .player-play { transform: translate(-50%, -50%) scale(1.06); }
.player-captions { position: absolute; left: 50%; bottom: 3.6rem; transform: translateX(-50%); width: min(88%, 760px); text-align: center; z-index: 3; pointer-events: none; transition: bottom .2s ease; }
.player:not(.is-paused):not(:hover):not(:focus-within) .player-captions { bottom: .8rem; }
.player-captions span { display: inline; background: rgba(0,0,0,.78); color: #fff; padding: .2rem .55rem; border-radius: 6px; font-size: clamp(.82rem, .7rem + .5vw, 1.08rem); line-height: 1.75; font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.player-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); color: #fff; opacity: 0; transition: opacity .2s; }
.player:hover .player-controls, .player.is-paused .player-controls, .player:focus-within .player-controls { opacity: 1; }
.player-controls button { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; flex-shrink: 0; }
.player-controls button:hover { background: rgba(255,255,255,.25); }
.player-controls button.is-on { background: var(--brand); color: var(--on-brand); }
.player-progress { flex: 1; height: 5px; border-radius: 5px; background: rgba(255,255,255,.25); cursor: pointer; position: relative; }
.player-progress > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: inherit; }
.player-time { font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.6rem; text-align: right; }
.player-sound-hint { position: absolute; top: .9rem; left: .9rem; z-index: 4; display: inline-flex; gap: .4rem; align-items: center; background: var(--brand); color: var(--on-brand); font-weight: 750; font-size: .82rem; border: 0; border-radius: var(--r-pill); padding: .4rem .8rem; cursor: pointer; }

/* Deux chemins */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) { .paths { grid-template-columns: minmax(0, 1fr); } }
.path { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--line); }
.path.is-featured { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.path.is-featured .muted { color: color-mix(in srgb, var(--text-inverse) 70%, transparent); }
.path-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.path-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.path-list li .ph { color: var(--brand); margin-top: .2rem; }
.path-list li.is-off { opacity: .55; }
.path-list li.is-off .ph { color: var(--text-3); }
.path-time { display: inline-flex; gap: .4rem; align-items: center; font-size: .84rem; font-weight: 700; }

/* Offres (lignes) */
.offer-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.offer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; padding: 1.25rem .25rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: background .12s, padding .15s var(--ease); }
.offer-row:hover { background: var(--bg-hover); padding-inline: 1rem; }
.offer-title { font-size: 1.15rem; font-weight: 750; font-stretch: 106%; line-height: 1.25; }
.offer-meta { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-top: .45rem; }
.offer-side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; text-align: right; }
@media (max-width: 680px) { .offer-row { grid-template-columns: 1fr; } .offer-side { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; } }
.offer-card { display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; height: 100%; }
.offer-card:hover { border-color: var(--line-strong); }

/* Domaines : mosaïque photo */
.domains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; gap: .9rem; }
.domain { position: relative; border-radius: var(--r-lg); overflow: hidden; color: #fff; text-decoration: none !important; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem; background: #000; }
.domain img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .74; }
.domain::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.9)); }
.domain > * { position: relative; z-index: 1; }
.domain:hover img { transform: scale(1.05); opacity: .9; }
.domain-name { font-weight: 750; font-stretch: 108%; font-size: 1.08rem; line-height: 1.2; }
.domain-count { font-size: .8rem; color: rgba(255,255,255,.75); margin-top: .2rem; }
.domain .ph-badge { position: absolute; top: 1rem; left: 1rem; z-index: 1; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: var(--brand); font-size: 1.2rem; }
.domain.is-big { grid-column: span 2; grid-row: span 2; }
.domain.is-big .domain-name { font-size: 1.6rem; }
@media (max-width: 980px) { .domains { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; } }
@media (max-width: 520px) { .domains { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: .6rem; } .domain.is-big { grid-column: span 2; grid-row: span 1; } .domain-name { font-size: .95rem; } }

/* Étapes séquentielles */
.howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: howto; border-top: 2px solid var(--text); }
.howto > div { padding: 1.4rem 1.4rem 0 0; counter-increment: howto; }
.howto > div::before { content: counter(howto); display: block; font-size: 3rem; font-weight: 800; font-stretch: 125%; line-height: 1; color: var(--brand-ink); margin-bottom: .8rem; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .howto { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; } }
@media (max-width: 520px) { .howto { grid-template-columns: 1fr; } }

/* Galerie */
.masonry { columns: 3 280px; column-gap: .9rem; }
.masonry > * { break-inside: avoid; margin-bottom: .9rem; }
.gallery-item { display: block; position: relative; border-radius: var(--r); overflow: hidden; cursor: zoom-in; border: 0; padding: 0; width: 100%; background: var(--bg-sunken); }
.gallery-item img { width: 100%; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .8rem .7rem; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); color: #fff; font-size: .82rem; text-align: left; opacity: 0; transition: opacity .2s; }
.gallery-item:hover figcaption { opacity: 1; }
.album { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; color: #fff; text-decoration: none !important; background: #000; }
.album img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .6s var(--ease); }
.album:hover img { transform: scale(1.04); }
.album-info { position: absolute; inset: auto 0 0 0; padding: 1rem 1.1rem; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); }

/* Articles */
.article-card { display: flex; flex-direction: column; gap: .8rem; color: var(--text); text-decoration: none !important; }
.article-card .thumb { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunken); }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.article-card:hover .thumb img { transform: scale(1.03); }
.article-card h3 { font-size: 1.15rem; font-weight: 750; font-stretch: 105%; margin: 0; line-height: 1.3; }
.article-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; background: none; border: 0; text-align: left; font-size: 1.05rem; font-weight: 700; color: var(--text); cursor: pointer; }
.faq-q .ph { transition: transform .2s var(--ease); flex-shrink: 0; color: var(--brand-ink); font-size: 1.3rem; }
.faq-item.is-open .faq-q .ph { transform: rotate(45deg); }
.faq-a { padding: 0 0 1.25rem; color: var(--text-2); max-width: 70ch; }

/* Annonces (accueil) */
.annonce-card { display: flex; gap: 1rem; padding: 1.2rem; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); align-items: flex-start; }
.annonce-card img { width: 92px; height: 92px; border-radius: var(--r); object-fit: cover; flex-shrink: 0; }

/* Newsletter */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding: clamp(1.6rem, 1rem + 2.5vw, 3rem); border-radius: var(--r-xl); background: var(--bg-inverse); color: var(--text-inverse); }
.newsletter .input { background: transparent; color: var(--text-inverse); border-color: color-mix(in srgb, var(--text-inverse) 30%, transparent); }
.newsletter .input::placeholder { color: color-mix(in srgb, var(--text-inverse) 55%, transparent); }
@media (max-width: 860px) { .newsletter { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 3rem 2rem; margin-top: 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.foot-grid h4 { font-size: .9rem; margin-bottom: .8rem; }
.foot-grid a { display: block; color: var(--text-2); padding: .2rem 0; font-size: .92rem; }
.foot-grid a:hover { color: var(--text); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--text-3); font-size: .84rem; }

/* Page header (pages internes) */
.page-hero { padding-block: clamp(2.2rem, 1rem + 4vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); border-bottom: 1px solid var(--line); }

/* Formulaire de candidature */
.apply-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.apply-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 1000px) { .apply-shell { grid-template-columns: minmax(0, 1fr); } .apply-aside { position: static; } }
.apply-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.2rem, .8rem + 2vw, 2.4rem); box-shadow: var(--shadow-1); }
.step-link { color: var(--text-2); border: 0; background: none; width: 100%; cursor: pointer; font: inherit; font-weight: 600; text-align: left; }
.step-link:hover { background: var(--bg-hover); color: var(--text); }
.step-link.is-current { background: var(--brand-soft); color: var(--text); }
.step-link:disabled { cursor: not-allowed; opacity: .6; }
.apply-nav { position: sticky; bottom: 0; z-index: 10; display: flex; gap: .75rem; justify-content: space-between; align-items: center; padding: .9rem 0; margin-top: 2rem; border-top: 1px solid var(--line); background: var(--bg-elev); box-shadow: 0 -12px 18px -14px rgba(0,0,0,.35); }
.repeat-item { position: relative; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken); }
.repeat-item .remove { position: absolute; top: .6rem; right: .6rem; }
.photo-pick { display: flex; align-items: center; gap: 1.2rem; }
.photo-pick .avatar-xl { border: 3px solid var(--bg-elev); box-shadow: 0 0 0 1px var(--line-strong); background: var(--bg-sunken); color: var(--text-3); }
.review-block { padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); }
.review-block h4 { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; margin-bottom: .6rem; }

/* Succès */
.success-burst { width: 6rem; height: 6rem; border-radius: 50%; background: var(--success-strong); color: var(--on-success); display: grid; place-items: center; font-size: 3rem; margin: 0 auto; animation: burst .6s var(--ease); box-shadow: 0 0 0 14px var(--success-soft); }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
.ref-code { display: inline-flex; gap: .6rem; align-items: center; padding: .6rem 1rem; border-radius: var(--r); background: var(--bg-sunken); border: 1px dashed var(--line-strong); font-weight: 800; font-size: 1.15rem; font-stretch: 110%; letter-spacing: .03em; font-variant-numeric: tabular-nums; }

/* (Anciennes classes .chat-* du premier assistant retirées : remplacées par .ai-* (module IA) et .cx-* (messagerie).) */
.typing { display: inline-flex; gap: 4px; padding: .2rem 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ------------------------------------------------------------- Éditeur de texte riche */
.rte { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-elev); overflow: hidden; }
.rte:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: .3rem; border-bottom: 1px solid var(--line); background: var(--bg-sunken); }
.rte-sep { width: 1px; background: var(--line-strong); margin: .2rem .25rem; }
.rte-area { padding: .85rem 1rem; outline: none; line-height: 1.6; overflow-y: auto; max-height: 520px; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rte-area h2 { font-size: 1.25rem; margin: .8em 0 .4em; } .rte-area h3 { font-size: 1.08rem; margin: .8em 0 .4em; }
.rte-area p, .rte-area ul, .rte-area ol { margin: 0 0 .7em; } .rte-area ul, .rte-area ol { padding-left: 1.3em; }
.rte-area blockquote { margin: .6em 0; padding-left: .9em; border-left: 3px solid var(--brand); color: var(--text-2); }
.rte-area a { text-decoration: underline; }

/* Logo (cercle noir) lisible sur fond sombre */
/* Le logo PNG a des lettres transparentes : fond blanc derrière pour qu'elles restent visibles en thème sombre */
.site-logo img { border-radius: 50%; background: #fff; }
[data-theme="dark"] .site-logo img { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.foot-grid a.site-logo { display: flex; padding: 0; }

/* =========================================================================
   SOCLE APPLICATION RH — COQUE, ESPACE AGENT MOBILE, SYSTÈME VISUEL
   (agent Design ; ne pas renommer ces classes — en ajouter si besoin)
   ========================================================================= */

/* ------------------------------------------------------------- Utilitaires de visibilité
   compact = téléphone + tablette (≤ 1023 px, menu latéral escamotable) */
@media (max-width: 1023px) { .hide-compact { display: none !important; } }
@media (min-width: 1024px) { .show-compact { display: none !important; } }
.print-only { display: none; }

/* ------------------------------------------------------------- Logo : toujours circulaire et bien visible */
.app-logo { --logo-size: 42px; display: inline-grid; place-items: center; width: var(--logo-size); height: var(--logo-size); border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 3px var(--line-strong); flex-shrink: 0; }
.app-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.app-logo.is-free { width: auto; max-width: calc(var(--logo-size) * 3.2); border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.app-logo.is-free img { width: auto; height: 100%; }
.sidebar .app-logo { box-shadow: 0 0 0 2px #000, 0 0 0 3px #2C2C31; }
.app-logo-hero { display: flex; }
.app-logo-hero .app-logo { box-shadow: 0 0 0 4px var(--bg-elev), 0 0 0 5px var(--brand), var(--shadow-2); }

/* ------------------------------------------------------------- Grille de la coque */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns .22s var(--ease); }
.shell.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.main { min-width: 0; display: flex; flex-direction: column; }

/* ------------------------------------------------------------- Menu latéral (noir : couleur du logo) */
.sidebar { position: sticky; top: 0; height: 100dvh; background: #000; color: #EDEDF0; display: flex; flex-direction: column; border-right: 1px solid #1C1C1F; z-index: 40; padding-top: var(--safe-top); }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 0 1.1rem; height: var(--topbar-h); text-decoration: none !important; color: #fff; flex-shrink: 0; min-width: 0; }
.sidebar-brand img { width: 2.3rem; height: 2.3rem; flex-shrink: 0; }
.sidebar-brand > div { min-width: 0; line-height: 1.15; }
.sidebar-brand b { display: block; font-stretch: 115%; font-weight: 800; letter-spacing: -0.01em; font-size: 1.02rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-brand small { display: block; color: #84848D; font-weight: 600; font-size: .74rem; font-stretch: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .3rem .7rem 1rem; scrollbar-width: thin; scrollbar-color: #2C2C31 transparent; overscroll-behavior: contain; }
.nav-group { margin-top: .85rem; }
.nav-group:first-child { margin-top: .15rem; }
.nav-group-label { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .35rem .7rem; border: 0; background: none; font: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; color: #84848D; white-space: nowrap; text-align: left; border-radius: var(--r-xs); }
button.nav-group-label { cursor: pointer; }
button.nav-group-label:hover { color: #EDEDF0; }
.nav-group-label > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-group-label > .ph { font-size: .8rem; transition: transform .2s var(--ease); opacity: .75; }
.nav-group.is-closed .nav-group-label > .ph { transform: rotate(-90deg); }
.nav-group-count { display: none; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 99px; background: var(--brand); color: var(--on-brand); font-size: .62rem; font-weight: 800; letter-spacing: 0; line-height: 1; place-items: center; }
.nav-group.is-closed .nav-group-count { display: inline-grid; }
.nav-group-items { display: flex; flex-direction: column; gap: 1px; padding-top: .1rem; }
.nav-link { display: flex; align-items: center; gap: .75rem; min-height: 2.5rem; padding: .45rem .7rem; border-radius: var(--r-sm); color: #C9C9CF; font-weight: 580; font-size: .92rem; line-height: 1.25; text-decoration: none !important; white-space: nowrap; position: relative; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.nav-link > .nav-text, .nav-link > span:not(.count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-link .ph, .nav-link .ph-fill { font-size: 1.25rem; flex-shrink: 0; color: #84848D; transition: color .15s; }
.nav-link:hover { background: #151517; color: #fff; }
.nav-link:hover .ph, .nav-link:hover .ph-fill { color: #fff; }
.nav-link.is-active { background: color-mix(in srgb, var(--brand) 14%, #000); color: #fff; }
.nav-link.is-active .ph, .nav-link.is-active .ph-fill { color: var(--brand-bright, var(--brand)); }
.nav-link.is-active::before { content: ""; position: absolute; left: -0.7rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-link .count { margin-left: auto; }
.nav-link:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
button.nav-link { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.sidebar-foot { padding: .55rem .7rem calc(.55rem + var(--safe-bottom)); border-top: 1px solid #1C1C1F; display: flex; flex-direction: column; gap: .15rem; flex-shrink: 0; }
.sidebar-version { padding: .15rem .7rem .3rem; color: #84848D !important; }
.sidebar-overlay { display: none; }
/* Ancien sélecteur d'entreprise (liste) — conservé pour compatibilité */
.company-switch { position: relative; margin: 0 .9rem .6rem; }
.company-switch > i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.company-switch .select { padding-left: 2.1rem; width: 100%; }

/* Menu réduit (rail d'icônes, ordinateur) : infobulles à droite, pastilles en points */
@media (min-width: 1024px) {
  .shell.is-collapsed .nav-link span, .shell.is-collapsed .nav-group-label, .shell.is-collapsed .sidebar-brand div,
  .shell.is-collapsed .sidebar-foot .hide-collapsed, .shell.is-collapsed .sidebar-version, .shell.is-collapsed .company-switch { display: none; }
  .shell.is-collapsed .nav-link { justify-content: center; padding: .55rem; }
  .shell.is-collapsed .nav-link .count { display: block; position: absolute; top: .45rem; right: .6rem; min-width: 0; width: .55rem; height: .55rem; padding: 0; font-size: 0; box-shadow: 0 0 0 2px #000; }
  .shell.is-collapsed .nav-group { margin-top: .45rem; border-top: 1px solid #1C1C1F; padding-top: .45rem; }
  .shell.is-collapsed .nav-group:first-child { border-top: 0; margin-top: .15rem; }
  .shell.is-collapsed .nav-group-items { display: flex !important; height: auto !important; overflow: visible !important; }
  .shell.is-collapsed .sidebar-brand { justify-content: center; padding-inline: .5rem; }
}

/* ------------------------------------------------------------- Barre du haut */
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--topbar-h) + var(--safe-top)); padding: var(--safe-top) calc(1.25rem + var(--safe-right)) 0 calc(1.25rem + var(--safe-left)); display: flex; align-items: center; gap: .6rem; background: var(--bg); border-bottom: 1px solid var(--line); }
/* le flou est porté par un pseudo-élément : la barre ne devient pas « bloc conteneur » des feuilles fixes */
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.topbar > * { position: relative; }
.topbar .btn-ghost.btn-icon { border-radius: 50%; }
.topbar-search { flex: 1 1 auto; max-width: 560px; min-width: 0; }
.topbar-search .input { background: var(--bg-elev); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.topbar-sep { width: 1px; height: 1.6rem; background: var(--line); margin-inline: .25rem; flex-shrink: 0; }
.topbar-title { font-weight: 750; font-stretch: 105%; font-size: 1.06rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; letter-spacing: -.005em; }
.topbar-brand { display: flex; align-items: center; gap: .55rem; min-width: 0; flex: 1; color: var(--text); text-decoration: none !important; }
.topbar-title.is-lead, .topbar-brand.is-lead { padding-left: .6rem; }
/* Grand titre façon iOS : le titre de la barre n'apparaît qu'une fois le titre de page sorti de l'écran */
@media (max-width: 1023px) {
  .topbar.has-large-title [data-mobile-title] { opacity: 0; transform: translateY(4px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .topbar.has-large-title.is-scrolled [data-mobile-title] { opacity: 1; transform: none; }
  .topbar.is-scrolled { box-shadow: 0 6px 18px -14px rgba(0, 0, 0, .35); }
}
.topbar-brand b { font-stretch: 112%; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.4rem; padding: 0 .35rem; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--bg-sunken); font: inherit; font-size: .72rem; font-weight: 700; line-height: 1; color: var(--text-3); white-space: nowrap; }
.user-chip { padding: .2rem .55rem .2rem .2rem; gap: .55rem; border-radius: var(--r-pill); min-height: 2.6rem; }
.user-chip-text { text-align: left; line-height: 1.15; display: flex; flex-direction: column; min-width: 0; }
.user-chip-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15ch; }

/* Sélecteur d'entreprise (multi-entités) */
.company-picker-btn { display: inline-flex; align-items: center; gap: .5rem; height: 2.5rem; max-width: 260px; padding: 0 .65rem 0 .3rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-elev); color: var(--text); font: inherit; font-weight: 650; font-size: .86rem; line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s; }
.company-picker-btn:hover { border-color: var(--line-strong); }
.company-picker-btn > .truncate { min-width: 0; }
.company-picker-btn > .ph { color: var(--text-3); font-size: .95rem; }
.company-dot { --c: var(--bg-inverse); width: 1.85rem; height: 1.85rem; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: .62rem; font-weight: 800; letter-spacing: .02em; line-height: 1; color: #fff; background: var(--c); overflow: hidden; }
.company-dot img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.company-dot.is-all { background: var(--brand-soft); color: var(--brand-ink); font-size: .95rem; }
.company-menu { width: 300px; }
@media (max-width: 1023px) { .company-picker-btn { width: var(--tap); height: var(--tap); padding: 0; border: 0; background: transparent; justify-content: center; border-radius: 50%; } .company-picker-btn:hover { background: var(--bg-hover); } }
.company-menu .menu-item { gap: .7rem; }
.company-menu .menu-item .check-mark { margin-left: auto; color: var(--brand-ink); font-size: 1.05rem; }

/* ------------------------------------------------------------- Zone de contenu */
.content { padding: 1.5rem 1.25rem 3rem; flex: 1; min-width: 0; }
.content-inner { width: 100%; max-width: var(--content-max); margin-inline: auto; }
.content.is-full .content-inner { max-width: none; }
.content.is-narrow .content-inner { max-width: 980px; }
@media (min-width: 1024px) { .content { padding: 1.75rem 2.2rem 3.5rem; } .topbar { padding-inline: calc(1.2rem + var(--safe-left)) calc(2.2rem + var(--safe-right)); } }
@media (min-width: 1800px) { .content { padding-inline: 3rem; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.page-sub { color: var(--text-2); margin: .3rem 0 0; font-size: .95rem; }
.breadcrumb { display: flex; gap: .4rem; align-items: center; font-size: .82rem; line-height: 1.3; color: var(--text-3); margin-bottom: .45rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-2); display: inline-flex; align-items: center; gap: .3rem; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .ph { font-size: .85rem; }
.breadcrumb .sep, .breadcrumb > .ph-caret-right { font-size: .7rem; opacity: .6; } /* séparateur unique dans tous les modules */
.app-breadcrumb { margin-bottom: .9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.bulkbar { position: sticky; bottom: calc(16px + var(--safe-bottom)); z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; margin-top: 1rem; background: var(--surface-inverse); color: var(--on-surface-inverse); border-radius: var(--r); box-shadow: var(--shadow-pop); flex-wrap: wrap; animation: rise .25s var(--ease-out); }
.bulkbar .btn { --btn-bg: transparent; --btn-fg: var(--on-surface-inverse); --btn-bd: rgba(255, 255, 255, .22); }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .08); }
.bulkbar .btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: var(--brand); }
.bulkbar .btn-danger { --btn-bg: var(--danger-strong); --btn-fg: #fff; --btn-bd: var(--danger-strong); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .25rem 0 .7rem; }
.section-title { font-size: 1.06rem; font-weight: 750; font-stretch: 105%; line-height: 1.25; margin: 0; display: flex; align-items: center; gap: .5rem; }
.section-title > .ph, .section-title > .ph-fill { color: var(--brand-ink); }
/* Barre d'actions principale fixée en bas sur mobile (formulaires, fiches) : <div class="action-bar is-sticky"> */
.action-bar { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
/* Bouton d'action flottant (téléphone) : @section('fab') <a class="fab" href="…"><i class="ph ph-plus"></i><span>Nouvelle demande</span></a> */
.fab { display: none; }
@media (max-width: 900px) {
  .fab { position: fixed; z-index: 65; right: calc(16px + var(--safe-right)); bottom: calc(16px + var(--safe-bottom)); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 3.5rem; height: 3.5rem; padding: 0 1.1rem; border-radius: 18px; border: 0; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 750; font-size: .95rem; line-height: 1; text-decoration: none !important; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--brand) 70%, #000), var(--shadow-2); cursor: pointer; animation: pop-in .3s var(--ease-out); -webkit-tap-highlight-color: transparent; }
  .fab > .ph, .fab > .ph-fill, .fab > .ph-bold { font-size: 1.45rem; }
  .fab:active { transform: scale(.95); }
  .fab.is-round { width: 3.5rem; padding: 0; border-radius: 50%; }
  .fab.is-round > span { display: none; }
  body:has(.has-tabbar) .fab { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); }
}

/* ------------------------------------------------------------- Mode compact (téléphone / tablette) */
@media (max-width: 1023px) {
  .shell, .shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(304px, 86vw); transform: translateX(-104%); transition: transform .3s var(--ease-out), box-shadow .3s; z-index: 240; padding-left: var(--safe-left); visibility: hidden; }
  .shell.is-mobile-open .sidebar { transform: none; visibility: visible; box-shadow: 24px 0 60px -20px rgba(0, 0, 0, .6); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: var(--backdrop); z-index: 239; }
  .sidebar-overlay[style*="display: none"] { display: none; }
  .nav-link { min-height: var(--tap); font-size: .98rem; }
  .topbar { gap: .2rem; padding-inline: calc(.4rem + var(--safe-left)) calc(.4rem + var(--safe-right)); }
  .topbar .btn-icon { width: var(--tap); min-width: var(--tap); min-height: var(--tap); }
  .topbar-actions { gap: 0; }
}
@media (max-width: 767px) {
  .content { padding: 1rem 16px 2rem; padding-left: calc(16px + var(--safe-left)); padding-right: calc(16px + var(--safe-right)); }
  .page-head { margin-bottom: 1.1rem; align-items: flex-start; }
  .page-head > .toolbar { width: 100%; }
  .page-title { font-size: 1.5rem; }
  .panel-header { padding: .85rem 1rem; }
  .panel-body { padding: 1rem; }
  .panel-footer { padding: .8rem 1rem; }
  .bulkbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); margin: 0; z-index: 70; }
  .has-tabbar .bulkbar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px); }
  .action-bar.is-sticky { position: sticky; bottom: 0; z-index: 15; margin: 1rem -16px 0; padding: .75rem 16px calc(.75rem + var(--safe-bottom)); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-top: 1px solid var(--line); }
  .has-tabbar .action-bar.is-sticky { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: .75rem; }
  .action-bar.is-sticky > .btn { flex: 1; }
  .action-bar.is-sticky > .btn.btn-ghost { flex: 0 1 auto; } /* « Annuler » à sa largeur : le bouton principal tient sur une ligne */
  .content-inner > .tabset > .tabs { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
}

/* ------------------------------------------------------------- Barre d'onglets mobile (espace agent) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .has-tabbar .content { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 1.5rem); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 0 calc(.25rem + var(--safe-right)) var(--safe-bottom) calc(.25rem + var(--safe-left)); background: var(--bg-elev); border-top: 1px solid var(--line); }
  .tabbar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--text-3); font-size: .68rem; font-weight: 650; line-height: 1.1; letter-spacing: .01em; text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
  .tabbar-item.is-active { color: var(--brand-ink); }
  .tabbar-icon { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; font-size: 1.4rem; line-height: 1; transition: background .25s var(--ease), transform .18s var(--ease-spring); }
  .tabbar-icon > .ph, .tabbar-icon > .ph-fill { font-size: 1em; }
  .tabbar-item.is-active .tabbar-icon { background: var(--brand-soft); }
  .tabbar-item:active .tabbar-icon { transform: scale(.86); }
  .tabbar-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .tabbar-badge { position: absolute; top: -3px; left: calc(50% + 6px); min-width: 1.1rem; height: 1.1rem; padding: 0 .28rem; border-radius: 999px; background: var(--danger-strong); color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg-elev); font-variant-numeric: tabular-nums; }
  body:has(.has-tabbar) .toasts { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }
}

/* ------------------------------------------------------------- Feuilles du bas (bottom sheets) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 219; background: var(--backdrop); }
.sheet { position: fixed; z-index: 220; left: 0; right: 0; bottom: 0; margin-inline: auto; width: 100%; max-height: calc(100dvh - var(--safe-top) - 24px); display: flex; flex-direction: column; background: var(--bg-elev); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .45); padding-bottom: var(--safe-bottom); overscroll-behavior: contain; will-change: transform; }
@media (min-width: 641px) { .sheet { width: min(560px, calc(100vw - 32px)); bottom: 16px; border-radius: 22px; padding-bottom: 0; max-height: calc(100dvh - 48px); } }
.sheet-grabber { flex-shrink: 0; display: grid; place-items: center; height: 24px; cursor: grab; touch-action: none; }
.sheet-grabber::before { content: ""; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); }
.sheet-head { display: flex; align-items: center; gap: .8rem; padding: .1rem 1.1rem .9rem; border-bottom: 1px solid var(--line); flex-shrink: 0; touch-action: none; }
.sheet-title { font-weight: 750; font-size: 1.05rem; line-height: 1.25; margin: 0; }
.sheet-body { overflow-y: auto; padding: .9rem 1rem 1.1rem; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1rem; }
.sheet-section-label { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin: 0 0 .35rem .2rem; }
.sheet-list { display: flex; flex-direction: column; background: var(--bg-sunken); border-radius: var(--r); padding: .25rem; }
.sheet-list .menu-item { min-height: 3rem; font-size: .98rem; }
.sheet-list .menu-item > .ph, .sheet-list .menu-item > .ph-fill { font-size: 1.25rem; }
.sheet-enter { transition: transform .34s var(--ease-out); } .sheet-leave { transition: transform .22s var(--ease); }
.sheet-from { transform: translateY(105%); } .sheet-to { transform: translateY(0); }
.sheet.is-dragging { transition: none !important; }
/* Tuiles d'application (menu « Plus », raccourcis) */
.app-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .85rem .35rem .75rem; min-height: 92px; border-radius: var(--r); background: var(--bg-sunken); border: 1px solid transparent; color: var(--text); font-size: .78rem; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none !important; transition: transform .15s var(--ease), background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.app-tile:hover { border-color: var(--line-strong); }
.app-tile:active { transform: scale(.95); }
.app-tile.is-active { background: var(--brand-soft); border-color: var(--brand-line); }
.app-tile .icon-box { width: 2.6rem; height: 2.6rem; font-size: 1.3rem; border-radius: 14px; }
.app-tile .count { position: absolute; top: .4rem; right: .4rem; }

/* Menus déroulants → feuilles du bas sur téléphone (automatique pour .dropdown > .menu) */
@media (max-width: 640px) {
  .dropdown > .menu, .menu.is-sheet {
    position: fixed; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; min-width: 0; max-width: none !important;
    max-height: min(80dvh, 680px) !important; overflow-y: auto; overscroll-behavior: contain; z-index: 260; padding: 0 .6rem calc(.8rem + var(--safe-bottom)) !important;
    border: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px -16px rgba(0, 0, 0, .5); animation: sheet-up .32s var(--ease-out);
  }
  .dropdown > .menu::before, .menu.is-sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: .55rem auto .45rem; flex-shrink: 0; }
  .dropdown:has(> .menu:not([style*="display: none"]):not([x-cloak]))::after { content: ""; position: fixed; inset: 0; z-index: 259; background: var(--backdrop); animation: fade-in .2s; }
  .topbar:has(.dropdown > .menu:not([style*="display: none"]):not([x-cloak])) { z-index: 270; }
  .dropdown > .menu .menu-item, .menu.is-sheet .menu-item { min-height: 3rem; font-size: 1rem; padding: .6rem .8rem; }
  .dropdown > .menu .menu-label { padding: .7rem .8rem .3rem; }
}

/* ------------------------------------------------------------- Modales : plein écran sur téléphone, feuille pour les confirmations */
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal { max-width: none; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; padding-top: var(--safe-top); animation: sheet-up .34s var(--ease-out); }
  .modal-body { flex: 1; }
  .modal-footer { padding-bottom: calc(1rem + var(--safe-bottom)); }
  .modal-footer > .btn, .modal-footer > form > .btn { flex: 1; }
  .modal.modal-sm { height: auto; max-height: calc(100dvh - var(--safe-top) - 24px); border-radius: 22px 22px 0 0; padding-top: 0; }
  .modal.modal-sm::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: .55rem auto 0; flex-shrink: 0; }
  .drawer { width: 100vw; border: 0; }
}

/* ------------------------------------------------------------- Cartes statistiques (<x-stat>) */
.stat-card { position: relative; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; box-shadow: var(--shadow-1); min-width: 0; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.stat-head { display: flex; align-items: center; gap: .6rem; min-height: 2.25rem; }
.stat-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-ink); font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
.stat-icon > .ph, .stat-icon > .ph-fill { font-size: 1em; }
.stat-card.tone-info .stat-icon { background: var(--info-soft); color: var(--info); }
.stat-card.tone-success .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.tone-warning .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.tone-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-card.tone-violet .stat-icon { background: var(--violet-soft); color: var(--violet); }
.stat-card.tone-orange .stat-icon { background: var(--orange-soft); color: var(--orange); }
.stat-card.tone-muted .stat-icon { background: var(--muted-soft); color: var(--text-2); }
.stat-label { font-size: .82rem; color: var(--text-2); font-weight: 600; line-height: 1.3; flex: 1; min-width: 0; }
.stat-toggle { margin-left: auto; margin-right: -.3rem; color: var(--text-3); }
.stat-toggle .ph { transition: transform .2s var(--ease); }
.stat-toggle .is-rotated { transform: rotate(180deg); }
.stat-value { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; font-stretch: 110%; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-unit { font-size: .58em; font-weight: 700; font-stretch: 100%; letter-spacing: 0; color: var(--text-2); white-space: nowrap; }
.stat-value.is-text { font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem); font-stretch: 100%; letter-spacing: -.01em; line-height: 1.2; } /* valeur en toutes lettres (x-stat) */
.stat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .78rem; line-height: 1.3; color: var(--text-3); }
.stat-trend { display: inline-flex; align-items: center; gap: .2rem; font-weight: 700; }
.stat-trend > .ph { font-size: 1.05em; }
.stat-trend.is-up { color: var(--success); }
.stat-trend.is-down { color: var(--danger); }
.stat-detail { border-top: 1px dashed var(--line); margin-top: .4rem; padding-top: .6rem; font-size: .85rem; }
.stat-card:has(> .stat-head a.stat-toggle):hover { border-color: var(--line-strong); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--gap, 1rem); }
/* Bandeau de statistiques repliable : <section class="stats-strip" x-data="collapsible('cle')"> */
.stats-strip { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.25rem; }
.collapse-toggle { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; padding: .25rem .4rem; margin-left: -.4rem; border-radius: var(--r-xs); font: inherit; font-size: .8rem; font-weight: 650; line-height: 1.2; color: var(--text-2); cursor: pointer; }
.collapse-toggle:hover { color: var(--text); background: var(--bg-hover); }
.collapse-toggle > .ph { transition: transform .2s var(--ease); font-size: .95rem; }
.collapse-toggle[aria-expanded="false"] > .ph { transform: rotate(-90deg); }
@media (max-width: 680px) {
  .grid:has(> .stat-card), .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat-card { padding: .8rem .85rem; border-radius: var(--r); }
  .stat-head { gap: .5rem; min-height: 2rem; }
  .stat-icon { width: 2rem; height: 2rem; font-size: 1.05rem; }
  .stat-label { font-size: .78rem; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; } /* deux colonnes étroites : jamais de mot qui déborde sur le bouton */
  .stat-value { font-size: min(1.4rem, 5.6vw); } /* un mot comme « Désactivée » tient sur deux colonnes de 360 px */
  .stat-value.is-text { font-size: min(1.15rem, 4.4vw); }
}

/* ------------------------------------------------------------- Onglets imbriqués (<x-tabs>) */
.tabset { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tabset .tabset { gap: .75rem; }
.tab-panel { min-width: 0; }
.tabs.is-overflowing { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0), #000 calc(100% - var(--fade-r, 0px)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0), #000 calc(100% - var(--fade-r, 0px)), transparent 100%); }
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--bg-hover) 70%, transparent); }
.tab:focus-visible { box-shadow: inset var(--ring); }
.tab > .ph, .tab > .ph-fill { font-size: 1.15rem; }
.tab.is-active > .ph, .tab.is-active > .ph-fill { color: var(--brand-ink); }
.tab .count { margin-left: .1rem; }
.tab:not(.is-active) .count { background: var(--bg-sunken); color: var(--text-2); }
.tab::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease-out); }
.tab.is-active::after { transform: scaleX(1); }
/* Niveau 2 (sous-onglets) et variante « pills » : pastilles */
.tabset-pills > .tabs, .tabset .tabset > .tabs { border-bottom: 0; gap: .35rem; padding: 2px; }
.tabset-pills > .tabs > .tab, .tabset .tabset > .tabs > .tab { padding: .45rem .9rem; border-radius: var(--r-pill); font-size: .88rem; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tabset-pills > .tabs > .tab::after, .tabset .tabset > .tabs > .tab::after { display: none; }
.tabset-pills > .tabs > .tab.is-active, .tabset .tabset > .tabs > .tab.is-active { background: var(--bg-inverse); color: var(--text-inverse); box-shadow: none; }
.tabset-pills > .tabs > .tab.is-active > .ph, .tabset .tabset > .tabs > .tab.is-active > .ph { color: inherit; }
/* Niveau 3 (sous-sous-onglets) : segments compacts */
.tabset .tabset .tabset > .tabs { display: inline-flex; align-self: flex-start; max-width: 100%; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--line); }
.tabset .tabset .tabset > .tabs > .tab { padding: .35rem .75rem; border-radius: 7px; font-size: .83rem; box-shadow: none; }
.tabset .tabset .tabset > .tabs > .tab.is-active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
@media (pointer: coarse) { .tab { min-height: var(--tap); } .tabset .tabset > .tabs > .tab { min-height: 2.5rem; } }

/* ------------------------------------------------------------- Lignes de liste, cartes génériques */
.list-row { display: flex; align-items: center; gap: .8rem; min-height: 3.25rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; transition: background .12s; -webkit-tap-highlight-color: transparent; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg-hover); }
.list-row.is-unread { background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.list-row > .chev { margin-left: auto; color: var(--text-3); font-size: 1rem; }
.list-row-title { font-weight: 650; line-height: 1.3; }
.list-row-sub { font-size: .8rem; color: var(--text-2); line-height: 1.35; }
.unread-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 260px)), 1fr)); gap: var(--gap, 1rem); }
.item-card { display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.1rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none !important; min-width: 0; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
a.item-card:hover, button.item-card:hover { border-color: var(--line-strong); }
.item-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

/* ------------------------------------------------------------- Mise en page « hauteur pleine »
   Règle du client : la page ne défile pas, seules les listes et tableaux défilent (ordinateur).
   <div class="page-fill"> <x-page-head/> <div class="panel fill"> <div class="table-wrap">…</div> </div> </div>
   .page-fill doit être un enfant direct du contenu de la page (ou @section('content_class', 'is-fill')).
   Sur téléphone / tablette, la page reprend un défilement naturel. */
.scroll-area { overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroll-y { max-height: var(--max-h, 60vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.table-wrap.scroll-y { overflow: auto; }
.fill { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
@media (min-width: 1024px) {
  .main:has(> .content > .content-inner > .page-fill), .main:has(> .content.is-fill) { height: 100dvh; overflow: hidden; }
  .content:has(> .content-inner > .page-fill), .content.is-fill { display: flex; flex-direction: column; min-height: 0; padding-bottom: 1.5rem; }
  .content:has(> .content-inner > .page-fill) > .content-inner, .content.is-fill > .content-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap, 1rem); }
  .page-fill > * { flex-shrink: 0; }
  .page-fill > .fill, .fill > .fill, .page-fill > .tabset.fill { flex: 1 1 auto; min-height: 0; }
  .fill > .table-wrap, .fill > .scroll-area, .fill > .panel-body, .fill > .kanban { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .tabset.fill > .tab-panels, .tabset.fill > .tab-panels > .tab-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .page-fill .kanban-col { max-height: 100%; }
  .page-fill .page-head { margin-bottom: 0; }
}

/* ------------------------------------------------------------- Tableaux : cartes empilées sur téléphone
   <table class="table is-stacked"> + <td data-label="Matricule"> ; .col-main = titre de la carte */
@media (max-width: 680px) {
  .table.is-stacked thead { display: none; }
  .table.is-stacked, .table.is-stacked tbody, .table.is-stacked tr, .table.is-stacked td { display: block; width: 100%; }
  .table.is-stacked tr { position: relative; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .table.is-stacked tr:has(> td.col-check) { padding-left: 3.1rem; }
  .table.is-stacked tr:has(> td.col-actions) > td.col-main { padding-right: 2.6rem; }
  .table.is-stacked tr:last-child { border-bottom: 0; }
  .table.is-stacked td { border: 0; padding: .18rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: right; min-height: 1.9rem; }
  .table.is-stacked td::before { content: attr(data-label); color: var(--text-3); font-weight: 600; font-size: .8rem; text-align: left; flex-shrink: 0; }
  .table.is-stacked td:not([data-label])::before, .table.is-stacked td[data-label=""]::before { display: none; }
  .table.is-stacked td.col-main { justify-content: flex-start; text-align: left; font-weight: 700; font-size: 1rem; }
  .table.is-stacked td.col-main::before { display: none; }
  .table.is-stacked td.col-check { position: absolute; top: .85rem; left: 1rem; width: auto; min-height: 0; padding: 0; }
  .table.is-stacked td.col-check::before, .table.is-stacked td.col-actions::before { display: none; }
  .table.is-stacked td.col-actions { position: absolute; top: .55rem; right: .5rem; width: auto; min-height: 0; padding: 0; }
}

/* ------------------------------------------------------------- Recherche globale (Ctrl K) */
.gsearch { position: relative; }
.gsearch .input { padding-right: 4.4rem; }
.gsearch-panel { width: 100%; max-height: min(460px, 70dvh); overflow-y: auto; padding: .35rem; }
.gsearch-group { padding: .55rem .7rem .25rem; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.gsearch-item { align-items: center; }
.gsearch-item .icon-box { width: 2.1rem; height: 2.1rem; font-size: 1.05rem; border-radius: var(--r-sm); }
.gsearch-item.is-active { background: var(--bg-hover); box-shadow: inset 3px 0 0 var(--brand); }
.gsearch-foot { display: flex; gap: .9rem; align-items: center; padding: .5rem .7rem .3rem; border-top: 1px solid var(--line); margin-top: .3rem; font-size: .75rem; color: var(--text-3); flex-wrap: wrap; }
.gsearch-foot span { display: inline-flex; align-items: center; gap: .3rem; }
.gsearch-overlay { position: fixed; inset: 0; z-index: 280; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--safe-top); animation: fade-in .18s; }
.gsearch-overlay-head { display: flex; align-items: center; gap: .4rem; padding: .5rem .5rem .5rem .75rem; border-bottom: 1px solid var(--line); }
.gsearch-overlay-head .input-icon { flex: 1; }
.gsearch-overlay-body { flex: 1; overflow-y: auto; padding: .5rem .5rem calc(1rem + var(--safe-bottom)); }
.gsearch-overlay-body .menu-item { min-height: 3.2rem; }

/* ------------------------------------------------------------- Notifications (cloche et page) */
.notif-menu { width: min(400px, 92vw); padding: 0 !important; }
.notif-menu-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.notif-list { max-height: 440px; overflow-y: auto; padding: .35rem; }
.notif-item { align-items: flex-start !important; white-space: normal; gap: .7rem; }
.notif-item .icon-box { width: 2.25rem; height: 2.25rem; font-size: 1.05rem; border-radius: 50%; }
.notif-item.is-read .icon-box { background: var(--bg-sunken); color: var(--text-3); }
.notif-item .unread-dot { margin-top: .45rem; }
.bell-count { position: absolute; top: 3px; right: 1px; min-width: 1.15rem; height: 1.15rem; font-size: .62rem; background: var(--danger-strong); color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.bell-ring { animation: bell-ring .9s var(--ease) 1; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.day-label { position: sticky; top: 0; z-index: 1; padding: .55rem 1rem; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--bg-sunken); border-bottom: 1px solid var(--line); }

/* ------------------------------------------------------------- Menu de compte */
.menu-profile { display: flex; align-items: center; gap: .75rem; padding: .7rem .7rem .85rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); min-width: 0; }
.menu-profile > div { min-width: 0; line-height: 1.25; }
.menu-profile b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem .7rem; min-height: 2.6rem; font-size: .9rem; font-weight: 550; }
.menu-row > span { display: inline-flex; align-items: center; gap: .6rem; }
.menu-row > span > .ph { color: var(--text-3); font-size: 1.1rem; }
.theme-icon { transition: transform .4s var(--ease-spring); }
[data-theme="dark"] .theme-icon { transform: rotate(-30deg); }

/* ------------------------------------------------------------- Accueil de l'espace agent */
.portal-home { display: flex; flex-direction: column; gap: 1.4rem; max-width: 1180px; margin-inline: auto; }
.hello-card { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 1.35rem; border-radius: var(--r-xl); background: #050605; color: #F3F5F1; box-shadow: var(--shadow-2); }
.hello-card::before { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; right: -140px; top: -170px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 62%, transparent) 0%, transparent 68%); opacity: .75; }
.hello-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 23px); }
[data-theme="dark"] .hello-card { box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.hello-card .avatar { --s: 4.2rem; background: #fff; color: #000; box-shadow: 0 0 0 3px #050605, 0 0 0 5px var(--brand); font-size: 1.35rem; }
.hello-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.hello-greet { font-size: .88rem; color: #B6B6BD; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.hello-greet .ph, .hello-greet .ph-fill { color: var(--brand-bright, var(--brand)); }
.hello-name { margin: 0; font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; font-stretch: 114%; letter-spacing: -.02em; line-height: 1.05; color: #fff; overflow-wrap: anywhere; }
.hello-meta { font-size: .86rem; color: #B6B6BD; line-height: 1.35; }
.hello-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.hello-chips .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #EDEDF0; }
.hello-chips .chip .ph { color: var(--brand-bright, var(--brand)); }
.hello-date { position: absolute; top: 1rem; right: 1.2rem; font-size: .76rem; font-weight: 650; color: #B6B6BD; }
.hello-date::first-letter { text-transform: uppercase; }
.portal-home .widgets-grid { margin-top: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.quick-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .55rem; min-height: 138px; padding: 1rem; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-1); transition: transform .2s var(--ease), border-color .15s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.quick-tile .icon-box { width: 2.9rem; height: 2.9rem; font-size: 1.45rem; border-radius: 15px; }
.quick-tile-title { margin-top: auto; font-weight: 750; font-size: 1rem; line-height: 1.2; font-stretch: 104%; }
.quick-tile-sub { font-size: .8rem; color: var(--text-2); line-height: 1.3; }
.quick-tile > .count { position: absolute; top: 1rem; right: 1rem; }
.quick-tile > .arrow { position: absolute; top: 1.05rem; right: 1rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--bg-sunken); font-size: .95rem; color: var(--text-2); transition: transform .2s var(--ease), color .15s, background .15s; }
.quick-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.quick-tile:hover > .arrow { transform: translateX(2px); color: var(--on-brand); background: var(--brand); }
.quick-tile:active { transform: scale(.975); }
.shortcut-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.shortcut-row::-webkit-scrollbar { display: none; }
.shortcut-row .chip { min-height: 2.5rem; padding-inline: .9rem; font-size: .86rem; color: var(--text); }
@media (max-width: 767px) {
  .hello-card { padding: 1.15rem 1.05rem; gap: .9rem; border-radius: 22px; }
  .hello-card .avatar { --s: 3.6rem; font-size: 1.15rem; }
  .hello-date { display: none; }
  .quick-tile { min-height: 124px; padding: .9rem; }
  .shortcut-row { margin-inline: calc(-1 * var(--pad-x, 16px)); padding-inline: var(--pad-x, 16px); }
}
/* Ancien en-tête d'accueil — conservé */
.portal-hello { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }

/* ------------------------------------------------------------- Widgets des modules (tableaux de bord) */
.widgets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 1rem; }
.widgets-grid:empty { display: none; }
.widget-slot { grid-column: span var(--span, 1); min-width: 0; display: flex; flex-direction: column; }
.widget-slot > .panel, .widget-slot > .stat-card, .widget-slot > .item-card { flex: 1; }
@media (max-width: 720px) { .widget-slot { grid-column: span 1; } }

/* ------------------------------------------------------------- Installation de l'application (PWA) */
.install-card { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--brand-line); box-shadow: var(--shadow-1); }
.install-card .app-logo { --logo-size: 44px; border-radius: 12px; }
.install-card .app-logo img { border-radius: 12px; }
.install-card-text { flex: 1; min-width: 0; line-height: 1.35; }
.install-card-text b { display: block; font-size: .95rem; }
.install-card-text > span { display: block; font-size: .8rem; color: var(--text-2); line-height: 1.45; }
.ios-share { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 5px; background: var(--bg-sunken); color: var(--text); /* charte : pas de bleu décoratif */ vertical-align: -0.3em; font-size: .85rem; line-height: 1; }

/* ------------------------------------------------------------- Bandeaux divers */
.impersonate-bar { background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .88rem; padding: .5rem 1rem; display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.impersonate-bar a { color: inherit; text-decoration: underline; }
.offline-bar { position: fixed; z-index: 410; left: 50%; top: calc(var(--safe-top) + 10px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 99px; background: var(--surface-inverse); color: var(--on-surface-inverse); font-size: .82rem; font-weight: 650; box-shadow: var(--shadow-pop); animation: fade-in .2s; }
.offline-bar .ph { color: #F2B35A; }

/* ------------------------------------------------------------- Diaporama, accueil public, maintenance (conservés) */
.slides { position: absolute; inset: 0; overflow: hidden; background: #000; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.1s var(--ease), transform 6s linear; }
.slide.is-active { opacity: 1; }
.effect-zoom .slide.is-active { transform: scale(1.06); }
.effect-slide .slide { transform: translateX(6%); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.effect-slide .slide.is-active { transform: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 40%, rgba(0,0,0,.85)); }
.slide figcaption { position: absolute; left: 2rem; right: 2rem; bottom: 5.5rem; z-index: 1; color: #fff; display: flex; flex-direction: column; gap: .25rem; }
.slide figcaption b { font-size: 1.3rem; }
.slides-dots { position: absolute; bottom: 1.5rem; left: 2rem; z-index: 2; display: flex; gap: .4rem; }
.slides-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: width .3s var(--ease); }
.slides-dots button.is-active { width: 26px; background: #fff; }
/* Écran tactile : chaque point devient une cible de 44 px (zone transparente), l'espacement visible reste serré */
@media (pointer: coarse) {
  .slides-dots { gap: 0; margin-left: 10px; }
  .slides-dots button { box-sizing: content-box; padding: 18px; margin: -18px -10px; background-clip: content-box; }
}
.auth-visual .slides { z-index: 0; }
.auth-visual::after { display: none; }
.auth-brand { position: relative; z-index: 2; color: #fff !important; }
.auth-visual-text { position: relative; z-index: 2; }
/* Pages de connexion : la légende de la diapositive passe sous le titre, juste au-dessus des points
   (elle ne recouvre plus ni le titre ni le logo) */
.auth-visual .slide figcaption { left: 2.2rem; right: 2.2rem; bottom: 3.3rem; gap: .1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.auth-visual .slide figcaption b { font-size: 1rem; }
.auth-visual .slide figcaption span { font-size: .86rem; color: rgba(255, 255, 255, .82); }
.auth-visual .slides-dots { left: 2.2rem; }
.auth-visual:has(.slide figcaption) .auth-visual-text { margin-bottom: 4.4rem; }
@media (max-width: 900px) {
  .auth-visual .slide figcaption { left: 1.4rem; right: 1.4rem; bottom: 2.5rem; }
  .auth-visual .slide figcaption span { display: none; }
  .auth-visual .slides-dots { left: 1.4rem; bottom: 1.1rem; }
}
.home { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.home-visual { position: relative; min-height: 100dvh; }
.home-panel { display: flex; flex-direction: column; padding: 1.5rem clamp(1.25rem, 4vw, 4rem); background: var(--bg); }
.home-top { justify-content: flex-end; }
.home-body { flex: 1; justify-content: center; max-width: 560px; padding: 2rem 0; }
.home-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); margin: .3rem 0 0; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); }
.home-panel .site-foot { background: transparent; border: 0; padding: 0; }
@media (max-width: 900px) { .home { grid-template-columns: 1fr; } .home-visual { min-height: 42vh; } }
.maintenance { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.maintenance-card { position: relative; z-index: 2; max-width: 560px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2.2rem 1.6rem; border-radius: var(--r-xl); background: color-mix(in srgb, var(--bg-elev) 90%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow-pop); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; width: 100%; }
.countdown > div { background: var(--bg-sunken); border-radius: var(--r); padding: .8rem .4rem; display: flex; flex-direction: column; }
.countdown b { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------------------------------------- Pages d'erreur et hors ligne */
.error-page { position: relative; isolation: isolate; overflow: hidden; min-height: 100dvh; display: grid; place-items: center; padding: calc(2rem + var(--safe-top)) 16px calc(2rem + var(--safe-bottom)); text-align: center; background: var(--bg); }
.error-page::before { content: ""; position: absolute; z-index: -1; width: min(900px, 140vw); aspect-ratio: 1; left: 50%; top: 42%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 62%); }
.error-page::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 70%); opacity: .55; }
.error-card { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 540px; }
.error-code { font-size: clamp(5.5rem, 3rem + 11vw, 10.5rem); font-weight: 800; font-stretch: 125%; line-height: .88; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 25%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-tag { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: .8rem; font-weight: 700; line-height: 1.2; }
.error-tag.tone-danger { background: var(--danger-soft); color: var(--danger); }
.error-tag.tone-warning { background: var(--warning-soft); color: var(--warning); }
.error-title { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; font-stretch: 110%; letter-spacing: -.015em; line-height: 1.15; }
.error-lead { margin: 0; color: var(--text-2); max-width: 46ch; font-size: 1.02rem; line-height: 1.55; }
.error-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .5rem; }
.error-foot { display: flex; align-items: center; gap: .6rem; margin-top: 1.5rem; color: var(--text-3); font-size: .8rem; }
@media (max-width: 520px) { .error-actions { width: 100%; flex-direction: column; } .error-actions .btn { width: 100%; } }

/* ------------------------------------------------------------- Effets visuels (Administration › Paramètres › Apparence)
   html[data-effects="on"] : apparitions, micro-interactions, transitions de page
   html[data-glass="on"]   : verre dépoli sur les barres, menus et feuilles */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
html[data-effects="on"] .content-inner > *:not(.no-anim) { animation: rise .42s var(--ease-out) backwards; }
/* pas de transform sur un bloc qui contient un élément fixe (il serait mal placé pendant l'animation) */
html[data-effects="on"] .content-inner > :has(.fab, .bulkbar, .action-bar.is-sticky, .modal-backdrop, .drawer-backdrop, .sheet, .chat-panel) { animation-name: fade-in; }
html[data-effects="on"] .content-inner > :nth-child(2) { animation-delay: .04s; }
html[data-effects="on"] .content-inner > :nth-child(3) { animation-delay: .08s; }
html[data-effects="on"] .content-inner > :nth-child(4) { animation-delay: .12s; }
html[data-effects="on"] .content-inner > :nth-child(n+5) { animation-delay: .16s; }
html[data-effects="on"] :is(.stat-grid, .grid, .quick-grid, .widgets-grid, .card-grid, .app-tiles) > :is(.stat-card, .kpi, .quick-tile, .widget-slot, .item-card, .app-tile) { animation: rise .5s var(--ease-out) backwards; }
html[data-effects="on"] :is(.stat-grid, .grid, .quick-grid, .widgets-grid, .card-grid, .app-tiles) > :nth-child(2) { animation-delay: .05s; }
html[data-effects="on"] :is(.stat-grid, .grid, .quick-grid, .widgets-grid, .card-grid, .app-tiles) > :nth-child(3) { animation-delay: .1s; }
html[data-effects="on"] :is(.stat-grid, .grid, .quick-grid, .widgets-grid, .card-grid, .app-tiles) > :nth-child(4) { animation-delay: .15s; }
html[data-effects="on"] :is(.stat-grid, .grid, .quick-grid, .widgets-grid, .card-grid, .app-tiles) > :nth-child(n+5) { animation-delay: .2s; }
html[data-effects="on"] .tab-panel:not([style*="display: none"]) { animation: fade-in .22s var(--ease); }
@media (min-width: 641px) {
  html[data-effects="on"] .menu:not(.gsearch-panel) { animation: pop-in .16s var(--ease-out); }
  html[data-effects="on"] .modal { animation: pop-in .24s var(--ease-out); }
}
html[data-effects="on"] .btn:active:not(:disabled) { transform: scale(.97); }
html[data-effects="on"] a.kpi:hover, html[data-effects="on"] a.item-card:hover, html[data-effects="on"] .quick-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
html[data-effects="on"] .stat-card:hover { box-shadow: var(--shadow-2); }
html[data-effects="off"] *, html[data-effects="off"] *::before, html[data-effects="off"] *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
/* Retour visuel au toucher (iOS : nécessite un écouteur touchstart, posé par eit.js) */
@media (hover: none) {
  .btn:active:not(:disabled) { filter: brightness(.94); }
  .list-row:active, .menu-item:active, .nav-link:active, .app-tile:active, .tab:active, .chip:active { background: var(--bg-hover); }
  .nav-link:active { background: #19191C; }
}
/* Verre dépoli */
html[data-glass="on"] .topbar::before { background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
html[data-glass="on"] .tabbar, html[data-glass="on"] .sheet, html[data-glass="on"] .menu, html[data-glass="on"] .bulkbar { -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
html[data-glass="on"] .tabbar { background: color-mix(in srgb, var(--bg-elev) 80%, transparent); }
html[data-glass="on"] .menu, html[data-glass="on"] .sheet { background: color-mix(in srgb, var(--bg-elev) 95%, transparent); }
html[data-glass="on"] .bulkbar { background: color-mix(in srgb, var(--surface-inverse) 90%, transparent); }
html[data-glass="on"] .modal-backdrop, html[data-glass="on"] .sheet-backdrop, html[data-glass="on"] .drawer-backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html[data-glass="off"] .modal-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* Transitions de page (navigateurs compatibles) : le contenu se fond, les barres restent en place */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: .16s var(--ease) both vt-out; }
::view-transition-new(root) { animation: .24s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
html[data-effects="off"]::view-transition-group(*), html[data-effects="off"]::view-transition-old(*), html[data-effects="off"]::view-transition-new(*) { animation: none !important; }

/* ------------------------------------------------------------- Ergonomie tactile */
@media (pointer: coarse) {
  .btn-sm { min-height: 2.5rem; }
  .btn-icon.btn-sm { width: 2.5rem; min-width: 2.5rem; }
  .btn-xs::before, .btn-sm::before { content: ""; position: absolute; inset: -5px; }
  .menu-item { min-height: var(--tap); }
  .pagination a, .pagination span { min-width: 2.75rem; height: 2.75rem; }
  .segmented button, .segmented a { min-height: 2.3rem; }
  .check input { width: 1.35rem; height: 1.35rem; }
  .chip { min-height: 2.25rem; }
}
/* Zones de toucher ≥ 44 px (--tap) pour les petites commandes, sans changer leur taille visuelle :
   une zone transparente (::before) prolonge la cible autour de l'élément. */
@media (pointer: coarse) {
  .btn-xs::before { inset: -8px; }
  :is(.segmented > a, .segmented > button, a.chip, button.chip, .breadcrumb a, .pf-crumbs a, .check, .switch, .link-btn, .site-foot a, .pf-login-links a, .auth-card a:not(.btn), .pf-public-intro a, .pf-legal-nav a, .pf-card-title, .pf-card-meta, .cm-react, .pf-ink button, .pf-preset, .vw-btn, .disc-back, .rq-subnav a, .task-check, .dv-chip-x, .emp-kv dd a, .emp-tl-who, .emp-hero-sub a, .emp-cr-head a, .task-emp-chip button) { position: relative; }
  :is(.segmented > a, .segmented > button) { min-width: 2.5rem; }
  :is(.segmented > a, .segmented > button)::before { content: ""; position: absolute; inset: -4px -4px; }
  .pagination a { position: relative; } .pagination a::before { content: ""; position: absolute; inset: -4px -3px; }
  :is(a.chip, button.chip)::before { content: ""; position: absolute; inset: -6px -2px; }
  :is(.breadcrumb a, .pf-crumbs a, .link-btn, .site-foot a, .pf-login-links a, .auth-card a:not(.btn), .pf-public-intro a, .pf-card-title, .pf-card-meta, .disc-back)::before { content: ""; position: absolute; inset: -14px -4px; }
  .pf-legal-nav a::before { content: ""; position: absolute; inset: -2px 0; }
  :is(.check, .switch)::before { content: ""; position: absolute; inset: -11px -11px; }
  .cm-react::before { content: ""; position: absolute; inset: -3px 0; }
  .pf-ink button::before, .pf-preset::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
  .vw-btn::before, .pf-slide-handle::before { content: ""; position: absolute; inset: -5px; }
  .rq-subnav a::before { content: ""; position: absolute; inset: -3px 0; }
  :is(.task-check, .task-emp-chip button)::before { content: ""; position: absolute; inset: -8px; }
  .dv-chip-x::before { content: ""; position: absolute; inset: -9px; }
  .composer-btn { position: relative; } .composer-btn::before { content: ""; position: absolute; inset: -2px; }
  .cx-head-actions .btn-icon::before { content: ""; position: absolute; inset: 0 -2px; }
  :is(.emp-kv dd a, .emp-cr-head a)::before { content: ""; position: absolute; inset: -14px -4px; }
  :is(.emp-tl-who, .emp-hero-sub a)::before { content: ""; position: absolute; inset: -7px -2px; }
  .pf-cell-user a, .collapse-toggle, .table .th-sort, .table td > a:not(.btn), .dl dd > a { position: relative; }
  :is(.table td > a:not(.btn), .dl dd > a)::before { content: ""; position: absolute; inset: -15px -4px; }
  :is(.pf-cell-user a, .table .th-sort)::before { content: ""; position: absolute; inset: -15px -4px; }
  .collapse-toggle::before { content: ""; position: absolute; inset: -11px 0; }
  .input.input-sm, .select.select-sm, .input-sm, .select-sm, input[type="range"] { min-height: var(--tap); }
  button.nav-group-label::before { content: ""; position: absolute; inset: -10px 0; } /* titres de groupes repliables du menu (tiroir mobile) */
  button.nav-group-label { position: relative; }
  .cx-composer .composer-input textarea { min-height: var(--tap); } /* zone de saisie des messages : cible de 44 px */
  .rq-cal-leave { position: relative; } .rq-cal-leave::before { content: ""; position: absolute; inset: -11px -7px; }
  .tabset .tabset > .tabs > .tab { min-height: var(--tap); }
  .segmented.pf-segmented a, .segmented.pf-segmented button { min-height: 2.3rem; } /* modes d'affichage des listes */
  .stepper-item { position: relative; } .stepper-item::before { content: ""; position: absolute; inset: -6px 0; } /* étapes d'un assistant */
  .cm-forum .grow > a { position: relative; } .cm-forum .grow > a::before { content: ""; position: absolute; inset: -9px -2px; } /* nom du forum (liste RH) */
  .dio-selected .chip button { position: relative; } .dio-selected .chip button::before { content: ""; position: absolute; inset: -13px; } /* retirer une colonne d'export */
  .vw-zoomval { position: relative; } .vw-zoomval::before { content: ""; position: absolute; inset: -5px 0; } /* visionneuse : niveau de zoom */
  label.vw-pageno > .vw-pageinput { height: 2.75rem; } /* visionneuse : numéro de page */
  :is(.pr-filters, .sc-bar) .select.select-sm { min-height: var(--tap); } /* filtres de la masse salariale et des graphiques du tableau de bord */
}
@media (max-width: 1023px) {
  .topbar-brand { min-height: var(--tap); }
  .topbar .user-chip { min-height: var(--tap); min-width: var(--tap); justify-content: center; }
}
/* Pas de zoom automatique d'iOS au focus : champs ≥ 16 px sur téléphone / tablette */
@media (max-width: 1023px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]), select, textarea, .input, .select, .textarea, .tag-input input { font-size: max(16px, 1rem) !important; }
}

/* ------------------------------------------------------------- Accessibilité */
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 600; padding: .6rem 1rem; border-radius: var(--r-sm); background: var(--surface-inverse); color: var(--on-surface-inverse); font-weight: 700; transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (forced-colors: active) {
  .nav-link.is-active, .tab.is-active, .tabbar-item.is-active { outline: 2px solid CanvasText; }
  .badge, .count { border: 1px solid CanvasText; }
}

/* =========================================================================
   VERSION 2.0 — SOCLE INTERFACE (agent 1) : coque, cadre sans défilement de page,
   barre latérale ajustable, cartes statistiques, onglets « remplissage », zones défilantes,
   finitions des composants, téléphones / tablettes / grands écrans.
   Toutes les classes historiques restent valables ; cette couche affine leur rendu.
   Mode d'emploi : docs/DESIGN.md (§ 10 et suivants).
   ========================================================================= */
:root {
  --topbar-h: 56px;
  --sticky-top: calc(var(--topbar-h) + var(--safe-top)); /* décalage d'un élément collant : 0 dans le cadre défilant (≥ 768 px) */
  --tabbar-h: 60px;
  --sidebar-w-collapsed: 68px;
  --content-max: 1680px;
  --r-panel: 14px;
  --r-control: 9px;
  --pad-x: 1.5rem;              /* marge latérale du contenu */
  --gap-page: .9rem;            /* espace vertical entre blocs d'une page « page-fill » */
  --app-h: calc(100dvh - var(--topbar-h) - var(--safe-top)); /* hauteur disponible sous la barre du haut */
  --sb-bg: #0A0A0B; --sb-line: #1C1C1F; --sb-text: #C9C9CF; --sb-muted: #7D7D86; --sb-hover: #151517;
}
[data-theme="dark"] { --sb-bg: #060607; --sb-line: #18181B; }

/* ---------------------------------------------------------------- Échelle typographique (application) */
@media (min-width: 1024px) { html:has(body .shell) { font-size: 15px; } }
@media (min-width: 1800px) { html:has(body .shell) { font-size: 15.5px; } }
@media (min-width: 2400px) { html:has(body .shell) { font-size: 17px; } }
.shell { font-size: .95rem; line-height: 1.55; }
.page-title { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); letter-spacing: -.018em; }
.page-sub { font-size: .9rem; margin-top: .2rem; }
.page-head { margin-bottom: 1.1rem; align-items: center; }
.section-title { font-size: 1rem; }
html.is-theming *, html.is-theming *::before, html.is-theming *::after { transition: none !important; }

/* ---------------------------------------------------------------- Boutons et contrôles (plus fins) */
.btn { min-height: 2.4rem; padding: .45rem .95rem; border-radius: var(--r-control); font-size: .9rem; font-weight: 620; gap: .45rem; }
.btn .ph, .btn .ph-fill, .btn .ph-bold { font-size: 1.1rem; }
.btn-sm { min-height: 2rem; padding: .3rem .7rem; font-size: .84rem; border-radius: 8px; }
.btn-xs { min-height: 1.65rem; padding: .15rem .5rem; font-size: .76rem; border-radius: 6px; }
.btn-lg { min-height: 2.9rem; padding: .7rem 1.35rem; font-size: 1rem; }
.btn-icon { width: 2.4rem; min-width: 2.4rem; }
.btn-icon.btn-sm { width: 2rem; min-width: 2rem; }
.btn-icon.btn-xs { width: 1.65rem; min-width: 1.65rem; }
.btn-outline { --btn-bd: var(--line-strong); }
.btn-outline:hover { background: var(--bg-hover); border-color: color-mix(in srgb, var(--text) 22%, var(--line-strong)); }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .08); }
.btn-dark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-soft { --btn-bg: var(--bg-sunken); --btn-fg: var(--text); }
.btn-soft:hover { background: var(--bg-hover); filter: none; }
.input, .select, .textarea { min-height: 2.5rem; padding: .5rem .8rem; border-radius: var(--r-control); font-size: .92rem; border-color: var(--line-strong); }
.select { padding-right: 2.2rem; background-position: right .7rem center; }
.input-sm, .select-sm { min-height: 2rem; padding: .3rem .6rem; font-size: .84rem; }
.select.select-sm { padding-right: 1.9rem; }
.textarea { min-height: 6rem; }
.label { font-size: .85rem; font-weight: 620; }
.help { font-size: .78rem; }
.tag-input { min-height: 2.5rem; border-radius: var(--r-control); }
.field { gap: .35rem; }
.form-grid { gap: 1rem 1.1rem; }
.check, .switch { font-size: .9rem; }
.segmented { border-radius: var(--r-control); }
.segmented button, .segmented a { padding: .32rem .7rem; font-size: .82rem; border-radius: 7px; }
.segmented .is-active { box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
[data-theme="dark"] .segmented .is-active { background: var(--bg-hover); box-shadow: 0 0 0 1px var(--line-strong); }

/* ---------------------------------------------------------------- Surfaces */
.panel { border-radius: var(--r-panel); box-shadow: var(--shadow-1); }
.panel-header { padding: .8rem 1.1rem; gap: .75rem; min-height: 3.25rem; }
.panel-title { font-size: .95rem; font-weight: 700; gap: .5rem; }
.panel-title > .ph, .panel-title > .ph-fill { color: var(--text-3); font-size: 1.1rem; }
.panel-body { padding: 1.1rem; }
.panel-footer { padding: .75rem 1.1rem; border-radius: 0 0 var(--r-panel) var(--r-panel); }
.item-card { border-radius: var(--r-panel); }
.box { border-radius: var(--r-control); }
.icon-box { background: var(--bg-sunken); color: var(--text-2); border-radius: 10px; }
.icon-box.tone-brand, .icon-box.is-brand { background: var(--brand-soft); color: var(--brand-ink); }
.icon-box.tone-success { background: var(--success-soft); color: var(--success); }
.notice { border-radius: var(--r-control); padding: .8rem 1rem; font-size: .9rem; }
.notice.tone-info { background: var(--bg-sunken); border-color: var(--line); }
.notice.tone-info > .ph, .notice.tone-info > .ph-fill { color: var(--text-2); }
.notice > .ph, .notice > .ph-fill, .notice > .ph-bold { font-size: 1.2rem; margin-top: .14rem; }

/* Badges : discrets, tons de statut uniquement */
.badge { padding: .12rem .5rem; font-size: .72rem; font-weight: 650; gap: .3rem; }
.badge::before { width: .38rem; height: .38rem; }
.chip { padding: .25rem .65rem; font-size: .8rem; }
.count { min-width: 1.25rem; height: 1.25rem; font-size: .68rem; }

/* Tableaux */
.table { font-size: .875rem; }
.table th { font-size: .74rem; font-weight: 650; color: var(--text-3); padding: .55rem .85rem; letter-spacing: .01em; background: var(--bg-sunken); box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.table td { padding: .6rem .85rem; }
.table tbody tr:hover { background: color-mix(in srgb, var(--bg-hover) 80%, transparent); }
.table tr.is-selected { background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.table-compact td { padding: .38rem .7rem; }

/* Onglets */
.tabs { gap: .1rem; }
.tab { padding: .62rem .8rem; font-size: .88rem; font-weight: 620; }
.tab > .ph, .tab > .ph-fill { font-size: 1.05rem; }
.tab::after { height: 2px; left: .5rem; right: .5rem; }
.tabset { gap: .85rem; }
.tabset-pills > .tabs > .tab, .tabset .tabset > .tabs > .tab { padding: .36rem .8rem; font-size: .84rem; }

/* Menus, fenêtres, tiroirs */
.menu { border-radius: 12px; padding: .3rem; }
.menu-item { min-height: 2.2rem; padding: .42rem .65rem; font-size: .875rem; border-radius: 7px; gap: .55rem; }
.menu-item > .ph, .menu-item > .ph-fill, .menu-item > .ph-bold, .menu-item .ph { font-size: 1.05rem; }
.menu-label { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .65rem; min-height: 2.5rem; font-size: .875rem; }
.menu-row > span:first-child { display: inline-flex; align-items: center; gap: .55rem; }
.menu-row > span:first-child > .ph { color: var(--text-3); font-size: 1.05rem; }
.account-menu { min-width: 270px; }
.modal { border-radius: 16px; }
.modal-header { padding: .95rem 1.15rem; }
.modal-title { font-size: 1.02rem; }
.modal-body { padding: 1.15rem; }
.modal-footer { padding: .85rem 1.15rem; }
.drawer-body { padding: 1rem 1.15rem; }
.toast { border-radius: 12px; font-size: .88rem; padding: .75rem .75rem .75rem .9rem; }
.empty { padding: 2.4rem 1.25rem; }
.empty .icon-box { background: var(--bg-sunken); color: var(--text-2); box-shadow: 0 0 0 7px color-mix(in srgb, var(--bg-sunken) 60%, transparent), 0 0 0 14px color-mix(in srgb, var(--bg-sunken) 30%, transparent); }
.empty-title { font-size: 1rem; }
.pagination a, .pagination span { min-width: 2rem; height: 2rem; font-size: .82rem; border-radius: 8px; }
.tip-float { font-size: .78rem; }

/* ---------------------------------------------------------------- Coque : grille et cadre sans défilement de page */
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .shell.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
}
.shell.is-resizing { transition: none; user-select: none; cursor: col-resize; }
.shell.is-resizing * { cursor: col-resize !important; }
@media (min-width: 768px) {
  html:has(body > .shell), html:has(body > .shell) > body { height: 100%; overflow: hidden; }
  .shell { height: 100dvh; min-height: 0; }
  .main { height: 100dvh; min-height: 0; overflow: hidden; }
  .content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-padding-top: 1rem; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; --sticky-top: 0px; }
  .topbar { position: relative; top: auto; }
}
.content { padding: 1.25rem var(--pad-x) 1.75rem; }
@media (min-width: 1024px) { .content { padding: 1.25rem calc(var(--pad-x) + .25rem) 1.5rem; } .topbar { padding-inline: calc(.75rem + var(--safe-left)) calc(1.5rem + var(--safe-right)); } }
@media (min-width: 1800px) { .content { padding-inline: 2.25rem; } }
.app-breadcrumb { margin-bottom: .6rem; font-size: .78rem; }

/* ---------------------------------------------------------------- Barre latérale */
.sidebar { background: var(--sb-bg); border-right: 1px solid var(--sb-line); color: var(--sb-text); }
@media (min-width: 1024px) { .sidebar { position: relative; top: auto; height: 100dvh; } }
.sidebar-head { display: flex; align-items: center; height: var(--topbar-h); flex-shrink: 0; padding-right: .5rem; border-bottom: 1px solid var(--sb-line); }
.sidebar-brand { flex: 1; min-width: 0; height: 100%; padding: 0 .95rem; gap: .6rem; }
.sidebar-brand b { font-size: .95rem; }
.sidebar-brand small { font-size: .7rem; color: var(--sb-muted); }
.sidebar .app-logo { box-shadow: 0 0 0 1.5px var(--sb-bg), 0 0 0 2.5px #2C2C31; }
.sidebar-close { --btn-fg: var(--sb-text); }
.sidebar-close:hover { background: var(--sb-hover); }
.sidebar-nav { padding: .5rem .6rem 1rem; scrollbar-color: #2A2A2F transparent; }
.nav-group { margin-top: .55rem; }
.nav-group:first-child { margin-top: 0; }
.nav-group-label { padding: .4rem .6rem .3rem; font-size: .66rem; letter-spacing: .09em; color: var(--sb-muted); min-height: 1.9rem; }
button.nav-group-label:hover { color: #EDEDF0; }
.nav-group-label > .ph { font-size: .75rem; }
.nav-group.is-closed .nav-group-label > .ph { transform: rotate(-90deg); }
/* Sections repliables animées sans JavaScript de hauteur (rendu serveur = pas de clignotement) */
.nav-group-items { display: grid; grid-template-rows: 1fr; padding-top: 0; transition: grid-template-rows .24s var(--ease-out); }
.nav-group-items > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.nav-group.is-closed > .nav-group-items { grid-template-rows: 0fr; }
.nav-group.is-closed > .nav-group-items > div { visibility: hidden; transition: visibility 0s .24s; }
.nav-link { min-height: 2.25rem; padding: .38rem .6rem; gap: .65rem; border-radius: 8px; font-size: .875rem; font-weight: 560; color: var(--sb-text); }
.nav-link .ph, .nav-link .ph-fill { font-size: 1.15rem; color: var(--sb-muted); }
.nav-link:hover { background: var(--sb-hover); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .07); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.nav-link.is-active::before { left: -.6rem; top: .5rem; bottom: .5rem; }
.nav-link .count { min-width: 1.2rem; height: 1.2rem; font-size: .64rem; }
.sidebar-foot { padding: .45rem .6rem calc(.45rem + var(--safe-bottom)); border-top: 1px solid var(--sb-line); }
.sidebar-collapse { color: var(--sb-muted); }
.sidebar-collapse .sidebar-version { display: none; }
.sidebar-resizer { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 5; cursor: col-resize; touch-action: none; outline: none; }
.sidebar-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.sidebar-resizer:hover::after, .sidebar-resizer:focus-visible::after, .shell.is-resizing .sidebar-resizer::after { background: var(--brand); }
@media (min-width: 1024px) {
  .shell.is-collapsed .nav-link { padding: .5rem; justify-content: center; }
  .shell.is-collapsed .nav-link .nav-text, .shell.is-collapsed .sidebar-collapse .sidebar-version { display: none; }
  .shell.is-collapsed .nav-link .count { top: .3rem; right: .45rem; box-shadow: 0 0 0 2px var(--sb-bg); }
  .shell.is-collapsed .nav-group-items, .shell.is-collapsed .nav-group.is-closed > .nav-group-items { grid-template-rows: 1fr; }
  .shell.is-collapsed .nav-group.is-closed > .nav-group-items > div { visibility: visible; }
  .shell.is-collapsed .nav-group { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--sb-line); }
  .shell.is-collapsed .nav-group:first-child { border-top: 0; padding-top: 0; }
  .shell.is-collapsed .sidebar-head { padding-right: 0; justify-content: center; }
  .shell.is-collapsed .sidebar-brand { justify-content: center; padding: 0; flex: 0 0 auto; }
  .shell.is-collapsed .sidebar-nav { padding-inline: .5rem; }
}
@media (max-width: 1023px) {
  .sidebar { width: min(300px, 86vw); }
  .sidebar-resizer { display: none; }
  .nav-group-items > div { gap: 2px; }
}

/* ---------------------------------------------------------------- Barre du haut */
.topbar { height: calc(var(--topbar-h) + var(--safe-top)); gap: .45rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.main > .impersonate-bar { flex-shrink: 0; }
.topbar .btn-ghost.btn-icon { width: 2.25rem; min-width: 2.25rem; min-height: 2.25rem; }
.topbar .btn-icon > .ph, .topbar .btn-icon > .ph-fill { font-size: 1.2rem; }
.topbar-search { max-width: 520px; }
.topbar-search .input { min-height: 2.25rem; background: var(--bg-sunken); border-color: transparent; }
.topbar-search .input:hover { border-color: var(--line-strong); }
.topbar-search .input:focus { background: var(--bg-elev); }
.topbar-actions { gap: .2rem; }
.topbar-page-actions .btn { min-height: 2.1rem; }
.topbar-tools { display: flex; align-items: center; gap: .2rem; }
.topbar-slot { display: flex; align-items: center; gap: .2rem; }
.topbar .segmented { padding: 2px; }
.topbar .segmented a { padding: .25rem .5rem; font-size: .75rem; }
.topbar .company-picker-btn { height: 2.25rem; font-size: .82rem; }
.user-chip { min-height: 2.25rem; padding: .15rem .45rem .15rem .15rem; gap: .5rem; }
.user-chip .avatar-sm { --s: 1.8rem; }
.user-chip-text > span { max-width: 13ch; }
.user-chip-caret { font-size: .85rem; }
@media (max-width: 1279px) { .topbar .user-chip-text, .topbar .user-chip-caret { display: none; } .topbar .user-chip { padding: .15rem; border-radius: 50%; } }
.theme-seg button { padding: .3rem .55rem; }

/* ---------------------------------------------------------------- Hauteur pleine : aucune page ne défile
   <div class="page-fill"> en-tête · cartes · <div class="fill">…<div class="scroll-zone">…</div></div> </div>
   ou @section('content_class', 'is-fill') + enfants .fill / .scroll-zone. Actif dès 768 px (tablette).  */
.scroll-zone { overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; position: relative; }
.scroll-zone.is-y { overflow-x: hidden; }
.scroll-zone > .table, .scroll-zone > table { border-radius: 0; }
.scroll-zone.has-shadow { background: linear-gradient(var(--bg-elev) 30%, transparent) top / 100% 24px no-repeat local, linear-gradient(transparent, var(--bg-elev) 70%) bottom / 100% 24px no-repeat local, radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .1), transparent) top / 100% 8px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .1), transparent) bottom / 100% 8px no-repeat scroll; }
.zone-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .55rem 1rem; border-top: 1px solid var(--line); flex-shrink: 0; font-size: .82rem; color: var(--text-3); }
@media (min-width: 768px) {
  .main:has(> .content > .content-inner > .page-fill) > .content, .content.is-fill { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 1.1rem; }
  .content:has(> .content-inner > .page-fill) > .content-inner, .content.is-fill > .content-inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .content.is-fill > .content-inner { gap: var(--gap-page); }
  .content.is-fill > .content-inner > :not(.fill):not(.page-fill):not(.tabset) { flex-shrink: 0; }
  .content.is-fill > .content-inner > :is(.fill, .page-fill, .tabset.fill) { flex: 1 1 auto; min-height: 0; }
  .page-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap, var(--gap-page)); }
  .page-fill > * { flex-shrink: 0; }
  .page-fill > :is(.fill, .tabset.fill, .scroll-zone), .fill > :is(.fill, .tabset.fill) { flex: 1 1 auto; min-height: 0; }
  .fill > :is(.table-wrap, .scroll-area, .scroll-zone, .panel-body, .kanban, .dv-body) { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .tabset.fill { display: flex; flex-direction: column; min-height: 0; }
  .tabset.fill > .tabs { flex-shrink: 0; }
  .tabset.fill > .tab-panels { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .tabset.fill > .tab-panels > .tab-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: var(--gap, var(--gap-page)); }
  .tabset.fill > .tab-panels > .tab-panel > * { flex-shrink: 0; }
  .tabset.fill > .tab-panels > .tab-panel > :is(.fill, .tabset.fill, .scroll-zone) { flex: 1 1 auto; min-height: 0; }
  .tabset.fill > .tab-panels > .tab-panel.is-scroll { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
  .page-fill .page-head, .content.is-fill .page-head { margin-bottom: 0; }
  .page-fill .dv.fill .dv-pane-table > .table-wrap, .tab-panel .dv.fill .dv-pane-table > .table-wrap { max-height: none; height: 100%; }
}
/* Panneau qui remplit la hauteur et dont le corps défile (en-tête et pied fixes) */
.panel.fill > .panel-header, .panel.fill > .panel-footer, .panel.fill > .zone-foot { flex-shrink: 0; }
/* Hauteur maximale bornée à l'écran (hors page-fill) */
.fit-screen { max-height: calc(var(--app-h) - 7rem); overflow: auto; overscroll-behavior: contain; }

/* ---------------------------------------------------------------- Rangée de cartes statistiques (<x-stat-row>)
   Tailles : nano | compact (défaut) | normal — variables héritées (préférence globale html[data-stat-size],
   surchargée par la rangée .stat-row[data-size]). */
:root, html[data-stat-size="compact"], .stat-row[data-size="compact"] {
  --st-pad: .7rem .85rem; --st-gap: .25rem; --st-icon: 1.8rem; --st-icon-fs: .98rem; --st-label: .78rem; --st-value: 1.35rem; --st-foot: flex; --st-min: 190px; --st-head-h: 1.8rem; --st-dir: column;
}
html[data-stat-size="normal"], .stat-row[data-size="normal"] {
  --st-pad: .95rem 1.05rem; --st-gap: .35rem; --st-icon: 2.15rem; --st-icon-fs: 1.12rem; --st-label: .82rem; --st-value: 1.75rem; --st-foot: flex; --st-min: 230px; --st-head-h: 2.15rem; --st-dir: column;
}
html[data-stat-size="nano"], .stat-row[data-size="nano"] {
  --st-pad: .45rem .7rem; --st-gap: .05rem; --st-icon: 1.45rem; --st-icon-fs: .85rem; --st-label: .72rem; --st-value: 1.08rem; --st-foot: none; --st-min: 150px; --st-head-h: 1.45rem; --st-dir: column;
}
.stat-card { padding: var(--st-pad); gap: var(--st-gap); border-radius: 12px; box-shadow: none; }
.stat-head { min-height: var(--st-head-h); gap: .5rem; }
.stat-icon { width: var(--st-icon); height: var(--st-icon); font-size: var(--st-icon-fs); border-radius: 8px; background: var(--bg-sunken); color: var(--text-2); }
.stat-card.tone-brand .stat-icon { background: var(--brand-soft); color: var(--brand-ink); }
.stat-card.tone-success .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.tone-info .stat-icon { background: var(--info-soft); color: var(--info); }
.stat-card.tone-violet .stat-icon { background: var(--violet-soft); color: var(--violet); }
.stat-card.tone-orange .stat-icon { background: var(--orange-soft); color: var(--orange); }
.stat-card.tone-teal .stat-icon { background: var(--c-teal-soft); color: var(--c-teal); }
.stat-card.tone-muted .stat-icon { background: var(--bg-sunken); color: var(--text-2); }
.stat-card.tone-warning .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.tone-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-label { font-size: var(--st-label); font-weight: 600; color: var(--text-2); }
.stat-value { font-size: var(--st-value); font-stretch: 106%; letter-spacing: -.015em; line-height: 1.15; }
.stat-value.is-text { font-size: calc(var(--st-value) * .8); }
.stat-foot { display: var(--st-foot); font-size: .74rem; gap: .4rem; }
.stat-toggle.btn-xs { width: 1.5rem; min-width: 1.5rem; min-height: 1.5rem; }
.stat-detail { font-size: .82rem; margin-top: .25rem; padding-top: .5rem; }
.stat-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--st-min)), 1fr)); gap: .6rem; }
.grid:has(> .stat-card) { --gap: .6rem; }
.stat-row[data-size="nano"] .stat-icon, html[data-stat-size="nano"] .stat-card:not(.stat-row .stat-card) .stat-icon { display: none; }
.stat-row { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.stat-row-head { display: flex; align-items: center; gap: .35rem; min-height: 1.9rem; }
.stat-row-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; padding: .2rem .4rem; margin-left: -.4rem; border-radius: 7px; font: inherit; font-size: .8rem; font-weight: 650; color: var(--text-2); cursor: pointer; line-height: 1.2; }
.stat-row-toggle:hover { background: var(--bg-hover); color: var(--text); }
.stat-row-toggle > .ph { font-size: .9rem; transition: transform .2s var(--ease); }
.stat-row:not(.is-open) .stat-row-toggle > .ph { transform: rotate(-90deg); }
.stat-row-toggle .count { background: var(--bg-sunken); color: var(--text-2); }
.stat-row-tools { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.stat-row-tools .segmented button { padding: .2rem .45rem; min-height: 1.6rem; }
.stat-row-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--st-min)), 1fr)); gap: .6rem; }
.stat-row-body[data-cols] { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.stat-row-body > .stat-card[hidden] { display: none; }
@media (max-width: 1279px) { .stat-row-body[data-cols] { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--st-min)), 1fr)); } }
.stat-row-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .24s var(--ease-out); }
.stat-row-wrap > div { min-height: 0; overflow: hidden; padding: 1px; margin: -1px; }
.stat-row:not(.is-open) .stat-row-wrap { grid-template-rows: 0fr; }
.stat-row:not(.is-open) .stat-row-wrap > div { visibility: hidden; transition: visibility 0s .24s; }
.stat-row-empty { font-size: .8rem; color: var(--text-3); padding: .4rem 0; }
.stat-menu { min-width: 250px; max-height: 360px; overflow: auto; }
.stat-menu .check { padding: .3rem .6rem; width: 100%; }
@media (max-width: 680px) {
  .stat-row-body, .stat-row-body[data-cols] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row[data-size="nano"] .stat-row-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-value { font-size: min(var(--st-value), 5.4vw); }
}

/* ---------------------------------------------------------------- Onglets (x-tabs) : niveaux 2 et 3 plus fins */
.tabset .tabset > .tabs > .tab { box-shadow: inset 0 0 0 1px var(--line); }
.tabset .tabset .tabset > .tabs { border-radius: var(--r-control); }
.tab .count { min-width: 1.15rem; height: 1.15rem; font-size: .64rem; }

/* ---------------------------------------------------------------- Cartes de liste : mini-cartes */
.dv[data-view="mini"] > .dv-body > .dv-pane-cards { display: block; animation: dv-in .18s var(--ease); }
.dv[data-view="mini"] .dv-cards { --dv-card-min: 210px; gap: .5rem; }
.dv[data-view="mini"] .dv-card { padding: .55rem .7rem; gap: .3rem; box-shadow: none; }
.dv[data-view="mini"] .dv-card :is(.dv-card-foot, .dv-card-body, .dv-card-media) { display: none; }
.dv[data-view="mini"] .dv-card .dv-card-head { gap: .5rem; }
.dv[data-view="mini"] .dv-card .dv-card-title { font-size: .86rem; }
.dv[data-view="mini"] .dv-card .dv-card-sub { font-size: .74rem; }
.dv[data-view="mini"] .dv-card .avatar { --s: 1.8rem; }

/* ---------------------------------------------------------------- Accueil de l'espace agent (v2) : sans défilement de page dès la tablette */
.portal-home.page-fill { max-width: min(1480px, 100%); width: 100%; }
@media (min-width: 1920px) { .portal-home.page-fill { max-width: 100%; } .portal-home-main .widgets-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); } }
.portal-home-main .widgets-grid { align-items: start; }
.portal-home-side { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.portal-home-main { display: flex; flex-direction: column; min-width: 0; }
.portal-home .icon-box[class*="tone-"]:not(.tone-brand):not(.tone-success) { background: var(--bg-sunken); color: var(--text); }
.quick-tile { border-radius: var(--r-panel); }
@media (min-width: 768px) {
  .portal-home-main { min-height: 0; }
  .portal-home-main > .section-head { flex-shrink: 0; }
  .portal-home-main > .portal-glance { flex: 1 1 auto; min-height: 0; padding: 2px; margin: -2px; }
  .portal-home .quick-tile { min-height: 112px; }
}
@media (min-width: 1100px) {
  .portal-home.page-fill { display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 1.4rem; }
  .portal-home-side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; min-height: 0; padding: 2px; margin: -2px; }
  .portal-home-side .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .portal-home-main .widgets-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
}
/* Tableau de bord RH (v2) : en-tête fixe, blocs défilants */
.dash-page .dash-hello { margin-bottom: 0; }
.dash-page > .dash-scroll { padding: 2px; margin: -2px; }

/* ---------------------------------------------------------------- Installation (iOS) */
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.install-steps li { display: flex; align-items: center; gap: .75rem; font-size: .95rem; }

/* ---------------------------------------------------------------- Téléphone */
@media (max-width: 1023px) {
  .topbar { padding-inline: calc(.35rem + var(--safe-left)) calc(.35rem + var(--safe-right)); }
  .topbar .btn-icon { width: var(--tap); min-width: var(--tap); min-height: var(--tap); }
  .topbar-title { font-size: 1rem; font-weight: 720; }
  .topbar-tools .btn:not(.btn-icon) > span { display: none; }
}
@media (max-width: 767px) {
  :root { --pad-x: 14px; }
  .content { padding: .9rem calc(14px + var(--safe-right)) 1.5rem calc(14px + var(--safe-left)); }
  .page-head { margin-bottom: .9rem; }
  .page-title { font-size: 1.35rem; }
  .content-inner > .tabset > .tabs { margin-inline: -14px; padding-inline: 14px; }
}
@media (max-width: 900px) {
  .tabbar { height: calc(var(--tabbar-h) + var(--safe-bottom)); border-top-color: var(--line); }
  .tabbar-icon { width: 52px; height: 28px; font-size: 1.3rem; }
  .tabbar-label { font-size: .66rem; }
  .tabbar-item.is-active { color: var(--text); }
  .tabbar-item.is-active .tabbar-icon { background: var(--brand-soft); color: var(--brand-ink); }
  .has-tabbar .content { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 1.25rem); }
}
@media (min-width: 768px) and (max-width: 900px) {
  /* Tablette avec barre d'onglets : le cadre défilant s'arrête au-dessus de la barre */
  .has-tabbar .main { height: calc(100dvh - var(--tabbar-h) - var(--safe-bottom)); }
  .has-tabbar .content { padding-bottom: 1.25rem; }
}

/* ---------------------------------------------------------------- Tablette (768–1279 px) */
@media (min-width: 768px) and (max-width: 1279px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { gap: .75rem; }
}

/* ---------------------------------------------------------------- Grands écrans et moniteurs */
@media (min-width: 1920px) {
  :root { --content-max: 1880px; }
  .form-grid:not(.form-grid-fixed) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
  .grid-3.grid-wide-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dv-cards { --dv-card-min: 300px; }
}
@media (min-width: 2400px) {
  :root { --content-max: 2280px; --pad-x: 2.5rem; }
  .grid-4.grid-wide-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* Largeurs de lecture : jamais de lignes de texte de 300 caractères */
.prose, .readable { max-width: 72ch; }
.notice, .page-sub { max-width: 110ch; }
.content.is-narrow .content-inner { max-width: 1000px; }

/* ---------------------------------------------------------------- Micro-animations (désactivées si effets coupés / mouvement réduit) */
html[data-effects="on"] .content-inner > *:not(.no-anim) { animation-duration: .32s; }
html[data-effects="on"] .stat-row-body > .stat-card { animation: rise .38s var(--ease-out) backwards; }
html[data-effects="on"] .stat-row-body > .stat-card:nth-child(2) { animation-delay: .03s; }
html[data-effects="on"] .stat-row-body > .stat-card:nth-child(3) { animation-delay: .06s; }
html[data-effects="on"] .stat-row-body > .stat-card:nth-child(n+4) { animation-delay: .09s; }
@media (hover: none) { .nav-link:active { background: var(--sb-hover); } }


/* =========================================================================
   VERSION 3 — STOCK IT (agent Design) : charte orange Assala / vert EIT, co-marquage,
   plein écran persistant, micro-interactions. Toutes les classes historiques restent valables.
   Mode d'emploi : docs/DESIGN.md § 17 à § 19 · kit Stock IT : docs/COMPONENTS.md § 12.
   ========================================================================= */
:root { --d-on-light: block; --d-on-dark: none; --sb-bg: #0A0A0B; --sb-line: #1C1C1F; --sb-text: #C9C9CF; --sb-muted: #84848D; --sb-hover: #151517; }
[data-theme="dark"] { --d-on-light: none; --d-on-dark: block; }
[data-theme="light"] { --d-on-light: block; --d-on-dark: none; }

/* ---------------------------------------------------------------- Logos et co-marquage (partials/brand.blade.php)
   Assala Gabon = client dont on gère le stock ; EIT GROUP = éditeur (« by EIT GROUP »). Logos vectoriels, jamais déformés :
   seule la hauteur (--brand-h) est fixée. .on-light / .on-dark : variante selon le thème (îlots de thème compris). */
.brand { --brand-h: 28px; display: inline-flex; align-items: center; gap: calc(var(--brand-h) * .52); line-height: 0; flex-shrink: 0; vertical-align: middle; text-decoration: none !important; }
.brand-img { display: block; flex-shrink: 0; height: calc(var(--brand-h) * var(--k, 1)); width: auto; max-width: none; }
.brand .on-light { display: var(--d-on-light); }
.brand .on-dark { display: var(--d-on-dark); }
.brand-sep { align-self: stretch; width: 1px; margin-block: calc(var(--brand-h) * .06); background: var(--line-strong); flex-shrink: 0; }
.brand.is-dark .brand-sep { background: rgba(255, 255, 255, .3); }
.brand-by, .brand-pub { display: inline-flex; align-items: flex-end; gap: calc(var(--brand-h) * .2); }
.brand-by-text { font-size: max(.62rem, calc(var(--brand-h) * .36)); font-weight: 600; font-style: italic; line-height: 1; letter-spacing: .01em; color: var(--text-3); white-space: nowrap; padding-bottom: calc(var(--brand-h) * .12); }
.brand.is-dark .brand-by-text { color: rgba(255, 255, 255, .72); }
/* Barre de co-marquage : rappel de la barre orange du logo Assala, terminée par le vert EIT */
.brand-bar { display: block; height: 3px; border: 0; margin: 0; background: linear-gradient(90deg, var(--assala) 0 78%, transparent 78% 80.5%, var(--eit) 80.5% 100%); }

/* Logo de l'application : icône « Stock IT » (tuile) par défaut, logo libre ou pastille ronde si personnalisé */
.app-logo.is-free { width: auto; height: var(--logo-size); max-width: calc(var(--logo-size) * 3.2); }
.app-logo.is-free img { width: auto; height: var(--logo-size); max-width: 100%; object-fit: contain; }
.app-logo.is-default, .app-logo.is-default.is-free { width: var(--logo-size); height: var(--logo-size); border-radius: 24%; overflow: hidden; background: #0A0A0B; box-shadow: 0 0 0 1px rgba(255, 255, 255, .13), 0 1px 2px rgba(0, 0, 0, .25); }
.app-logo.is-default img, .sidebar-brand .app-logo.is-default img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.sidebar-brand .app-logo.is-free:not(.is-default) img { border-radius: 0; width: auto; }
.sidebar .app-logo.is-default { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.sidebar .app-logo.is-free:not(.is-default) { box-shadow: none; }

/* ---------------------------------------------------------------- Barre latérale : marque et signature de l'éditeur */
.sidebar-brand { gap: .65rem; }
.sidebar-brand b { font-size: .98rem; }
.sidebar-brand small { display: flex; align-items: center; gap: .4rem; margin-top: .12rem; font-size: .7rem; font-weight: 600; letter-spacing: .01em; color: var(--sb-muted); }
.sidebar-brand small::before { content: ""; width: 11px; height: 3px; flex-shrink: 0; background: var(--assala); }
.sidebar-sign { display: flex; align-items: center; gap: .4rem; min-width: 0; min-height: 2rem; padding: .2rem .6rem; color: var(--sb-muted); font-size: .68rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.sidebar-sign-by { font-style: italic; font-size: .7rem; }
.sidebar-sign-logo { display: block; width: auto; height: 18px; flex-shrink: 0; opacity: .94; }
.sidebar-sign-version { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .85; }
.sidebar .nav-link > .sidebar-kbd { flex: 0 0 auto; margin-left: auto; min-width: 0; height: 1.25rem; padding: 0 .35rem; border-color: #2C2C31; background: transparent; color: var(--sb-muted); font-size: .62rem; font-weight: 650; }
.nav-link .count { background: var(--brand); color: var(--on-brand); }
.nav-group-count { background: var(--brand); color: var(--on-brand); }
@media (min-width: 1024px) {
  .shell.is-collapsed .sidebar-sign { justify-content: center; padding-inline: 0; }
  .shell.is-collapsed .sidebar-sign-by, .shell.is-collapsed .sidebar-sign-version, .shell.is-collapsed .sidebar-kbd { display: none; }
  .shell.is-collapsed .sidebar-sign-logo { height: 16px; }
}
@media (hover: none) { .sidebar-kbd { display: none; } }

/* ---------------------------------------------------------------- Plein écran persistant (public/assets/js/modules/design.js)
   Hôte : la page courante (ou la coque /app/plein-ecran) porte le cadre .fs-frame où l'application continue de vivre. */
html.is-fs-host, html.is-fs-host > body { height: 100% !important; overflow: hidden !important; }
html.is-fs-host > body > :not(.fs-frame):not(.fs-hint) { display: none !important; }
.fs-frame { position: fixed; inset: 0; z-index: 2147483000; display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
html:fullscreen, html:fullscreen > body { background: var(--bg); }
::backdrop { background: var(--bg); }
.fs-hint { position: fixed; z-index: 2147483001; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #111113; color: #F4F4F5; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fs-hint button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 999px; padding: 7px 14px; }
.fs-hint-go::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }
.fs-hint-x { width: 30px; height: 30px; padding: 0 !important; font-size: 17px !important; line-height: 1; opacity: .65; }
.fs-hint button:hover { background: rgba(255, 255, 255, .1); opacity: 1; }
/* Bouton de la barre du haut : état actif à la couleur d'accent */
.fs-toggle[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.fs-toggle[aria-pressed="true"]:hover { background: var(--brand-soft); filter: brightness(.97); }
.menu-item[data-fs-toggle][aria-pressed="true"] > .ph { color: var(--brand-ink); }
[data-fs-wrap][hidden] { display: none !important; }

/* ---------------------------------------------------------------- Fil d'Ariane (<x-breadcrumb>) */
.breadcrumb { gap: .3rem; font-size: .8rem; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.breadcrumb > a, .breadcrumb > span { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; padding: .12rem .3rem; margin-inline: -.1rem; border-radius: 6px; white-space: nowrap; }
.breadcrumb > a { color: var(--text-2); flex-shrink: 0; transition: background .15s, color .15s; }
.breadcrumb > a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.breadcrumb > span[aria-current] { color: var(--text); font-weight: 620; overflow: hidden; text-overflow: ellipsis; display: block; flex-shrink: 1; }
.breadcrumb > span:not([aria-current]) { flex-shrink: 0; }
.breadcrumb-home { width: 1.6rem; height: 1.6rem; justify-content: center; padding: 0 !important; }
.breadcrumb-home .ph { font-size: 1rem; }
.breadcrumb .sep { flex-shrink: 0; }
.app-breadcrumb { margin-bottom: .55rem; }
.page-head .breadcrumb { margin-bottom: .3rem; }
@media (max-width: 767px) { .breadcrumb { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 1.5rem), transparent); } .breadcrumb::-webkit-scrollbar { display: none; } .breadcrumb > span[aria-current] { overflow: visible; display: inline-flex; flex-shrink: 0; padding-right: 1.5rem; } }

/* ---------------------------------------------------------------- Focus clavier : anneau net à la couleur d'accent, partout */
:focus-visible { outline: none; box-shadow: var(--ring); }
:is(.btn, .tab, .chip, .menu-item, .list-row, .segmented > *, .pagination a, .stat-card, .kpi, .item-card, .nav-link, summary, a):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; }
:is(.input, .select, .textarea):focus-visible { outline: none; }
.sidebar :is(.nav-link, .nav-group-label, .sidebar-brand, .btn):focus-visible { outline: 2px solid var(--brand-bright); outline-offset: -2px; box-shadow: none; }
.btn-primary:focus-visible { outline-color: var(--text); }

/* ---------------------------------------------------------------- Micro-interactions (coupées par data-effects="off" et prefers-reduced-motion)
   Classes utilitaires pour les modules :
     .anim-rise | .anim-fade | .anim-pop   apparition d'un bloc (style="--d: 2" = rang, 60 ms par rang)
     .anim-stagger                         apparition échelonnée des enfants directs d'une grille
     .is-clickable                         carte / tuile cliquable : léger soulèvement au survol, pression au clic
     .hover-arrow                          flèche (dernière icône) qui avance au survol du parent cliquable
     [data-countup]                        compteur animé de 0 à la valeur affichée (automatique sur .stat-value, .kpi-value)
     .skeleton (+ .sk-line, .sk-title…)    squelettes ; [aria-busy="true"] > * s'estompe pendant un chargement */
@keyframes anim-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes anim-fade { from { opacity: 0; } }
@keyframes anim-pop { from { opacity: 0; transform: scale(.965); } }
@keyframes nav-progress { 0% { transform: scaleX(0); } 18% { transform: scaleX(.34); } 55% { transform: scaleX(.68); } 100% { transform: scaleX(.93); } }
html[data-effects="on"] .anim-rise { animation: anim-rise .5s var(--ease-out) calc(var(--d, 0) * 60ms) backwards; }
html[data-effects="on"] .anim-fade { animation: anim-fade .4s var(--ease) calc(var(--d, 0) * 60ms) backwards; }
html[data-effects="on"] .anim-pop { animation: anim-pop .36s var(--ease-out) calc(var(--d, 0) * 60ms) backwards; }
html[data-effects="on"] .anim-stagger > * { animation: anim-rise .46s var(--ease-out) backwards; }
html[data-effects="on"] .anim-stagger > :nth-child(2) { animation-delay: .04s; }
html[data-effects="on"] .anim-stagger > :nth-child(3) { animation-delay: .08s; }
html[data-effects="on"] .anim-stagger > :nth-child(4) { animation-delay: .12s; }
html[data-effects="on"] .anim-stagger > :nth-child(5) { animation-delay: .16s; }
html[data-effects="on"] .anim-stagger > :nth-child(6) { animation-delay: .2s; }
html[data-effects="on"] .anim-stagger > :nth-child(7) { animation-delay: .24s; }
html[data-effects="on"] .anim-stagger > :nth-child(8) { animation-delay: .28s; }
html[data-effects="on"] .anim-stagger > :nth-child(n+9) { animation-delay: .32s; }
.is-clickable { cursor: pointer; text-decoration: none !important; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease), border-color .18s, background .18s; -webkit-tap-highlight-color: transparent; }
.is-clickable:hover { border-color: var(--line-strong); }
html[data-effects="on"] .is-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
html[data-effects="on"] .is-clickable:active { transform: translateY(0) scale(.985); box-shadow: var(--shadow-1); transition-duration: .06s; }
.hover-arrow { transition: transform .2s var(--ease-out), opacity .2s; }
html[data-effects="on"] :is(a, button, .is-clickable):hover > .hover-arrow, html[data-effects="on"] :is(a, button, .is-clickable):hover .hover-arrow { transform: translateX(3px); }
html[data-effects="on"] .btn { transition: background .15s var(--ease), border-color .15s, transform .12s var(--ease), box-shadow .15s, filter .15s, color .15s; }
html[data-effects="on"] .btn-primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 16px -8px rgb(var(--brand-rgb) / .7); }
html[data-effects="on"] .nav-link .ph, html[data-effects="on"] .nav-link .ph-fill { transition: color .15s, transform .2s var(--ease-out); }
html[data-effects="on"] .nav-link:hover .ph, html[data-effects="on"] .nav-link:hover .ph-fill { transform: scale(1.08); }
html[data-effects="on"] .nav-link.is-active::before { animation: nav-mark .3s var(--ease-out) backwards; }
@keyframes nav-mark { from { transform: scaleY(0); opacity: 0; } }
html[data-effects="on"] .table tbody tr { transition: background .12s; }
html[data-effects="on"] .tab { transition: color .15s, background .15s; }
html[data-effects="on"] .tab::after { transition: transform .22s var(--ease-out), opacity .15s; }
[aria-busy="true"] > * { opacity: .55; transition: opacity .2s; pointer-events: none; }
/* Barre de progression de navigation (2 px, couleur d'accent) : retour immédiat au clic */
.nav-progress { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; opacity: 0; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.nav-progress.is-on { opacity: 1; animation: nav-progress 5s cubic-bezier(.1, .7, .1, 1) forwards; }
.nav-progress.is-done { opacity: 0; transition: opacity .3s; }
html[data-effects="off"] .nav-progress { display: none; }
/* Squelettes : reflet plus doux, respect du mouvement réduit */
.skeleton { background: linear-gradient(90deg, var(--bg-sunken) 25%, color-mix(in srgb, var(--bg-sunken) 55%, var(--bg-elev)) 37%, var(--bg-sunken) 63%); background-size: 400% 100%; }
html[data-effects="off"] .skeleton { animation: none; }
@media (prefers-reduced-motion: reduce) { .skeleton, .nav-progress { animation: none !important; } }

/* ---------------------------------------------------------------- Téléphone : une vraie application (PWA)
   Application installée (html.is-standalone) : pas de rebond de page, pas de sélection ni de menu contextuel sur la coque.
   Clavier virtuel (html.is-kb-open, --kb, --vvh posés par design.js) : la barre d'onglets et le bouton flottant s'effacent,
   feuilles du bas, menus et fenêtres restent au-dessus du clavier. */
html.is-standalone, html.is-standalone body { overscroll-behavior-y: none; }
html.is-standalone :is(.topbar, .tabbar, .sidebar, .btn, .tab, .chip, .nav-link, .menu-item, .tabbar-item, .segmented, .badge, .sheet-head) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (max-width: 900px) {
  html.is-kb-open .tabbar, html.is-kb-open .fab { display: none !important; }
  html.is-kb-open .has-tabbar .content { padding-bottom: 1.5rem; }
  html.is-kb-open .has-tabbar .action-bar.is-sticky, html.is-kb-open .action-bar.is-sticky { bottom: 0; }
  html.is-kb-open .sheet { bottom: var(--kb, 0px); max-height: calc(var(--vvh, 100dvh) - 12px); padding-bottom: 0; }
  html.is-kb-open .dropdown > .menu, html.is-kb-open .menu.is-sheet { bottom: var(--kb, 0px) !important; max-height: calc(var(--vvh, 80dvh) - 12px) !important; }
  html.is-kb-open .bulkbar, html.is-kb-open .toasts { bottom: calc(var(--kb, 0px) + 12px) !important; }
}
@media (max-width: 640px) {
  html.is-kb-open .modal { height: var(--vvh, 100dvh); max-height: var(--vvh, 100dvh); }
  html.is-kb-open .modal.modal-sm { height: auto; max-height: calc(var(--vvh, 100dvh) - 12px); margin-bottom: var(--kb, 0px); }
  html.is-kb-open .drawer { height: var(--vvh, 100dvh); }
}
/* Tiroir de menu : invite d'installation */
.sidebar-install { display: flex; align-items: center; gap: .6rem; margin: .15rem 0 .45rem; padding: .6rem .5rem .6rem .65rem; border-radius: 12px; background: #151517; border: 1px solid #26262B; color: #fff; }
.sidebar-install-ico { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex-shrink: 0; border-radius: 9px; background: rgb(var(--brand-rgb) / .16); color: var(--brand-bright); font-size: 1.15rem; line-height: 1; }
.sidebar-install-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.sidebar-install-text b { font-size: .84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-install-text small { font-size: .72rem; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-install-x { --btn-fg: var(--sb-muted); flex-shrink: 0; }
.sidebar-install-x:hover { background: var(--sb-hover); }
/* Zones tactiles ≥ 44 px pour les petits liens du kit (sans changer leur taille visuelle) */
@media (hover: none) and (pointer: coarse) {
  :is(a.qty, a.st-pill, a.split-item, .breadcrumb > a) { position: relative; }
  :is(a.qty, a.st-pill, a.split-item)::after { content: ""; position: absolute; inset: -11px -5px; }
  .split-bar > a { min-width: 10px; }
}
/* Barre d'onglets : accent orange, libellé net, transition de type application */
@media (max-width: 900px) {
  .tabbar { box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .28); }
  .tabbar-item { min-height: var(--tap); }
  .tabbar-item.is-active { color: var(--text); }
  .tabbar-item.is-active .tabbar-icon { background: var(--brand-soft); color: var(--brand-ink); }
  html[data-effects="on"] .tabbar-item.is-active .tabbar-icon { animation: tab-pop .32s var(--ease-spring) backwards; }
  @keyframes tab-pop { from { transform: scale(.7); opacity: .4; } }
}

/* ---------------------------------------------------------------- Modules du socle : états « positifs » en vert (succès), l'orange reste la couleur d'accent */
.pw-fields .pw-meter-bars[data-score="3"] span:nth-child(-n+3), .pw-fields .pw-meter-bars[data-score="4"] span { background: var(--success-strong); }
.pw-fields .pw-reqs li.is-ok { color: var(--success); }
.pw-fields .pw-match .text-brand { color: var(--success); }
body .access-banner { border-bottom-color: var(--brand); }
body .access-banner-icon { background: var(--brand); color: var(--on-brand); }
.dash-ico.dash-ico.tone-success { background: var(--success-soft); color: var(--success); }
.money.money.is-pos { color: var(--success); }

/* ---------------------------------------------------------------- Pages d'erreur (errors/_page.blade.php) et maintenance : charte et co-marquage */
.error-page::before { background: radial-gradient(circle, color-mix(in srgb, var(--brand) 13%, transparent) 0%, transparent 62%); }
.error-card { gap: .9rem; max-width: 560px; }
.error-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; color: var(--text); text-decoration: none !important; text-align: left; }
.error-brand b { display: block; font-weight: 800; font-stretch: 112%; font-size: 1rem; line-height: 1.15; letter-spacing: -.01em; }
.error-brand small { display: block; font-size: .74rem; font-weight: 600; color: var(--text-3); }
.error-code { position: relative; font-size: clamp(5rem, 3rem + 10vw, 9.5rem); }
.error-code::after { content: ""; display: block; width: 78%; height: clamp(5px, .06em, 9px); margin: .12em auto 0; background: linear-gradient(90deg, var(--assala) 0 78%, transparent 78% 81%, var(--eit) 81% 100%); }
.error-tag { background: var(--bg-sunken); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.error-foot { flex-wrap: wrap; justify-content: center; gap: .5rem .75rem; margin-top: 1.25rem; }
.error-foot .brand { opacity: .9; }

/* ------------------------------------------------------------- Impression : propre, sans la coque */
@media print {
  :root, [data-theme] { --bg: #fff; --bg-elev: #fff; --bg-sunken: #f3f3f3; --bg-hover: #fff; --text: #000; --text-2: #333; --text-3: #555; --line: #d0d0d0; --line-strong: #bbb; --shadow-1: none; --shadow-2: none; color-scheme: light; }
  .sidebar, .sidebar-overlay, .topbar, .tabbar, .sheet, .sheet-backdrop, .site-top, .site-foot, .chat-fab, .toasts, .bulkbar, .no-print, .install-card, .tip-float, .impersonate-bar, .offline-bar,
  .page-head .toolbar, .form-actions, .action-bar, .pagination, .filters, .stat-toggle, .collapse-toggle, .skip-link, .sr-only { display: none !important; }
  html, body { background: #fff !important; color: #000; font-size: 10.5pt; }
  body { overflow: visible; }
  html:has(body > .shell), html:has(body > .shell) > body { height: auto !important; overflow: visible !important; }
  .shell, .main, .content { display: block !important; height: auto !important; overflow: visible !important; }
  .sidebar-resizer, .topbar-tools, .stat-row-tools { display: none !important; }
  .content { padding: 0 !important; } .content-inner { max-width: none; }
  .panel, .stat-card, .kpi, .item-card, .quick-tile, .hello-card { box-shadow: none !important; border-color: #ccc; break-inside: avoid; }
  .hello-card { background: #fff; color: #000; border: 1px solid #ccc; } .hello-name { color: #000; }
  .page-fill, .fill, .scroll-area, .table-wrap, .scroll-y, .kanban-col, .kanban-list, .modal-body, .drawer-body { height: auto !important; max-height: none !important; overflow: visible !important; }
  .table th { position: static; background: #f3f3f3 !important; }
  thead { display: table-header-group; } tr, img { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3 { break-after: avoid; }
  .print-only { display: block !important; }
  * { animation: none !important; transition: none !important; }
  @page { margin: 14mm 12mm; }
}
