/* =========================================================================
   CCMESD — DESIGN SYSTEM
   Direction : institutionnel · international · sobre · lisible
   Aucune dependance externe. Aucune police distante. Aucun framework.
   ========================================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Couleurs de marque */
  --ink:            #0A1826;
  --ink-2:          #14293D;
  --brand:          #0F3B5C;
  --brand-600:      #0B2C46;
  --brand-400:      #1E5A85;
  --brand-100:      #E3EDF4;
  --accent:         #B0703C;   /* décoratif uniquement : filets, puces, bordures */
  --accent-600:     #8E5629;
  --accent-100:     #F7EDE4;
  /* Déclinaisons TEXTE de l'accent — contraste WCAG AA vérifié.
     --accent-text    : 5.98:1 sur fond clair
     --accent-on-dark : 7.12:1 sur --ink */
  --accent-text:    #8E5629;
  --accent-on-dark: #D9945C;
  /* Boutons : fond garanti contrasté avec leur libellé */
  --btn-primary:    #0F3B5C;
  --btn-primary-h:  #0B2C46;
  --btn-primary-fg: #FFFFFF;
  --btn-accent:     #8E5629;
  --btn-accent-h:   #7F4D24;
  --btn-accent-fg:  #FFFFFF;
  --badge-fg:       #0B2C46;
  --badge-accent-fg:#8E5629;

  /* Surfaces */
  --bg:             #FFFFFF;
  --bg-soft:        #F6F8FA;
  --bg-sunken:      #EDF1F5;
  --surface:        #FFFFFF;
  --border:         #DCE3EA;
  --border-strong:  #B9C5D1;

  /* Texte */
  --text:           #0A1826;
  --text-muted:     #4A5C6E;
  --text-faint:     #5F6E7D;
  --text-invert:    #FFFFFF;

  /* Etats */
  --ok:             #1B6B4A;
  --ok-bg:          #E7F3ED;
  --warn:           #8A6212;
  --warn-bg:        #FBF1DC;
  --info-bg:        #E8F0F7;

  /* Typographie */
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs:   0.75rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.375rem;
  --fs-4xl:  3rem;
  --fs-5xl:  3.75rem;

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.65;

  /* Espacements */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s5: 1.5rem;   --s6: 2rem;     --s7: 2.5rem;   --s8: 3rem;
  --s9: 4rem;     --s10: 5rem;    --s11: 6.5rem;  --s12: 8rem;

  /* Formes */
  --r-sm: 3px;  --r-md: 5px;  --r-lg: 8px;  --r-xl: 14px;  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(10,24,38,.06), 0 1px 3px rgba(10,24,38,.04);
  --shadow-md: 0 2px 6px rgba(10,24,38,.07), 0 8px 20px rgba(10,24,38,.05);
  --shadow-lg: 0 4px 12px rgba(10,24,38,.08), 0 18px 44px rgba(10,24,38,.09);

  --container: 1220px;
  --container-narrow: 780px;

  --ease: cubic-bezier(.4,0,.2,1);
  --dur: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0A1420;
    --bg-soft:       #0E1B2A;
    --bg-sunken:     #132435;
    --surface:       #101E2E;
    --border:        #22384C;
    --border-strong: #365068;
    --text:          #E8EEF4;
    --text-muted:    #A3B4C4;
    --text-faint:    #7E90A1;
    --brand:         #4A93C4;
    --brand-400:     #6FB0DA;
    --brand-600:     #2E6F9C;
    --brand-100:     #16293A;
    --accent:        #D9945C;
    --accent-600:    #C07B44;
    --accent-100:    #241A12;
    --accent-text:   #D9945C;
    --accent-on-dark:#D9945C;
    --btn-primary:   #1E5A85;
    --btn-primary-h: #2E6F9C;
    --btn-primary-fg:#FFFFFF;
    --btn-accent:    #D9945C;
    --btn-accent-h:  #E0A472;
    --btn-accent-fg: #0A1420;
    --ok:            #6FCFA2;
    --warn:          #E5C173;
    --badge-fg:      #6FB0DA;
    --badge-accent-fg:#E0A472;
    --ok-bg:         #10261D;
    --warn-bg:       #2A2314;
    --info-bg:       #14263A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 2px 6px rgba(0,0,0,.45), 0 8px 20px rgba(0,0,0,.3);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg:#0A1420; --bg-soft:#0E1B2A; --bg-sunken:#132435; --surface:#101E2E;
  --border:#22384C; --border-strong:#365068;
  --text:#E8EEF4; --text-muted:#A3B4C4; --text-faint:#7E90A1;
  --brand:#4A93C4; --brand-400:#6FB0DA; --brand-600:#2E6F9C; --brand-100:#16293A;
  --accent:#D9945C; --accent-600:#C07B44; --accent-100:#241A12;
  --accent-text:#D9945C; --accent-on-dark:#D9945C;
  --btn-primary:#1E5A85; --btn-primary-h:#2E6F9C; --btn-primary-fg:#FFFFFF;
  --btn-accent:#D9945C; --btn-accent-h:#E0A472; --btn-accent-fg:#0A1420;
  --ok:#6FCFA2; --warn:#E5C173;
  --badge-fg:#6FB0DA; --badge-accent-fg:#E0A472;
  --ok-bg:#10261D; --warn-bg:#2A2314; --info-bg:#14263A;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 2px 6px rgba(0,0,0,.45),0 8px 20px rgba(0,0,0,.3);
  --shadow-lg:0 4px 12px rgba(0,0,0,.5),0 18px 44px rgba(0,0,0,.4);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-600); }
