/* ============================================================
   CRISALIDA — Conseil & Formation
   Design system : tokens, base, composants, en-tête, pied de page
   ============================================================ */

:root {
  /* Marque */
  --crimson: #c0203a;
  --crimson-dark: #9a1830;
  --crimson-50: #fcf0f2;
  --crimson-100: #f8dbe0;
  --coral: #e8536a;
  --coral-light: #f3697e;
  --charcoal: #2c2f37;
  --charcoal-2: #25272e;
  --night: #1d1f26;

  /* Neutres */
  --ink: #1d1f26;
  --slate: #565d70;
  --slate-light: #7b8294;
  --mist: #f5f6f9;
  --mist-2: #eef0f5;
  --line: #e3e5ec;
  --line-soft: #edeef3;
  --white: #ffffff;

  /* Surfaces & textes (jetons sémantiques — redéfinis en mode sombre) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-hover: #fafbfc;
  --raised: #ffffff;
  --field-bg: #ffffff;
  --section-alt: #f5f6f9;
  --text-strong: #2c2f37;
  --line-strong: #cfd3dd;
  --placeholder: #9aa0ac;
  --inverse-bg: #2c2f37;
  --inverse-fg: #ffffff;
  --btn-dark: #2c2f37;
  --btn-dark-hover: #1d1f26;
  --utility-bg: #2c2f37;
  --info-ink: #1e3f8a;
  --warning-ink: #6b4600;

  /* États */
  --success: #1f7a47;
  --success-bg: #e6f5ec;
  --warning: #8a5a00;
  --warning-bg: #fff3d6;
  --info: #2459c6;
  --info-bg: #eaf1ff;
  --danger: #c0263a;
  --danger-bg: #fdecee;

  /* Dégradés */
  --grad-solid: linear-gradient(135deg, #d2304b 0%, #a8182f 100%);
  --grad-dark: linear-gradient(160deg, #2c2f37 0%, #1d1f26 100%);

  /* Typographie */
  --font-head: "Google Sans", "Product Sans", "Archivo", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Google Sans", "Product Sans", "Mulish", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Rayons */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Ombres */
  --sh-sm: 0 1px 2px rgba(28, 31, 38, .06), 0 1px 3px rgba(28, 31, 38, .04);
  --sh-md: 0 4px 14px rgba(28, 31, 38, .08);
  --sh-lg: 0 12px 34px rgba(28, 31, 38, .12);
  --sh-xl: 0 24px 60px rgba(28, 31, 38, .18);
  --sh-crimson: 0 10px 26px rgba(192, 32, 58, .28);

  --wrap: 1240px;
  --gut: 32px;
  --utility-h: 38px;
  --header-h: 78px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Hauteur d'écran. Sur iPhone, 100vh compte la zone cachée sous les barres de Safari : le bas des panneaux passait
     dessous. svh (barres affichées, stable) pour les mises en page, dvh (suit les barres) pour le plein écran. */
  --screen-h: 100vh;
  --screen-dh: 100vh;
}
@supports (height: 100svh) { :root { --screen-h: 100svh; --screen-dh: 100dvh; } }

/* Couleurs d'accent par domaine */
[data-domain="ia"] { --d: #c0203a; --d-bg: #fdf0f3; }
[data-domain="gouvernance"] { --d: #4f46e5; --d-bg: #eef0ff; }
[data-domain="service"] { --d: #0d8f84; --d-bg: #e5f6f4; }
[data-domain="architecture"] { --d: #c96a06; --d-bg: #fdf3e6; }
[data-domain="projet"] { --d: #2563eb; --d-bg: #ebf2ff; }
[data-domain="securite"] { --d: #7c3aed; --d-bg: #f3edff; }

/* ============================================================ BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); margin: 0; line-height: 1.12; color: var(--ink); letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: 0 0 auto; }
/* Filet de sécurité : une icône sans règle de taille reste à la taille du texte (spécificité nulle). */
:where(svg[viewBox="0 0 24 24"]) { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(192, 32, 58, .45); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--crimson-100); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gut); }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--inverse-bg); color: var(--inverse-fg); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; transition: top .15s; }
.skip-link:focus { top: 12px; }
.muted { color: var(--slate); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--crimson);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow.on-dark { color: var(--coral-light); }

.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-mist { background: var(--section-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin: 14px 0 12px; }
.section-head p { color: var(--slate); font-size: 17px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head-row .section-head { margin-bottom: 0; }

/* ============================================================ BOUTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 14.5px; line-height: 1.2;
  padding: 13px 24px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap; cursor: pointer; text-align: center;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-solid); color: #fff; box-shadow: var(--sh-crimson); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(192, 32, 58, .36); }
.btn-dark { background: var(--btn-dark); color: #fff; }
.btn-dark:hover { background: var(--btn-dark-hover); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--crimson); color: var(--crimson); }
.btn-soft { background: var(--crimson-50); color: var(--crimson); }
.btn-soft:hover { background: var(--crimson-100); }
.btn-outline-w { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-outline-w:hover { background: #fff; color: #1d1f26; border-color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { padding: 16px 30px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-ghost.is-loading::after { border-color: rgba(192, 32, 58, .25); border-top-color: var(--crimson); }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--crimson); transition: gap .18s ease; }
.link-arrow:hover { gap: 12px; }
.link-arrow svg { width: 16px; height: 16px; }
.link-btn { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--crimson); display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn svg { width: 15px; height: 15px; }
.text-link { color: var(--crimson); font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: var(--r-sm);
  display: inline-grid; place-items: center; color: var(--text-strong);
  border: 1.5px solid var(--line); background: var(--surface); transition: all .15s;
}
.icon-btn:hover { border-color: var(--crimson); color: var(--crimson); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count {
  position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--crimson); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm svg { width: 17px; height: 17px; }

/* ============================================================ BADGES / TAGS */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: .02em;
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; line-height: 1.3;
  background: var(--mist-2); color: var(--text-strong);
}
.badge svg { width: 12px; height: 12px; }
.badge-cert { background: var(--crimson-50); color: var(--crimson-dark); }
.badge-new { background: var(--inverse-bg); color: var(--inverse-fg); }
.badge-cpf { background: var(--info-bg); color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-success .gdot { width: 7px; height: 7px; border-radius: 50%; background: #28a35c; }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-on-dark { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .16); }

.dtag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--d, var(--crimson));
}
.dtag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d, var(--crimson)); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-strong);
  padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  transition: all .15s; white-space: nowrap; cursor: pointer;
}
.chip:hover { border-color: var(--crimson); color: var(--crimson); }
.chip.is-active { background: var(--inverse-bg); border-color: var(--inverse-bg); color: var(--inverse-fg); }
.chip svg { width: 13px; height: 13px; }
.chip .x { opacity: .7; }

/* ============================================================ FORMULAIRES */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--text-strong); }
.field .req { color: var(--crimson); }
.field-hint { font-size: 12.5px; color: var(--slate-light); }
.input, .select, .textarea {
  width: 100%; background: var(--field-bg); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--field-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565d70' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center / 15px;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 4px rgba(192, 32, 58, .1); }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field-error { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--text-strong); cursor: pointer; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--field-bg); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--crimson); border-color: var(--crimson); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.check input:focus-visible { outline: 3px solid rgba(192, 32, 58, .35); outline-offset: 2px; }
.check a { color: var(--crimson); font-weight: 700; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; }
.form-alert svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.form-alert.error { background: var(--danger-bg); color: var(--danger); }
.form-alert.info { background: var(--info-bg); color: var(--info); }
.form-alert.success { background: var(--success-bg); color: var(--success); }

.form-success { text-align: center; padding: 26px 10px; }
.form-success .fs-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--success-bg); color: var(--success); }
.form-success .fs-ic svg { width: 30px; height: 30px; }
.form-success h3 { font-size: 21px; margin-bottom: 8px; }
.form-success p { color: var(--slate); }
.on-dark .form-success h3 { color: #fff; }
.on-dark .form-success p { color: #c5c9d3; }

/* ============================================================ BARRE UTILITAIRE */
.utility { background: var(--utility-bg); color: #cfd2da; font-size: 12.5px; position: relative; z-index: 61; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; height: var(--utility-h); gap: 16px; }
.utility a { color: #cfd2da; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; white-space: nowrap; }
.utility a:hover { color: #fff; }
.utility svg { width: 13px; height: 13px; }
.utility-left, .utility-right { display: flex; align-items: center; gap: 18px; }
.util-sep { width: 1px; height: 15px; background: rgba(255, 255, 255, .16); }
.util-strong { color: #fff; font-weight: 700; }

/* ============================================================ EN-TÊTE */
.header { position: sticky; top: 0; z-index: 60; background: var(--surface); border-bottom: 1px solid var(--line); transition: box-shadow .2s ease; }
.header.scrolled { box-shadow: 0 6px 20px rgba(28, 31, 38, .07); }
.header .wrap { max-width: 1400px; }
.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 46px; width: auto; }

.nav { flex: 1 1 auto; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 0; }
.nav-item { position: static; }
.nav-item.has-drop { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; height: var(--header-h);
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px; color: var(--text-strong);
  padding: 0 13px; transition: color .15s; white-space: nowrap; position: relative;
}
.nav-link svg { width: 13px; height: 13px; opacity: .55; transition: transform .18s; }
.nav-link::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--crimson); transform: scaleX(0); transition: transform .2s var(--ease); }
.nav-item:hover > .nav-link, .nav-item.is-open > .nav-link, .nav-link.is-current { color: var(--crimson); }
.nav-item.is-open > .nav-link svg, .nav-item:hover > .nav-link svg { transform: rotate(180deg); }
.nav-link.is-current::after, .nav-item.is-open > .nav-link::after { transform: scaleX(1); }

/* Panneaux déroulants */
.mega, .drop {
  position: absolute; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: 0 24px 50px rgba(28, 31, 38, .14); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 70;
}
.nav-item.is-open > .mega, .nav-item.is-open > .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.mega { left: 50%; width: min(1060px, calc(100vw - 40px)); margin-left: calc(min(1060px, calc(100vw - 40px)) / -2); display: grid; grid-template-columns: 300px 1fr; overflow: hidden; }
.mega-domains { background: var(--mist); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.mega-domain { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); transition: background .15s; }
.mega-domain:hover, .mega-domain.is-active { background: var(--raised); box-shadow: var(--sh-sm); }
.mega-domain .mega-ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--d-bg); color: var(--d); }
.mega-domain .mega-ic svg { width: 19px; height: 19px; }
.mega-domain .mega-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mega-domain .mega-tt { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.25; }
.mega-domain .mega-ds { font-size: 12px; color: var(--slate-light); }
.mega-domain > svg { width: 15px; height: 15px; color: var(--slate-light); opacity: 0; transition: opacity .15s, transform .15s; }
.mega-domain.is-active > svg { opacity: 1; color: var(--crimson); transform: translateX(2px); }
.mega-all { margin-top: 10px; padding: 12px; border-top: 1px solid var(--line); font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--crimson); display: flex; align-items: center; gap: 8px; }
.mega-all svg { width: 15px; height: 15px; }
.mega-panels { position: relative; padding: 24px 28px; min-height: 380px; }
.mega-panel { display: none; }
.mega-panel.is-active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.mega-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.mega-panel-head h3 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.mega-panel-head p { font-size: 13.5px; color: var(--slate); max-width: 520px; }
.mega-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.mega-course { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--r-md); transition: background .15s; }
.mega-course:hover { background: var(--mist); }
.mega-course .mc-ref { flex: 0 0 auto; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--d, var(--crimson)); background: var(--d-bg, var(--crimson-50)); padding: 3px 7px; border-radius: 5px; margin-top: 1px; }
.mega-course .mc-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.mega-course .mc-meta { display: block; font-size: 12px; color: var(--slate-light); margin-top: 2px; }
.mega-course:hover .mc-title { color: var(--crimson); }
.mega-panel-foot { display: flex; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

.drop { left: -14px; min-width: 300px; padding: 10px; border-radius: 0 0 var(--r-md) var(--r-md); }
.drop-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); transition: background .15s; }
.drop-link:hover { background: var(--mist); }
.drop-link .dl-ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: var(--crimson-50); color: var(--crimson); display: grid; place-items: center; }
.drop-link .dl-ic svg { width: 17px; height: 17px; }
.drop-link .dl-tt { display: block; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink); }
.drop-link .dl-ds { display: block; font-size: 12.5px; color: var(--slate-light); line-height: 1.35; }
.drop-mono { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: var(--inverse-bg); color: var(--inverse-fg); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 11.5px; letter-spacing: .04em; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.burger { display: none; }

/* ============================================================ RECHERCHE (overlay) */
.search-overlay { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 9vh 20px 20px; }
.so-backdrop { position: absolute; inset: 0; background: rgba(20, 22, 27, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.so-panel { position: relative; width: min(760px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-xl); overflow: hidden; animation: pop .22s var(--ease); max-height: 82vh; display: flex; flex-direction: column; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
.so-form { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.so-form svg { width: 22px; height: 22px; color: var(--crimson); }
.so-form input { flex: 1; border: none; outline: none; font-size: 18px; font-family: var(--font-body); color: var(--ink); background: transparent; min-width: 0; }
.so-form input::-webkit-search-cancel-button { display: none; }
.so-form kbd { font-family: var(--font-mono); font-size: 11px; color: var(--slate-light); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; }
.so-close { display: none; }
.so-body { overflow-y: auto; padding: 10px; }
.so-group-title { font-family: var(--font-head); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); padding: 12px 12px 6px; }
.so-item { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: var(--r-md); cursor: pointer; }
.so-item.is-active, .so-item:hover { background: var(--mist); }
.so-item .so-ref { flex: 0 0 52px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--d, var(--crimson)); background: var(--d-bg, var(--crimson-50)); border-radius: 6px; padding: 5px 0; }
.so-item .so-main { flex: 1; min-width: 0; }
.so-item .so-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-item .so-title mark { background: var(--crimson-100); color: inherit; border-radius: 3px; padding: 0 1px; }
.so-item .so-meta { display: block; font-size: 12.5px; color: var(--slate-light); }
.so-item .so-price { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; }
.so-item > svg { width: 16px; height: 16px; color: var(--slate-light); }
.so-empty { padding: 10px 12px 18px; }
.so-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 8px; }
.so-domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 12px; }
.so-domain { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); font-family: var(--font-head); font-weight: 700; font-size: 13px; transition: all .15s; }
.so-domain:hover { border-color: var(--d); background: var(--d-bg); }
.so-domain .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--d); }
.so-noresult { padding: 30px 16px; text-align: center; color: var(--slate); }
.so-noresult strong { color: var(--ink); }
.so-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--mist); font-size: 12.5px; color: var(--slate-light); }
.so-footer kbd { font-family: var(--font-mono); font-size: 10.5px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 1px 5px; }

