/* ==========================================================================
   WASD — design system (tokens et composants repris du fichier Figma)
   Pas de build requis : fichier servi tel quel (compatible hébergement mutualisé).
   ========================================================================== */

:root {
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink: #111318;
  --offwhite: #F4F4F1;
  --graphite: #1B1E25;

  --bg-canvas: #F4F4F1;
  --bg-surface: #FFFFFF;
  --bg-subtle: #ECECE8;
  --bg-muted: #E2E2DD;
  --bg-inverse: #111318;
  --bg-overlay: rgba(17, 19, 24, .42);

  --text-primary: #111318;
  --text-secondary: #4E525B;
  --text-tertiary: #6B6E76;
  --text-inverse: #F4F4F1;

  --border-subtle: #E2E2DD;
  --border-default: #CFCFCA;
  --border-strong: #B4B5B2;

  /* Pôle — Production par défaut (surchargé par style="--accent-…") */
  --accent-solid: #B60000;
  --accent-text: #B60000;
  --accent-tint: #FBE9E7;
  --accent-border: #D12626;
  --accent-on-solid: #FFFFFF;
  --accent-dark: #D12626;

  --pole-production: #B60000;
  --pole-production-text: #B60000;
  --pole-production-tint: #FBE9E7;
  --pole-games: #FF7A1A;
  --pole-games-text: #B54A00;
  --pole-games-tint: #FFF0E3;
  --pole-modding: #2FCB7E;
  --pole-modding-text: #0F7A45;
  --pole-modding-tint: #E3F7EC;

  --success-fg: #12784A; --success-bg: #E7F6EE; --success-solid: #12784A;
  --warning-fg: #8A5A00; --warning-bg: #FFF3D6; --warning-solid: #B07A00;
  --danger-fg: #C21F1F;  --danger-bg: #FDECEC;  --danger-solid: #C21F1F;
  --info-fg: #2450C8;    --info-bg: #E8EEFD;    --info-solid: #2F5BEA;
  --progress-fg: #5B3FD6; --progress-bg: #EEEAFD; --progress-solid: #6A4FE0;
  --neutral-fg: #4E525B; --neutral-bg: #E2E2DD;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-key: 8px;
  --radius-md: 10px;
  --radius-card: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-key: 0 2px 0 rgba(17, 19, 24, .22), 0 3px 6px rgba(17, 19, 24, .08);
  --shadow-card: 0 1px 2px rgba(17, 19, 24, .04);
  --shadow-pop: 0 18px 48px rgba(17, 19, 24, .18), 0 2px 6px rgba(17, 19, 24, .08);

  --container: 1280px;
  --gutter: 80px;
  --nav-h: 72px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg-canvas: #111318;
  --bg-surface: #1B1E25;
  --bg-subtle: #23262E;
  --bg-muted: #2B2F38;
  --bg-inverse: #F4F4F1;
  --bg-overlay: rgba(0, 0, 0, .6);
  --text-primary: #F4F4F1;
  --text-secondary: #B4B5B2;
  --text-tertiary: #8E9096;
  --text-inverse: #111318;
  --border-subtle: #2B2F38;
  --border-default: #3A3E48;
  --border-strong: #4E525B;
  --accent-text: var(--accent-dark-text, #FF6B6B);
  --accent-tint: color-mix(in srgb, var(--accent-solid) 16%, transparent);
  --pole-production-text: #FF6B6B; --pole-games-text: #FF9A4D; --pole-modding-text: #2FCB7E;
  --pole-production-tint: rgba(209, 38, 38, .16); --pole-games-tint: rgba(255, 122, 26, .16); --pole-modding-tint: rgba(47, 203, 126, .16);
  --success-fg: #3DDC97; --success-bg: rgba(18, 120, 74, .25);
  --warning-fg: #F5C24A; --warning-bg: rgba(176, 122, 0, .22);
  --danger-fg: #FF7676;  --danger-bg: rgba(194, 31, 31, .22);
  --info-fg: #8BA8FF;    --info-bg: rgba(47, 91, 234, .22);
  --progress-fg: #B4A4FF; --progress-bg: rgba(106, 79, 224, .25);
  --neutral-fg: #B4B5B2; --neutral-bg: #2B2F38;
  --shadow-key: 0 2px 0 rgba(0, 0, 0, .5), 0 3px 6px rgba(0, 0, 0, .3);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- Polices (auto-hébergées, Fontsource / SIL OFL) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/unbounded-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/unbounded-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/jetbrains-mono-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-ui); font-size: 14px; line-height: 22px; color: var(--text-primary); background: var(--bg-canvas); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent-tint); color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--info-solid); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typographie ---------- */