:where(h1,h2,h3,h4,h5,h6) { font-family: var(--font-display); line-height: var(--lh-tight); font-weight: 600; letter-spacing: -.015em; }
p { text-wrap: pretty; }
:where(h1,h2,h3) { text-wrap: balance; }

/* Focus visible — WCAG 2.2 */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 999;
  background: var(--brand); color: #fff; padding: var(--s3) var(--s5);
  border-radius: var(--r-md); font-weight: 600; text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s4); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. LAYOUT ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s5); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--s10); }
.section-sm { padding-block: var(--s8); }
.section-soft { background: var(--bg-soft); }
.section-sunken { background: var(--bg-sunken); }
.section-ink { background: var(--ink); color: var(--text-invert); }
.section-ink :where(h1,h2,h3,h4) { color: #fff; }
.section-ink p { color: rgba(255,255,255,.82); }

.grid { display: grid; gap: var(--s5); }
.grid > * { min-width: 0; }
.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)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0,1fr); } }

/* Gabarits à deux colonnes — toujours responsives.
   Ne jamais déclarer grid-template-columns en style inline : les débordements
   mobiles constatés en recette venaient tous de là. */
.split, .split-aside, .split-media {
  display: grid; gap: var(--s8); align-items: start;
}
.split       { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.split-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.split-media { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
.split > *, .split-aside > *, .split-media > * { min-width: 0; }
@media (max-width: 1000px) {
  .split, .split-aside, .split-media { grid-template-columns: minmax(0,1fr); gap: var(--s7); }
  .split-aside > aside, .split > aside, .split-media > aside { position: static !important; }
}

.stack > * + * { margin-top: var(--s4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; min-width: 0; }
.cluster > * { min-width: 0; }

/* ---------- 4. TYPOGRAPHIE ---------- */
.display-1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.75rem); }
.display-2 { font-size: clamp(1.875rem, 1.1rem + 2.6vw, 3rem); }
.h-section { font-size: clamp(1.625rem, 1.05rem + 1.9vw, 2.375rem); }
.h-card    { font-size: var(--fs-lg); }
.lead { font-size: clamp(1.0625rem, .98rem + .4vw, 1.25rem); color: var(--text-muted); line-height: 1.6; }
.eyebrow {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--accent-text);
  display: block; margin-bottom: var(--s3);
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: var(--fs-sm); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s7); }
.prose h3 { font-size: var(--fs-lg); margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: var(--s2); }

