/* ═══════════════════════════════════════════════════════════════
   CURUBI — L'atelier du logiciel sur mesure
   ═══════════════════════════════════════════════════════════════ */

@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette */
    --navy: #101D32;
    --navy-deep: #0B1526;
    --light: #8CBDF4;
    --light-deep: #4F86C2;
    --ivory: #F2EDE5;
    --ivory-soft: #F8F5F0;
    --white: #FFFFFF;
    --ink: #101D32;
    --muted: #5D6775;
    --line: rgba(16, 29, 50, .12);
    --danger: #B0473D;

    /* Typographie */
    --font-display: "Manrope", system-ui, sans-serif;
    --font-text: "DM Sans", system-ui, sans-serif;

    /* Mise en page */
    --gutter: clamp(24px, 9vw, 155px);
    --gutter-nav: clamp(24px, 6vw, 100px);

    /* Mouvement : des courbes longues, sans à-coups */
    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-soft: cubic-bezier(.45, 0, .2, 1);
}

/* ── Base ─────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: var(--ivory-soft);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }

::selection { background: var(--light); color: var(--navy); }

:focus-visible {
    outline: 2px solid var(--light);
    outline-offset: 4px;
    border-radius: 2px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 99px;
    background: var(--white);
    color: var(--navy);
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform .4s var(--ease);
}
.skip-link:focus { transform: none; }

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

/* ── Transitions entre pages (navigateurs compatibles) ──────── */

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: page-out .45s var(--ease-soft) both; }
::view-transition-new(root) { animation: page-in .8s var(--ease) both; }

@keyframes page-out { to { opacity: 0; filter: blur(6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* ── Boutons ──────────────────────────────────────────────────── */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 54px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.005em;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), box-shadow .6s var(--ease), translate .7s var(--ease);
}

/* Reflet de lumière qui traverse le bouton au survol */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 1.1s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }

.btn-arrow {
    display: inline-block;
    font-family: system-ui, sans-serif;
    transition: transform .6s var(--ease);
}
.btn:hover .btn-arrow,
.direct-card:hover .btn-arrow { transform: translate(3px, -3px); }
.btn:hover .btn-arrow-down { transform: translateY(4px); }

.btn-primary { background: var(--light); color: var(--navy); }
.btn-primary:hover { background: #A9CFF8; box-shadow: 0 14px 40px -12px rgba(140, 189, 244, .65); }

.btn-glass {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .35);
    color: var(--white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .6); }

.btn-ghost { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }

.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark::before { background: linear-gradient(110deg, transparent 30%, rgba(140, 189, 244, .35) 50%, transparent 70%); }
.btn-dark:hover { background: #1A2B47; box-shadow: 0 18px 40px -18px rgba(16, 29, 50, .7); }

.btn-small { min-height: 44px; padding: 10px 20px; font-size: 14px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.actions-center { justify-content: center; gap: 18px 26px; }

/* ── En-tête ──────────────────────────────────────────────────── */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 26px var(--gutter-nav);
    color: var(--white);
    transition: transform .9s var(--ease), opacity .7s var(--ease), padding .7s var(--ease), background-color .7s var(--ease), box-shadow .7s var(--ease);
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(16, 29, 50, .74);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    opacity: 0;
    transition: opacity .7s var(--ease);
}

.site-header.is-solid { padding-block: 14px; }
.site-header.is-solid::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-105%); }