.display-2xl { font: 700 72px/76px var(--font-display); letter-spacing: -2px; }
.display-xl  { font: 700 56px/60px var(--font-display); letter-spacing: -1.5px; }
.display-lg  { font: 700 40px/46px var(--font-display); letter-spacing: -1px; }
.display-md  { font: 600 28px/34px var(--font-display); letter-spacing: -.5px; }
.display-sm  { font: 600 20px/26px var(--font-display); }
.heading-lg  { font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: -.3px; }
.heading-md  { font-weight: 600; font-size: 16px; line-height: 24px; letter-spacing: -.1px; }
.heading-sm  { font-weight: 600; font-size: 14px; line-height: 20px; }
.body-lg { font-size: 16px; line-height: 26px; }
.body-md { font-size: 14px; line-height: 22px; }
.body-sm { font-size: 13px; line-height: 20px; }
.caption { font-size: 12px; line-height: 16px; }
.label-md { font-weight: 500; font-size: 14px; line-height: 20px; }
.label-sm { font-weight: 500; font-size: 12px; line-height: 16px; }
.overline { font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; }
.mono { font-family: var(--font-mono); font-size: 13px; line-height: 20px; }
.mono-sm { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent-text); }
.text-success { color: var(--success-fg); }
.text-warning { color: var(--warning-fg); }
.text-danger { color: var(--danger-fg); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { color: var(--accent-text); margin-bottom: 8px; }

/* ---------- Mise en page ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--white { background: var(--bg-surface); }
.section--canvas { background: var(--bg-canvas); }
.section--dark { background: var(--bg-inverse); color: var(--text-inverse); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head p { margin-top: 12px; color: var(--text-secondary); font-size: 16px; line-height: 26px; max-width: 560px; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.grid { display: grid; gap: 16px; }
.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-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; }
.stack-4 > * + * { margin-top: 4px; } .stack-8 > * + * { margin-top: 8px; } .stack-12 > * + * { margin-top: 12px; } .stack-16 > * + * { margin-top: 16px; } .stack-24 > * + * { margin-top: 24px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--border-subtle); border: 0; margin: 24px 0; }

/* ---------- Icônes ---------- */
.ico { flex: none; }

/* ---------- Boutons (touches) ---------- */
.btn { --btn-bg: var(--bg-surface); --btn-fg: var(--text-primary); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--radius-key); background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 500; font-size: 14px; line-height: 20px; white-space: nowrap; box-shadow: var(--shadow-key);
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease, filter .15s ease; cursor: pointer; text-decoration: none; position: relative; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(17, 19, 24, .22), 0 1px 2px rgba(17, 19, 24, .08); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn--primary { --btn-bg: var(--accent-solid); --btn-fg: var(--accent-on-solid); --btn-bd: transparent; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--secondary { --btn-bg: var(--bg-surface); --btn-fg: var(--text-primary); --btn-bd: var(--border-strong); }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--bg-subtle); filter: none; }
.btn--dark { --btn-bg: transparent; --btn-fg: #F4F4F1; --btn-bd: #4E525B; box-shadow: none; }
.btn--dark:hover { background: rgba(255, 255, 255, .06); filter: none; }
.btn--inverse { --btn-bg: #F4F4F1; --btn-fg: #111318; --btn-bd: transparent; }
.btn--danger { --btn-bg: #C21F1F; --btn-fg: #fff; --btn-bd: transparent; }
.btn--danger-soft { --btn-bg: var(--danger-solid); --btn-fg: #fff; --btn-bd: transparent; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn--xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn--block { display: flex; width: 100%; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--accent-text); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link--muted { color: var(--text-secondary); }

/* Petites touches de clavier (raccourcis, étapes) */
.keycap { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--bg-surface); box-shadow: 0 1.5px 0 var(--border-strong); font: 500 11px/1 var(--font-mono); color: var(--text-secondary); }
.keycap--lg { width: 40px; height: 40px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text-primary); box-shadow: var(--shadow-key); border-color: var(--border-default); }
.keycap--accent { background: var(--accent-solid); color: var(--accent-on-solid); border-color: transparent; }
.keycap--dark { background: transparent; border-color: #4E525B; color: #B4B5B2; box-shadow: none; }

/* ---------- Badges, tags, statuts ---------- */
.pole-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px; background: var(--tag-tint, var(--accent-tint)); color: var(--tag-text, var(--accent-text)); font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.pole-tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tag-solid, var(--accent-solid)); }
.pole-tag--solid { background: var(--tag-solid, var(--accent-solid)); color: var(--tag-on, #fff); }
.pole-tag--solid::before { background: currentColor; }
.pole-tag--plain { background: transparent; padding: 0; color: var(--text-secondary); }
.pole-production { --tag-solid: var(--pole-production); --tag-text: var(--pole-production-text); --tag-tint: var(--pole-production-tint); --tag-on: #fff; }
.pole-games { --tag-solid: var(--pole-games); --tag-text: var(--pole-games-text); --tag-tint: var(--pole-games-tint); --tag-on: #111318; }
.pole-modding { --tag-solid: var(--pole-modding); --tag-text: var(--pole-modding-text); --tag-tint: var(--pole-modding-tint); --tag-on: #111318; }
.mono-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--bg-muted); color: var(--text-secondary); font: 500 11px/16px var(--font-mono); white-space: nowrap; }
.section--dark .mono-tag, .is-dark .mono-tag { background: rgba(255, 255, 255, .08); color: #B4B5B2; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-fg); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--plain::before { display: none; }
.status--info { background: var(--info-bg); color: var(--info-fg); }
.status--progress { background: var(--progress-bg); color: var(--progress-fg); }
.status--warning { background: var(--warning-bg); color: var(--warning-fg); }
.status--success { background: var(--success-bg); color: var(--success-fg); }
.status--danger { background: var(--danger-bg); color: var(--danger-fg); }
.status--neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.status--square { border-radius: 4px; font-family: var(--font-mono); font-size: 11px; }
.status--square::before { display: none; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--bg-muted); color: var(--text-secondary); font: 500 11px/1 var(--font-mono); }
.count--accent { background: var(--accent-solid); color: var(--accent-on-solid); }
.count--tint { background: var(--accent-tint); color: var(--accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-solid); display: inline-block; flex: none; }
.dot--success { background: var(--success-solid); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--bg-surface); border: 1px solid var(--border-default); color: var(--text-secondary); font-size: 12px; font-weight: 500; }

/* ---------- Avatars ---------- */
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--bg-muted); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex: none; border: 1px solid var(--border-subtle); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 24px; height: 24px; border-radius: 6px; font-size: 10px; }
.avatar--md { width: 40px; height: 40px; border-radius: 11px; font-size: 13px; }
.avatar--lg { width: 64px; height: 64px; border-radius: 16px; font-size: 18px; font-weight: 600; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-right: -8px; border: 2px solid var(--bg-canvas); }

/* ---------- Cartes ---------- */
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.card--pad { padding: 24px; }
.card--pad-20 { padding: 20px; }
.card--subtle { background: var(--bg-subtle); border-color: var(--border-subtle); box-shadow: none; }
.card--tint { background: var(--accent-tint); border-color: transparent; }
.card--warning { background: var(--warning-bg); border-color: transparent; color: var(--warning-fg); }
.card--dark { background: var(--graphite); border-color: transparent; color: #F4F4F1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.card-head--bordered { padding: 18px 20px; border-bottom: 1px solid var(--border-subtle); }
.card-body { padding: 20px; }
.card-foot { padding: 16px 20px; border-top: 1px solid var(--border-subtle); background: var(--bg-subtle); border-radius: 0 0 var(--radius-card) var(--radius-card); }
.card-list > * + * { border-top: 1px solid var(--border-subtle); }
a.card:hover, .card--hover:hover { border-color: var(--border-default); }

/* KPI */
.kpi { padding: 20px; }
.kpi__label { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); }
.kpi__value { font: 700 28px/34px var(--font-display); letter-spacing: -.5px; margin-top: 12px; display: flex; align-items: baseline; gap: 8px; }
.kpi__value small { font: 400 13px/20px var(--font-mono); color: var(--text-tertiary); letter-spacing: 0; }
.kpi__sub { margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.kpi--lg .kpi__value { font-size: 32px; line-height: 38px; }

/* Barres de progression */
.progress { height: 4px; background: var(--bg-muted); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent-solid); border-radius: inherit; }
.progress--lg { height: 8px; }
.progress--success > span { background: var(--success-solid); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 500; font-size: 13px; line-height: 18px; color: var(--text-primary); }
.field-hint { font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.field-error { font-size: 12px; line-height: 16px; color: var(--danger-fg); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-key); border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary); font-size: 14px; line-height: 20px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--info-solid); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info-solid) 18%, transparent); }
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { border-color: var(--danger-solid); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23111318' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
html[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23F4F4F1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
.textarea { height: auto; min-height: 120px; padding: 12px; resize: vertical; line-height: 22px; }
.input--sm, .select--sm { height: 32px; font-size: 13px; }
.input-wrap { position: relative; }
.input-wrap > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }
.input-wrap > .input { padding-left: 36px; }
.input-wrap > .keycap { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.char-count { font: 400 12px/16px var(--font-mono); color: var(--text-tertiary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 20px; }
.check input { appearance: none; width: 18px; height: 18px; flex: none; margin: 1px 0 0; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--bg-surface); display: grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input::after { content: ""; width: 10px; height: 10px; opacity: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.check input:checked { background: var(--accent-solid); border-color: var(--accent-solid); }
.check input:checked::after { opacity: 1; }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]::after { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.toggle input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--bg-muted); border: 1px solid var(--border-default); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked { background: var(--accent-solid); border-color: var(--accent-solid); }
.toggle input:checked::after { transform: translateX(16px); }
.radio-card { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--bg-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .radio-dot { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-content: center; }
.radio-card:has(input:checked) { border: 2px solid var(--tag-solid, var(--accent-solid)); background: var(--tag-tint, var(--accent-tint)); padding: 19px; }
.radio-card:has(input:checked) .radio-dot { border-color: var(--tag-solid, var(--accent-solid)); }
.radio-card:has(input:checked) .radio-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tag-solid, var(--accent-solid)); }
.icon-key { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; background: var(--tag-solid, var(--accent-solid)); color: var(--tag-on, #fff); box-shadow: var(--shadow-key); flex: none; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--accent-solid) var(--val, 40%), var(--bg-muted) var(--val, 40%)); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--accent-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); cursor: pointer; }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent-solid); cursor: pointer; }
.tags-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--info-bg); color: var(--info-fg); font: 500 12px/1 var(--font-mono); }
.tag-chip button { color: inherit; opacity: .7; font-size: 14px; line-height: 1; }
.tag-chip--add { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-secondary); cursor: pointer; }

/* Dépôt de fichiers */
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--bg-subtle); padding: 32px 24px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone.is-over { border-color: var(--accent-solid); background: var(--accent-tint); }
.dropzone__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-surface); border: 1px solid var(--border-default); box-shadow: var(--shadow-key); display: grid; place-items: center; margin: 0 auto 16px; }
.upload-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); background: var(--bg-surface); }
.file-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-subtle); display: grid; place-items: center; color: var(--text-secondary); flex: none; }

