/* ==========================================================================
   Optiquest — feuille de style
   Palette issue du one-pager : bleu nuit (titres), violet « Simuler »,
   sarcelle « Certifier », orange « Exécuter », couleurs par secteur.
   ========================================================================== */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin-wght-normal.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;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 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: "Figtree";
  src: url("../fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Couleurs de marque */
  --ink: #161c45;
  --ink-soft: #454c74;
  --ink-mute: #666d90;
  --canvas: #f5f8fc;
  --paper: #ffffff;
  --line: #e2e8f2;

  --quest: #6b3fd3;
  --quest-deep: #4d29a6;
  --quest-tint: #efeafd;
  --certify: #10968a;
  --certify-text: #0b7a70;
  --certify-deep: #0a6b62;
  --certify-tint: #e2f5f2;
  --execute: #ee7418;
  --execute-text: #b5520a;
  --execute-deep: #b8560c;
  --execute-tint: #fdeedf;

  /* Couleurs secteurs (fonds assez sombres pour du texte blanc) */
  --bank: #2350c8;
  --insurance: #0e8378;
  --industry: #c95a0b;
  --energy: #0f7d8e;
  --services: #d02a5f;

  /* Typographie */
  --font-display: "Fredoka", "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  /* Espacements */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(5rem, 11vw, 9.5rem);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-soft: 0 1px 2px rgb(22 28 69 / 0.04), 0 12px 32px -12px rgb(22 28 69 / 0.14);
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink-soft);
  background: var(--canvas);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--quest); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--quest-deep); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, .h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.2vw, 4.2rem); font-weight: 650; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 600; }
h3, .h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 38em; }

:focus-visible { outline: 3px solid var(--quest); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.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;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.7rem 1rem; border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 780px); }

/* --------------------------------------------------------------------------
   Barre d'expérience (progression de lecture)
   -------------------------------------------------------------------------- */
