/* =========================================================================
   EIT GROUP — Plateforme Carrières · Design system
   Charte : noir du logo, blanc, vert EIT (#5CAC30). Archivo (axe de largeur).
   Thèmes : [data-theme="light"] / [data-theme="dark"] sur <html>.
   ========================================================================= */

@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;
}

:root {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --black: #000000;
  --white: #ffffff;
  --brand: #5CAC30;
  --brand-600: #4C9426;
  --brand-700: #3B7A1B;
  --signal: #F47B20;

  --bg: #F5F6F3;
  --bg-elev: #FFFFFF;
  --bg-sunken: #ECEEE9;
  --bg-hover: #F0F2EE;
  --bg-inverse: #000000;
  --line: #E1E4DD;
  --line-strong: #C9CEC4;
  --text: #0A0D09;
  --text-2: #4F564C;
  --text-3: #7C8378;
  --text-inverse: #FFFFFF;
  --brand-ink: #3B7A1B;
  --brand-soft: #EAF5E3;
  --brand-line: #BFE0AC;

  --info: #1D5FD0;   --info-soft: #E6EEFC;
  --warning: #B35C00; --warning-soft: #FCF0DD;
  --danger: #C62828; --danger-soft: #FCE8E8;
  --violet: #6D3FD6; --violet-soft: #EFE9FC;
  --orange: #C2560A; --orange-soft: #FDEBDD;
  --muted-soft: #EEF0EC;

  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(10, 13, 9, .06);
  --shadow-2: 0 6px 24px -10px rgba(10, 13, 9, .22);
  --shadow-pop: 0 24px 60px -18px rgba(10, 13, 9, .35), 0 2px 6px rgba(10, 13, 9, .08);
  --ring: 0 0 0 3px rgba(92, 172, 48, .45);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0F110E;
  --bg-sunken: #070807;
  --bg-hover: #171A16;
  --bg-inverse: #FFFFFF;
  --line: #22261F;
  --line-strong: #343A30;
  --text: #F3F5F1;
  --text-2: #B3BAAE;
  --text-3: #858C80;
  --text-inverse: #000000;
  --brand-ink: #8BD35F;
  --brand-soft: #13220B;
  --brand-line: #2C4A1B;
  --info: #7FAEFF;   --info-soft: #0E1A2F;
  --warning: #F2B35A; --warning-soft: #261A08;
  --danger: #FF8A80; --danger-soft: #2A0E0D;
  --violet: #B79BFF; --violet-soft: #1B1430;
  --orange: #FFA466; --orange-soft: #2A1607;
  --muted-soft: #171A16;
  --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 #22261F;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
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;
}
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: #000; }
[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 */
.ph, .ph-fill, .ph-bold { line-height: 1; font-size: 1.15em; vertical-align: -0.16em; }
.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;
}
.icon-box.is-dark { background: var(--bg-inverse); color: var(--text-inverse); }