.brand { display: block; padding: 6px 0; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.brand-logo { width: auto; height: 21px; }

/* Accueil : la vidéo porte déjà la marque, le logo n'apparaît qu'en défilant. */
.page-home .brand { opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden; }
.page-home .site-header.is-solid .brand { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

/* Accueil : tout l'en-tête reste caché sur l'image d'ouverture et n'apparaît qu'après elle.
   (Avec JavaScript seulement ; il réapparaît aussi dès qu'un de ses liens reçoit le focus clavier.) */
.js .page-home .site-header:not(.is-solid):not(:focus-within) {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.nav { display: flex; align-items: center; gap: 34px; margin-left: auto; font-size: 14px; }

.nav-link { position: relative; opacity: .88; transition: opacity .4s; }
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .7s var(--ease);
}
.nav-link:hover { opacity: 1; }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Sélecteur de langue : FR · EN, chaque langue sur son domaine.
   Fixé hors de l'en-tête pour rester visible quand celui-ci se masque (image d'accueil, défilement),
   aligné sur son bouton ; l'en-tête lui réserve sa place à droite. */
.site-header { padding-right: calc(var(--gutter-nav) + var(--lang-switch-w) + 14px); }
:root { --lang-switch-w: 84px; }
.lang-switch {
    position: fixed;
    top: 26px;
    right: var(--gutter-nav);
    z-index: 51;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: var(--lang-switch-w);
    height: 44px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(16, 29, 50, .45);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    transition: top .7s var(--ease);
}
.site-header.is-solid + .lang-switch { top: 14px; }
.lang-switch > * { padding: 6px 4px; border-radius: 6px; }
.lang-current { opacity: 1; }
.lang-link { opacity: .5; transition: opacity .4s; }
.lang-link:hover,
.lang-link:focus-visible { opacity: 1; }
.nav-cta-short { display: none; }

/* Au survol (souris) de l'autre langue, ses lettres cèdent la place à une baguette (FR) ou à une tasse de thé fumante (EN). */
.lang-face { position: relative; display: inline-block; }
.lang-code { display: inline-block; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.lang-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    max-width: none;
    height: 22px;
    margin: -11px 0 0 -11px;
    fill: none;
    stroke: var(--light);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: translateY(5px) scale(.6);
    pointer-events: none;
    transition: opacity .4s var(--ease), transform .55s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
    .lang-link:hover .lang-code,
    .lang-link:focus-visible .lang-code { opacity: 0; transform: translateY(-5px) scale(.8); }
    .lang-link:hover .lang-icon,
    .lang-link:focus-visible .lang-icon { opacity: 1; transform: none; }
}
.lang-steam { animation: lang-steam 2.4s ease-in-out infinite; }
.lang-steam + .lang-steam { animation-delay: -1.2s; }
@keyframes lang-steam {
    0%   { opacity: 0; transform: translateY(2px); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
    .lang-icon,
    .lang-code { transition: opacity .3s; transform: none !important; }
    .lang-steam { animation: none; }
}
.lang-current + .lang-link::before,
.lang-link + .lang-current::before { content: "·"; margin-right: 8px; opacity: .5; }

/* ── Vidéo d'ouverture ────────────────────────────────────────── */

.hero {
    position: relative;
    height: 100svh;
    min-height: 640px;
    max-height: 1100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
}

.hero-media {
    position: absolute;
    inset: 0;
    will-change: transform;
}

/* Cadre de l'image : reproduit « object-fit: cover » + « object-position » (--fx, --fy),
   pour que l'image, ses effets et les points interactifs partagent les mêmes coordonnées. */
.hero-media,
.hero-spots { container-type: size; }

.hero-art {
    --fx: .5;
    --fy: .28;
    --w: max(100cqw, 150cqh);
    position: absolute;
    left: calc((100cqw - var(--w)) * var(--fx));
    top: calc((100cqh - var(--w) / 1.5) * var(--fy));
    width: var(--w);
    aspect-ratio: 3 / 2;
    container-type: inline-size;
}

.hero-media .hero-art { animation: hero-media-in 2.8s var(--ease) both; }

.hero-image { width: 100%; height: 100%; }

/* ── Calques de l'image d'accueil (parallaxe au survol, main.js) ── */
/* Les calques couvrent toute l'image (zones transparentes comprises) : ils laissent passer les clics,
   seul le dessin de veste reste manipulable. */
.hero-layers .layer { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.hero-layers .layer > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Écran holographique : texte en HTML, posé dans la perspective du panneau. */
.holo-screen {
    position: absolute;
    left: var(--holo-x, 14.58%);
    top: var(--holo-y, 22.65%);
    transform-origin: 0 0;
    /* Le texte suit la perspective du panneau : les lignes descendent vers la droite (≈ 8,5°). */
    transform: skewY(var(--holo-skew, 8.5deg));
    pointer-events: none;
}
.holo-text { display: flex; flex-direction: column; margin: 0; color: #F4F8FF; }
.holo-logo {
    display: block;
    width: var(--holo-logo-w, 10.7cqw);
    height: auto;
    color: #F4F8FF;
    filter: drop-shadow(0 0 .35cqw rgba(140, 189, 244, .75));
    opacity: .95;
}
.holo-tagline {
    margin-top: var(--holo-gap, 2.35cqw);
    font-family: var(--font-text);
    font-size: var(--holo-fs, 1.56cqw);
    font-weight: 400;
    line-height: var(--holo-lh, 1.5);
    letter-spacing: -.01em;
    white-space: nowrap;
    color: rgba(236, 244, 255, .92);
    text-shadow: 0 0 .45cqw rgba(140, 189, 244, .65);
}

/* Scintillement sur la lueur du panneau (sous le texte) : une seule étoile de lumière, au centre de la lueur
   (x 305, y 409 sur 1536 × 1024), toujours allumée, dont l'éclat varie doucement et irrégulièrement. */
.holo-glint {
    position: absolute;
    left: 19.86%;
    top: 39.94%;
    width: 0;
    height: 0;
    pointer-events: none;
}
.holo-glint i {
    position: absolute;
    left: -1.3cqw;
    top: -1.3cqw;
    width: 2.6cqw;
    height: 2.6cqw;
    background:
        radial-gradient(circle, #FFFFFF 0 5%, rgba(200, 228, 255, .9) 13%, rgba(140, 189, 244, .35) 26%, transparent 46%),
        linear-gradient(90deg, transparent, rgba(225, 240, 255, .95) 50%, transparent) 50% 50% / 100% 5% no-repeat,
        linear-gradient(0deg, transparent, rgba(225, 240, 255, .75) 50%, transparent) 50% 50% / 5% 58% no-repeat;
    mix-blend-mode: screen;
    opacity: .7;
    animation: holo-twinkle 6.4s ease-in-out infinite;
}
/* Éclat plus ou moins fort au fil du temps, sans jamais s'éteindre. */
@keyframes holo-twinkle {
    0%, 100% { opacity: .7;  transform: scale(.9); }
    18%      { opacity: 1;   transform: scale(1.05); }
    31%      { opacity: .55; transform: scale(.82); }
    47%      { opacity: .85; transform: scale(.97); }
    63%      { opacity: .5;  transform: scale(.8); }
    80%      { opacity: .95; transform: scale(1.02); }
}
.hero.is-offscreen .holo-glint i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .holo-glint i { animation: none; } }

/* Dessin de veste : on le fait tourner sur son axe vertical (glisser, lancer, flèches). */
.holo-jacket {
    position: absolute;
    left: 2.47%;
    top: 16.9%; /* 16,11 % = position du calque source ; abaissée d'environ 8 px (sur 1024) pour mieux tomber dans le panneau */
    width: 11.72%;
    height: 26.56%;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    cursor: grab;
    pointer-events: auto;
    perspective: 40cqw;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    animation: holo-float 6s var(--ease-soft) infinite alternate;
}
.holo-jacket:active { cursor: grabbing; }
.holo-jacket img {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotateY(var(--ry, 0deg));
    filter: drop-shadow(0 0 .3cqw rgba(140, 189, 244, .9));
    transition: filter .5s var(--ease);
    pointer-events: none;
}
.holo-jacket:hover img,
.holo-jacket:focus-visible img { filter: drop-shadow(0 0 .45cqw rgba(170, 214, 255, 1)) brightness(1.15); }
.holo-jacket:focus-visible { outline: 2px solid var(--light); outline-offset: 4px; }
@keyframes holo-float { from { translate: 0 0; } to { translate: 0 -.35cqw; } }
@media (prefers-reduced-motion: reduce) { .holo-jacket { animation: none; } }

/* ── La veste prend vie ── */
.hero-fx { position: absolute; inset: 0; pointer-events: none; }
.hero-fx > * { position: absolute; inset: 0; }

/* Masques découpés dans l'image : la veste (lueur, flux) et ses coutures (reflets). */
.fx-glow,
.fx-flow {
    -webkit-mask: url("../img/hero-mask-jacket.png") 0 0 / 100% 100% no-repeat;
    mask: url("../img/hero-mask-jacket.png") 0 0 / 100% 100% no-repeat;
}
.fx-lines {
    -webkit-mask: url("../img/hero-mask-lines.png") 0 0 / 100% 100% no-repeat;
    mask: url("../img/hero-mask-lines.png") 0 0 / 100% 100% no-repeat;
}

/* 1. La veste respire : une lueur bleu lumière qui monte et redescend. */
.fx-glow {
    background: radial-gradient(60% 70% at 66% 62%, rgba(170, 214, 255, .9), rgba(140, 189, 244, .35) 70%);
    mix-blend-mode: screen;
    opacity: 0;
    animation: fx-breathe 5.2s var(--ease-soft) 2.6s infinite;
}
@keyframes fx-breathe { 0%, 100% { opacity: .05; } 50% { opacity: .42; } }

/* 2. Le flux de données : des vagues de lumière parcourent les lignes de binaire. */
.fx-flow { overflow: hidden; mix-blend-mode: screen; }
.fx-flow i {
    position: absolute;
    top: -30%;
    left: 0;
    width: 34%;
    height: 160%;
    background: linear-gradient(90deg, transparent, rgba(205, 232, 255, .0) 20%, rgba(215, 238, 255, .95) 50%, rgba(205, 232, 255, 0) 80%, transparent);
    opacity: 0;
    transform: translateX(120%) rotate(24deg);
    filter: blur(5px);
    animation: fx-flow 4.6s linear 2.8s infinite;
}
.fx-flow i + i { width: 22%; animation-duration: 5.8s; animation-delay: 4.9s; --peak: .7; }
/* Le reflet glisse à vitesse régulière et apparaît / s'efface en fondu, sans à-coup. */
@keyframes fx-flow {
    0%   { opacity: 0; transform: translateX(120%) rotate(24deg); }
    22%  { opacity: var(--peak, 1); }
    62%  { opacity: var(--peak, 1); }
    88%  { opacity: 0; transform: translateX(400%) rotate(24deg); }
    100% { opacity: 0; transform: translateX(400%) rotate(24deg); }
}

/* 3. Les coutures s'illuminent : un éclat descend le long des arêtes de la veste. */
.fx-lines { overflow: hidden; mix-blend-mode: screen; }
.fx-lines i {
    position: absolute;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .95), transparent);
    opacity: 0;
    transform: translateY(80%);
    animation: fx-seam 5.2s linear 3.6s infinite;
}
@keyframes fx-seam {
    0%   { opacity: 0; transform: translateY(80%); }
    25%  { opacity: 1; }
    60%  { opacity: 1; }
    85%  { opacity: 0; transform: translateY(340%); }
    100% { opacity: 0; transform: translateY(340%); }
}

/* 4. Chiffres vivants (placés par main.js sur les flux de binaire) */
.fx-digit {
    position: absolute;
    color: #EAF5FF;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 1.05cqw;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 0 .35cqw #8CBDF4, 0 0 .9cqw rgba(140, 189, 244, .9);
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-16deg) scale(.7);
    transition: opacity .9s var(--ease), transform 1.2s var(--ease);
}
.fx-digit.is-on { opacity: .95; transform: translate(-50%, -50%) rotate(-16deg) scale(1); }

/* 5. Étincelles qui flottent */
.fx-sparks i {
    position: absolute;
    width: .32cqw;
    height: .32cqw;
    border-radius: 50%;
    background: #FFF6E8;
    box-shadow: 0 0 .6cqw .15cqw rgba(255, 226, 180, .85), 0 0 1.4cqw rgba(140, 189, 244, .6);
    opacity: 0;
    animation: fx-spark var(--t, 8s) var(--ease-soft) var(--d, 0s) infinite;
}
@keyframes fx-spark {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    20% { opacity: .9; }
    60% { opacity: .6; }
    100% { opacity: 0; transform: translate(1.4cqw, -4cqw) scale(1); }
}

/* Hors écran ou mouvement réduit : tout s'arrête. */
.hero.is-offscreen .hero-fx *,
.hero.is-offscreen .hero-fx { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .hero-fx { display: none; }
}

@keyframes hero-media-in {
    from { opacity: 0; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1); }
}

/* Voile très léger en haut (le texte de la vidéo reste lisible), plus dense en bas pour l'accroche. */
.hero-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(0deg, rgba(11, 21, 38, .94) 0%, rgba(11, 21, 38, .72) 24%, rgba(11, 21, 38, .18) 50%, rgba(11, 21, 38, 0) 64%),
        linear-gradient(180deg, rgba(11, 21, 38, .35) 0%, rgba(11, 21, 38, 0) 16%);
}

/* Accroche en bandeau bas : la moitié haute reste à la vidéo et à son titre. */
/* ── Points sur les personnages ── */

.hero-spots {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
    animation: spots-in 1.6s 2.4s var(--ease) both;
}
html:not(.js) .hero-spots { display: none; }

@keyframes spots-in { from { opacity: 0; } }

.spot { position: absolute; width: 0; height: 0; }
.spot[hidden] { display: none; }
.spot.is-open { z-index: 3; }

.spot-dot {
    position: absolute;
    left: -16px;
    top: -16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
}

