/* ==========================================================================
   Dalicea — V3 : page d'accueil et composants partagés par toutes les pages
   (en-têtes de section, liens, ligne d'étapes, portes de sortie…).
   Se charge après style.css, qui fournit les jetons, la barre de navigation,
   les boutons, le pied de page et la fenêtre de téléchargement.
   ========================================================================== */

.v3 main > section{padding:140px 0}
.v3 main h2{font-size:clamp(32px,4.5vw,62px);letter-spacing:-.03em;line-height:1.02;text-wrap:balance}
.v3 main .legal h2{font-size:24px;letter-spacing:-.02em;line-height:1.1}
.h-head{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:24px 72px;align-items:end}
.h-head p{font-size:18px;color:#514a3c;max-width:44ch;padding-bottom:6px}
.h-link{display:inline-block;font-weight:600;font-size:16px;color:inherit;text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:6px;transition:text-underline-offset .2s ease,text-decoration-color .2s ease}
.h-link:hover{text-underline-offset:9px;text-decoration-color:currentColor}

/* ---------- Fil de progression de lecture ---------- */
.h-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:70;pointer-events:none}
.h-progress i{display:block;height:100%;background:var(--gold);transform-origin:0 50%;transform:scaleX(var(--sp,0))}

/* ---------- Ouverture : le dépliant s'ouvre en boucle (vidéo) ---------- */
.h-hero{position:relative;background:var(--ink-3);color:var(--paper);overflow:hidden;min-height:min(calc(100svh - 104px),860px);display:flex;align-items:center}
.h-hero-video{position:absolute;top:0;right:-3%;width:88%;height:100%;object-fit:cover;object-position:72% 50%}
.h-hero-veil{position:absolute;inset:0;background:linear-gradient(90deg,var(--ink-3) 0%,var(--ink-3) 22%,rgba(15,26,46,0) 44%),linear-gradient(0deg,var(--ink-3) 0,rgba(15,26,46,0) 16%)}
.h-hero .wrap{position:relative;width:100%;padding-top:72px;padding-bottom:96px}
.h-hero-txt{max-width:min(500px,40vw)}
.h-kicker{font-size:15px;font-weight:600;color:var(--gold-soft)}
/* le repère fait partie du H1 (mot-clé), sans en prendre l'allure */
h1 .h-kicker{display:block;font-family:'Inter',system-ui,sans-serif;font-size:15px;font-weight:600;letter-spacing:0;line-height:1.5;margin-bottom:20px;color:var(--gold-soft)}
.h-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.h-hero h1{font-size:clamp(40px,5vw,68px);font-weight:800;letter-spacing:-.035em;line-height:.98;margin-top:0}
.h-hero h1 .l{display:block}
.h-hero h1 .g{color:var(--gold-bright)}
.h-hero .lead{font-size:18.5px;line-height:1.55;color:#c9d2e0;margin-top:28px;max-width:44ch}
.h-hero-cta{display:flex;gap:14px;flex-wrap:wrap;margin-top:34px}
.h-hero-cta .btn-ghost svg{transition:transform .25s ease}
.h-hero-cta .btn-ghost:hover svg{transform:translateY(3px)}
.h-hero-facts{list-style:none;display:flex;flex-wrap:wrap;gap:8px 26px;margin-top:38px;font-size:14px;color:#9fb0c9}
.h-hero-facts li{display:flex;align-items:center;gap:9px}
.h-hero-facts li::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--gold)}
/* entrée en scène, une seule fois, au chargement */
.h-kicker,.h-hero h1 .l,.h-hero .lead,.h-hero-cta,.h-hero-facts{animation:monte .8s cubic-bezier(.2,.7,.2,1) both}
.h-hero h1 .l:nth-child(2){animation-delay:.08s}
.h-hero h1 .l:nth-child(3){animation-delay:.16s}
.h-hero h1 .l:nth-child(4){animation-delay:.34s}
.h-hero h1 .l:nth-child(5){animation-delay:.42s}
.h-hero .lead{animation-delay:.6s}
.h-hero-cta{animation-delay:.7s}
.h-hero-facts{animation-delay:.8s}
.h-hero-video{animation:video-entre 1.4s ease both}
@keyframes video-entre{from{opacity:0;transform:scale(1.05)}}

