/* ==========================================================================
   Be Consulting - feuille de style unique
   Direction : papier clair + bleu marine du logo, accent « signal » orange.
   Motif conducteur : les trois barres inclinées du « E » du logo.
   ========================================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
    --paper: #F4F2EE;
    --paper-2: #EBE8E1;
    --white: #FFFFFF;
    --ink: #0E1B2B;
    --navy: #0B1D33;
    --navy-2: #12304F;
    --navy-3: #08162A;
    --blue: #34638F;          /* bleu du « b » */
    --blue-deep: #1F4F7F;     /* bleu des barres du « E » */
    --blue-sky: #8FB3DB;
    --signal: #FF5A1F;

    /* jetons sémantiques (redéfinis dans [data-theme=dark]) */
    --bg: var(--paper);
    --fg: var(--ink);
    --fg-2: #3D4B5D;
    --muted: #6B7685;
    --line: rgb(14 27 43 / .12);
    --card: var(--white);

    --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
    --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --nav-h: 68px;
    --gutter: clamp(16px, 4.5vw, 72px);
    --maxw: 1320px;
    --radius: 24px;
    --ease: cubic-bezier(.22, .8, .16, 1);
}

[data-theme="dark"] {
    --bg: var(--navy);
    --fg: #EEF2F7;
    --fg-2: rgb(238 242 247 / .74);
    --muted: rgb(238 242 247 / .5);
    --line: rgb(255 255 255 / .12);
    --card: var(--navy-2);
    color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 400 17px/1.6 var(--f-body);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }

/* ---------- Logo (monogramme vectoriel) ---------- */
.logomark { display: block; height: 100%; width: auto; overflow: visible; }
.logomark__b { fill: var(--blue); }
.logomark__bars { fill: var(--blue-deep); }

/* ---------- Surlignage « barre du E » ---------- */
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::after {
    content: ""; position: absolute; z-index: -1;
    left: -.06em; right: -.1em; bottom: .04em; height: .3em;
    background: var(--signal);
    clip-path: polygon(.22em 0, 100% 0, calc(100% - .22em) 100%, 0 100%);
    transform-origin: left; transition: transform 1s var(--ease) .35s;
}
.js .hl:not(.hl--static)::after { transform: scaleX(0); }
.js .is-in .hl::after, .js .hl.is-in::after { transform: none; }

/* ---------- Petites barres inclinées (sur-titres) ---------- */
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 600 14px/1.2 var(--f-body); letter-spacing: .02em; color: var(--blue); }
[data-theme="dark"] .eyebrow { color: var(--blue-sky); }
.eyebrow__bars {
    flex: none; width: 22px; height: 13px; transform: skewX(-28deg);
    background:
        linear-gradient(var(--signal), var(--signal)) 0 0 / 100% 3px no-repeat,
        linear-gradient(var(--signal), var(--signal)) 0 5px / 72% 3px no-repeat,
        linear-gradient(var(--signal), var(--signal)) 0 10px / 100% 3px no-repeat;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
    font: 600 16px/1 var(--f-body); cursor: pointer; white-space: nowrap;
    transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--blue-deep); }