/* Le point : une perle de lumière qui respire doucement. */
.spot-dot::before,
.spot-dot::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
}
.spot-dot::before {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 0 0 3px rgba(140, 189, 244, .35), 0 0 18px rgba(140, 189, 244, .8);
    transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.spot-dot::after {
    border: 1px solid rgba(255, 255, 255, .7);
    animation: spot-breathe 3.2s var(--ease-soft) infinite;
}
.spot + .spot .spot-dot::after { animation-delay: -1.6s; }

.spot:hover .spot-dot::before,
.spot.is-open .spot-dot::before,
.spot-dot:focus-visible::before { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(140, 189, 244, .4), 0 0 24px rgba(140, 189, 244, .9); }

@keyframes spot-breathe {
    0% { transform: scale(1); opacity: .8; }
    70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* La bulle : verre dépoli, apparition en douceur. */
.spot-card {
    position: absolute;
    left: 26px;
    top: -26px;
    width: 250px;
    padding: 16px 18px 17px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 6px;
    background: rgba(16, 29, 50, .62);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 24px 50px -24px rgba(7, 14, 28, .7);
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-6px);
    filter: blur(4px);
    pointer-events: none;
    transition: opacity .6s var(--ease), transform .8s var(--ease), filter .6s var(--ease), visibility 0s .6s;
}
.spot-left .spot-card { left: auto; right: 26px; transform: translateX(6px); }

.spot:hover .spot-card,
.spot.is-open .spot-card,
.spot:focus-within .spot-card {
    opacity: 1;
    visibility: visible;
    transform: none;
    filter: none;
    pointer-events: auto;
    transition: opacity .6s var(--ease), transform .8s var(--ease), filter .6s var(--ease), visibility 0s;
}

.spot-kicker { color: var(--light); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.spot-title { margin-top: 4px; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.03em; }
.spot-text { margin-top: 6px; color: #D5DDE8; font-size: 14px; line-height: 1.55; }

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 580px);
    gap: 24px clamp(40px, 6vw, 110px);
    align-items: end;
    padding: 0 var(--gutter-nav) clamp(96px, 12vh, 124px) var(--gutter);
    will-change: transform, opacity;
}

.hero-aside .actions { margin-top: 24px; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }

.hero-eyebrow { color: var(--light); animation: fade-up 1.4s .5s var(--ease) both; }

.hero-title {
    margin: 16px 0 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 3.1vw, 48px);
    line-height: 1.12;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.hero-title em { font-style: normal; color: #A9D1FB; }

.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; animation: line-rise 1.6s var(--ease) both; }
.hero-title .line:nth-child(1) > span { animation-delay: .65s; }
.hero-title .line:nth-child(2) > span { animation-delay: .8s; }

@keyframes line-rise { from { transform: translateY(105%); } }

/* ── Accroche « compilée » depuis le binaire (main.js) ── */

/* Avant le découpage par JavaScript : la phrase reste invisible (pas de flash),
   avec un filet de sécurité qui l'affiche quoi qu'il arrive au bout de 2,5 s. */
.js .hero-title:not(.is-ready) { opacity: 0; animation: title-fallback 0s 2.5s forwards; }
@keyframes title-fallback { to { opacity: 1; } }

/* Le décodage remplace la montée des lignes. */
.hero-title.is-decoding .line > span { animation: none; }

.hero-title .dw { display: inline-block; white-space: nowrap; }
/* Lettre et chiffre partagent la même case, alignés sur la ligne de base du texte.
   Le chiffre n'a pas de largeur propre : la lettre seule fixe la mise en page (aucun décalage). */
.hero-title .dc {
    display: inline-grid;
    align-items: baseline;
    justify-items: center;
}
.hero-title .dc > * { grid-area: 1 / 1; }

/* La lettre est déjà à sa place, mais invisible ; un chiffre la recouvre. */
.hero-title.is-decoding .dc-glyph { color: transparent; }
.hero-title .dc-bit {
    display: flex;
    justify-content: center;
    width: 0;
    color: inherit;                                   /* blanc, ou bleu lumière pour « Votre logiciel » */
    font-size: calc(1em * var(--bit-scale, .72));     /* hauteur des chiffres = hauteur des minuscules */
    font-weight: 600;
    transform: scaleX(var(--sx, 1));
    pointer-events: none;
}
/* Les chiffres (CURUBI en binaire) restent fixes ; seule leur luminosité scintille. */
.hero-title.is-decoding .dc:not(.is-on) .dc-bit { animation: bit-blink .6s steps(2, jump-none) var(--blink, 0s) infinite alternate; }
@keyframes bit-blink { from { opacity: 1; } to { opacity: .45; } }

/* Lettre décodée : elle prend sa couleur, avec un micro-glitch très discret. */
.hero-title .dc.is-on .dc-glyph { color: inherit; animation: glyph-glitch .16s steps(2, end); }
.hero-title .dc.is-on .dc-bit { opacity: 0; transition: opacity .12s; }
@keyframes glyph-glitch {
    0%   { text-shadow: -1.5px 0 rgba(255, 70, 110, .45), 1.5px 0 rgba(90, 190, 255, .5); transform: translateX(.8px); }
    100% { text-shadow: none; transform: none; }
}
.hero-title .dc-glyph { display: inline-block; }

/* Dernier « commit » : un léger éclat parcourt la phrase, de gauche à droite. */
.hero-title.is-decoded .dc-glyph { animation: glyph-sheen .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 9ms); }
@keyframes glyph-sheen {
    0%, 100% { text-shadow: none; }
    40% { text-shadow: 0 0 14px rgba(140, 189, 244, .75); }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

.hero-lead {
    max-width: 500px;
    color: #DCE3EC;
    font-size: 16px;
    line-height: 1.65;
    animation: fade-up 1.6s 1.35s var(--ease) both;
}

.hero .actions { animation: fade-up 1.6s 1.5s var(--ease) both; }

@media (max-width: 1100px) {
    .hero-content { grid-template-columns: 1fr; max-width: calc(640px + var(--gutter) * 2); padding-right: var(--gutter); }
}

.hero-foot {
    position: absolute;
    z-index: 2;
    left: var(--gutter);
    right: var(--gutter-nav);
    bottom: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: #E3EAF5;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    animation: fade-up 1.6s 1.75s var(--ease) both;
}

.explore {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0 10px 10px;
}

.explore-line {
    position: relative;
    width: 40px;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, .35);
    transition: width .8s var(--ease);
}
/* Un point de lumière parcourt le fil, comme une aiguille. */
.explore-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--white), transparent);
    animation: thread-run 2.6s var(--ease-soft) infinite;
}
.explore:hover .explore-line { width: 64px; }

@keyframes thread-run {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* ── Sections ─────────────────────────────────────────────────── */

.section {
    position: relative;
    padding: clamp(96px, 11vw, 170px) var(--gutter);
    overflow: hidden;
    overflow: clip; /* « clip » préserve les éléments collants (position: sticky) */
}

.inner { position: relative; z-index: 1; max-width: 1260px; margin: 0 auto; }

.label {
    color: var(--light-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.section h2,
.form-intro h2 {
    max-width: 860px;
    margin: 22px 0 26px;
    font-family: var(--font-display);
    font-size: clamp(34px, 3.8vw, 58px);
    line-height: 1.12;
    letter-spacing: -.05em;
    text-wrap: balance;
}

.section p { color: var(--muted); font-size: 17px; line-height: 1.8; }

.intro-grid {
    display: grid;
    grid-template-columns: 1fr .72fr;
    gap: 80px;
    align-items: end;
}
.intro-grid > p { max-width: 440px; }

.section-ivory { background: var(--ivory); }

/* Trame de tissu (fabric.js) : très discrète, elle s'estompe vers les bords de la rubrique. */
.fabric {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 40%, transparent 100%);
}

/* Modelage : un outil choisi, la rubrique devient un atelier (pas de sélection de texte, curseur de précision). */
[data-fabric].is-sculpting { cursor: crosshair; user-select: none; }

.fabric-tools {
    position: absolute;
    right: var(--gutter);
    bottom: 28px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100% - 32px);
    opacity: .55;
    transition: opacity .6s var(--ease);
}
[data-fabric]:hover .fabric-tools,
.fabric-tools:focus-within,
.is-sculpting .fabric-tools { opacity: 1; }
/* Pas de modelage sur petit écran : la barre masquerait le texte. */
@media (max-width: 1100px) {
    .fabric-tools { display: none; }
}
.fabric-tools-title {
    margin-right: 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.fabric-tool,
.fabric-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(16, 29, 50, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: var(--ink);
    font: 13px var(--font-text);
    cursor: pointer;
    transition: border-color .4s var(--ease), background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.fabric-tool svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--light-deep);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fabric-tool:hover,
.fabric-reset:hover { border-color: rgba(140, 189, 244, .9); background: var(--white); }
.fabric-tool[aria-pressed="true"] {
    border-color: var(--light-deep);
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 10px 22px -14px rgba(16, 29, 50, .6);
}
.fabric-tool[aria-pressed="true"] svg { stroke: var(--light); }
.fabric-reset { padding-left: 12px; color: var(--muted); }
.fabric-download { display: inline-flex; align-items: center; gap: 6px; }
.fabric-download svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fabric-tool:focus-visible,
.fabric-reset:focus-visible { outline: 2px solid var(--light-deep); outline-offset: 2px; }

/* ── Cartes du savoir-faire ───────────────────────────────────── */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 60px;
}

.card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    min-height: 360px;
    padding: 40px 32px;
    border: 1px solid rgba(16, 29, 50, .08);
    border-radius: 4px;
    background: rgba(255, 255, 255, .72);
    overflow: hidden;
    isolation: isolate;
    transition: border-color .8s var(--ease), background-color .8s var(--ease), box-shadow .9s var(--ease);
}