/* ------------------------------------------------------------- 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 .08s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; position: relative; user-select: none;
}
.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 { font-size: 1.15rem; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: #000; --btn-bd: var(--brand); }
.btn-primary:hover { background: #6BBE3D; border-color: #6BBE3D; }
.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); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.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%; }
.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: ""; position: absolute; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  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); } }
.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: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(--brand); }
.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: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 2.5rem; }
.input-icon > .input-action { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); }
.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 #000; 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: #000; transform: none; }
.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; color: var(--text-2); cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; 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: rgba(0,0,0,.1); }
.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;
}
.badge::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.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-success, .tone-brand { --b-fg: var(--brand-ink); --b-bg: var(--brand-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); }
.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; 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; }
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: #000; font-size: .72rem; font-weight: 800; }
.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 { font-size: 1.35rem; flex-shrink: 0; margin-top: .05rem; }
.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(--brand-soft); border-color: var(--brand-line); color: var(--text); } .notice.tone-success > .ph { color: var(--brand-ink); }
.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); flex-shrink: 0; overflow: hidden; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-brand { background: var(--brand); color: #000; }
.avatar-sm { --s: 1.9rem; } .avatar-lg { --s: 3.4rem; } .avatar-xl { --s: 5.5rem; } .avatar-2xl { --s: 8rem; }
.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: 1; text-align: left; font-size: .78rem; font-weight: 700; color: var(--text-3); 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; }
.th-sort.is-active { color: var(--text); }

/* 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; }
.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 { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.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; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--brand); }

/* ------------------------------------------------------------- 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);
}
.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%; padding: .55rem .7rem; border-radius: var(--r-xs); border: 0; background: transparent; color: var(--text); font-size: .9rem; font-weight: 550; text-align: left; cursor: pointer; text-decoration: none !important; }
.menu-item:hover { background: var(--bg-hover); }
.menu-item .ph { color: var(--text-3); font-size: 1.1rem; }
.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: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.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); }
.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; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(0,0,0,.45); }
.drawer { position: fixed; z-index: 191; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--bg-elev); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.drawer.is-wide { width: min(880px, 100%); }
.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 */
.toasts { position: fixed; z-index: 400; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r); background: var(--bg-inverse); color: var(--text-inverse); box-shadow: var(--shadow-pop); animation: toast-in .28s var(--ease); font-size: .92rem; }
.toast .ph { font-size: 1.3rem; flex-shrink: 0; color: var(--brand); }
.toast.tone-danger .ph { color: #FF8A80; } .toast.tone-warning .ph { color: #F2B35A; } .toast.tone-info .ph { color: #7FAEFF; }
.toast-title { font-weight: 750; }
.toast-close { margin-left: auto; background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
.toast.is-leaving { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@media (max-width: 767px) { .toasts { bottom: 84px; } }

/* ------------------------------------------------------------- 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; }
.kpi-label { font-size: .84rem; color: var(--text-2); font-weight: 600; display: flex; gap: .45rem; align-items: center; }
.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; } .trend-down { color: var(--danger); font-weight: 700; }
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); }
.empty-title { font-weight: 750; color: var(--text); font-size: 1.05rem; }

/* Skeleton */
.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); }
@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; 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; 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(--brand); color: #000; }
@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(--brand); border-color: var(--brand); }
.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(--brand); }
.steps-track > div.is-done::after { background: var(--brand); border-color: var(--brand); }
.steps-track > div.is-current::after { box-shadow: 0 0 0 5px var(--brand-soft); }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--bg-inverse); color: var(--text-inverse); font-size: .74rem; font-weight: 600; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; pointer-events: none;
}

