/* ==========================================================================
   CHILAH Developer — feuille de style partagée par toutes les pages.
   Mise en page : colonne de 980 px, héros de 1120 px,
   bandes alternées noir bleuté / anthracite, tuiles arrondies sans ombre.
   Thème sombre d'abord (comme le thème par défaut du CRM, « Verre sombre ») ;
   le clair est redéfini plus bas, jeton par jeton.
   ========================================================================== */

@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
  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: "Zalando Sans";
  src: url("fonts/ZalandoSans-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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;
}

:root {
  color-scheme: dark;
  /* Surfaces */
  --bg: #020409;
  --band: #0c1016;
  --tile: #12161e;
  --tile-hov: #1a1f29;
  --tile-band: #181d26;
  --tile-band-hov: #212734;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  /* Encre */
  --fg: #f4f6fa;
  --fg-2: #a6adbb;
  --fg-3: #7d8595;
  /* Marque */
  --royal: #1e61f4;
  --on-royal: #ffffff;
  --navy: #113586;
  --sky: #4b81f6;
  --accent: #6e98ff;
  --pill-bg: #f4f6fa;
  --pill-fg: #071118;
  --nav-bg: rgba(6, 8, 13, 0.78);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.14);
  /* Sémantique (distincte de l'accent) */
  --ok: #4cc38a;
  --warn: #f0b429;
  --info: #6e98ff;
  /* Pôles — couleurs de la charte ; encre #071118 sauf Direction */
  --pole-direction: #1e61f4;
  --pole-compta: #e63946;
  --pole-commercial: #f4820a;
  --pole-admin: #e87baf;
  --pole-juridique: #5cb860;
  --pole-finance: #f4c430;
  --pole-social: #7a8fb2;
  --pole-technique: #a357f7;
  --ink-pole: #071118;
  /* Typographie */
  --f-title: "Unbounded", "Arial Black", "Segoe UI", system-ui, sans-serif;
  --f-sans: "Zalando Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  /* Gabarits */
  --w: 980px;
  --w-wide: 1120px;
  --r-tile: 18px;
  --r-hero: 28px;
  --r-pill: 980px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff;
    --band: #f3f5f9;
    --tile: #f3f5f9;
    --tile-hov: #eaeef5;
    --tile-band: #ffffff;
    --tile-band-hov: #f8f9fc;
    --line: rgba(11, 18, 32, 0.1);
    --line-strong: rgba(11, 18, 32, 0.18);
    --fg: #0b1220;
    --fg-2: #4a5263;
    --fg-3: #626a78;
    --accent: #1e61f4;
    --pill-bg: #0b1220;
    --pill-fg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --glass: rgba(255, 255, 255, 0.55);
    --glass-line: rgba(11, 18, 32, 0.1);
    --ok: #1d7f52;
    --warn: #9a6400;
    --info: #1e61f4;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --band: #f3f5f9;
  --tile: #f3f5f9;
  --tile-hov: #eaeef5;
  --tile-band: #ffffff;
  --tile-band-hov: #f8f9fc;
  --line: rgba(11, 18, 32, 0.1);
  --line-strong: rgba(11, 18, 32, 0.18);
  --fg: #0b1220;
  --fg-2: #4a5263;
  --fg-3: #626a78;
  --accent: #1e61f4;
  --pill-bg: #0b1220;
  --pill-fg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(11, 18, 32, 0.1);
  --ok: #1d7f52;
  --warn: #9a6400;
  --info: #1e61f4;
}

/* --------------------------------------------------------------------------
   Socle
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* Sans cette règle, un `display` de composant l'emporte sur l'attribut hidden : un élément
   filtré resterait visible, et une icône SVG masquée s'afficherait quand même. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.5 var(--f-sans);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--nav-bg);
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }

/* Colonne et gouttière : la gouttière vit sur l'enveloppe intérieure de chaque bande */
.wrap, .wrap-wide {
  width: 100%;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: calc(var(--w) + 64px); }