/* Halo de lumière qui suit le curseur */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(140, 189, 244, .28), transparent 60%);
    opacity: 0;
    transition: opacity .8s var(--ease);
}

.card:hover { background: var(--white); border-color: rgba(140, 189, 244, .55); box-shadow: 0 30px 60px -40px rgba(16, 29, 50, .35); }
.card:hover::before { opacity: 1; }

.card-num { color: var(--light-deep); font-size: 13px; letter-spacing: .14em; }

.card-icon {
    width: 46px;
    height: 46px;
    margin: 34px 0 26px;
    fill: none;
    stroke: var(--light-deep);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
    transition: transform 1s var(--ease);
}
.card:hover .card-icon { transform: translateY(-4px) rotate(-4deg); }

/* ── Mini-jeux des cartes (games.js) ─────────────────────────── */

/* L'icône devient l'objet du jeu : elle passe au-dessus du texte et regagne doucement sa place à la sortie. */
.card.has-game .card-icon {
    position: relative;
    z-index: 2;
    transition: transform 1s var(--ease), translate 1.1s var(--ease), rotate 1.1s var(--ease), scale 1.1s var(--ease), stroke-width 1.1s var(--ease), opacity .5s var(--ease);
}
.card.is-playing .card-icon { transform: none; transition: opacity .5s var(--ease), scale .6s var(--ease), stroke-width .6s var(--ease); pointer-events: none; }
.card .card-icon.is-out { opacity: 0; }

/* Raquette du Pong : fine barre lumineuse sur le bord droit, pilotée par la souris. */
.game-paddle {
    position: absolute;
    top: 0;
    right: 12px;
    z-index: 3;
    width: 4px;
    height: 72px;
    border-radius: 4px;
    background: linear-gradient(var(--light), var(--light-deep));
    box-shadow: 0 0 18px rgba(140, 189, 244, .7);
    opacity: 0;
    scale: 1 .4;
    transition: opacity .6s var(--ease), scale .6s var(--ease);
    pointer-events: none;
}
.card.is-playing .game-paddle { opacity: 1; scale: 1; }
.game-paddle.is-hit { animation: paddle-hit .45s var(--ease); }
@keyframes paddle-hit {
    40% { box-shadow: 0 0 28px 4px rgba(140, 189, 244, .95); scale: 1.6 1.05; }
}

/* Compteur de points, discret, en haut à droite (au-dessus des briques). */
.game-score {
    position: absolute;
    top: 34px;
    right: 32px;
    z-index: 3;
    color: var(--light-deep);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    translate: 0 -6px;
    transition: opacity .6s var(--ease), translate .6s var(--ease);
    pointer-events: none;
}
.game-score::after { content: " pts"; color: var(--muted); font-family: var(--font-text); font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.card.is-playing .game-score { opacity: 1; translate: 0 0; }
.game-score.is-bump { animation: score-bump .5s var(--ease); }
@keyframes score-bump { 35% { scale: 1.18; } }

/* « +1 » / « −3 » qui s'envolent là où le point se joue. */
.game-pop {
    position: absolute;
    z-index: 3;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    pointer-events: none;
    animation: score-pop 1s var(--ease) forwards;
}
.game-pop.is-win { color: var(--light-deep); }
.game-pop.is-loss { color: var(--danger); }
@keyframes score-pop {
    from { opacity: 0; translate: -50% -50%; }
    25% { opacity: 1; }
    to { opacity: 0; translate: -50% calc(-50% - 34px); }
}

/* Casse-briques : raquette horizontale en bas, briques fines en haut de la carte. */
.game-paddle.is-bottom {
    top: auto;
    right: auto;
    bottom: 12px;
    left: 0;
    width: 52px;
    height: 4px;
    background: linear-gradient(90deg, var(--light), var(--light-deep));
    scale: .4 1;
}
.card.is-playing .game-paddle.is-bottom { scale: 1; }
.game-paddle.is-bottom.is-hit { animation-name: paddle-hit-x; }
@keyframes paddle-hit-x {
    40% { box-shadow: 0 0 28px 4px rgba(140, 189, 244, .95); scale: 1.05 1.6; }
}

.game-bricks { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* Les briques occupent le haut de la carte : le compteur descend en bas à droite, au-dessus de la raquette. */
.card[data-game="breakout"] .game-score { top: auto; bottom: 28px; }
.game-brick {
    position: absolute;
    height: 9px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(140, 189, 244, .75), rgba(79, 134, 194, .75));
    box-shadow: 0 4px 12px -6px rgba(79, 134, 194, .8);
    opacity: 0;
    scale: .6 1;
    transition: opacity .7s var(--ease), scale .7s var(--ease);
}
.card.is-playing .game-brick { opacity: 1; scale: 1; }
.card.is-playing .game-brick.is-broken { opacity: 0; scale: 1.5 .2; transition-duration: .35s; }
.game-brick.is-new { animation: brick-in .6s var(--ease) backwards; }
@keyframes brick-in { from { opacity: 0; translate: 0 -10px; } }

/* « Le copilote » : l'étoile recueille les points ; l'IA trace leur trajectoire et marque leur arrivée. */
.game-copilot {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    overflow: visible;
    opacity: 0;
    transition: opacity .6s var(--ease);
    pointer-events: none;
}
.card.is-playing .game-copilot { opacity: 1; }
/* Le texte s'estompe pour laisser lire les trajectoires ; le lien vers l'offre reste net. */
.card[data-game="copilot"] > h3,
.card[data-game="copilot"] > p:not(.card-num) { transition: opacity .6s var(--ease); }
.card[data-game="copilot"].is-playing > h3,
.card[data-game="copilot"].is-playing > p:not(.card-num) { opacity: .25; }
.copilot-path {
    fill: none;
    stroke: var(--light-deep);
    stroke-width: 1;
    stroke-dasharray: 2 5;
    stroke-linecap: round;
    opacity: .55;
    animation: copilot-in .5s .15s var(--ease) backwards;
    transition: opacity .4s var(--ease);
}
.copilot-path.is-gone { opacity: 0; }
.copilot-ring,
.copilot-dot { transform-box: fill-box; transform-origin: center; }
/* L'IA affine sa prévision : le cercle se resserre sur le point d'arrivée. */
.copilot-ring {
    fill: none;
    stroke: var(--light-deep);
    stroke-width: 1.2;
    stroke-dasharray: 3 3;
    animation: copilot-aim .9s .15s var(--ease) backwards;
    transition: opacity .6s var(--ease), scale .6s var(--ease);
}
.copilot-ring.is-caught { opacity: 0; scale: 2; stroke-dasharray: none; }
.copilot-ring.is-missed { opacity: 0; stroke: var(--danger); transition-duration: .7s; }
.copilot-dot {
    fill: var(--light);
    stroke: var(--light-deep);
    stroke-width: 1.4;
    animation: food-in .5s var(--ease);
    transition: opacity .6s var(--ease), scale .6s var(--ease);
}
.copilot-dot.is-caught { opacity: 0; scale: .2; }
.copilot-dot.is-missed { opacity: 0; stroke: var(--danger); }
.card .card-icon.is-catch { animation: copilot-catch .5s var(--ease); }
@keyframes copilot-in { from { opacity: 0; } }
@keyframes copilot-aim { from { opacity: 0; scale: 2.6; } }
@keyframes copilot-catch { 40% { filter: drop-shadow(0 0 10px rgba(140, 189, 244, .95)); } }

/* Snake : la chaîne de nœuds de l'icône, dessinée dans le même trait. */
.card[data-game="snake"].is-playing .card-icon { opacity: 0; }
.game-snake {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    overflow: visible;
    opacity: 0;
    transition: opacity .6s var(--ease);
    pointer-events: none;
}
.card.is-playing .game-snake { opacity: 1; }
.snake-links,
.snake-node {
    fill: none;
    stroke: var(--light-deep);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.snake-node { fill: var(--white); }
.snake-food {
    fill: var(--light);
    stroke: var(--light-deep);
    stroke-width: 1.4;
    transform-box: fill-box;
    transform-origin: center;
    animation: food-pulse 1.8s var(--ease-soft) infinite;
}
.snake-food.is-new { animation: food-in .6s var(--ease), food-pulse 1.8s .6s var(--ease-soft) infinite; }
@keyframes food-pulse { 50% { scale: 1.35; } }
@keyframes food-in { from { scale: 0; } }
.game-snake.is-bitten .snake-links,
.game-snake.is-bitten .snake-node { animation: snake-bitten .7s var(--ease); }
@keyframes snake-bitten { 30% { stroke: var(--danger); } }

.card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.035em; }
.section .card p { margin-top: 12px; font-size: 15px; line-height: 1.7; }

/* Les cartes s'empilent en colonne : le lien vers l'offre se cale toujours en bas. */
.card { display: flex; flex-direction: column; }

/* Deux lignes, toujours : « Voir aussi notre offre », puis le nom de l'offre souligné. */
.card-link {
    display: block;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 26px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}
.card-link-intro { display: block; color: var(--muted); font-size: 13px; }
.card-link-name {
    display: inline-flex;
    align-items: baseline;
    margin-top: 2px;
    padding-bottom: 3px;
    white-space: nowrap;
    background: linear-gradient(var(--light-deep), var(--light-deep)) no-repeat 0 100% / 0 1px,
                linear-gradient(rgba(16, 29, 50, .18), rgba(16, 29, 50, .18)) no-repeat 0 100% / 100% 1px;
    transition: background-size .8s var(--ease);
}
.card-link strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.card-link .btn-arrow { margin-left: 8px; color: var(--light-deep); font-size: 13px; }
.card-link:hover .card-link-name { background-size: 100% 1px, 100% 1px; }
.card-link:hover .btn-arrow { transform: translate(3px, -3px); }

/* Les icônes se dessinent d'un trait, comme un patron. */
.js .card-icon * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease-soft); }
.js .card.is-visible .card-icon * { stroke-dashoffset: 0; }
.js .card.is-visible .card-icon :nth-child(2) { transition-delay: .25s; }
.js .card.is-visible .card-icon :nth-child(3) { transition-delay: .45s; }
.js .card.is-visible .card-icon :nth-child(4) { transition-delay: .6s; }
.js .card.is-visible .card-icon :nth-child(5) { transition-delay: .75s; }
.js .card.is-visible .card-icon :nth-child(n+6) { transition-delay: .9s; }