.section-head { max-width: 74ch; margin-bottom: var(--s7); }

/* ---------- 5. BOUTONS ---------- */
.btn {
  --btn-bg: var(--btn-primary); --btn-fg: var(--btn-primary-fg); --btn-bd: var(--btn-primary);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 46px; padding: var(--s3) var(--s5);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-md);
  font-size: var(--fs-base); font-weight: 600; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { --btn-bg: var(--btn-primary-h); --btn-bd: var(--btn-primary-h); color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-accent  { --btn-bg: var(--btn-accent); --btn-bd: var(--btn-accent); --btn-fg: var(--btn-accent-fg); }
.btn-accent:hover { --btn-bg: var(--btn-accent-h); --btn-bd: var(--btn-accent-h); color: var(--btn-accent-fg); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--border-strong); }
.btn-outline:hover { --btn-bg: var(--brand-100); --btn-fg: var(--brand-600); --btn-bd: var(--brand); }
.btn-ghost   { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--bg-sunken); --btn-fg: var(--text); }
.btn-on-dark { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn-on-dark:hover { --btn-bg: rgba(255,255,255,.88); --btn-fg: var(--ink); --btn-bd: rgba(255,255,255,.88); }
.btn-outline-on-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.4); }
.btn-outline-on-dark:hover { --btn-bg: rgba(255,255,255,.1); --btn-fg: #fff; --btn-bd: #fff; }
.btn { max-width: 100%; overflow-wrap: anywhere; }
.btn-lg { min-height: 54px; padding: var(--s4) var(--s6); font-size: var(--fs-md); }
.btn-sm { min-height: 38px; padding: var(--s2) var(--s4); font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn-wa { --btn-bg:#1FA855; --btn-bd:#1FA855; }
.btn-wa:hover { --btn-bg:#178443; --btn-bd:#178443; }

/* ---------- 6. BADGES ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: 3px var(--s3); border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none;
  background: var(--brand-100); color: var(--badge-fg);
  border: 1px solid transparent;
}
.badge-accent { background: var(--accent-100); color: var(--badge-accent-fg); }
.badge-outline { background: transparent; border-color: var(--border-strong); color: var(--text-muted); }
.badge-hero { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.badge-ph { background: var(--warn-bg); color: var(--warn); }

/* ---------- 7. CARTES ---------- */
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s5);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card-link:hover { border-color: var(--brand-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { font-size: var(--fs-md); margin-bottom: var(--s2); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p { color: var(--text-muted); font-size: var(--fs-sm); }
.card-foot { margin-top: auto; padding-top: var(--s4); }
.card-meta { display: flex; flex-wrap: wrap; gap: var(--s3); font-size: var(--fs-sm); color: var(--text-faint); }
.card-meta > * { display: inline-flex; align-items: center; gap: 5px; }

.card-formation { position: relative; }
.card-formation .badge { align-self: flex-start; margin-bottom: var(--s3); }
.card-formation h3 { font-size: var(--fs-base); line-height: var(--lh-snug); font-family: var(--font-body); font-weight: 650; }
.card-formation h3 a::after { content:""; position:absolute; inset:0; }

.card-domaine { border-left: 3px solid var(--accent); }
.card-domaine .count { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--brand); line-height: 1; }

/* ---------- 8. EN-TETE / NAVIGATION ---------- */
.topbar {
  background: var(--ink); color: rgba(255,255,255,.78); font-size: var(--fs-sm);
  padding-block: var(--s2);
}
.topbar a { color: rgba(255,255,255,.86); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .container { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: var(--s4); min-height: 70px; }

.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--r-md);
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; letter-spacing: .02em;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: .01em; line-height: 1.1; }
.brand-sub { font-size: 10.5px; color: var(--text-faint); letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }

.nav { margin-left: auto; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 0; list-style: none; padding: 0; margin: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: var(--s2) 10px; border-radius: var(--r-md);
  color: var(--text); text-decoration: none; font-weight: 550; font-size: var(--fs-sm);
  background: none; border: 0;
}
/* Pas de variante large de la navigation : le conteneur est plafonné à 1320 px,
   et depuis l'ajout du sélecteur de langue la marque, les sept entrées de menu
   et les boutons ne tiennent plus avec le rembourrage élargi — quelle que soit
   la largeur de l'écran. Un en-tête qui déborde vaut moins qu'un menu d'un
   point plus petit. */
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--bg-sunken); color: var(--brand); }
.nav-link[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-caret { width: 9px; height: 9px; transition: transform var(--dur) var(--ease); }
.nav-link[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.megamenu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(640px, calc(100vw - 2rem)); padding: var(--s5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.megamenu[hidden] { display: none; }
.megamenu-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s2) var(--s5); }
.megamenu a {
  display: block; padding: var(--s2) var(--s3); border-radius: var(--r-md);
  color: var(--text); text-decoration: none; font-size: var(--fs-sm); line-height: 1.4;
}
.megamenu a:hover { background: var(--bg-sunken); color: var(--brand); }
.megamenu-foot { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }

.header-cta { display: flex; gap: var(--s2); align-items: center; flex-shrink: 0; }
.nav-toggle { display: none; }
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }

/* Sélecteur de langue. Le drapeau seul serait ambigu — un drapeau désigne un
   pays, pas une langue — il est donc accompagné du code de langue. Le nom
   complet est porté par aria-label et title, sans coûter de largeur. */
.lang-switch {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 38px; padding: 0 var(--s2);
  letter-spacing: .02em;
  border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.lang-switch:hover { border-color: var(--border-strong); color: var(--text); }
.lang-switch svg { border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); display: block; }

@media (max-width: 1280px) {
  .nav, .header-cta .btn { display: none; }
  .nav-toggle { display: grid; place-items: center; width: 42px; height: 42px; background: transparent; border: 1px solid var(--border); border-radius: var(--r-md); }
  .nav.is-open {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: var(--s4); max-height: 78vh; overflow-y: auto;
  }
  .nav.is-open .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav.is-open .nav-link { width: 100%; justify-content: space-between; padding: var(--s3); }
  .nav.is-open .megamenu {
    position: static; transform: none; width: auto; box-shadow: none;
    border: 0; border-left: 2px solid var(--border); border-radius: 0;
    padding: var(--s2) 0 var(--s2) var(--s4); margin-bottom: var(--s2);
  }
  .nav.is-open .megamenu-grid { grid-template-columns: 1fr; }
  .nav.is-open .mobile-cta { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
}
.mobile-cta { display: none; }

/* ---------- 9. HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--ink) 0%, var(--brand-600) 62%, var(--brand) 100%);
  color: #fff;
  padding-block: clamp(var(--s9), 8vw, var(--s12));
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46rem 30rem at 88% -8%, rgba(176,112,60,.24), transparent 62%),
    radial-gradient(38rem 26rem at 4% 108%, rgba(74,147,196,.20), transparent 62%);
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow, .section-ink .eyebrow, .cta-band .eyebrow { color: var(--accent-on-dark); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: var(--s9); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s7); } }
.hero h1 { color: #fff; margin-bottom: var(--s5); }
.hero .lead { color: rgba(255,255,255,.82); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s7); }
.hero-tertiary { margin-top: var(--s4); font-size: var(--fs-sm); }
.hero-tertiary a { color: rgba(255,255,255,.8); text-underline-offset: 3px; }
.hero-tertiary a:hover { color: #fff; }

.hero-panel {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-xl); padding: var(--s6); backdrop-filter: blur(6px);
}
.hero-panel h2 { font-size: var(--fs-md); color: #fff; margin-bottom: var(--s4); }
.hero-panel ul { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.hero-panel li { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-sm); color: rgba(255,255,255,.86); }
.hero-panel .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex-shrink: 0; }

/* ---------- 10. BARRE DE CONFIANCE ---------- */
.trustbar { border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.trustbar .container { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s5); padding-block: var(--s6); }
@media (max-width: 860px) { .trustbar .container { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 460px) { .trustbar .container { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: var(--s3); align-items: flex-start; }
.trust-item .ico { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.trust-item strong { display: block; font-size: var(--fs-base); font-weight: 650; }
.trust-item span { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- 11. STATISTIQUES ---------- */
.stat { text-align: left; }
.stat .value { font-family: var(--font-display); font-size: clamp(2rem,1.4rem+2vw,2.75rem); color: var(--brand); line-height: 1; }
.section-ink .stat .value { color: #fff; }
.stat .label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--s2); }
.section-ink .stat .label { color: rgba(255,255,255,.7); }

/* ---------- 12. FIL D'ARIANE ---------- */
.breadcrumb { padding-block: var(--s4); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); }
.breadcrumb li { display: flex; align-items: center; gap: var(--s2); color: var(--text-faint); }
.breadcrumb li + li::before { content: "›"; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ---------- 13. PAGE HEADER ---------- */
.page-head { padding-block: var(--s8) var(--s7); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(1.875rem,1.2rem+2.4vw,2.75rem); margin-bottom: var(--s4); }
.page-head .lead { max-width: 72ch; }

/* ---------- 14. CATALOGUE / FILTRES ---------- */
.catalog { display: grid; grid-template-columns: minmax(0,280px) minmax(0,1fr); gap: var(--s7); align-items: start; }
.catalog > * { min-width: 0; }
@media (max-width: 940px) { .catalog { grid-template-columns: minmax(0,1fr); } }
.filters {
  position: sticky; top: 90px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s5);
}
@media (max-width: 940px) { .filters { position: static; } }
.filters h2 { font-size: var(--fs-md); margin-bottom: var(--s4); }
.filter-group + .filter-group { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.filter-group > legend, .filter-group > h3 {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: var(--s3); padding: 0;
}
.filter-list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.filter-opt { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); }
.filter-opt:hover { background: var(--bg-sunken); }
.filter-opt input { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; }
.filter-opt .n { margin-left: auto; color: var(--text-faint); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

.searchbox { position: relative; margin-bottom: var(--s5); }
.searchbox input {
  width: 100%; min-height: 48px; padding: var(--s3) var(--s4) var(--s3) 42px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.searchbox input:focus { border-color: var(--brand); }
.searchbox .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }

.results-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; margin-bottom: var(--s5); }
.results-count { font-size: var(--fs-sm); color: var(--text-muted); }
.results-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 4px var(--s3); border-radius: var(--r-full);
  background: var(--brand-100); color: var(--brand-600);
  border: 0; font-size: var(--fs-xs); font-weight: 600;
}
.chip button { background: none; border: 0; color: inherit; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.empty-state { text-align: center; padding: var(--s10) var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }

/* ---------- 15. FICHE FORMATION ---------- */
.formation-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,340px); gap: var(--s8); align-items: start; }
.formation-layout > * { min-width: 0; }
@media (max-width: 1000px) { .formation-layout { grid-template-columns: minmax(0,1fr); } }
.formation-aside { position: sticky; top: 90px; display: grid; gap: var(--s4); }
@media (max-width: 1000px) { .formation-aside { position: static; } }

.booking-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.booking-card .head { background: var(--brand); color: #fff; padding: var(--s4) var(--s5); }
.booking-card .head .k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.booking-card .head .v { font-family: var(--font-display); font-size: var(--fs-lg); }
.booking-card .body { padding: var(--s5); display: grid; gap: var(--s4); }
.spec { display: flex; justify-content: space-between; gap: var(--s4); font-size: var(--fs-sm); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.spec:last-of-type { border-bottom: 0; padding-bottom: 0; }
.spec dt { color: var(--text-faint); }
.spec dd { margin: 0; font-weight: 600; text-align: right; }
.booking-actions { display: grid; gap: var(--s2); }

.objectifs { display: grid; gap: var(--s3); list-style: none; padding: 0; }
.objectifs li { display: flex; gap: var(--s3); align-items: flex-start; min-width: 0; }
.objectifs li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.objectifs .tick { color: var(--ok); flex-shrink: 0; margin-top: 3px; }

/* ---------- 16. ACCORDEON ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.accordion details + details { border-top: 1px solid var(--border); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s4) var(--s5); cursor: pointer; font-weight: 600; list-style: none;
  background: var(--surface);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--bg-soft); }
.accordion summary::after { content: "+"; font-size: 1.25rem; color: var(--accent); font-weight: 400; line-height: 1; flex-shrink: 0; }
.accordion details[open] summary::after { content: "−"; }
.accordion .acc-body { padding: 0 var(--s5) var(--s5); color: var(--text-muted); }
.acc-num { color: var(--accent); font-family: var(--font-display); margin-right: var(--s3); }

/* ---------- 17. TABLEAUX / CALENDRIER ---------- */
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--border); border-radius: var(--r-lg); }
table { min-width: 540px; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
thead th {
  text-align: left; padding: var(--s3) var(--s4);
  background: var(--bg-sunken); color: var(--text-muted);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  white-space: nowrap; border-bottom: 1px solid var(--border);
}
tbody td { padding: var(--s4); border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }
td .t-title { font-weight: 600; color: var(--text); text-decoration: none; }
td .t-title:hover { color: var(--brand); }

/* Sous 720px, le tableau du calendrier devient une pile de cartes :
   plus lisible au pouce qu'un défilement horizontal. */
@media (max-width: 720px) {
  .table-cards table { min-width: 0; }
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-cards, .table-cards table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; }
  .table-cards { border: 0; overflow-x: visible; }
  .table-cards tr {
    border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: var(--s4); margin-bottom: var(--s4); background: var(--surface);
  }
  .table-cards tr:hover { background: var(--surface); }
  .table-cards td { border: 0; padding: 0; display: flex; gap: var(--s4); justify-content: space-between; }
  .table-cards td + td { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
  .table-cards td::before {
    content: attr(data-label); flex-shrink: 0;
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-faint);
  }
  .table-cards td:empty, .table-cards td::before:empty { display: none; }
  .table-cards td > * { text-align: right; min-width: 0; }
  .table-cards td .btn { width: 100%; }
  .table-cards td:last-child { display: block; }
  .table-cards td:last-child::before { display: none; }
}

/* ---------- 18. EXPERTS ---------- */
.expert-card { text-align: left; }
.expert-photo {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 1/1; border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--brand-100), var(--bg-sunken));
  display: grid; place-items: center; margin-bottom: var(--s4);
  font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--brand); font-weight: 600;
  border: 1px solid var(--border);
}
.expert-photo picture, .expert-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.expert-photo img { object-fit: cover; object-position: 50% 22%; }
.card-link:hover .expert-photo img { transform: scale(1.03); }
.expert-photo img { transition: transform 320ms var(--ease); }