/* ---------- Onglets & segments ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 12px 13px; font-weight: 500; font-size: 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text-primary); }
.tabs .is-active { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--accent-solid); }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--bg-muted); border-radius: 10px; }
.segmented a, .segmented button, .segmented label { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .is-active, .segmented label:has(input:checked) { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 2px rgba(17, 19, 24, .1), 0 1px 0 rgba(17, 19, 24, .06); }
.segmented .sq { width: 7px; height: 7px; border-radius: 2px; background: var(--tag-solid); }

/* ---------- Tableaux ---------- */
.table-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table th { text-align: left; padding: 12px 20px; background: var(--bg-subtle); color: var(--text-secondary); font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--bg-subtle) 50%, transparent); }
.table tr.is-selected { background: var(--accent-tint); }
.table .num { text-align: right; font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.table .mono { white-space: nowrap; }
.table--compact td { padding: 10px 20px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font-size: 13px; color: var(--text-secondary); padding: 0 8px; }
.pagination a:hover { background: var(--bg-subtle); }
.pagination .is-active { border: 1px solid var(--border-strong); color: var(--text-primary); background: var(--bg-surface); box-shadow: 0 1.5px 0 var(--border-strong); }

/* ---------- Encadrés ---------- */
.callout { display: flex; gap: 12px; padding: 16px 20px; border-radius: var(--radius-card); font-size: 13px; line-height: 20px; }
.callout .ico { margin-top: 2px; }
.callout strong { display: block; font-weight: 600; font-size: 14px; }
.callout--info { background: var(--info-bg); color: var(--info-fg); }
.callout--warning { background: var(--warning-bg); color: var(--warning-fg); }
.callout--accent { background: var(--accent-tint); color: var(--text-primary); }
.callout--accent .ico { color: var(--accent-text); }
.callout--success { background: var(--success-bg); color: var(--success-fg); }
.callout--danger { background: var(--danger-bg); color: var(--danger-fg); }
.flash { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 420px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-card); background: var(--graphite); color: #F4F4F1; box-shadow: var(--shadow-pop); animation: flashIn .25s ease; }
.flash--error { background: #7A1212; }
.flash .ico { margin-top: 3px; color: #3DDC97; }
.flash--error .ico { color: #FFB4B4; }
@keyframes flashIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modales & tiroirs ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: var(--bg-overlay); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .15s ease; }
.overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow: auto; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); animation: popIn .18s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal--sm { max-width: 480px; } .modal--lg { max-width: 640px; }
.modal__head { display: flex; gap: 16px; align-items: flex-start; padding: 24px 28px 0; }
.modal__head .x { margin-left: auto; color: var(--text-secondary); padding: 4px; border-radius: 6px; }
.modal__head .x:hover { background: var(--bg-subtle); }
.modal__body { padding: 20px 28px 24px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 28px; background: var(--bg-subtle); border-top: 1px solid var(--border-subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.overlay--drawer { justify-content: flex-end; padding: 0; }
.drawer { width: 100%; max-width: 560px; height: 100%; background: var(--bg-surface); display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slideIn .22s ease; }
.drawer--narrow { max-width: 520px; }
@keyframes slideIn { from { transform: translateX(32px); opacity: 0; } }
.drawer__head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--border-subtle); }
.drawer__head .x { margin-left: auto; color: var(--text-secondary); padding: 4px; }
.drawer__body { flex: 1; overflow: auto; padding: 24px; }
.drawer__foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border-subtle); }

/* Menus déroulants */
.dropdown { position: relative; }
.dropdown__menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 6px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.dropdown__menu a, .dropdown__menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13px; text-align: left; color: var(--text-primary); }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--bg-subtle); }
.dropdown__menu .danger { color: var(--danger-fg); }

/* ==========================================================================
   SITE VITRINE
   ========================================================================== */
.site-nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in srgb, var(--bg-canvas) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border-subtle); }
.site-nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.site-nav__links { flex: 1; display: flex; justify-content: center; gap: 28px; }
.site-nav__links > a, .site-nav__links > button { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; color: var(--text-secondary); height: var(--nav-h); }
.site-nav__links > a:hover, .site-nav__links > button:hover, .site-nav__links .is-active { color: var(--text-primary); }
.site-nav__actions { display: flex; align-items: center; gap: 12px; }
.site-nav__burger { display: none; }
.lockup { display: inline-flex; align-items: center; gap: 10px; }
.lockup__text { display: flex; flex-direction: column; gap: 4px; }
.lockup__desc { font: 600 8.6px/1 var(--font-display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-text); }
.lockup--h { gap: 12px; }
.lockup--h .lockup__sep { width: 1px; height: 18px; background: currentColor; opacity: .25; }
.lockup--h .lockup__desc { font-size: 11px; letter-spacing: 1.6px; }
.megamenu { position: absolute; left: 0; right: 0; top: var(--nav-h); background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); box-shadow: 0 24px 40px rgba(17, 19, 24, .18); padding: 32px 0; }
.megamenu__grid { display: grid; grid-template-columns: repeat(var(--mm-cols, 3), minmax(0, 1fr)) 300px; gap: 24px; }
/* Plus de 3 pôles : les fiches sur toute la largeur, l'encart d'aide en bandeau dessous */
.megamenu__grid--many { grid-template-columns: repeat(var(--mm-cols, 4), minmax(0, 1fr)); }
.megamenu__grid--many .megamenu__help { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.megamenu__grid--many .megamenu__help > * { margin: 0 !important; }
.megamenu__grid--many .megamenu__help .btn { margin-left: auto !important; }
.megamenu__card { display: block; padding: 24px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); transition: border-color .15s, background .15s; }
.megamenu__card li a { display: flex; align-items: center; gap: 10px; flex: 1; margin: -6px -10px; padding: 6px 10px; border-radius: 8px; color: var(--text-primary); transition: background .15s, color .15s; }
.megamenu__card li a:hover, .megamenu__card li a:focus-visible { background: var(--tag-tint); color: var(--tag-text); }
.megamenu__card li.megamenu__more { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.megamenu__card li.megamenu__more a { font-weight: 600; color: var(--tag-text); }
.service-card[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.service-card:target { border-color: var(--tag-solid); box-shadow: 0 0 0 3px var(--tag-tint); }
.megamenu__card p { margin: 14px 0 16px; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.megamenu__card li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.megamenu__card li .ico { color: var(--tag-text); }
.megamenu__help { background: var(--bg-inverse); color: var(--text-inverse); border-radius: var(--radius-card); padding: 24px; align-self: start; }
html[data-theme="dark"] .megamenu__help { background: #23262E; color: #F4F4F1; }
.mobile-menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); z-index: 49; background: var(--bg-canvas); padding: 8px 20px 32px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--border-subtle); }
/* (le menu est en « absolute » sous l'en-tête : le flou de l'en-tête empêcherait un « fixed » de couvrir l'écran) */
html.menu-open, html.menu-open body { overflow: hidden; }
.mobile-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); font-size: 16px; font-weight: 500; }