/* ── Méthode (section sombre) ─────────────────────────────────── */

.section-dark { background: var(--navy); color: var(--white); }
.section-dark .label { color: var(--light); }
.section-dark p { color: #B9C3D0; }

.process {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .14); }

.step {
    position: relative;
    display: flex;
    gap: 26px;
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

/* Un fil de lumière se tend sous chaque étape. */
.step::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, var(--light), rgba(140, 189, 244, 0));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 2.2s .3s var(--ease);
}
.js .step.is-visible::after { transform: scaleX(1); }

.step-num {
    flex: none;
    padding-top: 4px;
    color: var(--light);
    font-size: 13px;
    letter-spacing: .1em;
    transition: transform .8s var(--ease);
}

.step h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -.03em; transition: transform .8s var(--ease), color .8s; }
.section-dark .step p { margin-top: 8px; font-size: 15px; }
.step:hover h3 { transform: translateX(6px); color: #D2E6FC; }
.step:hover .step-num { transform: translateX(3px); }

/* Fils décoratifs qui ondulent en fond */
.threads {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    fill: none;
    stroke: rgba(140, 189, 244, .2);
    stroke-width: 1.2;
    vector-effect: non-scaling-stroke;
}
.threads path { vector-effect: non-scaling-stroke; animation: drift 14s var(--ease-soft) infinite alternate; }
.threads path:nth-child(2) { animation-duration: 18s; animation-delay: -4s; stroke: rgba(140, 189, 244, .12); }
.threads path:nth-child(3) { animation-duration: 22s; animation-delay: -9s; stroke: rgba(242, 237, 229, .08); }
.threads-soft { stroke: rgba(16, 29, 50, .1); }
.threads-soft path:nth-child(2) { stroke: rgba(79, 134, 194, .14); }

/* Fils sensibles à la souris (threads.js) : l'ondulation est alors calculée en JS, et un reflet
   (couleur du dégradé = color) glisse le long des fils à hauteur du curseur. */
.threads.is-live { color: var(--light); }
.threads-soft.is-live { color: var(--light-deep); }
.threads.is-live > path { animation: none; }
.js .threads .threads-glow path {
    stroke-width: 1.6;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
    transition: none;
}
.threads-glow { filter: drop-shadow(0 0 5px rgba(140, 189, 244, .7)); }

@keyframes drift {
    from { transform: translateY(0); }
    to { transform: translateY(-26px); }
}

.js .threads path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 4s var(--ease-soft); }
.js .threads.is-visible path { stroke-dashoffset: 0; }
.js .threads.is-visible path:nth-child(2) { transition-delay: .5s; }
.js .threads.is-visible path:nth-child(3) { transition-delay: 1s; }
.js [data-reveal].threads { transform: none; filter: none; }

/* ── Signature ────────────────────────────────────────────────── */

.section-quote { background: var(--ivory-soft); }

.quote { margin: 26px 0 0; }

.quote p {
    max-width: 980px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 48px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -.04em;
}
.section .quote p { color: var(--ink); font-size: clamp(28px, 3vw, 48px); line-height: 1.35; }
.quote em { color: var(--light-deep); font-style: normal; }

/* Les mots s'illuminent au rythme du défilement. */
.js .quote .qw { opacity: .16; transition: opacity .9s var(--ease); }
.js .quote .qw.is-lit { opacity: 1; }

/* ── Appel à contact ──────────────────────────────────────────── */

.section-closing {
    text-align: center;
    background: linear-gradient(180deg, var(--ivory) 0%, #E4ECF5 100%);
}
.section-closing h2 { margin-inline: auto; }
.section-closing p { max-width: 540px; margin: 0 auto; }

.link-phone { color: var(--muted); font-size: 15px; }
.link-phone strong { color: var(--ink); font-weight: 600; background: linear-gradient(var(--light-deep), var(--light-deep)) no-repeat 0 100% / 0 1px; transition: background-size .7s var(--ease); }
.link-phone:hover strong { background-size: 100% 1px; }

/* ── Pied de page ─────────────────────────────────────────────── */

/* Logo à gauche, signature au centre, offres à droite ; la ligne légale partage l'axe central. */
.footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 26px 40px;
    padding: 44px var(--gutter);
    background: var(--navy-deep);
    color: #AAB6C8;
    font-size: 13px;
}
.footer-brand { justify-self: start; }
.footer-tagline { text-align: center; }
.footer-offers { justify-self: end; }

.footer-brand { color: var(--white); transition: opacity .5s; }
.footer-brand:hover { opacity: .8; }
.footer-logo { width: auto; height: 22px; }

/* Deuxième rangée : informations légales sous un filet discret */
.footer-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 10px 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* Tablette et mobile : tout s'empile, centré sur le même axe. */
@media (max-width: 1100px) {
    .footer { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
    .footer-brand, .footer-offers { justify-self: center; }
    .footer-offers { justify-content: center; }
}

.footer-offers { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.footer-offers-label { color: var(--light); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.footer-offers a { color: var(--white); font-weight: 600; transition: color .5s var(--ease); }
.footer-offers a:hover { color: var(--light); }
.footer-offers .btn-arrow { margin-left: 5px; color: var(--light); font-size: 11px; }
.footer-offers a:hover .btn-arrow { transform: translate(2px, -2px); }

.footer-meta a { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; padding-bottom: 2px; transition: background-size .7s var(--ease), color .5s; }
.footer-meta a:hover { color: var(--white); background-size: 0 1px; background-position: 100% 100%; }
.footer-meta span { margin: 0 6px; }

/* ═══════════════════════════════════════════════════════════════
   Page contact
   ═══════════════════════════════════════════════════════════════ */

.contact-hero {
    position: relative;
    padding: clamp(150px, 18vw, 210px) var(--gutter) clamp(90px, 10vw, 140px);
    overflow: hidden;
    background: radial-gradient(1100px 600px at 85% 0%, rgba(140, 189, 244, .16), transparent 60%), var(--navy);
    color: var(--white);
}

.contact-hero .label { color: var(--light); }

.contact-title {
    max-width: 900px;
    margin: 22px 0 24px;
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 76px);
    line-height: 1.06;
    letter-spacing: -.055em;
    text-wrap: balance;
}

.contact-lead { max-width: 620px; color: #C4CDD9; font-size: 18px; line-height: 1.7; }

.direct {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 980px;
    margin-top: 56px;
}

.direct-card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 34px 34px 30px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 4px;
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
    isolation: isolate;
    transition: border-color .8s var(--ease), background-color .8s var(--ease);
}
.direct-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(380px circle at var(--mx) var(--my), rgba(140, 189, 244, .2), transparent 60%);
    opacity: 0;
    transition: opacity .8s var(--ease);
}
.direct-card:hover { border-color: rgba(140, 189, 244, .5); background: rgba(255, 255, 255, .06); }
.direct-card:hover::before { opacity: 1; }

.direct-label { color: var(--light); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.direct-value { font-family: var(--font-display); font-size: clamp(24px, 2.5vw, 38px); font-weight: 600; letter-spacing: -.04em; overflow-wrap: anywhere; }
.direct-hint { color: #AAB6C8; font-size: 14px; }

/* ── L'équipe ─────────────────────────────────────────────────── */

.team { background: var(--ivory-soft); }
/* Accueil : fond ivoire soutenu, qui alterne avec la signature et se fond dans l'appel final. */
.team.section-ivory { background: var(--ivory); padding-bottom: clamp(48px, 6vw, 90px); }

.team-more { margin-top: 56px; text-align: center; }
.team-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}
.team-link > span:first-child {
    padding-bottom: 3px;
    background: linear-gradient(var(--light-deep), var(--light-deep)) no-repeat 0 100% / 0 1px,
                linear-gradient(rgba(16, 29, 50, .2), rgba(16, 29, 50, .2)) no-repeat 0 100% / 100% 1px;
    transition: background-size .8s var(--ease);
}
.team-link .btn-arrow { color: var(--light-deep); }
.team-link:hover > span:first-child { background-size: 100% 1px, 100% 1px; }
.team-link:hover .btn-arrow { transform: translateX(4px); }

.team-head {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 24px 80px;
    align-items: end;
}
.team-head > p { max-width: 460px; }
.section .team-head h2 { margin-bottom: 0; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 24px;
    margin: 64px 0 0;
    padding: 0;
    list-style: none;
}

.member { text-align: center; }

/* Portrait détouré dans un cercle parfait, sur fond ivoire. */
.member-photo {
    position: relative;
    width: min(100%, 200px);
    aspect-ratio: 1;
    margin: 0 auto 22px;
    border-radius: 50%;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(circle at 50% 30%, var(--white), var(--ivory) 75%);
    box-shadow: 0 0 0 1px rgba(16, 29, 50, .07), 0 18px 40px -28px rgba(16, 29, 50, .45);
    transition: box-shadow .9s var(--ease);
}
/* Teinte bleu lumière qui apparaît au survol */
.member-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 30%, #F3F8FE, #D6E7FB 75%);
    opacity: 0;
    transition: opacity .9s var(--ease);
}
.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.85) contrast(1.02);
    transform: translateX(var(--shift-x, 0%)) translateY(5%) scale(1.02);
    transform-origin: 50% 100%;
    transition: filter 1.1s var(--ease), transform 1.1s var(--ease);
}