/* ---------- 18b. VISUELS ---------- */
.media {
  display: block; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--bg-sunken);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-4x3 { aspect-ratio: 4/3; }
.media-16x9 { aspect-ratio: 16/9; }

/* Mosaïque du hero : 4 photos de session, sans carrousel */
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.hero-mosaic .media {
  border-color: rgba(255,255,255,.18); box-shadow: var(--shadow-lg); aspect-ratio: 1/1;
}
.hero-mosaic .media:nth-child(1) { border-radius: var(--r-xl) var(--r-md) var(--r-md) var(--r-md); }
.hero-mosaic .media:nth-child(2) { border-radius: var(--r-md) var(--r-xl) var(--r-md) var(--r-md); margin-top: var(--s6); }
.hero-mosaic .media:nth-child(3) { border-radius: var(--r-md) var(--r-md) var(--r-md) var(--r-xl); }
.hero-mosaic .media:nth-child(4) { border-radius: var(--r-md) var(--r-md) var(--r-xl) var(--r-md); margin-top: calc(var(--s6) * -1 + var(--s3)); }
@media (max-width: 940px) {
  .hero-mosaic .media:nth-child(2), .hero-mosaic .media:nth-child(4) { margin-top: 0; }
}

/* Bandeau galerie */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s4); }
.gallery > * { min-width: 0; }
.gallery .media { aspect-ratio: 4/3; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px)  { .gallery { grid-template-columns: minmax(0,1fr); } }