.xp-bar { position: fixed; inset: 0 0 auto; height: 4px; z-index: 60; pointer-events: none; }
.xp-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--quest) 0 33%, var(--certify) 33% 66%, var(--execute) 66% 100%);
  background-size: 100vw 100%;
  transform-origin: left; transform: scaleX(var(--xp, 0));
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  --edge: var(--quest-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0.8rem 1.5rem;
  border: 0; border-radius: 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn--primary { background: var(--quest); color: #fff; box-shadow: 0 5px 0 var(--edge); }
.btn--primary:hover { color: #fff; background: #7447e0; transform: translateY(-1px); box-shadow: 0 6px 0 var(--edge); }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--light { --edge: #c9cfe6; background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--edge); }
.btn--light:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 0 var(--edge); }
.btn--light:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn--small { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: 0.98rem; border-radius: 12px; box-shadow: 0 4px 0 var(--edge); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 650; color: var(--quest); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--quest) 35%, transparent);
  text-decoration-thickness: 2px;
}
.text-link:hover { text-decoration-color: currentColor; }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(245 248 252 / 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.is-scrolled .site-header { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.logo-mark { width: 42px; height: 42px; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; }
.brand--light, .brand--light:hover { color: #fff; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 0.35rem; list-style: none; }
.site-nav ul a {
  display: block; padding: 0.5rem 0.85rem; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.site-nav ul a:hover { background: #fff; }
.site-nav ul a[aria-current="page"] { background: var(--quest-tint); color: var(--quest-deep); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 46px; height: 46px;
    border: 0; border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .nav-toggle .icon { width: 24px; height: 24px; grid-area: 1 / 1; }
  .nav-toggle__close { display: none; }
  .nav-open .nav-toggle__open { display: none; }
  .nav-open .nav-toggle__close { display: block; }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1.25rem var(--gutter) 2rem; background: var(--canvas);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgb(22 28 69 / 0.25);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 0.85rem 0.75rem; font-size: 1.15rem; }
  .site-nav .btn { min-height: 3.25rem; font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   Fil d'Ariane et en-tête de page
   -------------------------------------------------------------------------- */
.breadcrumbs { padding-top: 1.5rem; font-size: 0.92rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; gap: 0.25rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: #b6bcd3; }
.breadcrumbs a { color: var(--ink-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--quest); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

.page-hero { padding-block: clamp(3rem, 7vw, 6rem) 0; }
.page-hero h1 { max-width: 16em; }
.page-hero .lead { margin-top: 1.25rem; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--first { padding-top: clamp(3rem, 6vw, 5rem); }
.section--tinted { background: var(--paper); }
.section__head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head p { font-size: 1.12rem; }
.section__head--sticky { align-self: start; position: sticky; top: calc(var(--header-h) + 2rem); }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.split .section__head { margin-bottom: 0; }
@media (max-width: 900px) {
  .split, .split--even { grid-template-columns: 1fr; }
  .section__head--sticky { position: static; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(60% 70% at 78% 45%, #e4f1fb 0%, rgb(228 241 251 / 0) 70%),
    var(--canvas);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { font-size: clamp(2.6rem, 4.9vw, 4.5rem); font-weight: 650; line-height: 1; letter-spacing: -0.015em; max-width: 11em; }
.hero__text .lead { margin-top: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }
.hero__proof { display: flex; align-items: center; gap: 0.6rem; margin-top: 2.25rem; font-size: 0.97rem; color: var(--ink-mute); }
.hero__proof .icon { color: var(--certify); }
.hero__visual { position: relative; margin-right: calc(-1 * clamp(0rem, 4vw, 4rem)); }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 640px; margin-inline: auto; width: 100%; }
  .world { overflow: hidden; }
}

/* Monde isométrique */
.world { width: 100%; height: auto; overflow: visible; }
.w-water { fill: #d6ecf8; }
.w-wave { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; opacity: 0.9; }
.w-cliff-l { fill: #c29367; }
.w-cliff-r { fill: #a47650; }
.w-lip-l { fill: #72bb5d; }
.w-lip-r { fill: #62a94f; }
.w-grass-a, .w-grass-b, .w-path { stroke: rgb(255 255 255 / 0.35); stroke-width: 1; }
.w-grass-a { fill: #9fd57f; }
.w-grass-b { fill: #92cd71; }
.w-path { fill: #f3e2b8; stroke: #e6cf98; }
.w-shadow { fill: rgb(22 28 69 / 0.13); }
.w-trunk { fill: #8a5a3b; }
.w-leaf { fill: #58ad5f; }
.w-leaf-d { fill: #3f8f4d; }
.w-tree--alt .w-leaf { fill: #8ccc5e; }
.w-tree--alt .w-leaf-d { fill: #62ab4a; }
.b-left { fill: #e3e8f4; }
.b-right { fill: #ffffff; }
.b-win { fill: #bcd5f1; }
.b-win--r { fill: #d3e4f7; }
.b-door { fill: var(--ink); opacity: 0.85; }
.b-pole { stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }
.w-building--simulate { --c: var(--quest); --d: var(--quest-deep); }
.w-building--certify { --c: var(--certify); --d: var(--certify-deep); }
.w-building--execute { --c: var(--execute); --d: var(--execute-deep); }
.b-roof-l { fill: var(--d); }
.b-roof-r { fill: var(--c); }
.b-flag { fill: var(--c); }
.w-start-flag { fill: var(--ink); }
.t-body { fill: var(--quest); }
.t-head { fill: #8a64ea; }
.t-shine { fill: #fff; opacity: 0.55; }
.w-token-body { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }

.w-label { --c: var(--quest); --t: var(--quest); }
.w-label--certify { --c: var(--certify); --t: var(--certify-text); }
.w-label--execute { --c: var(--execute); --t: var(--execute-text); }
.w-label rect { fill: #fff; stroke: var(--c); stroke-width: 2; filter: drop-shadow(0 4px 6px rgb(22 28 69 / 0.12)); }
.w-label text { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--t); }
.l-check { fill: #fff; stroke: var(--c); stroke-width: 2; transition: fill 0.25s ease; }
.l-tick { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.25s ease; }
.w-label.is-done .l-check { fill: var(--c); }
.w-label.is-done .l-tick { opacity: 1; }
.w-label.is-done { animation: pop 0.45s cubic-bezier(.34,1.56,.64,1); transform-box: fill-box; }
@keyframes pop { 40% { scale: 1.12; } }

/* Tableau de bord de quête */
.hud {
  position: absolute; left: 0; bottom: 2%;
  width: min(270px, 62%); padding: 1rem 1.1rem 1.05rem;
  background: #fff; border-radius: var(--radius-m);
  box-shadow: 0 2px 0 var(--line), 0 24px 40px -18px rgb(22 28 69 / 0.28);
}
.hud__head { display: flex; gap: 0.75rem; align-items: center; }
.hud__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--quest-tint); color: var(--quest); }
.hud__quest { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.98rem; line-height: 1.2; }
.hud__step { margin: 0.1rem 0 0; font-size: 0.85rem; color: var(--ink-mute); }
.hud__xp { height: 10px; margin-top: 0.85rem; border-radius: 99px; background: #edf0f7; overflow: hidden; }
.hud__xp span {
  display: block; height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--quest), var(--certify), var(--execute));
  transform-origin: left; transform: scaleX(var(--hud-xp, 0)); transition: transform 0.5s ease;
}
.hud__badges { display: flex; gap: 0.5rem; margin-top: 0.8rem; list-style: none; }
.hud__badges li {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: #edf0f7; color: #b3b9cf; transition: background-color 0.3s ease, color 0.3s ease;
}
.hud__badges .icon { width: 16px; height: 16px; }
.hud__badges li.is-earned[data-badge="1"] { background: var(--quest); color: #fff; }
.hud__badges li.is-earned[data-badge="2"] { background: var(--certify); color: #fff; }
.hud__badges li.is-earned[data-badge="3"] { background: var(--execute); color: #fff; }
@media (max-width: 520px) { .hud { position: relative; width: 100%; margin-top: 1rem; } }

/* --------------------------------------------------------------------------
   Tableau des indicateurs
   -------------------------------------------------------------------------- */
.stats__scroll { overflow-x: auto; border-radius: var(--radius-l); background: #fff; box-shadow: var(--shadow-soft); }
.section--tinted .stats__scroll { box-shadow: inset 0 0 0 1px var(--line); }
.stats table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; }
.stats th, .stats td { padding: 1.1rem 1rem; text-align: center; vertical-align: middle; }
.stats thead th { padding: 1.4rem 0.5rem 0.5rem; }
.stats thead th a {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 0.75rem; border-radius: 12px;
  color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  background: var(--sc); box-shadow: 0 4px 0 color-mix(in srgb, var(--sc) 70%, #000);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.stats thead th a:hover { transform: translateY(-1px); box-shadow: 0 5px 0 color-mix(in srgb, var(--sc) 70%, #000); }
.stats tbody th {
  display: flex; align-items: center; gap: 0.8rem; min-width: 250px;
  text-align: left; font-weight: 600; font-size: 0.95rem; color: var(--ink); line-height: 1.3;
}
.stats tbody th .icon { color: var(--quest); width: 22px; height: 22px; }
.stats thead th a span { white-space: nowrap; }
.stats tbody tr + tr > * { border-top: 1px solid var(--line); }
.stats td { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--st); letter-spacing: -0.01em; white-space: nowrap; transition: background-color 0.15s ease; }
.stats .stats__stakes td { font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--ink-soft); white-space: normal; line-height: 1.4; }
.stats td.is-hot { background: color-mix(in srgb, var(--sc) 7%, #fff); }
.stats__note { display: flex; align-items: flex-start; gap: 0.5rem; margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--ink-mute); }
.stats__note .icon { margin-top: 0.15em; }

.stats--single table { min-width: 0; }

.sector-bank { --sc: var(--bank); --st: var(--bank); }
.sector-insurance { --sc: var(--insurance); --st: var(--insurance); }
.sector-industry { --sc: var(--industry); --st: var(--industry); }
.sector-energy { --sc: var(--energy); --st: var(--energy); }
.sector-services { --sc: var(--services); --st: var(--services); }

/* --------------------------------------------------------------------------
   Triade Simuler / Certifier / Exécuter
   -------------------------------------------------------------------------- */
.triad {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0; font-size: clamp(2.6rem, 5.4vw, 5rem); font-weight: 650; line-height: 1; letter-spacing: -0.02em;
}
.t-simulate { color: var(--quest); }
.t-certify { color: var(--certify); }
.t-execute { color: var(--execute); }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.pillar { padding-top: 1.5rem; border-top: 3px solid var(--pc); }
.pillar--simulate { --pc: var(--quest); --pt: var(--quest-tint); }
.pillar--certify { --pc: var(--certify); --pt: var(--certify-tint); }
.pillar--execute { --pc: var(--execute); --pt: var(--execute-tint); }
.pillar__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 14px; background: var(--pt); color: var(--pc); }
.pillar p { font-size: 1.08rem; margin: 0; }
.pillars__coda { margin: clamp(3rem, 6vw, 4.5rem) 0 0; max-width: 34em; font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 500; color: var(--ink); line-height: 1.3; letter-spacing: 0; }
.triad--small { display: block; margin-top: 1rem; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.site-footer .t-simulate { color: #a98bf5; }
.site-footer .t-certify { color: #4fd1c1; }
.site-footer .t-execute { color: #ffa55c; }
@media (max-width: 760px) {
  .triad, .pillars { grid-template-columns: 1fr; }
  .triad { gap: 0.2rem; }
}

/* --------------------------------------------------------------------------
   Chemin de quête (étapes)
   -------------------------------------------------------------------------- */
.quest-path { list-style: none; position: relative; }
.quest-path__step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 1.5rem; padding-bottom: 2.75rem; }
.quest-path__step:last-child { padding-bottom: 0; }
.quest-path__step:not(:last-child)::before {
  content: ""; position: absolute; left: 27px; top: 62px; bottom: 6px;
  border-left: 3px dashed #cfc3f3;
}
.quest-path__node {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--quest); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  box-shadow: 0 5px 0 var(--quest-deep);
}
.quest-path__step:last-child .quest-path__node { background: var(--execute); box-shadow: 0 5px 0 var(--execute-deep); }
.quest-path__body { padding-top: 0.6rem; }
.quest-path__body h3 { margin-bottom: 0.35rem; }
.quest-path__body p { margin: 0; max-width: 34em; }

/* --------------------------------------------------------------------------
   Fonctionnalités
   -------------------------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem); }
.feature { display: grid; grid-template-columns: 60px 1fr; gap: 1.25rem; align-items: start; }
.feature__icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px;
  background: var(--quest-tint); color: var(--quest); box-shadow: 0 4px 0 #dcd1fa;
}
.feature__icon .icon { width: 28px; height: 28px; }
.feature:nth-child(3n+2) .feature__icon { background: var(--certify-tint); color: var(--certify); box-shadow: 0 4px 0 #bfe7e1; }
.feature:nth-child(3n) .feature__icon { background: var(--execute-tint); color: var(--execute); box-shadow: 0 4px 0 #f9d6b5; }
.feature__title { font-size: 1.3rem; font-weight: 600; margin: 0.3rem 0 0.4rem; line-height: 1.25; }
.feature p { margin: 0; }
.feature--more a { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 1.5rem 1.75rem; border-radius: var(--radius-m); background: var(--quest-tint); color: var(--quest-deep); text-decoration: none; box-shadow: 0 4px 0 #dcd1fa; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.feature--more a:hover { color: var(--quest-deep); transform: translateY(-2px); box-shadow: 0 6px 0 #cbbaf7; }
.feature--more strong { font-family: var(--font-display); font-size: 1.2rem; }
.features--detailed { grid-template-columns: 1fr; gap: 0; }
.features--detailed .feature { grid-template-columns: 76px minmax(0, 1fr); padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.features--detailed .feature:first-child { border-top: 0; padding-top: 0; }
.features--detailed .feature__icon { width: 76px; height: 76px; border-radius: 22px; }
.features--detailed .feature__icon .icon { width: 34px; height: 34px; }
.features--detailed .feature__title { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.02em; }
.features--detailed .feature > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem 3rem; }
.features--detailed .feature > div > :is(h2, p) { grid-column: 1; }
.features--detailed .checklist { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .features--detailed .feature > div { grid-template-columns: 1fr; }
  .features--detailed .checklist { grid-column: 1; grid-row: auto; margin-top: 1rem; }
}
@media (max-width: 520px) {
  .features--detailed .feature { grid-template-columns: 1fr; gap: 1rem; }
}

.checklist { list-style: none; display: grid; gap: 0.7rem; }
.checklist li { display: flex; gap: 0.65rem; align-items: flex-start; }
.checklist .icon { color: var(--certify); margin-top: 0.2em; }

/* --------------------------------------------------------------------------
   Tuiles secteurs
   -------------------------------------------------------------------------- */
.sector-tiles { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.sector-tile a {
  display: flex; flex-direction: column; height: 100%; padding: 1.5rem 1.35rem 1.4rem;
  background: #fff; border-radius: var(--radius-m); text-decoration: none; color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 0 color-mix(in srgb, var(--sc) 85%, #fff);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.section--tinted .sector-tile a { background: var(--canvas); }
.sector-tile a:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), 0 10px 0 var(--sc); color: var(--ink-soft); }
.sector-tile a:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px var(--line), 0 2px 0 var(--sc); }
.sector-tile__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sc); color: #fff; margin-bottom: 1.25rem; }
.sector-tile__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.sector-tile__stakes { margin-top: 0.5rem; font-size: 0.95rem; line-height: 1.45; flex: 1; }
.sector-tile__stat { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-mute); }
.sector-tile__stat strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--st); }
@media (max-width: 1080px) { .sector-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .sector-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .sector-tiles { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Bénéfices et confiance
   -------------------------------------------------------------------------- */
.benefits { list-style: none; display: grid; gap: 1.1rem; margin-top: 2rem; }
.benefits li { display: flex; align-items: center; gap: 1rem; font-size: 1.12rem; color: var(--ink); font-weight: 500; }
.benefits__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--certify-tint); color: var(--certify); }
.trust-card { padding: clamp(2rem, 4vw, 3rem); border-radius: var(--radius-l); background: var(--ink); color: #c9cde4; }
.trust-card h2 { color: #fff; }
.trust-card__icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 1.5rem; border-radius: 18px; background: var(--certify); color: #fff; box-shadow: 0 5px 0 var(--certify-deep); }
.trust-card__icon .icon { width: 30px; height: 30px; }
.trust-card .text-link { color: #fff; text-decoration-color: rgb(255 255 255 / 0.4); }

/* --------------------------------------------------------------------------
   Feuille de route
   -------------------------------------------------------------------------- */
.roadmap { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; border-top: 3px dashed #cdd3e4; }
.roadmap__item { position: relative; padding-top: 2.6rem; }
.roadmap__dot { position: absolute; top: 0; left: 0; width: 25px; height: 25px; border-radius: 50%; background: var(--canvas); border: 4px solid #b9c0d6; }
.section--tinted .roadmap__dot { background: #fff; }
.roadmap__item--live .roadmap__dot { background: var(--certify); border-color: var(--certify); box-shadow: 0 0 0 5px var(--certify-tint); }
.roadmap__item--next .roadmap__dot { border-color: var(--quest); }
.roadmap__status { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 99px; font-size: 0.8rem; font-weight: 700; background: #eceff6; color: var(--ink-mute); }
.roadmap__item--live .roadmap__status { background: var(--certify-tint); color: var(--certify-text); }
.roadmap__item--next .roadmap__status { background: var(--quest-tint); color: var(--quest-deep); }
.roadmap__item h3 { margin: 0.8rem 0 0.35rem; font-size: 1.12rem; }
.roadmap__item p { margin: 0; font-size: 0.95rem; }
@media (max-width: 900px) {
  .roadmap { grid-template-columns: 1fr; gap: 0; }
  .roadmap::before { left: 11px; right: auto; top: 12px; bottom: 12px; border-top: 0; border-left: 3px dashed #cdd3e4; }
  .roadmap__item { padding: 0 0 2rem 3rem; }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 0.75rem; }
.faq__item { border-radius: var(--radius-m); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.section--tinted .faq__item { background: var(--canvas); box-shadow: none; }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; cursor: pointer; list-style: none; border-radius: inherit;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { margin: 0; font-size: 1.1rem; }
.faq__chevron { color: var(--quest); transition: transform 0.2s ease; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__item p { margin: 0; padding: 0 1.5rem 1.4rem; max-width: 42em; }

/* --------------------------------------------------------------------------
   Appel à l'action
   -------------------------------------------------------------------------- */
.cta { padding-block: 0 var(--section); }
.section--tinted + .cta { padding-top: var(--section); background: linear-gradient(var(--paper) 50%, var(--canvas) 50%); }
.cta__panel {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius-l); background: var(--ink); color: #c9cde4; overflow: hidden;
}
.cta__panel h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.cta__panel p { margin: 0; max-width: 34em; }
.cta__tiles { position: relative; width: 104px; height: 90px; }
.cta__tiles span { position: absolute; width: 52px; height: 52px; border-radius: 10px; transform: rotate(45deg) skew(-10deg, -10deg); }
.cta__tiles span:nth-child(1) { left: 0; top: 24px; background: var(--quest); }
.cta__tiles span:nth-child(2) { left: 26px; top: 4px; background: var(--certify); }
.cta__tiles span:nth-child(3) { left: 52px; top: 24px; background: var(--execute); }
@media (max-width: 820px) {
  .cta__panel { grid-template-columns: 1fr; }
  .cta__tiles { display: none; }
}

/* --------------------------------------------------------------------------
   Pages internes
   -------------------------------------------------------------------------- */
.mini-facts { list-style: none; display: grid; gap: 1rem; }
.mini-facts li { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: var(--radius-m); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 600; }
.mini-facts .icon { color: var(--quest); width: 24px; height: 24px; }

.modules { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.module { padding: 1.5rem; border-radius: var(--radius-m); background: var(--canvas); }
.module__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border-radius: 12px; background: #fff; color: var(--quest); box-shadow: 0 3px 0 var(--line); }
.module h3 { margin-bottom: 0.3rem; }
.module p { margin: 0; font-size: 0.97rem; }
.deploy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.deploy__option { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; border-radius: var(--radius-m); box-shadow: inset 0 0 0 2px var(--line); }
.deploy__option > .icon { width: 30px; height: 30px; color: var(--certify); }
.deploy__option h3 { margin-bottom: 0.2rem; }
.deploy__option p { margin: 0; }
@media (max-width: 900px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modules, .deploy { grid-template-columns: 1fr; } }

.sector-hero__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.5rem; border-radius: 18px; background: var(--sc); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--sc) 70%, #000); }
.sector-hero__icon .icon { width: 30px; height: 30px; }

.challenges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.challenge { padding-top: 1.25rem; border-top: 3px solid var(--ink); }
.challenge p { margin: 0; }
@media (max-width: 760px) { .challenges { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.kpi { padding: 1.4rem; border-radius: var(--radius-m); background: var(--canvas); }
.kpi dt { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.92rem; line-height: 1.35; color: var(--ink-soft); }
.kpi dt .icon { color: var(--st); margin-top: 0.05em; }
.kpi dd { margin: 0.75rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--st); letter-spacing: -0.02em; line-height: 1; }
@media (max-width: 440px) { .kpis { grid-template-columns: 1fr; } }

.quest-cards { list-style: none; display: grid; gap: 0.9rem; }
.quest-card { display: flex; align-items: center; gap: 1.25rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-m); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.quest-card p { margin: 0; color: var(--ink); font-weight: 500; }
.quest-card__level { flex: none; padding: 0.3rem 0.7rem; border-radius: 99px; background: var(--quest-tint); color: var(--quest-deep); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .quest-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; } }

.pill-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.pill-links a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 99px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line);
}
.pill-links a .icon { color: var(--sc, var(--quest)); }
.pill-links a:hover { box-shadow: inset 0 0 0 2px var(--sc, var(--quest)); }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem); }
.principle__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.25rem; border-radius: 16px; background: var(--certify-tint); color: var(--certify); box-shadow: 0 4px 0 #bfe7e1; }
.principle p { margin: 0; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .principles { grid-template-columns: 1fr; } }

.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose__meta { color: var(--ink-mute); font-size: 0.95rem; }

.not-found { text-align: left; }
.not-found__code { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 16vw, 9rem); line-height: 1; letter-spacing: -0.02em; color: var(--quest-tint); -webkit-text-stroke: 2px var(--quest); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__form-wrap { padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius-l); background: #fff; box-shadow: var(--shadow-soft); }
.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__group { border: 0; margin: 0; padding: 0; }
.form__group legend, .field label { display: block; margin-bottom: 0.45rem; font-weight: 650; color: var(--ink); font-size: 0.97rem; }
.field__optional { font-weight: 400; color: var(--ink-mute); font-size: 0.88rem; margin-left: 0.25rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3.1rem; padding: 0.75rem 0.95rem;
  border: 2px solid var(--line); border-radius: 12px; background: var(--canvas);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.field select {
  appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b3fd3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #cbd3e4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--quest); background: #fff; }
.field [aria-invalid="true"] { border-color: #c62f4d; background: #fff6f8; }
.field__error { margin: 0.4rem 0 0; color: #b0243f; font-size: 0.9rem; font-weight: 600; }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.field--check input { width: 22px; height: 22px; min-height: 0; margin: 0.15rem 0 0; accent-color: var(--quest); }
.field--check label { font-weight: 400; color: var(--ink-soft); margin: 0; }
.field--check .field__error { grid-column: 2; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 480px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 3.1rem; padding: 0.65rem 1rem;
  border-radius: 12px; background: var(--canvas); box-shadow: inset 0 0 0 2px var(--line);
  font-weight: 600; color: var(--ink); line-height: 1.25;
  transition: box-shadow 0.12s ease, background-color 0.12s ease, transform 0.12s ease;
}
.choice:hover span { box-shadow: inset 0 0 0 2px #cbd3e4; }
.choice input:checked + span { background: var(--quest-tint); color: var(--quest-deep); box-shadow: inset 0 0 0 2px var(--quest), 0 3px 0 var(--quest); transform: translateY(-2px); }
.choice input:focus-visible + span { outline: 3px solid var(--quest); outline-offset: 2px; }

.form-status { display: flex; gap: 0.85rem; align-items: flex-start; margin-bottom: 1.5rem; padding: 1.1rem 1.25rem; border-radius: var(--radius-m); font-weight: 600; }
.form-status[hidden] { display: none; }
.form-status p { margin: 0; }
.form-status .icon { width: 26px; height: 26px; }
.form-status.is-success { background: var(--certify-tint); color: var(--certify-text); margin-bottom: 0; animation: pop 0.45s cubic-bezier(.34,1.56,.64,1); }
.form-status.is-error { background: #fdecef; color: #9e1f38; }

.contact__aside { padding-top: 0.5rem; }
.next-steps { list-style: none; counter-reset: step; display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; }
.next-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--quest-tint); color: var(--quest-deep); font-family: var(--font-display); font-weight: 700;
}
.next-steps strong { color: var(--ink); }
.contact__direct { display: grid; gap: 0.35rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.contact__direct p { margin: 0; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer { padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem; background: var(--ink); color: #aab0cf; font-size: 0.97rem; }
.site-footer a { color: #dfe2f1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; display: grid; gap: 0.55rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.site-footer__brand p { margin: 1rem 0 0; max-width: 22em; }
.site-footer__title { margin-bottom: 1rem; font-size: 1rem; color: #fff; letter-spacing: 0; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 0.9rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Accessibilité : mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .xp-bar, .cta, .site-footer, .hud { display: none; }
  body { background: #fff; }
}

/* Tableau des indicateurs sur petit écran : libellés figés pendant le défilement */
@media (max-width: 760px) {
  .stats tbody th { min-width: 170px; position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 8px 0 12px -10px rgb(22 28 69 / 0.25); }
  .stats thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
  .stats table { min-width: 780px; }
}