.h-pause{position:absolute;right:20px;bottom:18px;z-index:2;display:inline-flex;align-items:center;gap:8px;font:500 13px/1 'Inter',sans-serif;color:#c9d2e0;background:rgba(15,26,46,.6);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:9px 14px;cursor:pointer;backdrop-filter:blur(6px)}
.h-pause:hover{color:#fff;border-color:rgba(255,255,255,.5)}
.h-pause .i-play{display:none}
.calme .h-pause .i-play{display:block}
.calme .h-pause .i-pause{display:none}

/* ---------- Bandeau défilant ---------- */
.h-marquee{display:flex;overflow:hidden;background:var(--gold-bright);color:var(--ink-3);padding:18px 0;user-select:none}
.h-marquee ul{flex:none;display:flex;list-style:none;animation:defile 46s linear infinite}
.h-marquee li{display:flex;align-items:center;white-space:nowrap;font-family:'Bricolage Grotesque';font-weight:700;font-size:19px;letter-spacing:-.01em}
.h-marquee li::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--ink-3);opacity:.45;margin:0 26px}
@keyframes defile{to{transform:translateX(-100%)}}
.h-marquee:hover ul,.calme .h-marquee ul{animation-play-state:paused}

/* ---------- Le document, volet par volet ---------- */
.h-doc{background:var(--paper)}
.h-doc-grid{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:88px;margin-top:40px;align-items:start}
.h-viewer{position:sticky;top:84px;height:calc(100vh - 104px);max-height:780px;display:flex;align-items:center;justify-content:center;gap:34px}
.h-viewer::before{
  content:"";position:absolute;left:50%;top:50%;width:min(92%,600px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;
  background:
    radial-gradient(closest-side,var(--paper-2) 62%,transparent calc(62% + 1px)),
    radial-gradient(closest-side,transparent calc(80% - 1px),var(--line) 80%,transparent calc(80% + 1px)),
    radial-gradient(closest-side,transparent calc(100% - 1.5px),var(--line) calc(100% - .5px),transparent 100%);
}
.h-viewer-card{position:relative;height:min(86%,640px);aspect-ratio:560/1186;transform:perspective(1300px) rotateY(var(--ry,-9deg)) rotateX(var(--rx,3deg));transition:transform .35s ease-out;transform-style:preserve-3d}
.h-viewer-card img{position:absolute;inset:0;width:100%;height:100%;border-radius:4px;box-shadow:0 40px 70px -34px rgba(15,26,46,.6),0 2px 0 rgba(15,26,46,.05);opacity:0;transform:translateX(46px) rotateY(-28deg);transform-origin:left center;transition:opacity .45s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
.h-viewer-card img.on{opacity:1;transform:none}
.h-viewer-card img.vu{transform:translateX(-46px) rotateY(28deg)}
.h-dots{position:relative;display:flex;flex-direction:column;gap:10px}
.h-dots button{width:8px;height:8px;border-radius:999px;border:none;background:#cfc4ad;padding:0;cursor:pointer;transition:height .3s ease,background .3s ease}
.h-dots button.on{height:34px;background:var(--gold)}
.h-steps{list-style:none}
.h-step{min-height:74vh;display:flex;align-items:center;opacity:.22;transition:opacity .45s ease}
.h-step.on{opacity:1}
.h-step > img{display:none}
.h-step .vol{font-size:15px;font-weight:600;color:var(--gold-deep)}
.h-step h3{font-size:clamp(30px,3.5vw,48px);letter-spacing:-.03em;line-height:1.04;margin-top:12px}
.h-step p:last-child{font-size:18px;color:#514a3c;margin-top:18px;max-width:42ch}
.h-doc-end{display:flex;align-items:center;gap:20px 34px;flex-wrap:wrap;margin-top:40px;padding-top:40px;border-top:2px solid var(--ink)}

/* ---------- Le chiffre ---------- */
.h-chiffre{position:relative;overflow:hidden;background:var(--ink-3);color:var(--paper)}
.h-chiffre::before{
  content:"";position:absolute;left:50%;top:50%;width:1500px;height:1500px;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:
    radial-gradient(closest-side,rgba(43,70,112,.55),transparent 62%),
    radial-gradient(closest-side,transparent calc(46% - 1px),rgba(184,137,43,.35) 46%,transparent calc(46% + 1px)),
    radial-gradient(closest-side,transparent calc(72% - 1px),rgba(255,255,255,.07) 72%,transparent calc(72% + 1px)),
    radial-gradient(closest-side,transparent calc(100% - 1.5px),rgba(255,255,255,.07) calc(100% - .5px),transparent 100%);
}
.h-chiffre .wrap{position:relative}
.h-chiffre h2{max-width:20ch}
.c-stage{margin-top:72px}
.c-top{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.c-big{display:flex;flex-direction:column}
.c-label{font-size:18px;font-weight:500;color:#9fb0c9}
.c-num{font-family:'Bricolage Grotesque';font-weight:800;font-size:clamp(64px,13.5vw,196px);letter-spacing:-.045em;line-height:.95;color:var(--gold-bright);font-variant-numeric:tabular-nums;transition:color .5s ease;white-space:nowrap}
.c-stage.net .c-num{color:#fff}
.c-replay{display:none;align-items:center;gap:8px;font:600 14px/1 'Inter',sans-serif;color:#c9d2e0;background:none;border:1px solid rgba(255,255,255,.28);border-radius:999px;padding:11px 18px;cursor:pointer;margin-bottom:18px;flex:none}
.c-stage.js .c-replay{display:inline-flex}
.c-replay:hover{color:#fff;border-color:rgba(255,255,255,.6)}
.c-replay:hover svg{transform:rotate(-40deg)}
.c-replay svg{transition:transform .3s ease}
.c-bar{display:flex;gap:4px;height:112px;margin-top:28px}
.c-bar i{display:block;height:100%;width:var(--tw);flex:none}
.c-bar i:first-child{border-radius:8px 0 0 8px}
.c-bar i:last-child{border-radius:0 8px 8px 0}
.c-stage.js .c-bar i{width:0;transition:width .85s cubic-bezier(.22,1,.36,1)}
.c-stage.js .c-bar i.on{width:var(--tw)}
.c-legend{list-style:none;display:grid;grid-template-columns:repeat(5,1fr);gap:24px;margin-top:36px}
.c-legend li{border-top:3px solid var(--c);padding-top:14px;font-size:14.5px;color:#b4c0d3;display:flex;flex-direction:column;gap:5px}
.c-legend b{font-family:'Bricolage Grotesque';font-weight:700;font-size:24px;color:#fff;letter-spacing:-.015em}
.c-stage.js .c-legend li{opacity:0;transform:translateY(14px);transition:opacity .5s ease,transform .5s ease}
.c-stage.js .c-legend li.on{opacity:1;transform:none}
.c-foot{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:24px 72px;margin-top:88px;padding-top:40px;border-top:1px solid rgba(255,255,255,.18);align-items:start}
.c-ratio{font-family:'Bricolage Grotesque';font-weight:600;font-size:clamp(24px,2.9vw,40px);letter-spacing:-.02em;line-height:1.15}
.c-ratio .g{color:var(--gold-bright)}
.c-note{font-size:17px;color:#b4c0d3}
.c-note span{display:block;margin-top:14px;font-size:13.5px;color:#8696b0}

/* ---------- Le film ---------- */
.h-film{background:var(--paper)}
.h-film-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:72px;align-items:center}
.h-film p{font-size:18px;color:#514a3c;margin:22px 0 26px;max-width:36ch}
.h-player{position:relative;border-radius:8px;overflow:hidden;background:var(--ink-3);box-shadow:18px 18px 0 var(--gold-soft)}
.h-player video{display:block;width:100%;height:auto;aspect-ratio:16/9}
.h-play{position:absolute;inset:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;border:none;cursor:pointer;color:#fff;font:600 16px/1 'Inter',sans-serif;background:linear-gradient(0deg,rgba(15,26,46,.7),rgba(15,26,46,.25))}
.h-play span{width:92px;height:92px;border-radius:50%;background:var(--gold-bright);color:var(--ink-3);display:flex;align-items:center;justify-content:center;transition:transform .25s cubic-bezier(.2,.7,.2,1);box-shadow:0 0 0 0 rgba(210,165,70,.5);animation:pouls 2.4s ease-out infinite}
.h-play:hover span{transform:scale(1.1)}
@keyframes pouls{to{box-shadow:0 0 0 26px rgba(210,165,70,0)}}
.calme .h-play span{animation:none}
.h-player.joue .h-play{display:none}

/* ---------- Ce que ça change ---------- */
.h-gains{background:var(--paper-2)}
.h-rows{margin-top:64px}
.h-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 72px;padding:44px 0;align-items:baseline}
.h-row::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--ink);transform-origin:0 50%}
.h-row.pre::before{transform:scaleX(0)}
.h-row.pre.in::before{transform:scaleX(1);transition:transform 1s cubic-bezier(.2,.7,.2,1) .1s}
.h-row h3{font-size:clamp(26px,3vw,40px);letter-spacing:-.025em;line-height:1.08;transition:transform .3s ease}
.h-row p{font-size:18px;color:#514a3c;max-width:46ch}
.h-row:hover h3{transform:translateX(14px)}

/* ---------- Méthode : la ligne se remplit au défilement ---------- */
.h-methode{background:var(--paper)}
.h-line{--p:1;position:relative;list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:36px;margin-top:84px}
.h-line::before,.h-line::after{content:"";position:absolute;left:0;top:22px;height:2px}
.h-line::before{right:0;background:var(--line)}
.h-line::after{width:calc(var(--p) * 100%);background:var(--gold);transition:width .15s linear}
.h-line li{position:relative;z-index:1}
.h-line .dot{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:var(--paper);border:2px solid var(--line);font-family:'Bricolage Grotesque';font-weight:800;font-size:18px;color:var(--muted);transition:background .35s ease,border-color .35s ease,color .35s ease,transform .35s cubic-bezier(.2,.7,.2,1)}
.h-line li.on .dot{background:var(--gold-bright);border-color:var(--gold-bright);color:var(--ink-3);transform:scale(1.1)}
.h-line h3{font-size:22px;margin-top:26px;letter-spacing:-.015em}
.h-line p{font-size:15.5px;color:#5d5546;margin-top:10px}
.h-line.js li:not(.on) h3,.h-line.js li:not(.on) p{opacity:.4}
.h-line h3,.h-line p{transition:opacity .4s ease}
.h-methode-end{margin-top:56px}

/* ---------- Référence ---------- */
.h-ref{background:var(--ink);color:var(--paper)}
.h-ref figure{max-width:980px}
.h-ref blockquote{font-family:'Bricolage Grotesque';font-weight:600;font-size:clamp(25px,3.3vw,46px);letter-spacing:-.025em;line-height:1.16;text-wrap:pretty}
.h-ref figcaption{margin-top:30px;font-size:16px;color:#b4c0d3;padding-left:20px;border-left:3px solid var(--gold)}
.h-ref figcaption b{display:block;color:#fff;font-family:'Bricolage Grotesque';font-size:18px;font-weight:600}
.h-ref-facts{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:28px;margin-top:72px}
.h-ref-facts li{border-top:1px solid rgba(255,255,255,.28);padding-top:16px;font-size:15.5px;color:#c9d2e0}

/* ---------- Deux portes de sortie ---------- */
.h-fin{background:var(--paper)}
.h-doors{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:56px}
.h-door{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-height:340px;padding:44px;border-radius:8px;border:2px solid var(--ink);background:transparent;color:var(--ink);font:inherit;cursor:pointer;overflow:hidden;transition:color .35s ease,transform .35s cubic-bezier(.2,.7,.2,1)}
.h-door::before{content:"";position:absolute;inset:0;background:var(--ink);transform:translateY(101%);transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.h-door > *{position:relative}
.h-door .t{font-family:'Bricolage Grotesque';font-weight:800;font-size:clamp(28px,3.3vw,46px);letter-spacing:-.03em;line-height:1.02}
.h-door .d{font-size:17px;margin-top:18px;max-width:34ch;opacity:.82}
.h-door .go{margin-top:auto;padding-top:36px;display:inline-flex;align-items:center;gap:12px;font-weight:600;font-size:16px}
.h-door .go svg{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.h-door:hover,.h-door:focus-visible{color:#fff;transform:translateY(-4px)}
.h-door:hover::before,.h-door:focus-visible::before{transform:none}
.h-door:hover .go svg,.h-door:focus-visible .go svg{transform:translateX(10px)}
.h-door.gold{background:var(--gold-bright);border-color:var(--gold-bright);color:var(--ink-3)}
.h-door.gold:hover,.h-door.gold:focus-visible{color:#fff;border-color:var(--ink)}

/* ---------- Responsive ---------- */
@media(max-width:1280px){
  /* écrans intermédiaires : la vidéo entière, fondue dans le fond */
  .h-hero-video{width:90%;right:-3%;object-fit:contain;object-position:50% 50%;-webkit-mask-image:radial-gradient(ellipse 50% 50% at 66% 50%,#000 58%,transparent 100%);mask-image:radial-gradient(ellipse 50% 50% at 66% 50%,#000 58%,transparent 100%)}
  .h-hero-veil{display:none}
}
@media(max-width:980px){
  .v3 main > section{padding:88px 0}
  .h-head,.c-foot,.h-film-grid{grid-template-columns:1fr}
  .h-head p{padding-bottom:0}
  /* ouverture : le texte, puis la vidéo en dessous */
  .h-hero{flex-direction:column;align-items:stretch;min-height:0}
  .h-hero .wrap{order:1;padding-top:52px;padding-bottom:36px}
  .h-hero-video{order:2;position:relative;right:auto;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;object-position:74% 50%;-webkit-mask-image:none;mask-image:none}
  .h-hero-veil{display:none}
  .h-hero-txt{max-width:none}
  .h-pause{bottom:14px;right:14px}
  .h-pause span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .h-pause{padding:11px}
  /* le document : chaque volet avec son image, sans épinglage */
  .h-doc-grid{grid-template-columns:1fr;margin-top:56px}
  .h-viewer{display:none}
  .h-step{min-height:0;opacity:1;display:grid;grid-template-columns:minmax(0,150px) minmax(0,1fr);gap:26px;align-items:center;padding:34px 0;border-top:1px solid var(--line)}
  .h-step > img{display:block;width:100%;height:auto;border-radius:3px;box-shadow:0 22px 36px -22px rgba(15,26,46,.55)}
  .h-step:nth-child(even) > img{transform:rotate(1.5deg)}
  .h-step:nth-child(odd) > img{transform:rotate(-1.5deg)}
  .h-doc-end{margin-top:0}
  .c-foot{margin-top:56px}
  .c-legend{grid-template-columns:repeat(3,1fr)}
  .h-film-grid{gap:44px}
  .h-row{grid-template-columns:1fr;padding:32px 0}
  .h-line{grid-template-columns:1fr;gap:34px;margin-top:56px;padding-left:0}
  .h-line::before,.h-line::after{left:22px;top:0;width:2px;height:auto}
  .h-line::before{bottom:0;right:auto}
  .h-line::after{width:2px;height:calc(var(--p) * 100%)}
  .h-line li{display:grid;grid-template-columns:46px 1fr;column-gap:22px}
  .h-line .dot{grid-row:1 / span 2}
  .h-line h3{margin-top:9px}
  .h-line p{grid-column:2}
  .h-ref-facts{grid-template-columns:1fr 1fr;margin-top:48px}
  .h-doors{grid-template-columns:1fr}
  .h-door{min-height:0;padding:32px 28px}
}
@media(max-width:560px){
  .h-hero h1{font-size:clamp(36px,10.6vw,44px)}
  .h-step{grid-template-columns:1fr;gap:22px}
  .h-step > img{width:56%;margin:0 auto}
  .c-bar{height:76px}
  .c-legend{grid-template-columns:1fr 1fr;gap:20px 16px}
  .c-legend b{font-size:21px}
  .c-top{flex-direction:column;align-items:flex-start;gap:14px}
  .c-replay{margin-bottom:0;padding:10px 14px}
  .h-player{box-shadow:10px 10px 0 var(--gold-soft)}
  .h-play span{width:72px;height:72px}
  .h-ref-facts{grid-template-columns:1fr}
  .h-marquee li{font-size:16px}
}

/* ---------- Mouvement réduit : tout est visible, rien ne bouge seul ---------- */
@media(prefers-reduced-motion:reduce){
  .h-kicker,.h-hero h1 .l,.h-hero .lead,.h-hero-cta,.h-hero-facts,.h-hero-video,.h-play span{animation:none}
  .h-marquee{overflow-x:auto}
  .h-marquee ul{animation:none}
  .h-marquee ul[aria-hidden]{display:none}
  .h-viewer-card,.h-viewer-card img,.h-step,.h-door,.h-door::before,.h-row h3,.h-line::after,.h-line .dot{transition:none}
  .h-pause{display:none}
}
@media print{.h-progress,.h-pause,.h-marquee,.h-hero-video,.h-play{display:none}}