/* ============================================================ MENU MOBILE */
.drawer { position: fixed; inset: 0; z-index: 110; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 22, 27, .55); animation: fade .2s ease; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: var(--surface); display: flex; flex-direction: column; animation: slideIn .28s var(--ease); box-shadow: var(--sh-xl); }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head img { height: 38px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 20px 24px; }
.drawer-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); margin: 8px 0 14px; color: var(--slate-light); width: 100%; }
.drawer-search svg { width: 18px; height: 18px; }
.m-nav > li { border-bottom: 1px solid var(--line-soft); }
.m-nav > li > a, .m-nav summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 2px; font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); cursor: pointer; list-style: none; }
.m-nav summary::-webkit-details-marker { display: none; }
.m-nav summary svg { width: 16px; height: 16px; transition: transform .2s; }
.m-nav details[open] summary svg { transform: rotate(180deg); }
.m-sub { padding: 0 0 12px; display: grid; gap: 2px; }
.m-sub a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--text-strong); }
.m-sub a:hover { background: var(--mist); }
.m-sub .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d, var(--crimson)); }
.m-sub small { margin-left: auto; color: var(--slate-light); font-size: 12px; }
.drawer-foot { padding: 16px 20px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer-contact { display: flex; justify-content: center; gap: 18px; font-size: 13.5px; color: var(--slate); }
.drawer-contact a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-strong); }
.drawer-contact svg { width: 15px; height: 15px; color: var(--crimson); }