/* Bandeau d'en-tête illustré (domaines, fiches, services) */
.page-media { margin-top: var(--s6); }
.page-media .media { aspect-ratio: 21/9; }
@media (max-width: 720px) { .page-media .media { aspect-ratio: 16/9; } }

/* Illustration sur fond clair : pas de recadrage, pas de bordure */
.media-illus { border: 0; background: transparent; border-radius: 0; }
.media-illus img { object-fit: contain; height: auto; }

/* Logo bitmap dans l'en-tête */
.brand-logo { height: 42px; width: auto; border-radius: var(--r-sm); }
@media (max-width: 400px) { .brand-logo { height: 34px; } }
.expert-card h3 { font-size: var(--fs-md); margin-bottom: 2px; }
.expert-role { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--s3); }

/* ---------- 19. FORMULAIRES ---------- */
.field { display: grid; gap: var(--s2); }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field .hint { font-size: var(--fs-xs); color: var(--text-faint); }
.field .req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: var(--s3) var(--s4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease);
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: var(--s3); }
.choice {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.choice:hover { border-color: var(--brand-400); background: var(--bg-soft); }
.choice input { margin-top: 3px; accent-color: var(--brand); width: 17px; height: 17px; flex-shrink: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-100); }
.choice strong { display: block; font-size: var(--fs-base); }
.choice span { font-size: var(--fs-sm); color: var(--text-muted); }