/* ------------------------------------------------------------- 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; padding: .8rem .95rem; font-weight: 750; font-size: .9rem; }
.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; }
.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); }

/* ------------------------------------------------------------- Admin shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns .2s var(--ease); }
.shell.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: #000; color: #E9ECE6; display: flex; flex-direction: column; border-right: 1px solid #1B1E19; z-index: 40; }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 1.05rem 1.1rem; height: var(--topbar-h); text-decoration: none !important; color: #fff; }
.sidebar-brand img { width: 2.3rem; height: 2.3rem; flex-shrink: 0; }
.sidebar-brand b { font-stretch: 115%; font-weight: 800; letter-spacing: -0.01em; font-size: 1.02rem; line-height: 1.1; }
.sidebar-brand small { display: block; color: #8C9487; font-weight: 600; font-size: .74rem; font-stretch: 100%; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .4rem .7rem 1rem; scrollbar-width: thin; scrollbar-color: #2a2e27 transparent; }
.nav-group { margin-top: 1.1rem; }
.nav-group-label { padding: 0 .7rem .35rem; font-size: .72rem; font-weight: 650; color: #6F776A; white-space: nowrap; }
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .58rem .7rem; border-radius: var(--r-sm); color: #C5CBC0; font-weight: 580; font-size: .92rem; text-decoration: none !important; white-space: nowrap; position: relative; }
.nav-link .ph { font-size: 1.25rem; flex-shrink: 0; color: #8C9487; }
.nav-link:hover { background: #121411; color: #fff; }
.nav-link:hover .ph { color: #fff; }
.nav-link.is-active { background: #151A12; color: #fff; }
.nav-link.is-active .ph { color: 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; }
.sidebar-foot { padding: .8rem; border-top: 1px solid #1B1E19; }
.shell.is-collapsed .nav-link span, .shell.is-collapsed .nav-group-label, .shell.is-collapsed .sidebar-brand div, .shell.is-collapsed .nav-link .count, .shell.is-collapsed .sidebar-foot .hide-collapsed { display: none; }
.shell.is-collapsed .nav-link { justify-content: center; padding: .65rem; }
.shell.is-collapsed .nav-group { margin-top: .6rem; border-top: 1px solid #1B1E19; padding-top: .6rem; }
.shell.is-collapsed .sidebar-brand { justify-content: center; padding-inline: .5rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { 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); }
.topbar-search { flex: 1; max-width: 560px; }
.topbar-search .input { background: var(--bg-elev); }
.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-size: .72rem; font-weight: 700; color: var(--text-3); }
.content { padding: 1.5rem 1.25rem 3rem; flex: 1; }
@media (min-width: 1024px) { .content { padding: 1.9rem 2.2rem 3.5rem; } .topbar { padding: 0 2.2rem; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-title { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; margin: 0; }
.page-sub { color: var(--text-2); margin: .25rem 0 0; font-size: .95rem; }
.breadcrumb { display: flex; gap: .4rem; align-items: center; font-size: .82rem; color: var(--text-3); margin-bottom: .45rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-2); }
.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: 16px; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; margin-top: 1rem; background: var(--bg-inverse); color: var(--text-inverse); border-radius: var(--r); box-shadow: var(--shadow-pop); flex-wrap: wrap; }
.bulkbar .btn { --btn-bg: transparent; --btn-fg: var(--text-inverse); --btn-bd: rgba(127,127,127,.4); }
@media (max-width: 1023px) {
  .shell, .shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .25s var(--ease); }
  .shell.is-mobile-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .shell.is-collapsed .nav-link span, .shell.is-collapsed .nav-group-label, .shell.is-collapsed .sidebar-brand div { display: initial; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; }
}

/* ------------------------------------------------------------- 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; }
}
.impersonate-bar { background: var(--signal); color: #000; 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: #000; text-decoration: underline; }
.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::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.1) 40%, rgba(0,0,0,.88) 100%); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 16px; 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; }
@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: #000; } .annonce-bar.tone-urgent a { color: #000; 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: #000; 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: #000; display: grid; place-items: center; font-size: 2.2rem; box-shadow: 0 0 0 10px rgba(92,172,48,.25); 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: #000; }
.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: #000; 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(--brand); color: #000; display: grid; place-items: center; font-size: 3rem; margin: 0 auto; animation: burst .6s var(--ease); box-shadow: 0 0 0 14px var(--brand-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; }

/* Chat (assistant IA) */
.chat-fab { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 0; background: var(--brand); color: #000; display: grid; place-items: center; font-size: 1.6rem; cursor: pointer; box-shadow: 0 12px 30px -8px rgba(92,172,48,.65); transition: transform .2s var(--ease); }
.chat-fab:hover { transform: translateY(-2px); }
.chat-panel { position: fixed; right: 18px; bottom: 90px; z-index: 91; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100dvh - 120px)); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel.is-max { right: 12px; left: 12px; top: 12px; bottom: 12px; width: auto; height: auto; }
@media (max-width: 560px) { .chat-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 100dvh; border-radius: 0; } .chat-fab { bottom: 16px; right: 16px; } }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .9rem; }
.chat-msg { display: flex; gap: .6rem; max-width: 92%; }
.chat-msg.is-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble { padding: .7rem .9rem; border-radius: 16px; background: var(--bg-sunken); font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; min-width: 0; }
.chat-msg.is-user .chat-bubble { background: var(--bg-inverse); color: var(--text-inverse); border-bottom-right-radius: 5px; }
.chat-msg:not(.is-user) .chat-bubble { border-bottom-left-radius: 5px; }
.chat-bubble p { margin: 0 0 .55em; } .chat-bubble p:last-child { margin: 0; }
.chat-bubble ul, .chat-bubble ol { margin: .3em 0 .6em; padding-left: 1.2em; }
.chat-bubble a { text-decoration: underline; }
.chat-bubble code { font-size: .85em; background: rgba(127,127,127,.15); padding: .05em .3em; border-radius: 4px; }
.chat-bubble table { border-collapse: collapse; font-size: .85em; margin: .5em 0; } .chat-bubble td, .chat-bubble th { border: 1px solid var(--line); padding: .25em .5em; }
.chat-input { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 2.8rem; max-height: 9rem; border-radius: var(--r); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-suggest button { border: 1px solid var(--line); background: var(--bg-elev); border-radius: var(--r-pill); padding: .4rem .75rem; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--text-2); text-align: left; }
.chat-suggest button:hover { border-color: var(--brand); color: var(--text); }
.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); } }
.chat-page { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100dvh - var(--topbar-h) - 4.5rem); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--bg-elev); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg-sunken); }
.chat-list-items { flex: 1; overflow-y: auto; padding: .5rem; display: flex; flex-direction: column; gap: 2px; }
.chat-list-item { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: var(--r-sm); cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--text-2); border: 0; background: none; text-align: left; width: 100%; }
.chat-list-item:hover { background: var(--bg-hover); color: var(--text); }
.chat-list-item.is-active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
@media (max-width: 860px) { .chat-page { grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - 7rem); } .chat-list { display: none; } .chat-page.show-list .chat-list { display: flex; } .chat-page.show-list .chat-main { display: none; } }