.hero { padding: 88px 0 96px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 580px; gap: 64px; align-items: center; }
.hero h1 { max-width: 660px; }
.hero__intro { max-width: 540px; color: var(--text-secondary); font-size: 16px; line-height: 26px; }
.hero__proof { display: flex; align-items: center; gap: 16px; padding-top: 8px; }
.hero__visual { position: relative; height: 520px; border-radius: var(--radius-xl); overflow: hidden; background: #15171D; isolation: isolate; }
.grid-bg { background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 48px 48px; background-position: -1px -1px; }
.hero__visual .logo-picto { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 343px; height: auto; }
.chip-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #1B1E25; border: 1px solid var(--chip, #D12626); color: #F4F4F1; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.chip-float::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--chip, #D12626); }
.mono-note { position: absolute; padding: 6px 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: #8E9096; font: 500 12px/16px var(--font-mono); white-space: nowrap; }
/* Animation des touches : W pressée → relâche → A, S, D en cascade (boucle 4 s) */
.anim-keys .logo-picto g { transform-box: fill-box; }
.anim-keys .logo-picto > g { animation: keyPress 4s infinite; }
.anim-keys .logo-picto > g:nth-child(2) { animation-delay: .9s; }
.anim-keys .logo-picto > g:nth-child(3) { animation-delay: 1.05s; }
.anim-keys .logo-picto > g:nth-child(4) { animation-delay: 1.2s; }
@keyframes keyPress { 0%, 14%, 100% { translate: 0 0; } 6% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .anim-keys .logo-picto > g { animation: none; } }

.pole-card { display: flex; flex-direction: column; overflow: hidden; border-bottom: 3px solid var(--tag-solid); }
.pole-card__body { padding: 24px 24px 20px; flex: 1; }
.pole-card__body h3 { margin: 18px 0 18px; }
.pole-card li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--text-secondary); }
.pole-card li .ico { color: var(--tag-text); }
.pole-card__foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--bg-subtle); color: var(--tag-text); font-weight: 500; font-size: 13px; transition: background .15s; }
.pole-card:hover .pole-card__foot { background: var(--tag-tint); }