.steps { display: flex; gap: var(--s2); margin-bottom: var(--s6); list-style: none; padding: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--text-faint); }
.steps li + li::before { content: ""; width: 22px; height: 1px; background: var(--border-strong); }
.steps .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); font-size: var(--fs-xs); font-weight: 700; }
.steps li[aria-current="step"] { color: var(--text); font-weight: 600; }
.steps li[aria-current="step"] .num { background: var(--brand); color: #fff; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- 20. ALERTES ---------- */
.alert { display: flex; gap: var(--s3); padding: var(--s4) var(--s5); border-radius: var(--r-md); border: 1px solid transparent; font-size: var(--fs-sm); }
.alert-info { background: var(--info-bg); border-color: var(--brand-400); }
.alert-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.alert-ok   { background: var(--ok-bg);   border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.alert strong { display: block; margin-bottom: 2px; }

/* Zone placeholder — jamais de donnee inventee */
.placeholder-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  padding: var(--s7) var(--s5); text-align: center; background: var(--bg-soft);
}
.placeholder-zone .badge { margin-bottom: var(--s3); }
.placeholder-zone p { color: var(--text-muted); font-size: var(--fs-sm); max-width: 60ch; margin-inline: auto; }
.logo-slot {
  height: 76px; border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  display: grid; place-items: center; color: var(--text-faint); font-size: var(--fs-xs);
  letter-spacing: .06em; text-transform: uppercase; background: var(--surface);
}

/* ---------- 21. CTA BAND ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(var(--s7), 5vw, var(--s9)); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(34rem 22rem at 92% 12%, rgba(176,112,60,.24), transparent 62%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem,1.05rem+1.6vw,2.25rem); margin-bottom: var(--s4); }
.cta-band p { color: rgba(255,255,255,.8); max-width: 62ch; }
.cta-band .cluster { margin-top: var(--s6); }

/* ---------- 22. PIED DE PAGE ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: var(--s9) var(--s6); margin-top: var(--s10); }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0,1fr)); gap: var(--s7) var(--s5); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px)  { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--s4); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: var(--fs-sm); margin-top: var(--s4); color: rgba(255,255,255,.6); }
.footer-legal-lines { font-size: var(--fs-xs); color: rgba(255,255,255,.5); margin-top: var(--s4); display: grid; gap: 3px; }
.footer-bottom {
  margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; font-size: var(--fs-xs);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: var(--s4); }

/* ---------- 23. WHATSAPP FAB ---------- */
/* Le bouton flottant WhatsApp est entièrement défini dans annonce.css
   (pastille compacte au portrait du conseiller). */

/* ---------- 24. PAGINATION ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; margin-top: var(--s8); list-style: none; padding: 0; }
.pagination a, .pagination span {
  min-width: 42px; min-height: 42px; padding: 0 var(--s3);
  display: inline-grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--r-md);
  text-decoration: none; color: var(--text); font-size: var(--fs-sm);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 25. UTILITAIRES ---------- */
/* ---------- 26. TRÈS PETITS ÉCRANS (320–400px) ---------- */
/* Le seuil est à 480 px, pas 400 : entre les deux, le bloc de marque et les
   boutons de l'en-tête dépassaient la largeur de l'écran (mesuré à 414 px,
   469 px de contenu pour 414 px disponibles). */
@media (max-width: 480px) {
  .container { padding-inline: var(--s4); }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.05rem; }
  .brand-mark { width: 36px; height: 36px; font-size: .78rem; }
  .site-header .container { gap: var(--s3); min-height: 62px; }
  /* La marque peut se comprimer : les boutons de l'en-tête, eux, ne le
     peuvent pas sans devenir des cibles tactiles trop petites. */
  .site-header .brand { flex-shrink: 1; min-width: 0; }
  /* À 375 px, le code de langue fait déborder l'en-tête de 14 px. Le drapeau
     seul reste compréhensible, et aria-label porte toujours le nom complet. */
  .lang-switch span { display: none; }
  .lang-switch { padding: 0 var(--s2); }
  .brand-name, .brand-sub { overflow: hidden; text-overflow: ellipsis; }
  .brand-logo { height: 32px; }
  .topbar { font-size: var(--fs-xs); }
  .badge { overflow-wrap: anywhere; }
  .section { padding-block: var(--s8); }
}
.card, .card > *, .placeholder-zone, .alert, .alert > * { min-width: 0; }
.card p, .card h3, .placeholder-zone p { overflow-wrap: anywhere; }
.spec { min-width: 0; }
.spec dd { overflow-wrap: anywhere; }
.trust-item, .trust-item > div { min-width: 0; }
.trust-item strong, .trust-item span { overflow-wrap: anywhere; }
.expert-card h3, .expert-role { overflow-wrap: anywhere; }
.formation-aside, .booking-card, .booking-actions { min-width: 0; }
.filters, .filter-opt, .filter-opt > span { min-width: 0; }
.filter-opt > span:not(.n) { overflow-wrap: anywhere; }

/* ---------- 27. UTILITAIRES ---------- */
.mt-0{margin-top:0}.mt-4{margin-top:var(--s4)}.mt-5{margin-top:var(--s5)}
.mt-6{margin-top:var(--s6)}.mt-7{margin-top:var(--s7)}.mt-8{margin-top:var(--s8)}
.mb-4{margin-bottom:var(--s4)}.mb-5{margin-bottom:var(--s5)}
.mb-6{margin-bottom:var(--s6)}.mb-7{margin-bottom:var(--s7)}
.text-center{text-align:center}
.divider{height:1px;background:var(--border);border:0;margin-block:var(--s7)}
[hidden]{display:none !important}