/* Flux entre les artisans (flow.js) : des fils relient les portraits, des points de lumière y circulent. */
.team-grid[data-flow] { position: relative; }
.team-grid[data-flow] > .member { position: relative; z-index: 1; }
.team-flow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
.team-flow path {
    fill: none;
    stroke: rgba(79, 134, 194, .28);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 2.6s var(--ease-soft), stroke .8s var(--ease), stroke-width .8s var(--ease);
}
.team-flow.is-visible path { stroke-dashoffset: 0; }
.team-flow path.is-lit { stroke: rgba(79, 134, 194, .7); stroke-width: 1.4; }
.flow-pulse {
    fill: var(--light);
    stroke: var(--light-deep);
    stroke-width: 1;
    filter: drop-shadow(0 0 4px rgba(140, 189, 244, .9));
}
/* Un portrait qui reçoit : un bref halo bleu lumière. */
.member-photo.is-ping { animation: member-ping 1s var(--ease); }
@keyframes member-ping {
    30% { box-shadow: 0 0 0 4px rgba(140, 189, 244, .35), 0 18px 40px -28px rgba(16, 29, 50, .45); }
}

/* Recadrage horizontal propre à certains portraits */
.member-david-grima .member-photo img { --shift-x: 5%; }
.member-loic-perrin .member-photo img { --shift-x: -4%; }

.member:hover .member-photo,
.member:focus-within .member-photo { box-shadow: 0 0 0 1px rgba(140, 189, 244, .6), 0 22px 44px -26px rgba(16, 29, 50, .5); }
.member:hover .member-photo::before,
.member:focus-within .member-photo::before { opacity: 1; }
.member:hover .member-photo img,
.member:focus-within .member-photo img { filter: none; transform: translateX(var(--shift-x, 0%)) translateY(3%) scale(1.06); }