/* Erreurs */
.error-page { min-height: 100dvh; display: grid; place-items: center; padding: 2rem 16px; text-align: center; }
.error-code { font-size: clamp(5rem, 3rem + 10vw, 10rem); font-weight: 800; font-stretch: 125%; line-height: .9; letter-spacing: -0.04em; }

/* Impression */
@media print {
  .sidebar, .topbar, .site-top, .site-foot, .chat-fab, .toasts, .no-print { display: none !important; }
  .shell { display: block; } body { background: #fff; color: #000; }
  .panel { box-shadow: none; border-color: #ccc; }
}

/* ------------------------------------------------------------- É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, .sidebar-brand img, .error-page img[alt="EIT GROUP"] { border-radius: 50%; background: #fff; }
/* v3 : aucun anneau coloré ; seulement un liseré neutre à peine visible là où le rond noir se fond dans un fond noir */
[data-theme="dark"] .site-logo img, .sidebar-brand img { box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.foot-grid a.site-logo { display: flex; padding: 0; }

/* =========================================================================
   Socle v2 — écran ajusté, composants de liste, effets
   ========================================================================= */

/* Marque (sidebar) : logo et nom de l'entreprise mis en avant */
.sidebar-brand { height: auto; min-height: calc(var(--topbar-h) + 14px); padding: 1rem 1.1rem .9rem; gap: .8rem; }
.sidebar-brand img { width: 3rem; height: 3rem; }
.sidebar-brand b { font-size: 1.28rem; font-stretch: 118%; letter-spacing: .01em; }
.sidebar-brand small { font-size: .76rem; color: #9AA394; margin-top: .1rem; }
.shell.is-collapsed .sidebar-brand img { width: 2.7rem; height: 2.7rem; }

/* Écran ajusté (≥ 1024 px) : la page ne défile pas, seules les listes défilent */
@media (min-width: 1024px) {
  .shell { height: 100dvh; overflow: hidden; }
  .main { height: 100dvh; overflow: hidden; }
  .content { overflow-y: auto; min-height: 0; scrollbar-gutter: stable; }
  body.is-fit .content { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 1.25rem; }
  body.is-fit .content > .fit, body.is-fit .fit { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.is-fit .page-head { margin-bottom: 1rem; }
  .fit-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fit-scroll { flex: 1; min-height: 0; overflow: auto; }
  .fit-row { flex: 1; min-height: 0; display: grid; gap: 1rem; }
  .fit-row > * { min-height: 0; }
}
.fit { display: flex; flex-direction: column; }

/* Entrée de page : une seule apparition orchestrée */
@media (prefers-reduced-motion: no-preference) {
  .content > * { animation: page-rise .38s var(--ease) backwards; }
  .content > *:nth-child(2) { animation-delay: .04s; } .content > *:nth-child(3) { animation-delay: .08s; }
  .fit > * { animation: page-rise .4s var(--ease) backwards; }
  .fit > *:nth-child(2) { animation-delay: .05s; } .fit > *:nth-child(3) { animation-delay: .1s; } .fit > *:nth-child(4) { animation-delay: .14s; }
}
@keyframes page-rise { from { opacity: 0; transform: translateY(10px); } }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
.lift { transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }

/* Cartes statistiques repliables */
.stats { margin-bottom: 1rem; flex-shrink: 0; }
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.stats-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .55rem .3rem .35rem; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.stats-toggle:hover { background: var(--bg-hover); color: var(--text); }
.stats-toggle .ph-caret-down { transition: transform .22s var(--ease); }
.stats.is-collapsed .stats-toggle .ph-caret-down { transform: rotate(-90deg); }
.stats.is-collapsed .stats-head { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .75rem; }
.stats-mini { display: flex; gap: .4rem; flex-wrap: wrap; }
.stats-mini .chip { font-variant-numeric: tabular-nums; }

/* KPI v2 : icône teintée, compteur animé, tendance */
.kpi { transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; padding: 1rem 1.1rem; }
.kpi-icon { position: absolute; top: .9rem; right: .9rem; width: 2.3rem; height: 2.3rem; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 1.2rem; background: var(--brand-soft); color: var(--brand-ink); }
.kpi[data-tone="info"] .kpi-icon { background: var(--info-soft); color: var(--info); }
.kpi[data-tone="warning"] .kpi-icon { background: var(--warning-soft); color: var(--warning); }
.kpi[data-tone="danger"] .kpi-icon { background: var(--danger-soft); color: var(--danger); }
.kpi[data-tone="violet"] .kpi-icon { background: var(--violet-soft); color: var(--violet); }
.kpi[data-tone="orange"] .kpi-icon { background: var(--orange-soft); color: var(--orange); }
.kpi[data-tone="muted"] .kpi-icon { background: var(--muted-soft); color: var(--text-2); }
.kpi[data-tone="dark"] .kpi-icon { background: var(--bg-inverse); color: var(--text-inverse); }
.kpi.has-icon .kpi-label { padding-right: 2.6rem; }
.kpi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--bg-sunken); }
.kpi-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 0 3px 3px 0; }
a.kpi:hover, .kpi.is-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }

/* Panneau de liste : barre d'outils, zone défilante, pied (pagination) */
.dt { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; overflow: visible; position: relative; }
.dt > :first-child { border-top-left-radius: calc(var(--r-lg) - 1px); border-top-right-radius: calc(var(--r-lg) - 1px); }
.dt > :last-child { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }
.dt-scroll:first-child { overflow: auto; } .dt-scroll:last-child { overflow: auto; }
body.is-fit .dt { flex: 1; }
.dt-toolbar { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: .75rem .9rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dt-toolbar .dt-search { flex: 1 1 240px; max-width: 440px; }
.dt-toolbar .grow { flex: 1; }
.dt-chips { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; padding: .55rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg-sunken); flex-shrink: 0; }
.chip-x { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .35rem .22rem .6rem; border-radius: var(--r-pill); background: var(--bg-elev); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--text); text-decoration: none !important; }
.chip-x .ph { font-size: .85rem; color: var(--text-3); }
.chip-x:hover { border-color: var(--danger); } .chip-x:hover .ph { color: var(--danger); }
.dt-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scroll-behavior: smooth; }
.dt-scroll .table th { top: 0; z-index: 2; }
.dt-scroll .table thead th { box-shadow: 0 1px 0 var(--line); }
.dt-pad { padding: .9rem; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .9rem; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: .84rem; color: var(--text-2); flex-shrink: 0; background: var(--bg-elev); }
.dt-foot .pagination a, .dt-foot .pagination span { min-width: 2rem; height: 2rem; font-size: .82rem; }
.dt-foot .select { width: auto; padding-block: .25rem; font-size: .84rem; min-height: 0; height: 2rem; }
.btn.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
@media (max-width: 1023px) { .dt-scroll { max-height: none; overflow-x: auto; overflow-y: visible; } }