.wrap-wide { max-width: calc(var(--w-wide) + 64px); }
@media (min-width: 735px) {
  .wrap, .wrap-wide {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

/* --------------------------------------------------------------------------
   Bandeau de prototype
   -------------------------------------------------------------------------- */
.ribbon {
  background: var(--band);
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
}
.ribbon .wrap { padding-block: 9px; }
.ribbon strong { color: var(--fg); font-weight: 700; }

/* --------------------------------------------------------------------------
   Navigation globale
   -------------------------------------------------------------------------- */
.gnav {
  position: relative;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.gnav-in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--fg);
}
.brand svg { display: block; height: 15px; width: auto; }
.brand span {
  font-family: var(--f-title);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg-2);
}
.gnav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-inline: auto;
}
.gnav-links a {
  display: block;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  color: var(--fg-2);
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.gnav-links a:hover { color: var(--fg); }
.gnav-links a[aria-current="page"] { color: var(--fg); background: var(--glass); }
.gnav-act { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gnav-links + .gnav-act { margin-left: 0; }
.gnav-menu {
  display: none;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.gnav-menu span, .gnav-menu span::before, .gnav-menu span::after {
  display: block; width: 16px; height: 1.5px; background: var(--fg); border-radius: 2px;
  transition: transform 200ms var(--ease), opacity 160ms var(--ease);
}
.gnav-menu span { position: relative; }
.gnav-menu span::before, .gnav-menu span::after { content: ""; position: absolute; left: 0; }
.gnav-menu span::before { top: -5px; }
.gnav-menu span::after { top: 5px; }
.gnav[data-open] .gnav-menu span { background: transparent; }
.gnav[data-open] .gnav-menu span::before { transform: translateY(5px) rotate(45deg); }
.gnav[data-open] .gnav-menu span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 899px) {
  .gnav-menu { display: inline-flex; }
  .gnav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .gnav[data-open] .gnav-links { display: flex; }
  .gnav-links a { padding: 12px 4px; border-radius: 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .gnav-links a[aria-current="page"] { background: transparent; color: var(--accent); }
  .gnav-act { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   Navigation locale (barre de rubrique collante)
   -------------------------------------------------------------------------- */
.lnav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.lnav-in {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
}
.lnav-title {
  font-family: var(--f-title);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.lnav-in > nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.lnav ul {
  display: flex;
  list-style: none;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.lnav ul::-webkit-scrollbar { display: none; }
.lnav li { flex-shrink: 0; }
.lnav a.lk {
  display: block;
  padding: 6px 10px;
  font-size: 0.8125rem;
  color: var(--fg-2);
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.lnav a.lk:hover { color: var(--fg); }
.lnav a.lk[aria-current="true"] { color: var(--fg); background: var(--glass); }
@media (max-width: 599px) {
  .lnav-in { flex-wrap: wrap; gap: 0; padding-block: 6px; }
  .lnav-title { width: 100%; font-size: 1rem; padding-block: 4px; }
  .lnav-in > nav { justify-content: flex-start; width: 100%; }
  .lnav ul { margin-left: -10px; width: calc(100% + 10px); }
}

/* --------------------------------------------------------------------------
   Sections, titres, textes
   -------------------------------------------------------------------------- */
.sec { padding-block: 64px; }
@media (min-width: 735px) { .sec { padding-block: 88px; } }
.sec.tight { padding-block: 40px; }
.band { background: var(--band); --tile: var(--tile-band); --tile-hov: var(--tile-band-hov); }
.band + .band { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.h-display {
  font-family: var(--f-title);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.h-section {
  font-family: var(--f-title);
  font-weight: 600;
  font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.h-tile {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.42;
  color: var(--fg-2);
  max-width: 44ch;
}
.prose { max-width: 66ch; color: var(--fg-2); display: grid; gap: 14px; }
.prose strong { color: var(--fg); }
.muted { color: var(--fg-2); }
.small { font-size: 0.875rem; }
.micro { font-size: 0.75rem; color: var(--fg-3); }

.shead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}
.shead > div { display: grid; gap: 10px; min-width: 0; }
.shead .lede { max-width: 56ch; }

.more {
  color: var(--accent);
  font-size: 1.0625rem;
  white-space: nowrap;
}
.more::after { content: "\00a0\203A"; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Page d'entrée de rubrique */
.phero { padding-block: 72px 56px; text-align: center; }
@media (min-width: 735px) { .phero { padding-block: 104px 72px; } }
.phero .wrap { display: grid; justify-items: center; gap: 18px; }
.phero .lede { max-width: 40ch; }
.phero-art { margin-top: 28px; width: 100%; }

/* --------------------------------------------------------------------------
   Boutons et pastilles
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--pill-bg);
  color: var(--pill-fg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 100ms var(--ease), filter 160ms var(--ease);
}
.pill:hover { filter: brightness(0.92); }
.pill:active { transform: scale(0.97); }
.pill.royal { background: var(--royal); color: var(--on-royal); }
.pill.ghost { background: var(--glass); color: var(--fg); box-shadow: inset 0 0 0 1px var(--glass-line); }
.pill.sm { min-height: 30px; padding: 5px 13px; font-size: 0.8125rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: none; }
.chip.ok { color: var(--ok); }
.chip.warn { color: var(--warn); }
.chip.info { color: var(--info); }
.chip.ok::before, .chip.warn::before, .chip.info::before { display: block; }

/* Pôle : pastille de couleur + libellé ; .fill = aplat avec encre mesurée */
.pole {
  --p: var(--royal);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fg-2);
  white-space: nowrap;
}
.pole::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--p); flex-shrink: 0; }
.pole.fill {
  padding: 3px 10px 3px 9px;
  border-radius: var(--r-pill);
  background: var(--p);
  color: var(--ink-pole);
}
.pole.fill::before { display: none; }
.pole.fill.on-royal { color: var(--on-royal); }
.p-direction { --p: var(--pole-direction); }
.p-compta { --p: var(--pole-compta); }
.p-commercial { --p: var(--pole-commercial); }
.p-admin { --p: var(--pole-admin); }
.p-juridique { --p: var(--pole-juridique); }
.p-finance { --p: var(--pole-finance); }
.p-social { --p: var(--pole-social); }
.p-technique { --p: var(--pole-technique); }

/* --------------------------------------------------------------------------
   Tuiles
   -------------------------------------------------------------------------- */
.tiles {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
@media (min-width: 735px) {
  .tiles.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 735px) and (max-width: 979px) {
  .tiles.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 26px 26px 24px;
  border-radius: var(--r-tile);
  background: var(--tile);
  overflow: hidden;
}
a.tile, button.tile { transition: background-color 180ms var(--ease), transform 120ms var(--ease); }
a.tile:hover { background: var(--tile-hov); }
a.tile:active { transform: scale(0.99); }
.tile p { color: var(--fg-2); }
.tile .more, .tile .tile-foot { margin-top: auto; padding-top: 8px; }
.tile-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tile-art {
  margin: -26px -26px 14px;
  min-height: 180px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.tile.center { text-align: center; align-items: center; }

/* Tuile « plateforme » : titre centré, illustration en bas */
.platform { padding: 30px 26px 0; gap: 6px; text-align: center; align-items: center; }
.platform .h-tile { font-family: var(--f-title); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.02em; }
.platform .tile-art { margin: 18px -26px 0; min-height: 210px; width: calc(100% + 52px); align-items: end; }

/* Tuile « plateforme » pleine largeur : clôt la grille, texte à gauche et illustration à droite dès 735 px */
.tiles > .platform.wide { grid-column: 1 / -1; }
.platform.wide .wide-text { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 735px) {
  .platform.wide { flex-direction: row; justify-content: space-between; align-items: center; gap: 32px; padding: 30px 40px; text-align: left; }
  .platform.wide .wide-text { max-width: 30rem; }
  .platform.wide .tile-art { margin: 0; width: auto; min-height: 0; flex: none; overflow: visible; }
  .platform.wide .art-tools { padding-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Rail horizontal (galeries)
   -------------------------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.rail-ctl { display: flex; gap: 10px; }
.rbtn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--fg);
  cursor: pointer;
  transition: opacity 160ms var(--ease), transform 100ms var(--ease);
}
.rbtn:active { transform: scale(0.94); }
.rbtn[disabled] { opacity: 0.35; cursor: default; }
.rbtn svg { width: 14px; height: 14px; }

/* Carte de nouveauté dans un rail */
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 22px;
  border-radius: var(--r-tile);
  background: var(--tile);
  transition: background-color 180ms var(--ease);
}
a.card:hover { background: var(--tile-hov); }
.card h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.005em; }
.card p { color: var(--fg-2); font-size: 0.9375rem; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date { font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-3); letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Héros d'accueil : carrousel de grandes cartes
   -------------------------------------------------------------------------- */
.hero { padding-block: 22px 8px; }
.hero-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(var(--w-wide), calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))));
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: max(16px, calc((100% - var(--w-wide)) / 2));
  scroll-padding-inline: max(16px, calc((100% - var(--w-wide)) / 2));
}
.hero-rail::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  scroll-snap-align: center;
  min-height: clamp(420px, 52vw, 600px);
  border-radius: var(--r-hero);
  overflow: hidden;
  background: #03050a;
  color: #f4f6fa;
  display: grid;
  grid-template-rows: 1fr auto;
}
.slide-art { position: relative; overflow: hidden; display: grid; place-items: center; padding: 28px 24px 0; }
.cap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 22px 28px 28px;
  font-size: 1.0625rem;
  line-height: 1.4;
}
.cap .pill { background: #f4f6fa; color: #071118; }
.cap p { flex: 1 1 320px; min-width: 0; color: #c9ced8; }
.cap p strong { color: #ffffff; font-weight: 700; }
.hero-ctl { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 22px; }
.dots {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--fg-3); cursor: pointer;
  transition: width 320ms var(--ease), background-color 200ms var(--ease);
}
.dot[aria-current="true"] { width: 34px; background: var(--fg); }

/* --------------------------------------------------------------------------
   Chiffres
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.stat { display: grid; gap: 4px; align-content: start; padding: 22px 0; border-top: 1px solid var(--line-strong); }
.stat b {
  font-family: var(--f-title);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--fg); font-weight: 700; }
.stat small { color: var(--fg-3); font-size: 0.8125rem; line-height: 1.4; }
.source { margin-top: 18px; font-size: 0.8125rem; color: var(--fg-3); max-width: 80ch; }

/* --------------------------------------------------------------------------
   Bandeau de programme (dégradé de la charte : marine → bleu roi → ciel)
   -------------------------------------------------------------------------- */
.program {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 18% 110%, var(--royal) 0%, transparent 70%),
    radial-gradient(55% 80% at 100% 0%, var(--sky) 0%, transparent 65%),
    radial-gradient(70% 100% at 50% 50%, var(--navy) 0%, transparent 80%),
    #071030;
  color: #ffffff;
  text-align: center;
}
.program .wrap { position: relative; display: grid; justify-items: center; gap: 16px; padding-block: 76px; }
.program p { color: rgba(255, 255, 255, 0.86); max-width: 52ch; font-size: 1.1875rem; }
.program .pill { background: #ffffff; color: #071118; }
.program .picto { width: 46px; height: auto; color: #ffffff; }

/* --------------------------------------------------------------------------
   Filtres, recherche, compteur (aucune troncature silencieuse)
   -------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border: 0; border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2);
  font-size: 0.8125rem; font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.fchip:hover { color: var(--fg); }
.fchip[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }
.fchip[data-pole]::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--p, var(--royal)); }
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 14px 8px 36px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
}
.search input::placeholder { color: var(--fg-3); }
.search svg { position: absolute; left: 13px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.count { font-size: 0.8125rem; color: var(--fg-3); }
.empty { padding: 40px 0; text-align: center; color: var(--fg-2); }

/* --------------------------------------------------------------------------
   Listes et définitions
   -------------------------------------------------------------------------- */
.rows { list-style: none; display: grid; }
.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: 1.0625rem; font-weight: 700; }
.rows p { grid-column: 1 / -1; color: var(--fg-2); font-size: 0.9375rem; max-width: 72ch; }

/* Étapes numérotées : uniquement pour une vraie séquence */
.steps { list-style: none; counter-reset: st; display: grid; gap: 14px; }
.steps > li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 20px 22px;
  border-radius: var(--r-tile);
  background: var(--tile);
}
.steps > li::before {
  content: counter(st);
  grid-row: span 2;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--royal);
  color: var(--on-royal);
  font-family: var(--f-title);
  font-weight: 600;
  font-size: 0.9375rem;
}
.steps h3 { font-size: 1.0625rem; font-weight: 700; align-self: center; }
.steps p { color: var(--fg-2); font-size: 0.9375rem; }

/* Code et commandes */
.code {
  margin: 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
}
.code .ok { color: var(--ok); }
.code .c { color: var(--fg-3); }
code { font-family: var(--f-mono); font-size: 0.9em; padding: 1px 5px; border-radius: 6px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }

/* Tableau large dans son propre défilement */
.table-scroll { overflow-x: auto; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------------------------
   Journal (Nouveautés)
   -------------------------------------------------------------------------- */
.month { display: grid; gap: 18px; padding-block: 36px; border-top: 1px solid var(--line); }
.month:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .month { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .month-head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); align-self: start; }
}
.month-head { display: grid; gap: 6px; }
.month-head h2 { font-family: var(--f-title); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; }
.month-head p { color: var(--fg-3); font-size: 0.875rem; }
.rel-list { list-style: none; display: grid; gap: 14px; }
.rel {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--r-tile);
  background: var(--tile);
}
.rel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rel h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.rel p { color: var(--fg-2); font-size: 0.9375rem; max-width: 70ch; }

/* --------------------------------------------------------------------------
   Nuancier et spécimens (Design)
   -------------------------------------------------------------------------- */
.swatches { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.swatch { border-radius: var(--r-tile); overflow: hidden; background: var(--tile); display: grid; }
.swatch-chip {
  height: 112px;
  padding: 14px 16px;
  display: flex; align-items: flex-end; justify-content: space-between;
  background: var(--sw);
  color: var(--sw-ink, #071118);
  font-weight: 700;
}
.swatch-chip .aa { font-family: var(--f-title); font-size: 1.5rem; line-height: 1; }
.swatch-body { padding: 14px 16px 16px; display: grid; gap: 2px; }
.swatch-body strong { font-size: 0.9375rem; }
.swatch-body span { font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-3); }
.specimen { display: grid; gap: 6px; padding: 26px; border-radius: var(--r-tile); background: var(--tile); min-width: 0; }
.specimen .big { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.75rem); line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Illustrations composées en CSS (décoratives, aria-hidden)
   Aucune donnée réelle : uniquement des gabarits.
   -------------------------------------------------------------------------- */
.aura {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 50% at 30% 70%, rgba(30, 97, 244, 0.55), transparent 70%),
    radial-gradient(35% 45% at 78% 22%, rgba(75, 129, 246, 0.45), transparent 70%),
    radial-gradient(50% 60% at 60% 60%, rgba(17, 53, 134, 0.6), transparent 75%);
  filter: blur(10px);
  pointer-events: none;
}
.aura.violet {
  background:
    radial-gradient(40% 50% at 30% 70%, rgba(163, 87, 247, 0.45), transparent 70%),
    radial-gradient(35% 45% at 78% 22%, rgba(30, 97, 244, 0.5), transparent 70%),
    radial-gradient(50% 60% at 60% 60%, rgba(17, 53, 134, 0.55), transparent 75%);
}
/* Jetons des illustrations : clairs dans le thème clair, sombres ailleurs ; les grandes cartes
   du carrousel restent sombres dans les deux thèmes (comme une scène de présentation). */
:root {
  --win-bg: rgba(14, 18, 27, 0.72);
  --win-line: rgba(255, 255, 255, 0.1);
  --sk: rgba(255, 255, 255, 0.16);
  --sk-2: rgba(255, 255, 255, 0.06);
  --win-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --win-bg: rgba(255, 255, 255, 0.86);
    --win-line: rgba(11, 18, 32, 0.1);
    --sk: rgba(11, 18, 32, 0.14);
    --sk-2: rgba(11, 18, 32, 0.05);
    --win-shadow: 0 24px 60px rgba(13, 41, 102, 0.16);
  }
}
:root[data-theme="light"] {
  --win-bg: rgba(255, 255, 255, 0.86);
  --win-line: rgba(11, 18, 32, 0.1);
  --sk: rgba(11, 18, 32, 0.14);
  --sk-2: rgba(11, 18, 32, 0.05);
  --win-shadow: 0 24px 60px rgba(13, 41, 102, 0.16);
}
.slide {
  --win-bg: rgba(14, 18, 27, 0.72);
  --win-line: rgba(255, 255, 255, 0.1);
  --sk: rgba(255, 255, 255, 0.16);
  --sk-2: rgba(255, 255, 255, 0.06);
  --win-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.win {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 16 / 10;
  border-radius: 16px 16px 0 0;
  background: var(--win-bg);
  box-shadow: inset 0 0 0 1px var(--win-line), var(--win-shadow);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: 26% 1fr;
  grid-template-rows: 30px 1fr;
  overflow: hidden;
  align-self: end;
}
.win.sm { width: min(100%, 420px); }
.win-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding-inline: 12px; border-bottom: 1px solid var(--win-line); }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--sk); }
.win-side { padding: 14px 12px; display: grid; align-content: start; gap: 10px; border-right: 1px solid var(--win-line); }
.win-side i { display: flex; align-items: center; gap: 8px; }
.win-side i::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--p, var(--royal)); flex-shrink: 0; }
.win-side i::after { content: ""; height: 6px; border-radius: 3px; background: var(--sk); width: var(--l, 70%); }
.win-main { padding: 16px; display: grid; gap: 12px; align-content: start; }
.win-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.win-kpis i { height: 54px; border-radius: 10px; background: var(--sk-2); box-shadow: inset 0 0 0 1px var(--win-line); position: relative; }
.win-kpis i::after { content: ""; position: absolute; left: 10px; bottom: 10px; height: 10px; width: 46%; border-radius: 4px; background: var(--p, var(--sk)); opacity: 0.9; }
.win-rows { display: grid; gap: 7px; }
.win-rows i { height: 22px; border-radius: 6px; background: var(--sk-2); display: flex; align-items: center; gap: 8px; padding-inline: 8px; }
.win-rows i::before { content: ""; width: 9px; height: 9px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--sk); flex-shrink: 0; }
.win-rows i::after { content: ""; height: 5px; border-radius: 3px; width: var(--l, 60%); background: var(--sk); }
.win-rows i.on::before { background: var(--royal); box-shadow: none; }
.win-sel { height: 26px; border-radius: 8px; background: var(--royal); display: flex; align-items: center; gap: 8px; padding-inline: 10px; }
.win-sel::before { content: ""; width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); }
.win-sel::after { content: ""; margin-left: auto; width: 52px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.95); }