.btn--line { border-color: currentColor; }
.btn--line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--signal { background: var(--signal); color: #fff; }
.btn--signal:hover { background: #ff7442; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Navigation ---------- */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
    display: flex; align-items: center; gap: 20px; padding: 0 var(--gutter);
    background: rgb(244 242 238 / .78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgb(14 27 43 / .08);
    transition: background .4s, color .4s, border-color .4s;
}
.nav.is-dark { background: rgb(11 29 51 / .72); color: #EEF2F7; border-color: rgb(255 255 255 / .08); }
.nav.is-dark .logomark__b { fill: #fff; }
.nav.is-dark .logomark__bars { fill: var(--blue-sky); }
.brand { display: flex; align-items: center; gap: 10px; height: 36px; }
.brand .logomark__b, .brand .logomark__bars { transition: fill .4s; }
.brand__word { font: 650 21px/1 var(--f-display); letter-spacing: -.03em; padding-top: 10px; }
.nav__chapter {
    position: relative; height: 20px; overflow: hidden; min-width: 130px;
    padding-left: 16px; border-left: 1px solid currentColor; opacity: .55;
    font: 500 14px/20px var(--f-body);
}
.nav__chapter-in { display: block; transition: transform .45s var(--ease), opacity .45s; }
.nav__chapter-in.is-out { transform: translateY(-100%); opacity: 0; }
.nav__links { margin-left: auto; display: flex; gap: 4px; }
.nav__links a { position: relative; padding: 8px 12px; font: 500 15px/1 var(--f-body); border-radius: 999px; transition: background .2s; }
.nav__links a:hover { background: rgb(14 27 43 / .06); }
.nav.is-dark .nav__links a:hover { background: rgb(255 255 255 / .08); }
.nav__links a.is-active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px;
    background: var(--signal); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.nav__cta { padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--f-body); transition: background .25s; }
.nav__cta:hover { background: var(--signal); }
.nav.is-dark .nav__cta { background: #fff; color: var(--ink); }
.nav.is-dark .nav__cta:hover { background: var(--signal); color: #fff; }
.nav__burger { display: none; }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--blue), var(--signal)); }

.menu {
    position: fixed; inset: var(--nav-h) 0 0; z-index: 99; background: var(--paper);
    display: flex; flex-direction: column; padding: 24px var(--gutter) 40px; overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu a { font: 700 clamp(22px, 6.2vw, 36px)/1.25 var(--f-display); letter-spacing: -.03em; padding: 11px 0; border-bottom: 1px solid var(--line); }
.menu a:last-child { color: var(--signal); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 270vh; background: var(--navy); }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__behind { position: absolute; inset: 0; display: grid; place-items: center; background: var(--navy); }
.hero__glow {
    position: absolute; inset: -20%;
    background:
        radial-gradient(35% 35% at 55% 55%, rgb(79 143 214 / .35), transparent 70%),
        radial-gradient(25% 25% at 40% 40%, rgb(255 90 31 / .18), transparent 70%);
    animation: glow 12s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: rotate(25deg) scale(1.1); } }
.hero__next {
    position: relative; margin: 0; padding: 0 var(--gutter); text-align: center;
    font: 700 clamp(36px, 6vw, 96px)/1.02 var(--f-display); letter-spacing: -.035em;
    opacity: var(--next, 0); transform: translateY(calc((1 - var(--next, 0)) * 30px));
}
.hero__portal { position: absolute; inset: 0; pointer-events: none; }
.hero__mask {
    position: absolute; overflow: visible;
    right: 7vw; top: 50%;
    height: min(74vh, 58vw); width: auto; aspect-ratio: 1070 / 1300;
    transform: translateY(-44%);
    /* Le zoom est fait en réduisant le viewBox (JS) : le tracé reste vectoriel et net à toute échelle. */
}
.hero__paper { fill: var(--paper); }
.hero__mask .bar { transform-box: fill-box; animation: barIn 1.1s var(--ease) both; }
.hero__mask .bar--1 { animation-delay: .25s; }
.hero__mask .bar--2 { animation-delay: .4s; fill: var(--signal); }
.hero__mask .bar--3 { animation-delay: .55s; }
.hero__mask .logomark__b { animation: fadeUp 1.1s var(--ease) both; }
@keyframes barIn { from { transform: translateX(70%); opacity: 0; } }
@keyframes fadeUp { from { transform: translateY(24px); opacity: 0; } }

.hero__copy {
    position: absolute; z-index: 2; left: var(--gutter); top: 50%;
    width: min(680px, 52vw); transform: translateY(calc(-46% - var(--lift, 0) * 80px));
    opacity: var(--copy, 1);
}
.hero__copy > * { animation: fadeUp 1s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: .08s; }
.hero__copy > :nth-child(3) { animation-delay: .16s; }
.hero__copy > :nth-child(4) { animation-delay: .24s; }
.hero__title { font-size: clamp(44px, 6.2vw, 104px); line-height: .98; letter-spacing: -.04em; font-weight: 750; }
.hero__lead { margin: 28px 0 0; max-width: 540px; font-size: clamp(17px, 1.35vw, 20px); color: var(--fg-2); }
.hero__ctas { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero__hint {
    position: absolute; z-index: 2; left: var(--gutter); bottom: 28px; margin: 0;
    display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); opacity: var(--copy, 1);
}
.hero__hint span { width: 1.5px; height: 36px; background: var(--ink); transform-origin: top; animation: hint 2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Sections ---------- */
.section { position: relative; background: var(--bg); padding: clamp(104px, 15vh, 176px) var(--gutter); }
.section > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { margin-bottom: clamp(48px, 8vh, 96px); }
.section__head--split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.section__head--split .lead { margin: 0; }
.title { font-size: clamp(40px, 5.6vw, 92px); line-height: 1; letter-spacing: -.04em; max-width: 15ch; }
.title--xl { font-size: clamp(48px, 6.6vw, 112px); }
.lead { margin: 28px 0 0; max-width: 620px; font-size: clamp(17px, 1.3vw, 20px); color: var(--fg-2); }

/* Titres : mots qui montent depuis un masque */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w__in { display: inline-block; transition: transform 1s var(--ease); transition-delay: calc(var(--wi, 0) * 40ms); }
.js [data-split]:not(.is-in) .w__in { transform: translateY(110%); }

.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }

/* ---------- 01 IA : cartes empilées ---------- */
.section--ia { padding-top: clamp(64px, 10vh, 120px); }
.deck { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 7vh; }
.deck__card {
    position: sticky; top: calc(var(--nav-h) + 3vh + var(--i) * 16px);
    min-height: min(560px, 72vh);
    display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 4vw, 64px); align-items: center;
    padding: clamp(28px, 4vw, 56px); border-radius: 28px;
    background: linear-gradient(160deg, #163A60, var(--navy-2) 60%); border: 1px solid var(--line);
    box-shadow: 0 -20px 60px -30px rgb(0 0 0 / .6);
    transform: scale(var(--s, 1)); transform-origin: 50% 0; filter: brightness(var(--b, 1));
}
.deck__n { font: 600 15px/1 var(--f-mono); color: var(--signal); }
.deck__n small { color: var(--muted); font-size: inherit; }
.deck__card h3 { margin: 18px 0 16px; font-size: clamp(30px, 3.2vw, 52px); line-height: 1.02; letter-spacing: -.035em; }
.deck__card p { margin: 0; color: var(--fg-2); max-width: 520px; }
.trace { margin: 0; border-radius: 18px; background: #07172A; border: 1px solid var(--line); overflow: hidden; }
.trace figcaption { display: flex; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.trace figcaption i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .16); }
.trace figcaption i:first-child { background: var(--signal); }
.trace pre { margin: 0; padding: 22px 20px 26px; white-space: normal; font: 400 14px/1.8 var(--f-mono); color: #BFD3EA; overflow-x: auto; }
.trace pre span { display: block; white-space: pre; min-height: 1.8em; }
.trace .cm { color: rgb(191 211 234 / .5); }
.trace .ok { color: #5EE0A0; }
.trace .ans { color: #FFB38F; }
.js .trace pre span { opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s var(--ease); transition-delay: calc(var(--l) * 110ms + .15s); }
.js .deck__card.is-in .trace pre span { opacity: 1; transform: none; }

/* ---------- 02 Expertises : liste-accordéon pilotée par le scroll ---------- */
.xlist { list-style: none; margin: 0 auto; padding: 0; border-top: 1px solid var(--line); }
.xrow {
    position: relative; display: grid; grid-template-columns: 72px 1fr 120px; column-gap: 24px; align-items: start;
    padding: 28px 0; border-bottom: 1px solid var(--line); cursor: default;
}
.xrow__n { font: 500 15px/1 var(--f-mono); color: var(--muted); padding-top: .9em; transition: color .3s; }
.xrow__title { font-size: clamp(28px, 3.8vw, 58px); line-height: 1.05; letter-spacing: -.035em; color: var(--muted); transition: color .4s; }
.xrow__more { grid-column: 2; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.xrow__more > div { overflow: hidden; }
.xrow__more p { margin: 16px 0 0; max-width: 640px; color: var(--fg-2); }
.xrow__bars { grid-column: 3; grid-row: 1; justify-self: end; display: grid; gap: 6px; padding-top: 14px; transform: skewX(-28deg); }
.xrow__bars i { display: block; height: 6px; width: 0; background: var(--signal); justify-self: end; transition: width .6s var(--ease); }
.xrow__bars i:nth-child(2) { transition-delay: .06s; }
.xrow__bars i:nth-child(3) { transition-delay: .12s; }
.xrow.is-active .xrow__title, .xrow:hover .xrow__title { color: var(--ink); }
.xrow.is-active .xrow__n, .xrow:hover .xrow__n { color: var(--signal); }
.xrow.is-active .xrow__more, .xrow:hover .xrow__more { grid-template-rows: 1fr; }
.xrow.is-active .xrow__bars i, .xrow:hover .xrow__bars i { width: 80px; }
.xrow.is-active .xrow__bars i:nth-child(2), .xrow:hover .xrow__bars i:nth-child(2) { width: 56px; }
html:not(.js) .xrow__more { grid-template-rows: 1fr; }
html:not(.js) .xrow__title { color: var(--ink); }

.toolbox { margin-top: clamp(80px, 12vh, 128px); }
.toolbox__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.toolbox__head h3 { font-size: clamp(30px, 3vw, 44px); letter-spacing: -.035em; }
.toolbox__head p { margin: 0; max-width: 440px; color: var(--fg-2); }
.toolbox__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tool { padding: 32px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.tool:nth-child(2) { --delay: .08s; background: var(--navy); color: #EEF2F7; border-color: transparent; }
.tool:nth-child(3) { --delay: .16s; }
.tool__n { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 14px/1 var(--f-body); color: var(--signal); letter-spacing: .02em; }
.tool h4 { margin: 16px 0 10px; font: 700 clamp(24px, 2vw, 30px)/1.1 var(--f-display); letter-spacing: -.03em; }
.tool__lead { margin: 0 0 8px; color: var(--fg-2); }
.tool:nth-child(2) .tool__lead { color: rgb(238 242 247 / .72); }
.tool__label { margin: 22px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tool:nth-child(2) .tool__label { color: var(--blue-sky); }
.tool .pills { gap: 8px; }
.tool .pills li { padding: 7px 13px; font-size: 14px; background: var(--paper); border-color: transparent; }
.tool:nth-child(2) .pills li { background: rgb(255 255 255 / .08); color: #EEF2F7; }
.tool .pills li:hover { background: var(--signal); color: #fff; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li { padding: 10px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.pills li:hover { background: var(--blue-deep); color: #fff; transform: translateY(-2px); }

/* ---------- 03 Références ---------- */
.section--clients { background: var(--paper-2); overflow: hidden; }
.kpis { margin: 0 auto 80px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding: 28px; border-radius: var(--radius); background: var(--white); }
.kpis > div:nth-child(2) { --delay: .08s; } .kpis > div:nth-child(3) { --delay: .16s; } .kpis > div:nth-child(4) { --delay: .24s; }
.kpis dd { margin: 0; font: 750 clamp(44px, 5vw, 76px)/1 var(--f-display); letter-spacing: -.045em; color: var(--blue-deep); }
.kpis dt { color: var(--fg-2); font-size: 15px; }

.logos { max-width: none !important; margin-inline: calc(var(--gutter) * -1) !important; display: grid; gap: 16px; }
.logos__row { overflow: hidden; padding-block: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos__track { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; width: max-content; will-change: transform; }
.logo {
    flex: none; width: 260px; height: 132px; border-radius: 20px; background: var(--white);
    display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 18px 22px 14px;
    border: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
/* Taille calculée côté serveur (SiteContent.Client) : le cadre a exactement les proportions du logo. */
.logo img { display: block; max-width: 100%; height: auto; transition: transform .4s var(--ease); }
.logo span { font-size: 12px; color: var(--muted); }
.logo:hover { border-color: var(--blue); box-shadow: 0 10px 30px -18px rgb(31 79 127 / .5); }
.logo:hover img { transform: scale(1.06); }

.quote { margin: clamp(80px, 12vh, 140px) auto 0; }
.quote blockquote { margin: 0; }
.quote p { margin: 0; max-width: 24ch; font: 650 clamp(30px, 3.8vw, 58px)/1.1 var(--f-display); letter-spacing: -.03em; }
.quote figcaption { margin-top: 24px; color: var(--muted); }

/* ---------- 04 Méthode : scroll horizontal épinglé ---------- */
.hscroll { position: relative; height: 430vh; background: var(--paper); }
.hscroll__stage {
    position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; gap: 44px;
    padding: var(--nav-h) 0 0 var(--gutter);
}
.hscroll__track {
    list-style: none; margin: 0; padding: 0 30vw 0 0; display: flex; gap: 20px; width: max-content;
    transform: translate3d(calc(var(--hp, 0) * var(--hmax, 0px) * -1), 0, 0); will-change: transform;
}
.panel {
    position: relative; width: clamp(300px, 32vw, 480px); min-height: clamp(320px, 48vh, 440px);
    padding: 34px; border-radius: var(--radius); background: var(--white);
    display: flex; flex-direction: column;
}
.panel__n { font: 800 110px/.8 var(--f-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--signal); }
.panel h3 { margin: auto 0 12px; font-size: clamp(30px, 2.8vw, 44px); letter-spacing: -.035em; }
.panel p { margin: 0; color: var(--fg-2); }
.panel--signal { background: var(--blue-deep); color: #fff; }
.panel--signal .panel__n { -webkit-text-stroke-color: rgb(255 255 255 / .6); }
.panel--signal p { color: rgb(255 255 255 / .8); }
.panel--signal .btn { margin-top: 24px; align-self: flex-start; }
.hscroll__road { margin-right: var(--gutter); height: 6px; transform: skewX(-28deg); background: var(--paper-2); }
.hscroll__road i { display: block; height: 100%; width: calc(var(--hp, 0) * 100%); background: var(--signal); }

/* ---------- 05 Équipe ---------- */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.person { border-radius: var(--radius); background: var(--white); overflow: hidden; }
.person + .person { --delay: .1s; }
.person__photo { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: grayscale(1) contrast(1.05); transition: filter .7s var(--ease), transform 1.2s var(--ease); }
.person:hover .person__photo img, .person:focus-within .person__photo img { filter: none; transform: scale(1.04); }
.person__body { padding: 28px 32px 34px; }
.person__role { margin: 6px 0 16px; color: var(--blue); font-weight: 600; font-size: 17px; letter-spacing: .01em; }
.person h3 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.person p:not(.person__role) { margin: 0 0 20px; color: var(--fg-2); }
.link { font-weight: 600; border-bottom: 2px solid var(--signal); padding-bottom: 2px; }
.link:hover { color: var(--signal); }

/* ---------- 06 FAQ ---------- */
.section--faq { background: var(--paper-2); }
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { font-size: clamp(20px, 2vw, 28px); letter-spacing: -.02em; font-weight: 650; }
.faq__item p { margin: 0 0 28px; max-width: 820px; color: var(--fg-2); }
.faq__icon { flex: none; position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--white); transition: background .3s, transform .4s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: var(--ink); transition: transform .4s var(--ease), background .3s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--signal); transform: rotate(180deg); }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: #fff; }
.faq__item[open] .faq__icon::after { transform: rotate(0); }

/* ---------- 07 Contact ---------- */
.section--contact { background: radial-gradient(60% 80% at 100% 100%, rgb(79 143 214 / .22), transparent 60%), var(--navy); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__info { margin: 48px 0 0; display: grid; gap: 18px; }
.contact__info > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.contact__info dt { color: var(--muted); }
.contact__info dd { margin: 0; color: var(--fg-2); }
.contact__info a { border-bottom: 1px solid var(--signal); }
.form { display: grid; gap: 18px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); background: rgb(255 255 255 / .05); border: 1px solid var(--line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; }
.form label > span { font-size: 14px; color: var(--fg-2); }
.form input, .form select, .form textarea {
    width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--fg);
    background: rgb(255 255 255 / .06); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
    transition: border-color .2s, background .2s;
}
.form select option { color: var(--ink); }
.form textarea { resize: vertical; min-height: 150px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--signal); background: rgb(255 255 255 / .1); }
.form [aria-invalid="true"] { border-color: #FF8A8A; }
.form .hp { position: absolute; left: -9999px; }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__status { margin: 0; font-size: 15px; }
.form__status.ok { color: #5EE0A0; }
.form__status.err { color: #FF8A8A; }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; background: var(--navy-3); padding: 96px var(--gutter) 28px; }
.footer > * { position: relative; max-width: var(--maxw); margin-inline: auto; }
.footer__top { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; padding-bottom: 64px; border-bottom: 1px solid var(--line); }
.footer__claim { margin: 0; font: 700 clamp(36px, 5vw, 76px)/1 var(--f-display); letter-spacing: -.04em; }
.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 56px 0 120px; }
.footer__grid > * { display: flex; flex-direction: column; gap: 10px; font-style: normal; color: var(--fg-2); }
.footer__grid a:hover { color: var(--signal); }
.footer__h { margin-bottom: 6px; font: 600 14px/1 var(--f-body); letter-spacing: .04em; color: var(--muted); }
.footer__mark { position: absolute !important; right: -4vw; bottom: -16vw; height: 52vw; max-width: none !important; opacity: .07; pointer-events: none; }
.footer__mark .logomark__b, .footer__mark .logomark__bars { fill: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- Ascenseur latéral : où en est-on dans la page ? ---------- */
:root { --rail-w: 52px; }
.rail[hidden] { display: none !important; }
.rail {
    position: fixed; z-index: 90; top: var(--nav-h); right: 0; bottom: 0; width: var(--rail-w);
    background: var(--paper); border-left: 1px solid rgb(14 27 43 / .1); color: var(--ink);
    transition: background .4s, color .4s, border-color .4s;
}
.rail.is-dark { background: var(--navy-3); color: #EEF2F7; border-color: rgb(255 255 255 / .08); }
.rail__track {
    position: absolute; inset: 20px 0 28px; opacity: .9;
    background:
        repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 10%) right 0 top 0 / 16px 100% no-repeat,
        repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 2%) right 0 top 0 / 7px 100% no-repeat;
}
.rail__fill { position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px; height: calc(var(--p, 0) * 100%); background: linear-gradient(var(--blue), var(--signal)); }
.rail__mark { position: absolute; right: 0; left: 0; height: 18px; margin-top: -9px; display: block; cursor: pointer; }
.rail__mark::before {
    content: ""; position: absolute; left: 10px; top: 7px; width: 18px; height: 4px; transform: skewX(-28deg);
    background: currentColor; opacity: .35; transition: opacity .3s, background .3s, width .3s;
}
.rail__mark.is-past::before { opacity: .7; }
.rail__mark.is-active::before { background: var(--signal); opacity: 1; width: 26px; }
.rail__mark span {
    position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%); white-space: nowrap;
    padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--paper);
    font: 500 13px/1 var(--f-body); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.rail:hover .rail__mark span { opacity: 1; transform: translate(0, -50%); }
.rail__mark:hover span { background: var(--signal); color: #fff; }
.rail__cursor { position: absolute; left: 0; right: 0; top: calc(var(--p, 0) * 100%); height: 2px; margin-top: -1px; background: var(--signal); pointer-events: none; }
.rail__pct {
    position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
    font: 600 12px/1 var(--f-mono); color: var(--signal); white-space: nowrap;
}
.rail:hover .rail__pct { opacity: 0; }
@media (min-width: 1181px) {
    main, .footer { margin-right: var(--rail-w); }
}
/* Version compacte (tablette / mobile) : une règle fine dans la marge droite, sans réserver de place. */
@media (max-width: 1180px) {
    :root { --rail-w: 12px; }
    .rail { background: transparent; border: 0; pointer-events: none; }
    .rail.is-dark { background: transparent; }
    .rail__track {
        inset: 14px 0 18px;
        background:
            repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 10%) right 0 top 0 / 8px 100% no-repeat,
            repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 2%) right 0 top 0 / 4px 100% no-repeat;
        opacity: .45;
    }
    .rail__fill { left: auto; right: 0; margin: 0; width: 2px; }
    .rail__mark { height: 8px; margin-top: -4px; }
    .rail__mark::before { left: auto; right: 0; top: 2px; width: 8px; height: 3px; opacity: .6; }
    .rail__mark.is-active::before { width: 12px; }
    .rail__mark span { display: none; }
    .rail__cursor { left: -4px; height: 3px; border-radius: 2px; }
    .rail__pct {
        right: calc(100% + 4px); padding: 3px 5px; border-radius: 6px; font-size: 10px;
        background: var(--signal); color: #fff; opacity: 0; transition: opacity .3s;
    }
    .rail.is-scrolling .rail__pct { opacity: 1; }
}

/* ---------- Pages simples ---------- */
.page { max-width: 860px; margin: 0 auto; padding: calc(var(--nav-h) + 96px) var(--gutter) 120px; }
.page h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -.04em; margin: 0 0 40px; }
.page h2 { font-size: 22px; margin: 40px 0 10px; }
.page p { color: var(--fg-2); }
.optout { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding: 14px 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.optout input { width: 20px; height: 20px; accent-color: var(--signal); }
.optout:has(input:disabled) { opacity: .7; cursor: default; }
.optout__status { margin-top: 10px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .nav__links, .nav__chapter { display: none; }
    .nav__cta { margin-left: auto; }
    .nav__burger {
        display: grid; gap: 5px; place-content: center; width: 44px; height: 44px; margin-right: -10px;
        background: none; border: 0; color: inherit; cursor: pointer;
    }
    .nav__burger span { display: block; width: 22px; height: 2px; background: currentColor; transform: skewX(-28deg); transition: transform .3s, opacity .3s, width .3s; }
    .nav__burger span:nth-child(2) { width: 16px; justify-self: end; }
    .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toolbox__grid { grid-template-columns: 1fr 1fr; }
    .tool:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    :root { --nav-h: 60px; }
    body { font-size: 16px; }
    .brand { height: 30px; }
    .brand__word { font-size: 18px; padding-top: 8px; }
    .nav__cta { padding: 10px 14px; font-size: 14px; }
    .hero { height: 220vh; }
    .hero__copy { top: calc(var(--nav-h) + 28px); width: auto; right: var(--gutter); transform: translateY(calc(var(--lift, 0) * -60px)); }
    .hero__title { font-size: clamp(35px, 10vw, 56px); }
    /* Titres un cran plus petits sur petit écran (environ -12 %) */
    .title { font-size: clamp(31px, 8.6vw, 40px); }
    .title--xl { font-size: clamp(36px, 10vw, 48px); }
    .xrow__title { font-size: 24px; }
    .toolbox__head h3 { font-size: 26px; }
    .tool h4 { font-size: 22px; }
    .kpis dd { font-size: 38px; }
    .quote p { font-size: 25px; }
    .panel h3 { font-size: 26px; }
    .person h3 { font-size: 26px; }
    .person__role { font-size: 16px; }
    .faq__item h3 { font-size: 18px; }
    .footer__claim { font-size: 31px; }
    .hero__lead { margin-top: 18px; }
    .hero__ctas { margin-top: 24px; }
    .hero__ctas .btn { flex: 1 1 auto; }
    .hero__ctas .btn--line { display: none; }   /* la section IA suit juste après : on libère la place pour le logo */
    /* Position et taille calculées en JS dans l'espace libre sous le texte (repli : bas d'écran). */
    .hero__mask { right: auto; left: 50%; top: var(--logo-top, auto); bottom: auto; height: var(--logo-h, 30vh); transform: translateX(-50%); }
    html:not(.js) .hero__mask { top: auto; bottom: 7vh; }
    .hero__hint { display: none; }
    .section__head--split, .contact, .team, .form__row, .deck__card, .toolbox__grid { grid-template-columns: 1fr; }
    /* Cartes IA empilées aussi sur mobile : version compacte qui tient dans un écran. */
    .deck { gap: 4vh; padding-bottom: 6vh; }
    .deck__card {
        top: calc(var(--nav-h) + 10px + var(--i) * 8px);
        min-height: 0; gap: 16px; padding: 22px 20px; border-radius: 22px;
        max-height: calc(100svh - var(--nav-h) - 20px - var(--i) * 8px); overflow: hidden;
    }
    .deck__card h3 { margin: 10px 0 8px; font-size: 23px; }
    .deck__card p { font-size: 15px; line-height: 1.5; }
    .deck__card .chips { margin-top: 12px; gap: 6px; }
    .deck__card .chips li { padding: 4px 10px; font-size: 12px; }
    .trace figcaption { padding: 9px 12px; }
    .trace pre { padding: 12px 14px 14px; font-size: 11px; line-height: 1.6; }
    .trace pre span { min-height: 1.6em; }
    .xrow { grid-template-columns: 44px 1fr; }
    .xrow__bars { display: none; }
    .kpis > div { padding: 20px; }
    .logo { width: 200px; height: 112px; }
    .logo img { max-width: 85%; }
    .hscroll { height: auto; }
    .hscroll__stage { position: relative; height: auto; padding: 104px var(--gutter); }
    .hscroll__track { width: auto; flex-direction: column; padding: 0; transform: none; }
    .panel { width: 100%; min-height: 260px; }
    .hscroll__road { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .contact__info > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 800px) and (max-height: 640px) {
    .deck__card .trace { display: none; }
}

@media (max-height: 700px) and (min-width: 801px) {
    .hero__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    html { scroll-behavior: auto; }
    .hero { height: auto; }
    .hero__stage { position: relative; }
}