/* Filtres avancés (panneau déroulant) */
.filter-pop { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; width: min(760px, calc(100vw - 32px)); padding: 1rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.filter-pop.right { left: auto; right: 0; }
.filter-pop .filters { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.filter-pop-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.btn .dot-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--brand); color: #000; font-size: .7rem; font-weight: 800; }
.range-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .4rem; align-items: center; }

/* Choix de l'affichage (tableau, liste, cartes, mini-cartes) */
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--bg-sunken); border: 1px solid var(--line); }
.view-switch button { width: 2.05rem; height: 1.9rem; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); cursor: pointer; font-size: 1.05rem; }
.view-switch button:hover { color: var(--text); }
.view-switch button.is-active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }

/* Sélecteur de période */
.period-menu { min-width: 300px; padding: .6rem; }
.period-presets { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.period-presets button { text-align: left; padding: .5rem .6rem; border-radius: var(--r-xs); border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: .86rem; font-weight: 580; cursor: pointer; }
.period-presets button:hover { background: var(--bg-hover); }
.period-presets button.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.period-custom { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }

/* Sous-onglets (segments) */
.subtabs { display: flex; gap: .25rem; padding: .25rem; border-radius: var(--r); background: var(--bg-sunken); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; width: fit-content; flex-shrink: 0; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .85rem; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 650; white-space: nowrap; cursor: pointer; text-decoration: none !important; transition: background .15s, color .15s; }
.subtab:hover { color: var(--text); background: color-mix(in srgb, var(--bg-elev) 60%, transparent); }
.subtab.is-active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
.subtab .ph { font-size: 1.05rem; }
.subtab .count { font-size: .72rem; font-weight: 800; padding: .05rem .42rem; border-radius: 999px; background: var(--bg-hover); color: var(--text-2); font-variant-numeric: tabular-nums; }
.subtab.is-active .count { background: var(--brand-soft); color: var(--brand-ink); }

/* Grilles de cartes */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .85rem; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .65rem; }
.card-item { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; position: relative; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card-item.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.list-rows { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: .9rem; padding: .75rem .95rem; border-bottom: 1px solid var(--line); transition: background .12s; min-width: 0; }
.list-row:hover { background: var(--bg-hover); }

/* Formulaires en modale */
.modal .form-grid { gap: .95rem 1.1rem; }
.modal-body > .notice { margin-bottom: 1rem; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.modal-backdrop[x-cloak] { display: none !important; }

/* Bouton d'import / zone de dépôt compacte */
.import-drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 1.2rem; text-align: center; color: var(--text-2); background: var(--bg-sunken); }
.import-drop .ph { font-size: 1.8rem; color: var(--brand-ink); }

/* Petits ajustements */
.page-head .toolbar .btn { white-space: nowrap; }
.content:focus { outline: none; }
.select-inline { width: auto; display: inline-block; }
/* KPI compacts (écran ajusté) */
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.stats .kpi { padding: .8rem .95rem .85rem; gap: .2rem; }
.stats .kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: .8rem; }
.stats .kpi-icon { top: .7rem; right: .7rem; width: 2rem; height: 2rem; font-size: 1.05rem; }
.stats .kpi-value { font-size: clamp(1.45rem, 1.05rem + .8vw, 1.95rem); }
.stats .kpi-foot { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.stats .kpi-foot > * { vertical-align: middle; }
/* Formulaire directement dans une modale : le corps défile, l'en-tête et le pied restent visibles */
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.modal > form > .modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