.member-name { font-family: var(--font-display); font-size: 20px; letter-spacing: -.03em; }
.section .member-role { margin-top: 4px; color: var(--light-deep); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

.member-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(16, 29, 50, .14);
    border-radius: 99px;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: border-color .6s var(--ease), background-color .6s var(--ease);
}
.member-phone:hover { border-color: var(--light-deep); background: #EEF5FD; }
.member-phone:hover .btn-arrow { transform: translate(2px, -2px); }

/* ── Formulaire ───────────────────────────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(40px, 6vw, 100px);
    align-items: start;
}

.form-intro { position: sticky; top: 120px; }
.form-intro > p { max-width: 420px; }
.section .form-privacy { margin-top: 22px; font-size: 14px; line-height: 1.7; }

.form-panel {
    position: relative;
    padding: clamp(28px, 4vw, 56px);
    border: 1px solid rgba(16, 29, 50, .06);
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 40px 80px -60px rgba(16, 29, 50, .45);
}

.form { display: grid; gap: 28px; }
.form[hidden], .thanks[hidden] { display: none; }

.form-notice {
    padding: 14px 18px;
    border-left: 2px solid var(--danger);
    background: #FBF1EF;
    color: #7A2F27;
    font-size: 15px;
    animation: fade-up .8s var(--ease) both;
}
.form-notice[hidden] { display: none; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }

.field { display: grid; gap: 6px; }

.field label { color: var(--ink); font-size: 14px; font-weight: 600; }
.field label span { color: var(--light-deep); }

.field input,
.field textarea {
    width: 100%;
    padding: 10px 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(16, 29, 50, .2);
    border-radius: 0;
    background: linear-gradient(var(--light-deep), var(--light-deep)) no-repeat 0 100% / 0 2px;
    font-size: 17px;
    transition: background-size .9s var(--ease), border-color .5s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field textarea:focus { outline: none; background-size: 100% 2px; border-bottom-color: transparent; }

.field [aria-invalid="true"] { border-bottom-color: var(--danger); }

.field-error { color: var(--danger); font-size: 14px; line-height: 1.5; animation: fade-up .6s var(--ease) both; }
.section .field-error { color: var(--danger); font-size: 14px; line-height: 1.5; }
.field-error:empty { display: none; }

.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.section .form-required { color: var(--muted); font-size: 13px; }

.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn-arrow { animation: busy 1s var(--ease-soft) infinite alternate; }
@keyframes busy { to { transform: translate(4px, -4px); opacity: .4; } }

/* ── La prise de mesure (captcha) ─────────────────────────────── */

.tape {
    --p: 0%;
    --ribbon: linear-gradient(180deg, #A6CCF7, var(--light));
    min-width: 0;
    margin: 4px 0 0;
    padding: 26px 26px 22px;
    border: 1px solid rgba(16, 29, 50, .07);
    border-radius: 6px;
    background: var(--ivory-soft);
    transition: background-color .8s var(--ease), border-color .8s var(--ease);
}

.tape-legend {
    float: left;
    width: 100%;
    padding: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.section .tape-brief { clear: both; padding-top: 8px; font-size: 15px; line-height: 1.7; }

/* La mesure à atteindre : une étiquette cousue (bord en pointillés), impossible à manquer. */
.tape-target {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 18px;
    padding: 12px 20px 13px;
    border: 1.5px dashed var(--light-deep);
    border-radius: 8px;
    background: var(--white);
    transition: border-color .6s var(--ease), background-color .6s var(--ease);
}
.tape-target-label { color: var(--light-deep); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.tape-target-value { color: var(--navy); font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
.tape.is-fit .tape-target { border-style: solid; background: #F5FAFF; }
.tape.is-fit .tape-target-value::after { content: " ✓"; color: var(--light-deep); }

.tape-stage { display: flex; align-items: center; margin-top: 56px; }

.tape-spool {
    position: relative;
    z-index: 2;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2C3E5C, var(--navy) 70%);
    /* Ombre resserrée sous la bobine : elle ne déborde pas sur le ruban (pas de différence de teinte). */
    box-shadow: 0 16px 16px -14px rgba(16, 29, 50, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.tape-spool i {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid var(--light);
    border-radius: 50%;
    transform: rotate(calc(var(--turn, 0) * 1deg));
    transition: transform .4s var(--ease);
}
.tape-spool i::after { content: ""; position: absolute; top: -2px; left: 50%; width: 2px; height: 8px; margin-left: -1px; background: var(--light); }

/* La bobine est décalée à gauche du zéro : le crochet reste toujours visible et attrapable. */
.tape-track { position: relative; flex: 1; height: 38px; margin-left: 16px; }

/* Le chemin que suivra le ruban (il part de la bobine) */
.tape-track::before {
    content: "";
    position: absolute;
    left: -16px; right: 0; top: 50%;
    border-top: 1px dashed rgba(16, 29, 50, .22);
}
/* Le bout de ruban qui sort de la bobine : il démarre sous le cercle (la bobine le recouvre). */
.tape-track::after {
    content: "";
    position: absolute;
    left: -40px;
    width: 48px; /* passe sous le ruban principal : aucune couture visible */
    top: 0;
    bottom: 0;
    background: var(--ribbon);
}

.tape-ribbon {
    position: absolute;
    inset: 0;
    border-radius: 0 3px 3px 0;
    background: var(--ribbon);
    color: var(--navy);
    box-shadow: 0 6px 14px -8px rgba(16, 29, 50, .5);
    clip-path: inset(0 calc(100% - var(--p)) 0 0);
    transition: clip-path .25s var(--ease), background .8s var(--ease);
}
.tape-ribbon svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: currentColor; stroke-width: 1; opacity: .7; vector-effect: non-scaling-stroke; }
.tape-ribbon svg path { vector-effect: non-scaling-stroke; }

.tape-digit { position: absolute; top: 3px; transform: translateX(-50%); font-size: 10px; font-weight: 700; line-height: 1; }
.tape-digit-10 { left: 16.6667%; }
.tape-digit-20 { left: 33.3333%; }
.tape-digit-30 { left: 50%; }
.tape-digit-40 { left: 66.6667%; }
.tape-digit-50 { left: 83.3333%; }

/* Le crochet métallique au bout du ruban */
.tape-tip {
    position: absolute;
    z-index: 4; /* au-dessus de la zone de saisie : seule la bulle capte le pointeur */
    top: -7px;
    bottom: -7px;
    left: var(--p);
    width: 5px;
    margin-left: -3px;
    border-radius: 2px;
    background: var(--navy);
    pointer-events: none;
    transition: left .25s var(--ease);
}
.tape-tip output {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    padding: 5px 11px;
    border-radius: 99px;
    background: var(--navy);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
    /* La bulle s'attrape (au-dessus de la zone de saisie) */
    z-index: 4;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color .6s var(--ease), color .6s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tape-tip output:hover { transform: translateX(-50%) scale(1.06); box-shadow: 0 8px 18px -8px rgba(16, 29, 50, .6); }
.tape-tip output.is-grabbed { cursor: grabbing; transform: translateX(-50%) scale(1.1); box-shadow: 0 10px 22px -8px rgba(16, 29, 50, .7); }
.tape-tip output::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 5px solid transparent;
    border-top-color: var(--navy);
    transform: translateX(-50%);
    transition: border-color .6s var(--ease);
}

.tape-label { display: block; margin-top: 14px; font-size: 14px; font-weight: 600; }
.tape-input { width: 140px; margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(16, 29, 50, .2); border-radius: 4px; background: var(--white); }

/* Avec JavaScript, le curseur natif devient le ruban lui-même. */
.js .tape-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
/* La zone de saisie couvre aussi la bulle « 0 cm » au-dessus du ruban : on peut l'attraper. */
.js .tape-input {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: -52px;
    width: 100%;
    height: calc(100% + 68px);
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: grab;
    touch-action: pan-y;
}
.js .tape-input:active { cursor: grabbing; }
/* Curseur natif réduit à un trait : la valeur suit exactement le crochet du ruban. */
.js .tape-input { -webkit-appearance: none; appearance: none; background: transparent; }
.js .tape-input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 1px; height: 106px; border: 0; background: transparent; }
.js .tape-input::-moz-range-thumb { width: 1px; height: 106px; border: 0; background: transparent; }
.js .tape-input::-webkit-slider-runnable-track { background: transparent; }
.tape-track:has(.tape-input:focus-visible) { outline: 2px solid var(--light-deep); outline-offset: 10px; border-radius: 4px; }

html:not(.js) .tape-spool,
html:not(.js) .tape-ribbon,
html:not(.js) .tape-tip,
html:not(.js) .tape-fine,
html:not(.js) .tape-track::before,
html:not(.js) .tape-track::after { display: none; }
html:not(.js) .tape-stage { margin-top: 0; }
html:not(.js) .tape-track { height: auto; margin: 0; }

.tape-fine {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.tape-nudge {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(16, 29, 50, .16);
    border-radius: 50%;
    background: var(--white);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition: border-color .4s, background-color .4s, transform .5s var(--ease);
}
.tape-nudge:hover { border-color: var(--light-deep); background: #EEF5FD; }
.tape-nudge:active { transform: scale(.92); }

.section .tape-status { min-height: 1.6em; margin-top: 6px; color: var(--muted); font-size: 14px; }

/* Mesure juste : le ruban s'illumine, un reflet le parcourt. */
.tape.is-fit { border-color: rgba(79, 134, 194, .35); background: #EEF5FD; }
/* Ruban et bout de ruban partagent la même couleur, dans les deux états. */
.tape.is-fit { --ribbon: linear-gradient(180deg, #BBDAFA, #94C3F6); }
.tape.is-fit .tape-ribbon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%);
    animation: shimmer 1.4s var(--ease) both;
}
.tape.is-fit .tape-tip output { background: var(--light-deep); }
.tape.is-fit .tape-tip output::after { border-top-color: var(--light-deep); }
.tape.is-fit .tape-spool { animation: spool-pulse 1.2s var(--ease); }
.section .tape.is-fit .tape-status { color: var(--light-deep); font-weight: 600; }

.tape.is-off .tape-ribbon { animation: nudge-no .6s var(--ease); }

/* Mesure manquante ou fausse à l'envoi : bloc teinté et message encadré, impossible à manquer. */
.tape.is-error { border-color: rgba(176, 71, 61, .4); background: #FCF5F3; }
.tape.is-error .tape-target { border-color: var(--danger); }
.section .tape .field-error {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 3px solid var(--danger);
    border-radius: 0 6px 6px 0;
    background: #FBEAE6;
    color: #7A2F27;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}
.section .tape .field-error::before {
    content: "!";
    flex: none;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}
.section .tape .field-error:empty { display: none; }

@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spool-pulse { 40% { box-shadow: 0 0 0 10px rgba(140, 189, 244, .25), 0 16px 16px -14px rgba(16, 29, 50, .55); } }
@keyframes nudge-no { 25% { translate: -5px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }

/* ── Remerciement ─────────────────────────────────────────────── */

.thanks { padding: clamp(20px, 4vw, 48px) 0; text-align: center; animation: fade-up 1.2s var(--ease) both; }
.thanks:focus { outline: none; }
.thanks-icon { width: 64px; height: 64px; margin: 0 auto 26px; fill: none; stroke: var(--light-deep); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.thanks-icon * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s .2s var(--ease-soft) forwards; }
.thanks-icon path { animation-delay: .9s; }
.thanks h3 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; }
.section .thanks p { max-width: 440px; margin: 14px auto 0; }
.section .thanks .thanks-alt { font-size: 15px; }
.thanks-alt a { color: var(--ink); font-weight: 600; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── Mentions légales ─────────────────────────────────────────── */

.legal-hero { padding-bottom: clamp(70px, 8vw, 110px); }

.legal-grid {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 760px);
    gap: clamp(40px, 7vw, 120px);
    align-items: start;
}

.legal-nav { position: sticky; top: 110px; }
.legal-nav ol { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: legal; }
.legal-nav li { counter-increment: legal; border-top: 1px solid var(--line); }
.legal-nav li:last-child { border-bottom: 1px solid var(--line); }
.legal-nav a {
    display: flex;
    gap: 14px;
    padding: 11px 0;
    color: var(--muted);
    font-size: 15px;
    transition: color .5s var(--ease), transform .7s var(--ease);
}
.legal-nav a::before { content: counter(legal, decimal-leading-zero); color: var(--light-deep); font-size: 12px; padding-top: 3px; }
.legal-nav a:hover { color: var(--ink); transform: translateX(4px); }

.legal-content article { padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.section .legal-content h2 { margin: 0 0 18px; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.04em; }
.legal-content h3 { margin: 26px 0 8px; font-family: var(--font-display); font-size: 17px; letter-spacing: -.02em; }
.section .legal-content p { font-size: 16px; line-height: 1.8; }
.section .legal-content p + p { margin-top: 14px; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content sup { font-size: .6em; }
.legal-content ul { margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 16px; line-height: 1.75; }
.legal-content li { position: relative; padding-left: 22px; }
.legal-content li + li { margin-top: 10px; }
.legal-content li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 1px; background: var(--light-deep); }
.legal-content a { color: var(--ink); background: linear-gradient(var(--light-deep), var(--light-deep)) no-repeat 0 100% / 100% 1px; transition: background-size .7s var(--ease); }
.legal-content a:hover { background-size: 0 1px; background-position: 100% 100%; }
.legal-content code { padding: 1px 6px; border-radius: 3px; background: var(--ivory); font-size: .92em; }
.section .legal-updated { font-size: 14px; }

.form-privacy a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── 404 ──────────────────────────────────────────────────────── */

.notfound { min-height: 82svh; display: flex; align-items: center; }

/* ═══════════════════════════════════════════════════════════════
   Apparitions au défilement (activées par JavaScript)
   ═══════════════════════════════════════════════════════════════ */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(6px);
    transition:
        opacity 1.3s var(--ease) var(--d, 0ms),
        transform 1.6s var(--ease) var(--d, 0ms),
        filter 1.3s var(--ease) var(--d, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

/* Titres : les mots montent un à un, comme on aligne des points de couture. */
.js [data-split]:not(.is-split) { opacity: 0; }
[data-split] .w { display: inline-block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; vertical-align: top; }
[data-split] .w > span { display: inline-block; }
.js [data-split] .w > span { transform: translateY(108%); transition: transform 1.4s var(--ease); transition-delay: calc(var(--i, 0) * 60ms + 80ms); }
.js [data-split].is-visible .w > span { transform: none; }

/* ═══════════════════════════════════════════════════════════════
   Adaptations
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1180px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .card { min-height: 0; }
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .intro-grid,
    .process,
    .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .process { gap: 48px; }
    .form-grid { gap: 48px; }
    .form-intro { position: static; }
    .legal-grid { grid-template-columns: 1fr; gap: 48px; }
    .team-head { grid-template-columns: 1fr; }
    .legal-nav { position: static; }
}

@media (max-width: 800px) {
    .site-header { padding: 18px 20px; }
    .site-header.is-solid { padding-block: 12px; }
    .nav { gap: 0; }
    .nav-link { display: none; }
    .site-header { padding-right: calc(20px + var(--lang-switch-w) + 10px); }
    .lang-switch { top: 18px; right: 20px; }
    .site-header.is-solid + .lang-switch { top: 12px; }
}

/* Petit écran : le bouton de l'en-tête se resserre pour laisser la place au sélecteur de langue. */
@media (max-width: 560px) {
    .site-header .nav-cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .site-header .nav-cta-short { display: inline; }
    .brand-logo { height: 18px; }

    .hero { min-height: 600px; height: 94svh; }
    /* Sur mobile, on cadre la vidéo sur son titre « CURUBI, l'atelier du logiciel sur mesure ». */
    /* Mobile : cadrage sur le panneau holographique (dessin à faire tourner + texte). */
    .hero-art { --fx: .02; --fy: .30; }
    .hero-content { padding-bottom: 104px; }
    .hero-title { font-size: clamp(27px, 7.4vw, 36px); }
    .hero-lead { font-size: 16px; }
    .hero-foot { left: 24px; right: 24px; bottom: 26px; }
    .hero-motto { display: none; }
    .hero-foot { justify-content: flex-end; }

    .section { padding: 88px 24px; }
    .contact-hero { padding: 130px 24px 80px; }
    .cards { grid-template-columns: 1fr; }
    .direct { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .footer { padding: 40px 24px; }
    .footer-meta { gap: 10px 18px; justify-self: stretch; }
    .footer-meta > span[aria-hidden] { display: none; }
}

/* Petit écran : l'accroche se fait discrète pour laisser lire le titre de la vidéo. */
@media (max-width: 520px) {
    .hero { height: 100svh; }
    .hero-eyebrow,
    .hero-lead,
    .hero .btn-glass { display: none; }
    .hero-content { padding-bottom: 92px; }
    .hero-aside .actions { margin-top: 0; }
}

@media (max-width: 480px) {
    .hero .actions .btn { width: 100%; }
    .btn { white-space: normal; text-align: center; }
    .tape { padding: 22px 18px 18px; }
    .tape-spool { flex-basis: 46px; height: 46px; }
    .tape-digit-10, .tape-digit-30, .tape-digit-50 { display: none; }
    .spot-card { width: min(230px, calc(100vw - 80px)); }
    .team-grid { gap: 36px 14px; }
    .member-name { font-size: 17px; }
    .section .member-role { font-size: 11px; }
    .member-phone { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
}

/* Mouvement réduit : tout reste visible, rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; filter: none; }
    .js [data-split] .w > span { transform: none; }
    .js [data-split]:not(.is-split) { opacity: 1; }
    .js .quote .qw { opacity: 1; }
    @view-transition { navigation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Accueil : fil d'avancement et visite guidée
   ═══════════════════════════════════════════════════════════════ */

/* « Explorer » : la mention « Visite guidée » apparaît au survol */
.explore-hint {
    color: var(--light);
    font-size: 11px;
    letter-spacing: .16em;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .6s var(--ease), transform .7s var(--ease);
}
.explore:hover .explore-hint,
.explore:focus-visible .explore-hint { opacity: 1; transform: none; }

/* ── Le fil, sur le bord droit ── */
.scroll-rail {
    position: fixed;
    z-index: 40;
    top: 50%;
    right: clamp(14px, 2vw, 30px);
    width: 20px;
    height: min(260px, 40vh);
    transform: translate(12px, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s var(--ease), transform .9s var(--ease);
}
.scroll-rail.is-visible { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }

.scroll-rail-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    border-radius: 2px;
    background: rgba(127, 140, 160, .3);
    overflow: hidden;
}
.scroll-rail-line i {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--light), var(--light-deep));
    transform: scaleY(0);
    transform-origin: top;
}

.scroll-rail ol { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.scroll-rail li { position: absolute; left: 0; right: 0; top: calc(var(--at, 0) * 100%); height: 0; }

.scroll-rail-notch {
    position: absolute;
    left: 50%;
    top: 0;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
}
.scroll-rail-notch::before {
    content: "";
    width: 9px;
    height: 9px;
    border: 1.5px solid rgba(127, 140, 160, .7);
    border-radius: 50%;
    background: var(--ivory-soft);
    transition: transform .6s var(--ease), background-color .6s var(--ease), border-color .6s var(--ease), box-shadow .6s var(--ease);
}
.scroll-rail li.is-past .scroll-rail-notch::before { border-color: var(--light-deep); background: var(--light); }
.scroll-rail li.is-current .scroll-rail-notch::before { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(140, 189, 244, .28); }
.scroll-rail-notch:hover::before,
.scroll-rail-notch:focus-visible::before { transform: scale(1.45); border-color: var(--light-deep); }

/* Nom de la section, au survol */
.scroll-rail-label {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    padding: 5px 11px;
    border-radius: 99px;
    background: rgba(16, 29, 50, .86);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(6px, -50%);
    pointer-events: none;
    transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.scroll-rail-notch:hover .scroll-rail-label,
.scroll-rail-notch:focus-visible .scroll-rail-label { opacity: 1; transform: translate(0, -50%); }

/* ── Mobile : une barre fine en haut ── */
.scroll-bar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--light-deep), var(--light));
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    transition: opacity .6s var(--ease);
    display: none;
}
.scroll-bar.is-visible { opacity: 1; }

@media (max-width: 800px) {
    .scroll-rail { display: none; }
    .scroll-bar { display: block; }
    .explore-hint { display: none; }
}

/* ── La pastille de la visite guidée ── */
.tour {
    position: fixed;
    z-index: 70;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 24px);
    padding: 9px 9px 9px 11px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 99px;
    background: rgba(16, 29, 50, .84);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 24px 50px -24px rgba(7, 14, 28, .75);
    color: var(--white);
    opacity: 0;
    transform: translate(-50%, 18px);
    filter: blur(4px);
    transition: opacity .6s var(--ease), transform .8s var(--ease), filter .6s var(--ease);
}
.tour[hidden] { display: none; }
.tour.is-visible { opacity: 1; transform: translate(-50%, 0); filter: none; }

.tour-ring { flex: none; width: 36px; height: 36px; }
.tour-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 2.5; }
.tour-ring-track { stroke: rgba(255, 255, 255, .14); }
.tour-ring-fill { stroke: var(--light); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: opacity .4s; }
.tour.is-paused .tour-ring-fill { opacity: .45; }

.tour-text { display: flex; flex-direction: column; min-width: 0; padding-right: 4px; }
.tour-kicker { color: var(--light); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.tour-step { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour.is-paused .tour-kicker { color: #F2C9A0; }

.tour-actions { display: flex; gap: 6px; }
.tour-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--white);
    cursor: pointer;
    transition: background-color .4s var(--ease), transform .5s var(--ease), opacity .4s;
}
.tour-btn:hover { background: rgba(255, 255, 255, .18); }
.tour-btn:active { transform: scale(.92); }
.tour-btn:disabled { opacity: .3; cursor: default; }
.tour-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tour-btn [d^="M8 5.5"] { fill: currentColor; }
.tour.is-ending .tour-actions { display: none; }

@media (max-width: 480px) {
    .tour { gap: 10px; }
    .tour-btn { width: 34px; height: 34px; }
}

/* Point initial du fil : retour à l'accueil (losange, pour le distinguer des sections) */
.scroll-rail li.is-home .scroll-rail-notch::before { border-radius: 2px; transform: rotate(45deg); }
.scroll-rail li.is-home .scroll-rail-notch:hover::before,
.scroll-rail li.is-home .scroll-rail-notch:focus-visible::before { transform: rotate(45deg) scale(1.45); }
.scroll-rail li.is-home.is-current .scroll-rail-notch::before { transform: rotate(45deg) scale(1.35); }