.work-card { display: block; }
.work-card__media { position: relative; aspect-ratio: 16 / 8.8; border-radius: var(--radius-card); overflow: hidden; background: linear-gradient(135deg, #34363F 0%, #1B1D23 55%, #121318 100%); }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.work-card__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 9px; background: #fff; color: #111318; display: grid; place-items: center; box-shadow: var(--shadow-key); transition: transform .15s; }
.work-card:hover .work-card__play { transform: translate(-50%, -50%) scale(1.06); }
.work-card__time { position: absolute; right: 12px; bottom: 10px; font: 500 12px/16px var(--font-mono); color: #F4F4F1; }
.work-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.work-card h3 { margin-top: 12px; font-weight: 600; font-size: 16px; line-height: 24px; }
.work-card p { margin-top: 8px; font-size: 12px; color: var(--text-tertiary); }

.stats-band { background: var(--bg-inverse); color: var(--text-inverse); padding: 64px 0; }
html[data-theme="dark"] .stats-band { background: #0B0C10; color: #F4F4F1; }
.stats-band__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 6px 0 6px 32px; border-left: 1px solid rgba(255, 255, 255, .12); }
.stat__value { font: 700 56px/60px var(--font-display); letter-spacing: -1.5px; }
.stat__label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: #B4B5B2; }
.stat__label::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tag-solid, #D12626); }
.logo-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-wall span { display: flex; align-items: center; justify-content: center; height: 52px; border: 1px solid var(--border-default); border-radius: var(--radius-key); font: 500 12px/1 var(--font-mono); letter-spacing: .06em; color: var(--text-secondary); background: var(--bg-canvas); }

.step-card { padding: 20px; background: var(--bg-canvas); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); min-height: 146px; }
.step-card h3 { margin: 18px 0 8px; font-weight: 600; font-size: 16px; line-height: 24px; }
.step-card p { color: var(--text-secondary); font-size: 13px; line-height: 20px; }

.testimonial { display: flex; flex-direction: column; padding: 24px; }
.testimonial .stars { color: var(--tag-solid, var(--accent-solid)); letter-spacing: 2px; font-size: 13px; }
.testimonial blockquote { margin: 16px 0 24px; font-size: 15px; line-height: 24px; flex: 1; }
.testimonial footer { display: flex; align-items: center; gap: 12px; }
.testimonial footer strong { display: block; font-weight: 600; font-size: 13px; }
.testimonial footer span { font-size: 12px; color: var(--text-tertiary); }

.cta-band { position: relative; display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: center; padding: 64px 40px; border-radius: var(--radius-xl); background: #1B1D23; border: 1.5px solid var(--accent-dark); color: #F4F4F1; overflow: hidden; }
.cta-band .overline { color: color-mix(in srgb, var(--accent-dark) 80%, white); }
.cta-band p { margin-top: 20px; color: #B4B5B2; font-size: 15px; line-height: 24px; max-width: 520px; }
.cta-band .logo-picto { width: 230px; height: auto; margin: 0 auto; }

.site-footer { background: #15171C; color: #F4F4F1; padding: 64px 0 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.site-footer h4 { font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8E9096; margin-bottom: 16px; }
.site-footer li a { display: inline-block; padding: 4px 0; font-size: 14px; color: #E2E2DD; }
.site-footer li a:hover { color: #fff; }
.site-footer__desc { color: #B4B5B2; font-size: 14px; line-height: 22px; margin: 20px 0 16px; max-width: 360px; }
.social-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #343843; background: #1F222A; font: 500 11px/1 var(--font-mono); color: #B4B5B2; }
.social-chip:hover { color: #fff; border-color: #4E525B; }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #2B2F38; font-size: 12px; color: #8E9096; }

/* Pages pôles */
.pole-hero { background: #1B1D23; color: #F4F4F1; padding: 64px 0 72px; }
.pole-hero__grid { display: grid; grid-template-columns: 1fr 520px; gap: 64px; align-items: center; }
.pole-hero p { color: #B4B5B2; font-size: 15px; line-height: 24px; max-width: 560px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .ico { opacity: .6; }
.breadcrumb .current { color: var(--text-primary); }
.pole-hero .breadcrumb { color: #8E9096; }
.pole-hero .breadcrumb .current { color: #F4F4F1; }
.media-frame { position: relative; aspect-ratio: 52 / 42; border-radius: var(--radius-lg); background: #262931; overflow: hidden; }
.media-frame__label { position: absolute; left: 14px; bottom: 12px; font: 500 11px/16px var(--font-mono); color: #8E9096; }
.shape { position: absolute; border-radius: 22%; }
.shape--accent { background: var(--accent-solid); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.shape--ghost { background: rgba(255, 255, 255, .07); }
.shape--white { background: #F4F4F1; border-radius: 18%; }
.service-card { display: flex; flex-direction: column; padding: 20px; }
.service-card h3 { margin: 18px 0 8px; font-weight: 600; font-size: 17px; line-height: 24px; }
.service-card .desc { color: var(--text-secondary); font-size: 12.5px; line-height: 19px; flex: 1; }
.service-card .meta { display: flex; gap: 16px; margin: 14px 0 16px; font-size: 11.5px; color: var(--text-secondary); }
.service-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.service-card__price { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.service-card__price small { display: block; font-size: 11px; color: var(--text-tertiary); }
.service-card__price strong { font: 700 20px/26px var(--font-display); }
.guarantee { display: flex; gap: 14px; align-items: flex-start; }
.guarantee__ico { width: 28px; height: 28px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.guarantee strong { display: block; font-weight: 600; font-size: 13px; }
.guarantee span { font-size: 11.5px; color: var(--text-secondary); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
.faq details { border-bottom: 1px solid var(--border-default); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 14px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s; color: var(--text-secondary); }
.faq details[open] summary .ico { transform: rotate(90deg); color: var(--accent-text); }
.faq details p { padding: 0 32px 18px 0; margin-top: -6px; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.server-card__media { position: relative; height: 170px; background: #23262E; border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; }
.dashed-card { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--bg-canvas); padding: 20px; }
.mini-mod { display: flex; align-items: center; gap: 14px; padding: 12px; }
.mini-mod__thumb { width: 64px; height: 44px; border-radius: 6px; background: linear-gradient(135deg, #34363F, #1B1D23); flex: none; }

/* Tarifs */
.plan-card { position: relative; display: flex; flex-direction: column; padding: 24px 20px 20px; }
.plan-card--featured { border: 2px solid var(--accent-solid); box-shadow: 0 24px 48px color-mix(in srgb, var(--accent-solid) 14%, transparent); }
.plan-card__price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 12px; }
.plan-card__price strong { font: 700 40px/46px var(--font-display); letter-spacing: -1px; }
.plan-card__price span { font-size: 12px; color: var(--text-tertiary); }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 12.5px; }
.plan-card li .ico { color: var(--tag-text, var(--accent-text)); margin-top: 3px; }
.badge-solid { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; background: var(--accent-solid); color: var(--accent-on-solid); font-size: 11px; font-weight: 600; }
.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; }
.compare .is-featured { background: color-mix(in srgb, var(--accent-tint) 75%, transparent); }
.compare .ico { margin: 0 auto; color: var(--accent-text); }

/* Devis */
.wizard { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; padding: 56px 0 96px; }
.wizard__aside { position: sticky; top: calc(var(--nav-h) + 24px); }
.wizard__bar { height: 4px; background: var(--bg-muted); border-radius: 999px; margin: 20px 0 20px; overflow: hidden; }
.wizard__bar span { display: block; height: 100%; background: var(--accent-solid); border-radius: inherit; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; }
.steps-list li.is-current { background: var(--bg-muted); }
.steps-list .num { width: 28px; height: 28px; border-radius: 6px; flex: none; display: grid; place-items: center; font: 500 12px/1 var(--font-mono); border: 1px solid var(--border-strong); background: var(--bg-surface); color: var(--text-secondary); }
.steps-list .is-current .num { background: var(--accent-solid); color: var(--accent-on-solid); border-color: transparent; box-shadow: var(--shadow-key); }
.steps-list .is-done .num { background: var(--accent-tint); color: var(--accent-text); border-color: transparent; }
.steps-list strong { display: block; font-weight: 500; font-size: 14px; line-height: 20px; }
.steps-list .is-todo strong { color: var(--text-secondary); }
.steps-list small { font-size: 12px; color: var(--text-tertiary); }
.wizard__panel { padding: 40px; border-radius: var(--radius-lg); }
.wizard__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; margin-top: 28px; border-top: 1px solid var(--border-subtle); }
.recap-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); font-size: 14px; }
.recap-row dt { color: var(--text-secondary); }
.recap-row dd { margin: 0; font-weight: 500; }
.recap-row a { color: var(--accent-text); font-size: 13px; font-weight: 500; }

/* Légal */
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 64px; padding: 64px 0 96px; }
.legal__nav { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.legal__nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; }
.legal__nav a.is-active, .legal__nav a:hover { background: var(--bg-muted); color: var(--text-primary); font-weight: 500; }
.legal section { padding: 28px 0 32px; border-bottom: 1px solid var(--border-subtle); }
.legal section h2 { font-weight: 600; font-size: 20px; line-height: 28px; margin-bottom: 14px; }
.legal section p, .legal section li { color: var(--text-secondary); font-size: 14px; line-height: 24px; }
.legal section ul { list-style: disc; padding-left: 20px; }

/* ==========================================================================
   APPLICATIONS (espace client & panel admin)
   ========================================================================== */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app--admin { grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg-canvas); border-right: 1px solid var(--border-subtle); padding: 18px 12px 0; overflow: hidden; }
.sidebar__brand { padding: 0 4px 16px; }
.sidebar__scroll { flex: 1; overflow-y: auto; margin: 0 -12px; padding: 0 12px 16px; scrollbar-width: thin; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-secondary); font-weight: 500; font-size: 14px; position: relative; margin-top: 2px; }
.nav-item .ico { color: var(--text-secondary); }
.nav-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.nav-item.is-active { background: var(--bg-muted); color: var(--text-primary); font-weight: 600; }
.nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-solid); }
.nav-item.is-active .ico { color: var(--text-primary); }
.nav-item .count { margin-left: auto; }
.nav-item.is-active .count { background: var(--accent-solid); color: var(--accent-on-solid); }
.nav-group { margin-top: 18px; }
.nav-group__title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 10px; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.nav-group__title .ico { transition: transform .15s; }
.nav-group.is-collapsed .nav-group__title .ico { transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-group__items { display: none; }
.sidebar__help { margin-top: 20px; padding: 14px; border-radius: 10px; background: var(--accent-tint); font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.sidebar__help strong { display: block; color: var(--text-primary); font-size: 14px; line-height: 20px; margin-bottom: 6px; }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 14px 4px; margin: 0 -12px; padding-left: 16px; padding-right: 16px; border-top: 1px solid var(--border-subtle); }
.sidebar__user strong { display: block; font-weight: 500; font-size: 14px; line-height: 20px; }
.sidebar__user small { display: block; font-size: 12px; color: var(--text-tertiary); }
.pole-filter { display: flex; flex-wrap: wrap; padding: 3px; gap: 2px; background: var(--bg-muted); border-radius: 8px; margin: 0 2px 14px; }
.pole-filter a { flex: 1 1 0; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; padding: 0 6px; }
.pole-filter a i { width: 6px; height: 6px; border-radius: 2px; background: var(--tag-solid); }
.pole-filter a.is-active { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 2px rgba(17, 19, 24, .1); }

.topbar { position: sticky; top: 0; z-index: 40; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 24px; background: color-mix(in srgb, var(--bg-canvas) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-subtle); }
.topbar .breadcrumb { font-size: 14px; color: var(--text-secondary); flex: 1; min-width: 0; }
.topbar .breadcrumb .current { font-weight: 500; }
.topbar__search { width: 280px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; border-radius: 8px; background: var(--bg-muted); color: var(--text-tertiary); font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.topbar__search:hover { border-color: var(--border-default); }
.topbar__search span:not(.keycap) { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__search .keycap { flex: none; }
.topbar__btn { position: relative; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--text-secondary); }
.topbar__btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.topbar__btn .badge-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-solid); border: 1.5px solid var(--bg-canvas); }
.topbar__menu { display: none; }
.unsaved { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--warning-bg); color: var(--warning-fg); font-size: 12px; font-weight: 500; }
.unsaved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.page { padding: 32px 32px 64px; max-width: 1440px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { font: 700 32px/40px var(--font-display); letter-spacing: -1px; }
.page-head p { margin-top: 2px; color: var(--text-secondary); font-size: 14px; }
.page-head__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.alert-banner { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--radius-card); background: var(--accent-tint); border: 1.5px solid color-mix(in srgb, var(--accent-solid) 50%, transparent); }
.alert-banner__icon { width: 48px; height: 48px; border-radius: 10px; background: var(--accent-solid); color: var(--accent-on-solid); display: grid; place-items: center; box-shadow: var(--shadow-key); flex: none; }
.project-card { display: flex; flex-direction: column; padding: 16px; gap: 0; }
.project-card__head { display: flex; align-items: center; gap: 8px; }
.project-card__head .more { margin-left: auto; color: var(--text-tertiary); }
.project-card h3 { font-weight: 600; font-size: 16px; line-height: 24px; margin: 12px 0 10px; }
.project-card__client { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.project-card__progress { margin: 14px 0 0; }
.project-card__progress .row-between { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.project-card__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; font-size: 12px; color: var(--text-secondary); }
.project-card__foot .due { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--warning-fg); }
.project-card__foot .msgs { display: inline-flex; align-items: center; gap: 4px; }
.project-card__foot .status { margin-left: auto; }
.date-box { width: 44px; height: 44px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date-box b { font: 600 16px/18px var(--font-display); }
.date-box small { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.list-row__ico { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-subtle); display: grid; place-items: center; color: var(--text-secondary); flex: none; }
.list-row--link:hover { background: var(--bg-subtle); }

/* Stepper (fiche projet) */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 20px 16px; }
.stepper__item { position: relative; }
.stepper__node { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; border: 1.5px solid var(--border-strong); background: var(--bg-surface); color: var(--text-tertiary); font: 500 11px/1 var(--font-mono); }
.stepper__item::after { content: ""; position: absolute; top: 11px; left: 24px; right: 0; height: 2px; background: var(--border-default); }
.stepper__item:last-child::after { display: none; }
.stepper__item.is-done::after { background: var(--accent-solid); }
.stepper__item.is-done .stepper__node { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-on-solid); }
.stepper__item.is-current .stepper__node { border-color: var(--accent-solid); color: var(--accent-solid); box-shadow: 0 0 0 3px var(--accent-tint); }
.stepper__item.is-current .stepper__node::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-solid); }
.stepper__item strong { display: block; margin-top: 12px; font-weight: 500; font-size: 14px; }
.stepper__item.is-todo strong { color: var(--text-secondary); }
.stepper__item small { font: 400 12px/16px var(--font-mono); color: var(--text-tertiary); }

/* Lecteur vidéo + commentaires horodatés */
.player { position: relative; background: #15171C; border-radius: var(--radius-card); overflow: hidden; color: #F4F4F1; }
.player__screen { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(ellipse at 30% 20%, #2A2D35 0%, #15171C 70%); display: grid; place-items: center; }
.player__screen video, .player__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player__label { position: absolute; left: 16px; top: 16px; z-index: 2; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, .55); font: 500 12px/16px var(--font-mono); color: #E2E2DD; }
.player__bigplay { width: 64px; height: 64px; border-radius: 14px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; color: #F4F4F1; transition: background .15s; }
.player__bigplay:hover { background: rgba(255, 255, 255, .16); }
.player__controls { padding: 12px 16px 14px; background: #15171C; }
.timeline { position: relative; height: 22px; cursor: pointer; }
.timeline__track { position: absolute; left: 0; right: 0; top: 14px; height: 3px; background: #343843; border-radius: 3px; }
.timeline__fill { position: absolute; left: 0; top: 14px; height: 3px; background: var(--accent-solid); border-radius: 3px; }
.timeline__thumb { position: absolute; top: 9px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; }
.timeline__marker { position: absolute; top: 0; width: 8px; height: 8px; margin-left: -4px; border-radius: 2px; background: #F5C24A; }
.player__bar { display: flex; align-items: center; gap: 12px; margin-top: 8px; font: 400 12px/16px var(--font-mono); color: #B4B5B2; }
.player__bar .btn { height: 30px; }
.comment { padding: 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); display: flex; gap: 12px; background: var(--bg-surface); }
.comment.is-resolved { opacity: .75; }
.comment__body { flex: 1; min-width: 0; }
.comment__body p { margin: 8px 0 8px; font-size: 14px; line-height: 20px; }
.comment.is-resolved .comment__body p { color: var(--text-tertiary); }
.tc { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--warning-bg); color: var(--warning-fg); font: 500 12px/1 var(--font-mono); cursor: pointer; }
.comment__actions { display: flex; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.comment__actions button:hover { color: var(--text-primary); }
.comment__actions .accent { color: var(--accent-text); }
.revisions-box { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius-card); background: var(--accent-tint); }
.rev-pips { display: flex; gap: 4px; }
.rev-pips span { width: 18px; height: 18px; border-radius: 4px; background: var(--accent-solid); }
.rev-pips span.is-used { background: transparent; border: 1.5px solid var(--accent-solid); }
.version-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.version-row.is-current { background: var(--bg-muted); }
.version-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 30px; padding: 0 8px; border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--border-default); font: 500 12px/1 var(--font-mono); color: var(--text-secondary); }
.version-row.is-current .version-badge { background: var(--accent-solid); color: var(--accent-on-solid); border-color: transparent; }

/* Messagerie */
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr) 280px; height: calc(100vh - 56px); }
.chat__list { border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; min-height: 0; background: var(--bg-canvas); }
.chat__item { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.chat__item:hover { background: var(--bg-subtle); }
.chat__item.is-active { background: var(--bg-muted); }
.chat__item .sq { width: 36px; height: 36px; border-radius: 8px; background: var(--tag-tint); display: grid; place-items: center; flex: none; }
.chat__item .sq::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--tag-solid); }
.chat__main { display: flex; flex-direction: column; min-height: 0; background: var(--bg-subtle); }
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--bg-canvas); border-bottom: 1px solid var(--border-subtle); }
.chat__msgs { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.chat__day { align-self: center; margin: 12px 0; padding: 2px 10px; border-radius: 6px; background: var(--bg-muted); font: 500 12px/18px var(--font-mono); color: var(--text-secondary); }
.msg { display: flex; gap: 12px; max-width: 78%; margin-top: 8px; }
.msg__meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.msg__meta b { color: var(--text-primary); font-weight: 600; margin-right: 6px; }
.msg__meta time { font-family: var(--font-mono); }
.msg__bubble { padding: 12px 14px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border-subtle); font-size: 14px; line-height: 22px; white-space: pre-line; }
.msg--me { align-self: flex-end; flex-direction: row-reverse; }
.msg--me .msg__meta { text-align: right; }
.msg--me .msg__bubble { background: var(--accent-solid); color: var(--accent-on-solid); border-color: transparent; }
.msg__file { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-default); background: var(--bg-surface); font-size: 13px; font-weight: 500; }
.msg__file small { font: 400 12px/1 var(--font-mono); color: var(--text-tertiary); }
.chat__composer { padding: 16px 24px 20px; background: var(--bg-canvas); border-top: 1px solid var(--border-subtle); }
.composer { display: flex; align-items: flex-end; gap: 12px; padding: 10px 10px 10px 14px; border: 2px solid var(--info-solid); border-radius: 12px; background: var(--bg-surface); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; min-height: 44px; max-height: 160px; background: transparent; font-size: 14px; line-height: 22px; padding: 0; }
.chat__details { border-left: 1px solid var(--border-subtle); padding: 24px 20px; background: var(--bg-canvas); overflow-y: auto; }
.chat__details dt { font-size: 12px; color: var(--text-tertiary); margin-top: 14px; }
.chat__details dd { margin: 2px 0 0; font-size: 14px; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.kanban__col { background: var(--bg-muted); border-radius: var(--radius-card); padding: 12px; min-height: 520px; }
.kanban__col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; font-weight: 600; }
.kanban__col-head .dot { width: 7px; height: 7px; }
.kanban__col-head .count { background: transparent; margin-left: auto; }
.kanban__cards { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.kanban__cards.is-over { outline: 2px dashed var(--accent-solid); outline-offset: 4px; border-radius: 10px; background: var(--accent-tint); }
.kanban .project-card { cursor: grab; }
.kanban .project-card.is-dragging { opacity: .5; transform: rotate(2deg); }

/* Planning (Gantt) */
.gantt { --day: 31px; overflow-x: auto; }
.gantt table { table-layout: fixed; min-width: calc(240px + 28 * var(--day)); }
.gantt th, .gantt td { border-bottom: 1px solid var(--border-subtle); }
.gantt thead th { padding: 8px 0; background: var(--bg-subtle); font-weight: 500; font-size: 11px; color: var(--text-secondary); text-align: center; }
.gantt thead th:first-child { width: 240px; text-align: left; padding-left: 16px; letter-spacing: .08em; font-weight: 600; text-transform: uppercase; }
.gantt thead th b { display: block; font: 500 12px/16px var(--font-mono); color: var(--text-primary); }
.gantt thead th.is-today b { color: var(--accent-text); }
.gantt thead th.is-weekend, .gantt td.is-weekend { background: color-mix(in srgb, var(--bg-muted) 60%, transparent); }
.gantt td.lane { position: relative; padding: 0; height: 49px; }
.gantt td.label { padding: 8px 16px; width: 240px; }
.gantt .bar { position: absolute; top: 11px; height: 26px; display: flex; align-items: center; padding: 0 8px; border-radius: 6px; border: 1.5px solid var(--tag-solid); background: var(--tag-tint); color: var(--tag-text); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; z-index: 1; }
.gantt .bar.is-late { border-color: var(--danger-solid); background: var(--danger-bg); color: var(--danger-fg); }
.load-bars { display: flex; align-items: flex-end; height: 44px; }
.load-bars span { width: calc(var(--day) - 12px); margin: 0 6px; border-radius: 4px 4px 2px 2px; background: var(--border-strong); }
.load-bars span.is-mid { background: #9B6A00; }
.load-bars span.is-high { background: var(--danger-solid); }

/* Graphique CA */
.chart-bars { display: grid; grid-template-columns: 40px repeat(12, 1fr); align-items: end; height: 220px; gap: 0 14px; position: relative; }
.chart-bars__col { display: flex; flex-direction: column-reverse; align-items: stretch; height: 100%; justify-content: flex-start; position: relative; }
.chart-bars__col span { display: block; width: 100%; border-radius: 3px; margin-top: 3px; }
.chart-bars__col.is-empty { border: 1.5px dashed var(--border-strong); border-radius: 4px; height: 28%; }
.chart-axis { display: grid; grid-template-columns: 40px repeat(12, 1fr); gap: 0 14px; margin-top: 8px; font: 400 11px/16px var(--font-mono); color: var(--text-secondary); text-align: center; }
.chart-grid { position: absolute; inset: 0 0 0 40px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { border-top: 1px solid var(--border-subtle); }
.chart-y { position: absolute; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font: 400 11px/1 var(--font-mono); color: var(--text-secondary); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-secondary); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.stack-bar { display: flex; gap: 3px; height: 10px; margin: 8px 0 18px; }
.stack-bar span { border-radius: 3px; }
.sparkline { width: 100%; height: 40px; }

/* Palette ⌘K */
.cmdk { width: 100%; max-width: 640px; align-self: flex-start; margin-top: 12vh; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.cmdk__input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-subtle); }
.cmdk__input input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; }
.cmdk__results { max-height: 460px; overflow-y: auto; padding: 8px 6px; }
.cmdk__group { padding: 10px 12px 6px; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.cmdk__item { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.cmdk__item.is-active { background: var(--bg-muted); }
.cmdk__item .file-ico { width: 32px; height: 32px; }
.cmdk__item strong { display: block; font-weight: 500; font-size: 14px; }
.cmdk__item small { font-size: 12px; color: var(--text-tertiary); }
.cmdk__foot { display: flex; gap: 20px; padding: 10px 16px; background: var(--bg-subtle); border-top: 1px solid var(--border-subtle); font-size: 12px; color: var(--text-secondary); }
.cmdk__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* Panneau de notifications */
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 420px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; z-index: 70; }
.notif-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border-subtle); position: relative; }
.notif-item.is-unread { background: color-mix(in srgb, var(--accent-tint) 70%, transparent); }
.notif-item.is-unread::after { content: ""; position: absolute; right: 18px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-solid); }
.notif-item .file-ico { background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.notif-item strong { display: block; font-weight: 600; font-size: 14px; line-height: 20px; }
.notif-item p { font-size: 13px; color: var(--text-secondary); }
.notif-item time { font: 400 12px/16px var(--font-mono); color: var(--text-tertiary); }

/* Facture (aperçu HTML + PDF) */
.invoice-sheet { background: #fff; color: #111318; padding: 40px 36px; font-size: 10px; line-height: 15px; box-shadow: 0 8px 24px rgba(17, 19, 24, .12); }
.invoice-sheet .inv-title { font: 700 22px/1 var(--font-display); letter-spacing: -.5px; text-align: right; }
.invoice-sheet .inv-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 10px 12px; border-radius: 6px; background: var(--accent-tint); margin: 18px 0; }
.invoice-sheet .inv-meta small { display: block; font-weight: 600; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.invoice-sheet .inv-meta b { font: 500 9.5px/14px var(--font-mono); }
.invoice-sheet table th { background: #111318; color: #fff; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 8px; text-align: left; }
.invoice-sheet table td { padding: 8px; border-bottom: 1px solid #E2E2DD; vertical-align: top; }
.invoice-sheet .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.invoice-sheet .net { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 4px; background: var(--accent-solid); color: var(--accent-on-solid); font-weight: 600; }

/* Divers */
.empty { padding: 48px 24px; text-align: center; color: var(--text-secondary); }
.empty .keycap--lg { margin: 0 auto 16px; }
.swatch { width: 100%; height: 54px; border-radius: 8px; border: 1px solid var(--border-subtle); }
.color-input { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 10px; }
.color-input input[type="color"] { width: 32px; height: 32px; border: 0; padding: 0; border-radius: 8px; background: none; cursor: pointer; }
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border-radius: 8px; border: 1px solid var(--border-default); }
.drag-handle { cursor: grab; color: var(--text-tertiary); }
.settings-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; padding: 0 0 24px; }
.settings-row h2 { font-weight: 600; font-size: 18px; line-height: 26px; }
.settings-row p { margin-top: 6px; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 520px; width: 100%; margin: 0 auto; }
.auth__visual { position: relative; background: #15171D; overflow: hidden; display: grid; place-items: center; }
.auth__visual .logo-picto { width: 340px; height: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  :root { --gutter: 40px; }
  .hero__grid, .pole-hero__grid { grid-template-columns: 1fr 440px; gap: 40px; }
  .hero__grid { grid-template-columns: 1fr 540px; }
  .display-2xl { font-size: 60px; line-height: 64px; }
  .chat { grid-template-columns: 300px minmax(0, 1fr); }
  .chat__details { display: none; }
  .grid-4.kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .site-nav__links, .site-nav__actions .hide-md { display: none; }
  .site-nav__burger { display: inline-flex; margin-left: auto; }
  .hero__grid, .pole-hero__grid, .faq-grid, .cta-band, .wizard, .legal { grid-template-columns: 1fr; }
  .hero__visual { height: 420px; }
  .grid-3, .grid-4, .grid-6, .logo-wall, .stats-band__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { margin-bottom: 24px; }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
  .megamenu__grid { grid-template-columns: 1fr; }
  .wizard__aside, .legal__nav { position: static; }
  .app, .app--admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .sidebar.is-open { transform: none; }
  .topbar__menu { display: grid !important; }
  .topbar__search { width: auto; }
  .topbar__search span { display: none; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat__list { display: none; }
  .settings-row { grid-template-columns: 1fr; gap: 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth__visual { display: none; }
  .split-main { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .section { padding: 64px 0; }
  .display-2xl { font-size: 44px; line-height: 48px; letter-spacing: -1px; }
  .display-xl { font-size: 38px; line-height: 42px; }
  .display-lg { font-size: 30px; line-height: 36px; }
  .grid-2, .grid-3, .grid-4, .grid-6, .logo-wall, .stats-band__grid, .form-grid, .form-grid-3, .site-footer__grid { grid-template-columns: 1fr; }
  .hero__visual { height: 320px; }
  .hero__visual .logo-picto { width: 220px; }
  .chip-float, .mono-note { display: none; }
  .cta-band { padding: 40px 24px; }
  .wizard__panel { padding: 24px; }
  .recap-row { grid-template-columns: 1fr auto; }
  .recap-row dt { grid-column: 1 / -1; }
  .page { padding: 24px 16px 48px; }
  .page-head { flex-direction: column; }
  .stepper { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Logo adaptatif clair / sombre */
.logo-adaptive { display: inline-flex; }
html:not([data-theme="dark"]) .logo-adaptive > .logo-dark,
html[data-theme="dark"] .logo-adaptive > .logo-light { display: none !important; }

/* ---------- Corrections mobile (débordements horizontaux) ---------- */
.legal { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 1024px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .legal > * { min-width: 0; }
}
@media (max-width: 640px) {
  #contenu .row.gap-12, #contenu .row.gap-8 { flex-wrap: wrap; }
  #contenu .row.gap-12 > .input-wrap, #contenu .row.gap-12 > .select { width: 100% !important; }
  /* grilles posées en style inline (2fr 1fr, 1fr 520px…) : une colonne sur mobile */
  #contenu [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  #contenu .grid > *, #contenu .card { min-width: 0; }
  /* tableaux : défilement horizontal dans leur cadre au lieu d'élargir la page */
  #contenu .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #contenu .media-frame { max-width: 100%; }
  .section-head--row { flex-wrap: wrap; align-items: flex-start; }
  h1, h2, .display-2xl, .display-xl, .display-lg { overflow-wrap: break-word; hyphens: auto; }
  .legal h1 { font-size: 30px; line-height: 36px; }
}
/* Espace client & panel admin sur mobile */
@media (max-width: 1024px) {
  .app > *, .app__main, .page { min-width: 0; }
}
@media (max-width: 640px) {
  .grid-4.kpis { grid-template-columns: 1fr; }
  .page [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .page .grid > *, .page .card { min-width: 0; }
  .page .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page .row, .page-head, .page-head__actions, .card-head { flex-wrap: wrap; }
  .topbar .breadcrumb > *:not(:last-child) { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 640px) {
  .alert-banner { flex-wrap: wrap; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat__main { min-width: 0; }
  .chat__head { flex-wrap: wrap; gap: 8px; }
}

/* Sécurité du compte */
.qr-box { width: 200px; height: 200px; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--border-subtle); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recovery-grid .mono-tag { height: 32px; justify-content: center; font-size: 13px; letter-spacing: 1px; user-select: all; }
@media (max-width: 640px) { .page .qr-box { margin: 0 auto; } }

/* En-tête et accueil sur mobile */
@media (max-width: 1024px) {
  .site-nav__actions { margin-left: auto; }
  .site-nav__inner { gap: 16px; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 56px; }
  .hero .stack { gap: 20px !important; }
  .hero h1 { margin-top: 4px !important; }
  .hero__intro { font-size: 15px; line-height: 24px; }
  .hero .row.gap-12 { gap: 10px; }
  .hero .row.gap-12 > .btn { flex: 1 1 100%; justify-content: center; }
  .hero__visual { height: 360px; }
  .hero__visual .logo-picto { width: 240px; }
  .hero__visual .chip-float { font-size: 11px; padding: 6px 10px; white-space: nowrap; }
  .hero__visual .chip-float:nth-of-type(1) { left: 14px !important; top: 16px !important; }
  .hero__visual .chip-float:nth-of-type(2) { left: auto !important; right: 14px !important; top: auto !important; bottom: 58px !important; }
  .hero__visual .chip-float:nth-of-type(3) { left: 14px !important; top: auto !important; bottom: 16px !important; }
}
.mobile-menu a.btn { display: flex; justify-content: center; padding: 0 20px; border-bottom: 0; font-size: 15px; }
