/* Orvok — éléments communs à toutes les pages : navigation, menu mobile, dernière section et pied de page,
   transitions, cookies, curseur. Classes préfixées x- pour ne jamais entrer en conflit avec une page. */
:root {
  --x-font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --x-serif: "Instrument Serif", Georgia, serif;
  --x-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --x-ink: #151513;
  --x-ink-2: #5d5c56;
  --x-ink-3: #8b8a83;
  --x-line: #e7e5df;
  --x-pad: clamp(16px, 4.6vw, 48px);
  --x-wrap: 1180px;
  --x-expo: cubic-bezier(.16, 1, .3, 1);
  --x-font-display: var(--x-font);
  --x-font-body: var(--x-font);
  --x-nav: 60px;
}

/* ---------------- Transitions entre pages ---------------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: x-vt-out .22s ease both; }
::view-transition-new(root) { animation: x-vt-in .5s var(--x-expo) both; }
@keyframes x-vt-out { to { opacity: 0; } }
@keyframes x-vt-in { from { opacity: 0; transform: translateY(10px); } }
.x-curtain { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: #fff; opacity: 0; transition: opacity .3s ease; }
html.x-leaving .x-curtain { opacity: 1; pointer-events: auto; }
html.x-entering .x-curtain { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .x-curtain { display: none; }
}

/* ---------------- Navigation ---------------- */
.x-nav { position: absolute; inset: 0 0 auto 0; z-index: 60; height: var(--x-nav); color: var(--x-ink); background: rgba(246, 245, 241, .72); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); box-shadow: 0 1px 0 var(--x-line); transition: transform .6s var(--x-expo), background .4s ease; font-family: var(--x-font-body); letter-spacing: -.01em; }
.x-nav.on-dark { color: #f6f5f1; background: rgba(12, 13, 11, .62); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.x-nav-in { width: 100%; max-width: calc(var(--x-wrap) + 2 * var(--x-pad)); height: 100%; margin: 0 auto; padding: 0 var(--x-pad); display: flex; align-items: center; gap: 36px; }
.x-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.x-brand svg { width: 20px; height: 20px; fill: currentColor; transition: transform 1s var(--x-expo); }
.x-brand:hover svg { transform: rotate(90deg); }
.x-brand span { font-family: var(--x-font-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.x-links { display: flex; gap: 22px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.x-links a { position: relative; font-size: 14px; color: inherit; text-decoration: none; opacity: .78; transition: opacity .2s; }
.x-links a::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform .45s var(--x-expo); }
.x-links a:hover, .x-links a[aria-current="page"] { opacity: 1; }
.x-links a[aria-current="page"]::after { transform: scale(1); }
.x-side { display: flex; align-items: center; gap: 14px; }
.x-cta { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; background: var(--x-ink); color: #fff; transition: transform .5s var(--x-expo), box-shadow .3s; }
.x-nav.on-dark .x-cta { background: #fff; color: var(--x-ink); }
.x-cta:hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.x-cta:active { transform: scale(.96); }

.x-burger { display: none; position: relative; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.x-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .5s var(--x-expo), top .5s var(--x-expo); }
.x-burger span:nth-child(1) { top: 16px; } .x-burger span:nth-child(2) { top: 23px; }
.x-menu-open .x-burger span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.x-menu-open .x-burger span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }
.x-menu { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--x-nav) + 24px) var(--x-pad) calc(28px + env(safe-area-inset-bottom)); background: rgba(245, 245, 247, .97); -webkit-backdrop-filter: saturate(1.8) blur(24px); backdrop-filter: saturate(1.8) blur(24px); color: var(--x-ink); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; font-family: var(--x-font-body); }
.x-menu-open .x-menu { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.x-menu-open .x-nav { color: var(--x-ink); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.x-menu ul { margin: 0; padding: 0; list-style: none; }
.x-menu li { overflow: hidden; border-bottom: 1px solid var(--x-line); }
.x-menu li a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; color: inherit; font-family: var(--x-font-display); font-size: 30px; font-weight: 600; letter-spacing: -.025em; text-decoration: none; transform: translateY(100%); opacity: 0; transition: transform .8s var(--x-expo), opacity .6s ease; }
.x-menu li a svg { width: 18px; height: 18px; color: #86868b; }
.x-menu-open .x-menu li a { transform: none; opacity: 1; }
.x-menu-open .x-menu li:nth-child(2) a { transition-delay: .04s; } .x-menu-open .x-menu li:nth-child(3) a { transition-delay: .08s; }
.x-menu-open .x-menu li:nth-child(4) a { transition-delay: .12s; } .x-menu-open .x-menu li:nth-child(5) a { transition-delay: .16s; }
.x-menu-open .x-menu li:nth-child(6) a { transition-delay: .2s; }
.x-menu-cta { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 999px; background: var(--x-ink); color: #fff; font-size: 17px; font-weight: 500; text-decoration: none; }
body.x-locked { overflow: hidden; }
/* La barre reste en haut de la page : elle ne suit pas le défilement. */
html { scroll-padding-top: 16px; }
.controls { top: 10px; }
@media (max-width: 1000px) {
  :root { --nav-h: 100px; --x-nav: 100px; }
  .x-nav { height: auto; }
  .x-nav-in { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 8px; }
  .x-brand { height: 44px; }
  .x-burger { display: block; }
  .x-side { margin-left: auto; gap: 10px; }
  .x-links { order: 3; flex: 0 0 100%; gap: 20px; margin: 0; padding: 6px 0 12px; overflow-x: auto; scrollbar-width: none; }
  .x-links::-webkit-scrollbar { display: none; }
  .x-links a { display: block; white-space: nowrap; }
  .x-links a::after { display: none; }
  .x-menu-open .x-links { visibility: hidden; }
}
@media (max-width: 374px) { .x-links { gap: 10px; } .x-links a { font-size: 13px; } }
.x-menu { overflow-y: auto; }

/* ---------------- Formulaire e-mail (haut de page et dernière section) ---------------- */
.x-end-form { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--x-line), 0 14px 30px -20px rgba(21, 21, 19, .25); transition: box-shadow .2s; }
.x-end-form:focus-within { box-shadow: 0 0 0 1.5px var(--x-ink), 0 14px 30px -20px rgba(21, 21, 19, .25); }
.x-end-form input { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 8px 0 18px; border: 0; background: none; color: var(--x-ink); font: 400 16px var(--x-font); letter-spacing: -.012em; outline: none; }
.x-end-form input::placeholder { color: var(--x-ink-3); }
.x-end-form button { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--x-ink); color: #fff; font: 500 15px var(--x-font); letter-spacing: -.012em; white-space: nowrap; cursor: pointer; transition: transform .4s var(--x-expo), background .2s; }
.x-end-form button:hover { background: #33332f; }
.x-end-form button:active { transform: scale(.97); }
.x-end-form button svg { width: 14px; height: 14px; transition: transform .4s var(--x-expo); }
.x-end-form button:hover svg { transform: translateX(3px); }
@media (max-width: 520px) {
  .x-end-form { flex-direction: column; align-items: stretch; border-radius: 26px; }
  .x-end-form input { height: 44px; text-align: center; padding: 0 12px; }
  .x-end-form button { justify-content: center; }
}

/* ---------------- Dernière section ---------------- */
.x-end { padding: clamp(32px, 4vw, 56px) var(--x-pad); background: #fff; font-family: var(--x-font); }
.x-end-card { position: relative; max-width: var(--x-wrap); margin: 0 auto; border-radius: 28px; overflow: hidden; isolation: isolate; color: #fff; text-align: center; background: #1779b9; }
.x-end-bg { position: absolute; inset: 0; z-index: -1; }
.x-end-bg img, .x-end-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.x-end-bg::after { content: ""; position: absolute; inset: 0 0 auto; height: 62%; background: linear-gradient(180deg, rgba(5, 42, 74, .5), rgba(5, 42, 74, 0)); }
.x-end-bg video { opacity: 0; transition: opacity 1.2s ease; }
.x-end-bg video.ready { opacity: 1; }
.x-end-stage { display: flex; flex-direction: column; align-items: center; min-height: clamp(520px, 50vw, 640px); padding: clamp(40px, 6vw, 76px) var(--x-pad); }
.x-end-eyebrow { margin: 0; font-family: var(--x-mono); font-size: 13px; letter-spacing: -.02em; opacity: .9; }
.x-end-title { margin: 12px 0 0; font-family: var(--x-serif); font-style: italic; font-weight: 400; font-size: clamp(50px, 6.6vw, 92px); line-height: 1; letter-spacing: -.02em; }
.x-end-lede { text-shadow: 0 1px 14px rgba(5, 42, 74, .7); max-width: 480px; margin: 12px 0 0; font-size: clamp(15.5px, 1.3vw, 18px); line-height: 1.4; text-wrap: pretty; }
.x-end-stage .x-end-form { width: 100%; max-width: 440px; margin-top: 22px; box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .45); }

/* ---------------- Pied de page ---------------- */
.x-foot { position: relative; padding: clamp(48px, 6vw, 80px) var(--x-pad) 0; background: #111110; color: #f6f5f1; font-family: var(--x-font); overflow: hidden; }
.x-foot-in { max-width: var(--x-wrap); margin: 0 auto; }
.x-foot-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .6fr)); gap: 32px; }
.x-foot-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.x-foot-brand svg { width: 20px; height: 20px; fill: currentColor; }
.x-foot-brand span { font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.x-foot-tag { max-width: 300px; margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: #a3a29b; }
.x-foot h3 { margin: 3px 0 0; font-family: var(--x-mono); font-size: 12px; font-weight: 400; letter-spacing: .02em; color: #8b8a83; }
.x-foot ul { margin: 12px 0 0; padding: 0; list-style: none; }
.x-foot li { line-height: 29px; }
.x-foot li a { font-size: 14.5px; color: #f6f5f1; text-decoration: none; transition: opacity .2s; }
.x-foot li a:hover, .x-foot li a[aria-current="page"] { opacity: .6; }
.x-foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; margin-top: clamp(32px, 4vw, 52px); padding-top: 20px; border-top: 1px solid #2c2c29; font-size: 13px; color: #8b8a83; }
.x-foot-row p { margin: 0; }
.x-foot-word { margin: 20px 0 0; font-size: clamp(110px, 25vw, 380px); font-weight: 650; line-height: .8; letter-spacing: -.06em; text-align: center; color: #232320; user-select: none; height: .62em; overflow: hidden; }
@media (max-width: 760px) {
  .x-end-bg img, .x-end-bg video { object-position: 78% 100%; }
  .x-foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .x-foot-top > :first-child { grid-column: 1 / -1; }
}

/* ---------------- Révélations ---------------- */
.motion [data-x-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform 1s var(--x-expo); }
.motion [data-x-reveal].is-in { opacity: 1; transform: none; }
.failsafe [data-x-reveal] { opacity: 1 !important; transform: none !important; }
.x-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.x-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- Cookies ---------------- */
.x-cookie { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 95; width: min(360px, calc(100vw - 32px)); padding: 18px; border-radius: 20px; color: var(--x-ink); background: #fff; box-shadow: 0 0 0 1px var(--x-line), 0 24px 50px -24px rgba(21, 21, 19, .35); font-family: var(--x-font); letter-spacing: -.012em; opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .6s var(--x-expo); }
.x-cookie.on { opacity: 1; transform: none; }
.x-ck-title { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; }
.x-ck-text { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--x-ink-2); }
.x-ck-act { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.x-ck-more { margin-right: auto; font-size: 13px; color: var(--x-ink); text-underline-offset: 3px; }
.x-ck-act button { height: 36px; padding: 0 15px; border: 0; border-radius: 999px; font: 500 13.5px var(--x-font); cursor: pointer; transition: transform .4s var(--x-expo), background .2s; }
.x-ck-act button:active { transform: scale(.96); }
.x-ck-no { color: var(--x-ink); background: #f6f5f1; }
.x-ck-no:hover { background: #ecebe6; }
.x-ck-yes { color: #fff; background: var(--x-ink); }
.x-ck-act button.cur { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--x-ink); }
@media (prefers-reduced-motion: reduce) { .x-cookie { transition: none; } }

/* ---------------- Curseur rond ---------------- */
.x-cur { position: fixed; left: 0; top: 0; z-index: 2147483000; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0; will-change: transform; transition: opacity .25s ease; }
.x-cur.on { opacity: 1; }
.x-cur.is-text { opacity: 0; }
html.x-cur-on, html.x-cur-on body, html.x-cur-on a, html.x-cur-on button, html.x-cur-on label, html.x-cur-on [role="button"], html.x-cur-on summary { cursor: none; }
html.x-cur-on :is(input, textarea, select, [contenteditable="true"]) { cursor: auto; }
@media (hover: none), (pointer: coarse) { .x-cur { display: none; } }

/* ---------------- Retour en haut ---------------- */
.x-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 58; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: var(--x-ink); background: #fff; box-shadow: 0 0 0 1px var(--x-line), 0 10px 24px -12px rgba(21, 21, 19, .3); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s ease, transform .5s var(--x-expo), visibility 0s linear .3s; cursor: pointer; }
.x-top.on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .5s var(--x-expo); }
.x-top svg { width: 15px; height: 15px; }

/* ---------------- Page suivante ---------------- */
.x-next { display: block; color: var(--x-ink); background: #fff; text-decoration: none; border-top: 1px solid var(--x-line); font-family: var(--x-font); }
.x-next-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: calc(var(--x-wrap) + 2 * var(--x-pad)); margin: 0 auto; padding: clamp(32px, 4.4vw, 56px) var(--x-pad); }
.x-next small { display: block; font-family: var(--x-mono); font-size: 13px; letter-spacing: -.02em; color: var(--x-ink-3); }
.x-next b { display: block; margin-top: 6px; font-size: clamp(24px, 3vw, 38px); font-weight: 600; line-height: 1.1; letter-spacing: -.033em; }
.x-next em { display: block; margin-top: 4px; font-style: normal; font-size: 15px; color: var(--x-ink-2); }
.x-next-arr { display: grid; place-items: center; flex: none; width: 52px; aspect-ratio: 1; border-radius: 50%; background: var(--x-ink); color: #fff; transition: transform .5s var(--x-expo); }
.x-next-arr svg { width: 18px; height: 18px; transition: transform .5s var(--x-expo); }
.x-next:hover .x-next-arr svg { transform: translateX(3px); }

/* ---------------- Titres : les mots montent ---------------- */
.x-split .xw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .14em 0; margin: 0 -.06em -.14em 0; }
.x-split .xwi { display: inline-block; will-change: transform; }
.x-split em .xw { padding-top: .04em; margin-top: -.04em; }

/* Aucune animation ne doit créer de défilement horizontal (sans casser les éléments collants). */
html { overflow-x: clip; }

/* ============ ANIMATIONS RESTAUREES ============ */
.motion [data-x-reveal] { opacity: 0; transform: perspective(1000px) translate3d(0, 40px, -80px) rotateX(16deg); filter: blur(6px); transform-origin: 50% 0; transition: opacity .9s cubic-bezier(.22, .65, .28, 1), transform 1.3s var(--x-expo), filter .9s ease; }
.motion [data-x-reveal].is-in { opacity: 1; transform: none; filter: none; }
.failsafe [data-x-reveal] { opacity: 1 !important; transform: none !important; }
.x-split .xw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; perspective: 600px; }
.x-split .xwi { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.x-read { position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 2px; background: var(--x-ink); transform-origin: left center; transform: scaleX(0); pointer-events: none; }
.x-end-bg { will-change: transform; }
.has-orb { position: relative; isolation: isolate; }
.orb-cv { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
.lost .orb-cv { opacity: .35; }
::view-transition-new(root) { animation: x-vt-circle .9s cubic-bezier(.7, 0, .2, 1) both; }
::view-transition-old(root) { animation: x-vt-back .9s cubic-bezier(.7, 0, .2, 1) both; }
@keyframes x-vt-circle { from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 50%)); } to { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 50%)); } }
@keyframes x-vt-back { to { transform: scale(.94); filter: brightness(.6) blur(4px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-new(root), ::view-transition-old(root) { animation: none; } }

/* Clavier : lien d'évitement, visible seulement au focus. */
.skip { position: fixed; top: 10px; left: 10px; z-index: 10000; padding: 10px 16px; border-radius: 999px; background: #111; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }

/* Téléphone : les six pages tiennent sur une ligne, sans défilement, « Appel » compris. */
@media (max-width: 480px) {
  .x-links, .nav-links, .home .nav-links { justify-content: space-between; gap: 6px; }
  .x-links a, .nav-links a, .home .nav-links a { font-size: 13px; letter-spacing: -.015em; }
}
@media (max-width: 359px) {
  .x-links, .nav-links, .home .nav-links { gap: 4px; }
  .x-links a, .nav-links a, .home .nav-links a { font-size: 12px; }
}

/* Survol : les liens de la barre doivent être des boîtes pour pouvoir grossir. */
.nav-links a, .x-links a { display: inline-block; }

/* ===== Carte de fin : anneau-turbine dessiné en direct (js/ring.js) ===== */
.x-end-card { background: #040605; }
.x-end-bg::after { display: none; }
.x-end-bg { will-change: auto; }
.x-end-bg canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.x-ring-bloom { z-index: 1; mix-blend-mode: screen; opacity: .9; }
.x-end-stage { justify-content: flex-start; min-height: 0; padding-top: clamp(230px, 30vw, 380px); }
.x-end-eyebrow { color: #8fd6b8; opacity: 1; }
.x-end-lede { text-shadow: none; color: rgba(255, 255, 255, .8); }
.x-tw-line { display: inline; }
.x-caret { display: inline-block; width: .045em; height: .8em; margin-left: .08em; vertical-align: -.04em; background: #8fd6b8; border-radius: 1px; }
.x-caret.off { opacity: 0; }
@media (max-width: 640px) {
  .x-end-stage { padding-top: 210px; }
  .x-tw-w { display: block; }   /* le mot tapé a sa propre ligne : rien ne saute quand il change */
}
@media (prefers-reduced-motion: reduce) { .x-caret { display: none; } }