/* ============================================================ FIL D'ARIANE / EN-TÊTE DE PAGE */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--slate-light); }
.crumbs a { color: var(--slate); transition: color .15s; }
.crumbs a:hover { color: var(--crimson); }
.crumbs svg { width: 13px; height: 13px; opacity: .6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.on-dark .crumbs, .page-hero .crumbs, .c-hero .crumbs { color: rgba(255, 255, 255, .55); }
.on-dark .crumbs a, .page-hero .crumbs a, .c-hero .crumbs a { color: rgba(255, 255, 255, .75); }
.on-dark .crumbs a:hover, .page-hero .crumbs a:hover, .c-hero .crumbs a:hover { color: #fff; }
.on-dark .crumbs [aria-current], .page-hero .crumbs [aria-current], .c-hero .crumbs [aria-current] { color: #fff; }

.page-hero { position: relative; background: var(--charcoal); color: #fff; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 360px at 88% -10%, rgba(192, 32, 58, .42), transparent 62%), radial-gradient(500px 300px at -5% 120%, rgba(232, 83, 106, .16), transparent 60%); pointer-events: none; }
.page-hero .ph-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .16; mix-blend-mode: luminosity; }
.page-hero-inner { position: relative; padding-top: 34px; padding-bottom: 54px; }
.page-hero .crumbs { margin-bottom: 26px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -.02em; margin: 14px 0 14px; max-width: 900px; }
.page-hero .lead { color: #c9cdd6; font-size: 17.5px; max-width: 720px; }
.page-hero-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 28px; }
.ph-stat { display: flex; flex-direction: column; }
.ph-stat b { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: #fff; line-height: 1.1; }
.ph-stat span { font-size: 13px; color: #aab0bd; }

/* ============================================================ CARTES FORMATION */
.ccard {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
}
.ccard:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: rgba(192, 32, 58, .28); }
.ccard::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--d, var(--crimson)); opacity: .85; }
.ccard-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ccard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ccard-title { font-size: 17.5px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ccard:hover .ccard-title { color: var(--crimson); }
.ccard-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ccard-summary { font-size: 14px; color: var(--slate); line-height: 1.5; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-meta { display: grid; gap: 7px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ccard-meta li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); font-weight: 600; }
.ccard-meta svg { width: 15px; height: 15px; color: var(--slate-light); }
.ccard-meta strong { color: var(--ink); }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ccard-ref { font-family: var(--font-mono); font-size: 12px; color: var(--slate-light); }
.ccard-price { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--ink); }
.ccard-price small { font-size: 12px; color: var(--slate-light); font-weight: 600; }
.fav-btn { position: relative; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--slate-light); border: 1px solid var(--line); background: var(--surface); transition: all .15s; }
.fav-btn svg { width: 17px; height: 17px; }
.fav-btn:hover { color: var(--crimson); border-color: var(--crimson); }
.fav-btn[aria-pressed="true"] { color: #fff; background: var(--crimson); border-color: var(--crimson); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.fav-btn.pop { animation: heartPop .35s var(--ease); }
@keyframes heartPop { 50% { transform: scale(1.22); } }

.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Ligne de résultat (style catalogue) */
.crow {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px 22px 28px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.crow::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--d, var(--crimson)); }
.crow:hover { box-shadow: var(--sh-md); border-color: var(--line-strong); }
.crow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.crow-ref { font-family: var(--font-mono); font-size: 12px; color: var(--slate-light); }
.crow-title { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.crow-title a:hover { color: var(--crimson); }
.crow-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.crow-summary { font-size: 14.5px; color: var(--slate); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crow-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.crow-meta li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--slate); }
.crow-meta svg { width: 15px; height: 15px; color: var(--slate-light); }
.crow-side { display: flex; flex-direction: column; gap: 12px; padding-left: 24px; border-left: 1px solid var(--line-soft); }
.crow-price { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1; }
.crow-price small { font-size: 12.5px; font-weight: 600; color: var(--slate-light); }
.crow-next { font-size: 12.5px; color: var(--slate); line-height: 1.45; }
.crow-next b { display: block; font-family: var(--font-head); font-size: 13.5px; color: var(--ink); }
.crow-next .later { color: var(--slate-light); }
.crow-actions { position: relative; z-index: 2; display: flex; gap: 8px; margin-top: auto; }
.crow-actions .btn { flex: 1; }

/* ============================================================ BLOCS GÉNÉRIQUES */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.card-mist { background: var(--mist); border-color: var(--line-soft); }
.card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--mist); border: 1px solid var(--line-soft); font-size: 14.5px; color: var(--text-strong); }
.callout svg { width: 20px; height: 20px; color: var(--crimson); flex: 0 0 auto; margin-top: 1px; }
.callout.info { background: var(--info-bg); border-color: transparent; color: var(--info-ink); }
.callout.info svg { color: var(--info); }
.callout.warning { background: var(--warning-bg); border-color: transparent; color: var(--warning-ink); }
.callout.warning svg { color: var(--warning); }
.callout a { font-weight: 700; color: var(--crimson); }