/* Scène « code » : liste de contrôles réussis */
.art-code {
  width: min(100%, 620px);
  border-radius: 16px;
  background: var(--win-bg);
  box-shadow: inset 0 0 0 1px var(--win-line), var(--win-shadow);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding: 18px 22px 22px;
  font-family: var(--f-mono);
  font-size: clamp(0.75rem, 0.62rem + 0.5vw, 0.9375rem);
  line-height: 1.9;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
}
.slide .art-code { color: #e8ecf3; }
.art-code .ok { color: #4cc38a; }
.art-code .c { color: #7d8595; }

/* Image plein cadre dans une carte du carrousel */
.slide-art img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-art.photo { padding: 0; }

/* Scène « flux à sens unique » (lecture seule) */
.art-flow { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; font-weight: 700; }
.art-flow .node {
  padding: 22px 26px;
  border-radius: 18px;
  background: var(--win-bg);
  box-shadow: inset 0 0 0 1px var(--win-line), var(--win-shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem);
  color: var(--fg);
}
.slide .art-flow .node { color: #f4f6fa; }
.art-flow .node.royal { background: var(--royal); color: #ffffff; box-shadow: var(--win-shadow); font-family: var(--f-title); letter-spacing: -0.02em; }
.art-flow .arrow { display: grid; justify-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9dbbfb; }
.art-flow .arrow::before { content: ""; width: 120px; height: 2px; background: linear-gradient(90deg, transparent, #9dbbfb); }
.art-flow .arrow::after { content: "\2192"; font-size: 1.6rem; line-height: 0.6; margin-top: -24px; justify-self: end; }

/* Scène « étages » (site du cabinet) */
.art-floors { display: grid; gap: 8px; width: min(78%, 320px); padding-bottom: 26px; }
.art-floors i { height: 26px; border-radius: 8px; background: var(--p); opacity: 0.92; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12); }
.art-floors i:last-child { height: 38px; background: var(--royal); }

/* Scène « journal » (actualités) */
.art-paper { width: min(80%, 340px); padding: 18px; border-radius: 14px 14px 0 0; background: var(--win-bg); box-shadow: inset 0 0 0 1px var(--win-line), var(--win-shadow); display: grid; gap: 10px; }
.art-paper b { display: block; height: 12px; width: 70%; border-radius: 4px; background: var(--fg); opacity: 0.8; }
.art-paper .cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.art-paper .ph { height: 64px; border-radius: 8px; background: linear-gradient(135deg, var(--navy), var(--sky)); }
.art-paper i { display: block; height: 6px; border-radius: 3px; background: var(--sk); margin-top: 6px; width: var(--l, 100%); }

/* Scène « montage » (studio) */
.art-video { width: min(84%, 360px); display: grid; gap: 10px; padding-bottom: 26px; }
.art-video .screen { aspect-ratio: 16 / 9; border-radius: 12px; background: radial-gradient(60% 80% at 30% 70%, var(--royal), transparent 70%), radial-gradient(50% 70% at 80% 20%, var(--pole-technique), transparent 70%), #0a1230; box-shadow: var(--win-shadow); }
.art-video .track { display: flex; gap: 4px; height: 22px; }
.art-video .track i { flex: var(--f, 1); border-radius: 5px; background: var(--p, var(--sky)); opacity: 0.85; }

/* Scène « ateliers » (outils sur le poste) */
.art-tools { display: grid; grid-template-columns: repeat(3, 64px); gap: 14px; padding-bottom: 30px; }
.art-tools i { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--win-bg); box-shadow: inset 0 0 0 1px var(--win-line), var(--win-shadow); color: var(--fg); }
.art-tools svg { width: 28px; height: 28px; }
@media (max-width: 599px) {
  .win { grid-template-columns: 1fr; }
  .win-side { display: none; }
}

.glass-stack { position: relative; width: min(100%, 520px); height: 260px; }
.glass-stack > i {
  position: absolute;
  width: 58%; height: 70%;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 20px 50px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; width: min(100%, 520px); }
.mini-bars i { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--sky), var(--royal)); min-height: 4px; }

/* --------------------------------------------------------------------------
   Pied de page (annuaire + fil d'Ariane)
   -------------------------------------------------------------------------- */
.gfoot { background: var(--band); color: var(--fg-2); font-size: 0.75rem; line-height: 1.5; border-top: 1px solid var(--line); }
.gfoot .wrap { padding-block: 26px 34px; display: grid; gap: 22px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { color: var(--fg-3); }
.crumbs svg { width: 15px; height: auto; display: block; color: var(--fg); }
.crumbs [aria-current="page"] { color: var(--fg); }
.dir { display: grid; gap: 22px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.dir h2 { font-size: 0.75rem; font-weight: 700; color: var(--fg); margin-bottom: 8px; letter-spacing: 0.01em; }
.dir ul { list-style: none; display: grid; gap: 7px; }
.dir a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.legal a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--fg); }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--fg-3); }

/* --------------------------------------------------------------------------
   Articles (pages courtes, colonne de lecture de 720 px)
   -------------------------------------------------------------------------- */
.article { padding-block: 48px 80px; }
@media (min-width: 735px) { .article { padding-block: 72px 104px; } }
.article .wrap { max-width: calc(720px + 64px); }
.article-head { display: grid; gap: 16px; margin-bottom: 30px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--fg-3); font-size: 0.875rem; }
.article-head h1 {
  font-family: var(--f-title);
  font-weight: 600;
  font-size: clamp(1.85rem, 1.25rem + 2.3vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.article-head .lede { max-width: none; }
.article-art {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 260px;
  margin: 6px 0 38px;
  padding: 34px 22px;
  border-radius: var(--r-tile);
  background: var(--tile);
}
.article-body { display: grid; gap: 18px; font-size: 1.125rem; line-height: 1.62; }
.article-body p, .article-body li { color: var(--fg); }
.article-body h2 { font-family: var(--f-sans); font-weight: 700; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; margin-top: 16px; }
.article-body ul, .article-body ol { padding-left: 1.25em; display: grid; gap: 8px; }
.article-body strong { font-weight: 700; }
.callout { padding: 18px 22px; border-radius: 14px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; }
.callout p { color: var(--fg-2); font-size: 1rem; }
.callout strong { color: var(--fg); }
figure { margin: 0; display: grid; gap: 10px; min-width: 0; }
figcaption { font-size: 0.875rem; color: var(--fg-3); }
img.shot { display: block; width: 100%; height: auto; border-radius: var(--r-tile); background: var(--tile); }
.article-foot { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.article-foot h2 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.byline { font-size: 0.875rem; color: var(--fg-3); }

/* --------------------------------------------------------------------------
   Apparition douce : contenu VISIBLE au repos, l'animation n'est qu'un plus
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 640ms var(--ease) both; }
  .rise.d1 { animation-delay: 60ms; }
  .rise.d2 { animation-delay: 120ms; }
  .rise.d3 { animation-delay: 180ms; }
}
@keyframes rise {
  from { opacity: 0.55; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .gnav, .lnav, .dots, .win { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gnav, .lnav { background: var(--bg); }
}