.empty-state { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-state .es-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--mist); color: var(--slate-light); display: grid; place-items: center; }
.empty-state .es-ic svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--slate); max-width: 460px; margin: 0 auto 20px; }
.empty-state .es-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.check-list { display: grid; gap: 11px; }
.check-list li { display: flex; gap: 11px; font-size: 15px; color: var(--text-strong); }
.check-list svg { width: 19px; height: 19px; color: var(--crimson); flex: 0 0 auto; margin-top: 2px; }

/* Bandeau CTA */
.cta-band { position: relative; overflow: hidden; background: var(--charcoal); color: #fff; border-radius: var(--r-xl); padding: 38px 42px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px 260px at 100% 0%, rgba(192, 32, 58, .5), transparent 60%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2, .cta-band h3 { color: #fff; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin-bottom: 8px; }
.cta-band p { color: #c5c9d3; max-width: 620px; }
.cta-band .cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================ PIED DE PAGE */
.footer { background: var(--night); color: #aab0bd; padding: 64px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 46px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-brand img { height: 50px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 13.5px; color: #8a8f9c; max-width: 280px; margin-bottom: 18px; }
.footer-contact { display: grid; gap: 8px; margin-bottom: 18px; font-size: 13.5px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 9px; color: #c3c7d0; }
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 15px; height: 15px; color: var(--coral-light); }
.footer-soc { display: flex; gap: 10px; }
.footer-soc a { width: 38px; height: 38px; border-radius: 9px; background: rgba(255, 255, 255, .06); display: grid; place-items: center; color: #c3c7d0; transition: all .15s; }
.footer-soc a:hover { background: var(--grad-solid); color: #fff; }
.footer-soc svg { width: 17px; height: 17px; }
.footer-col h5 { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13.5px; color: #9aa0ac; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-news p { font-size: 13.5px; color: #9aa0ac; margin-bottom: 14px; }
.news-form { display: flex; gap: 8px; }
.news-form .input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; padding: 11px 13px; font-size: 14px; }
.news-form .input::placeholder { color: #8a8f9c; }
.news-form .btn { padding: 11px 15px; }
.news-form-msg { font-size: 12.5px; margin-top: 10px; }
.news-form-msg.ok { color: #7fd6a4; }
.news-form-msg.err { color: #ff9aa8; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 12.5px; color: #8a8f9c; flex-wrap: wrap; gap: 12px; }
.footer-bottom .fb-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a:hover { color: #fff; }
.qualiopi { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-sm); font-size: 12px; color: #c3c7d0; }
.qualiopi b { color: #fff; font-family: var(--font-head); }
.qualiopi svg { width: 15px; height: 15px; color: #7fd6a4; }

/* ============================================================ TOASTS */
.toasts { position: fixed; z-index: 150; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--night); color: #fff; padding: 13px 14px 13px 16px; border-radius: var(--r-md); box-shadow: var(--sh-xl); font-size: 14px; animation: toastIn .3s var(--ease); }
.toast.out { animation: toastOut .25s ease forwards; }
.toast .t-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); flex: 0 0 auto; }
.toast .t-ic svg { width: 15px; height: 15px; }
.toast.success .t-ic { background: #1f8a4d; }
.toast.error .t-ic { background: var(--danger); }
.toast .t-msg { flex: 1; line-height: 1.4; }
.toast a { color: var(--coral-light); font-weight: 700; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ============================================================ RÉVÉLATION AU DÉFILEMENT */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Retour en haut */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line); box-shadow: var(--sh-md); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .2s ease; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--crimson); border-color: var(--crimson); }
.to-top svg { width: 19px; height: 19px; }

/* ============================================================ MODE SOMBRE
   Le script d'en-tête pose data-theme="light|dark" sur <html> avant le
   premier rendu (préférence enregistrée, sinon préférence système).
   Les sections déjà sombres (héros, bandeaux, pied de page) le restent. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --crimson: #ec4d68;
    --crimson-dark: #ff8fa2;
    --crimson-50: rgba(236, 77, 104, .13);
    --crimson-100: rgba(236, 77, 104, .24);
    --coral: #f06a80;
    --coral-light: #f68a9b;
    --charcoal: #1a1c23;
    --charcoal-2: #15171d;
    --night: #0b0c10;

    --ink: #eef0f4;
    --text-strong: #dde0e7;
    --slate: #a6acb9;
    --slate-light: #858b99;
    --placeholder: #6b7180;
    --mist: #1f2229;
    --mist-2: #272a33;
    --line: #2b2e37;
    --line-soft: #23262e;
    --line-strong: #3b3f4b;

    --bg: #111318;
    --surface: #181a21;
    --surface-hover: #1d2027;
    --raised: #2a2e37;
    --field-bg: #13151a;
    --section-alt: #0d0f13;
    --inverse-bg: #e9ecf1;
    --inverse-fg: #14161b;
    --btn-dark: #2c3039;
    --btn-dark-hover: #373b46;
    --utility-bg: #0b0c10;

    --success: #4fc98a;
    --success-bg: rgba(79, 201, 138, .13);
    --warning: #f2b752;
    --warning-bg: rgba(242, 183, 82, .13);
    --info: #7eaaff;
    --info-bg: rgba(126, 170, 255, .13);
    --danger: #ff6f81;
    --danger-bg: rgba(255, 111, 129, .13);
    --info-ink: #b5cdff;
    --warning-ink: #f6d08f;

    --grad-dark: linear-gradient(160deg, #20232b 0%, #14161b 100%);
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --sh-md: 0 6px 18px rgba(0, 0, 0, .4);
    --sh-lg: 0 14px 38px rgba(0, 0, 0, .5);
    --sh-xl: 0 26px 64px rgba(0, 0, 0, .6);
    --sh-crimson: 0 10px 26px rgba(236, 77, 104, .22);
  }
  :root[data-theme="dark"] [data-domain="ia"] { --d: #f0607a; }
  :root[data-theme="dark"] [data-domain="gouvernance"] { --d: #9690ff; }
  :root[data-theme="dark"] [data-domain="service"] { --d: #34c6b8; }
  :root[data-theme="dark"] [data-domain="architecture"] { --d: #f0a052; }
  :root[data-theme="dark"] [data-domain="projet"] { --d: #72a6ff; }
  :root[data-theme="dark"] [data-domain="securite"] { --d: #b690ff; }
  :root[data-theme="dark"] [data-domain] { --d-bg: color-mix(in srgb, var(--d) 15%, transparent); }

  [data-theme="dark"] body { background: var(--bg); }
  [data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6acb9' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
  [data-theme="dark"] .header { background: rgba(24, 26, 33, .94); -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px); }
  [data-theme="dark"] .header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
  [data-theme="dark"] .mega, [data-theme="dark"] .drop { box-shadow: 0 24px 50px rgba(0, 0, 0, .55); }
  [data-theme="dark"] .cta-band { border: 1px solid var(--line); }
  [data-theme="dark"] .toast { background: #262a33; border: 1px solid #353946; }
  [data-theme="dark"] .ccard:hover, [data-theme="dark"] .crow:hover { border-color: rgba(236, 77, 104, .35); }
  [data-theme="dark"] .empty-state { background: var(--surface); }
  [data-theme="dark"] .so-backdrop, [data-theme="dark"] .drawer-backdrop { background: rgba(5, 6, 8, .72); }
  [data-theme="dark"] img.logo-light { display: none; }
  [data-theme="dark"] img.logo-dark { display: block; }
}
img.logo-dark { display: none; }

/* Bascule animée du thème (View Transitions quand disponible) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease !important;
}

/* ============================================================ RESPONSIVE */
@media (max-width: 1240px) {
  .nav-link { padding: 0 9px; font-size: 14px; }
  .nav-link::after { left: 9px; right: 9px; }
  .brand img { height: 40px; }
  .header-inner { gap: 16px; }
  .header-actions .hide-md { display: none; }
}
@media (max-width: 1120px) {
  .cards-grid, .cards-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-news { grid-column: span 3; }
}
@media (max-width: 1060px) {
  .utility .util-hide { display: none; }
}
/* Menu complet : environ 1 100 px utiles (logo, cinq rubriques, actions). En dessous, menu burger. */
@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
}
@media (max-width: 760px) {
  :root { --gut: 20px; --header-h: 68px; }
  .section { padding: 60px 0; }
  .brand img { height: 40px; }
  .cards-grid, .cards-grid.cols-2, .cards-grid.cols-4 { grid-template-columns: 1fr; }
  .crow { grid-template-columns: 1fr; padding: 20px 20px 20px 24px; gap: 16px; }
  .crow-side { padding-left: 0; border-left: none; border-top: 1px solid var(--line-soft); padding-top: 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .crow-actions { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-news { grid-column: 1 / -1; }
  .cta-band { padding: 30px 24px; }
  .so-domains { grid-template-columns: 1fr 1fr; }
  .search-overlay { padding: 0; }
  .so-panel { max-height: var(--screen-dh); height: 100%; border-radius: 0; }
  .so-form kbd { display: none; }
  .so-close { display: inline-grid; }
  .so-footer { display: none; }
  .header-actions .icon-btn.hide-sm { display: none; }
  .utility-left .util-hide-sm { display: none; }
}
@media (max-width: 420px) {
  .header-actions { gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
