/* « 2026 → 2050 » : avant/après piloté par le défilement.
   Un bloc .story contient N scènes ; la hauteur se règle seule (--n posé par 2050.js). */
.story{--nav:75px;position:relative;height:calc(var(--n,2) * 180svh)}
.story .sticky{position:sticky;top:var(--nav);height:calc(100svh - var(--nav));overflow:hidden;background:var(--noir)}
.story .scene{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;pointer-events:none}
.story .scene.on{opacity:1;pointer-events:auto}
.story .media{position:absolute;inset:0;cursor:ew-resize;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.story .media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:var(--op,50%) 50%;-webkit-user-drag:none}
.story .media .apres{clip-path:inset(0 0 0 var(--pos,100%))}
.story .ligne{position:absolute;top:0;bottom:0;left:var(--pos,100%);width:3px;margin-left:-1.5px;background:#fff;box-shadow:0 0 18px rgba(0,0,0,.35);pointer-events:none}
.story .ligne::after{content:"";position:absolute;top:50%;left:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D5348' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center/22px no-repeat;box-shadow:0 4px 16px rgba(0,0,0,.35)}
.story .annee{position:absolute;top:22px;font-size:clamp(18px,2.2vw,26px);font-weight:700;color:#fff;padding:4px 14px;border-radius:99px;background:rgba(23,32,28,.7)}
.story .annee.g{left:22px} .story .annee.d{right:22px;background:var(--vert)}
.story .legende{position:absolute;left:28px;bottom:32px;max-width:480px;padding:20px 22px;border-radius:16px;background:rgba(23,32,28,.8);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff}
.story .legende .t{display:none} .story .legende .t.on{display:block;animation:monte2050 .45s ease}
.story .legende b{display:block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--lime);margin-bottom:6px}
.story .legende h3,.story .legende h2{font-size:clamp(19px,2vw,24px);margin-bottom:6px}
.story .legende p{font-size:15px;color:#dfe8e3}
.story .legende .comp{margin:10px 0 8px;padding:10px 14px;border-radius:10px;background:rgba(143,224,78,.14);border-left:3px solid var(--lime);font-size:14.5px;line-height:1.5;color:#fff}
.story .legende .comp span{display:block;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--lime);margin-bottom:3px}
.story .legende p.metier{font-size:14px;font-weight:600;color:#fff}
@keyframes monte2050{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.story .fiction{position:absolute;right:16px;bottom:14px;font-size:12px;font-weight:600;color:#fff;background:rgba(23,32,28,.7);padding:4px 10px;border-radius:8px}
.story .reperes{position:absolute;z-index:4;right:22px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:10px}
.story .reperes i{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.45)}
.story .reperes i.on{background:#fff}
.story .astuce{position:absolute;z-index:4;left:50%;top:22px;transform:translateX(-50%);white-space:nowrap;font-size:13px;font-weight:600;color:#fff;background:rgba(23,32,28,.7);padding:6px 14px;border-radius:99px;transition:opacity .4s}
.story .astuce.cache{opacity:0}
.story .scene input[type=range]{position:absolute;left:0;bottom:0;width:100%;opacity:0;pointer-events:none}
.story .scene:has(input:focus-visible) .ligne::after{outline:3px solid var(--vif);outline-offset:3px}

.intro2050{padding:80px 0 52px;text-align:center;background:var(--papier)}
.intro2050 h1,.intro2050 h2{font-size:clamp(28px,3.8vw,46px);margin:12px auto 14px;max-width:18ch}
.intro2050 p{font-size:18px;color:var(--gris);max-width:640px;margin:0 auto}
.intro2050 .src{font-size:13px;margin-top:10px}
.mention-fiction{text-align:center;font-size:13.5px;color:var(--gris);padding:14px 24px 0;background:var(--papier)}
.formation2050{padding:80px 0 88px;background:var(--vif-pale)}
.formation2050 .in{max-width:820px;margin:0 auto;text-align:center}
.formation2050 h2{font-size:clamp(28px,3.6vw,42px);margin:12px 0 14px}
.formation2050 .in>p{font-size:18px;color:var(--gris);max-width:640px;margin:0 auto 28px}
.formation2050 .ekonea{text-align:left;background:var(--vert);color:#fff;border-radius:18px;padding:26px 28px;margin:0 auto 30px}
.formation2050 .ekonea b{display:block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--lime);margin-bottom:8px}
.formation2050 .ekonea p{font-size:17px;line-height:1.6}
.formation2050 .cta{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.suite2050{padding:34px 0 56px;text-align:center;background:var(--papier)}

@media (max-width:720px){
  .story .media{bottom:auto;height:calc(62svh - var(--nav)*.6)}
  .story .legende{left:0;right:0;bottom:0;top:calc(62svh - var(--nav)*.6);max-width:none;border-radius:0;background:var(--noir);padding:16px 18px 18px;backdrop-filter:none;overflow-y:auto}
  .story .legende h3,.story .legende h2{font-size:18px} .story .legende .comp{font-size:13.5px;padding:8px 12px;margin:8px 0 6px}
  .story .annee{top:12px;font-size:16px} .story .annee.g{left:12px} .story .annee.d{right:12px}
  .story .astuce{top:calc(62svh - var(--nav)*.6 - 44px)}
  .story .fiction{right:auto;left:12px;bottom:auto;top:52px;font-size:11px}
  .story .reperes{right:10px;top:calc(31svh - var(--nav)*.3)}
  .intro2050{padding:56px 0 36px}
}

/* Sans animation (ou sans JavaScript) : les comparaisons l'une sous l'autre, à manier au curseur */
html.calme .story,html:not(.js) .story{height:auto}
html.calme .story .sticky,html:not(.js) .story .sticky{position:relative;top:auto;height:auto;background:none;overflow:visible}
html.calme .story .scene,html:not(.js) .story .scene{position:relative;opacity:1;pointer-events:auto;margin:0 auto 48px;max-width:1100px;padding:0 24px;display:flex;flex-direction:column}
html.calme .story .media,html:not(.js) .story .media{position:relative;inset:auto;aspect-ratio:1376/768;height:auto;border-radius:16px;overflow:hidden}
html.calme .story .legende,html:not(.js) .story .legende{position:static;max-width:none;margin-top:12px;border-radius:12px;background:var(--noir);order:3}
html.calme .story .legende .t,html:not(.js) .story .legende .t{display:block;animation:none}
html.calme .story .reperes,html.calme .story .astuce,html:not(.js) .story .reperes,html:not(.js) .story .astuce{display:none}
html.calme .story .scene input[type=range]{position:static;opacity:1;pointer-events:auto;margin-top:10px;accent-color:var(--vert);order:2}
html.calme .story .fiction,html:not(.js) .story .fiction{top:auto;bottom:10px}

/* Accessibilité : titre lu avec chaque scène, lien pour passer l'animation */
.story .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-2050{position:absolute;left:-9999px;top:auto}
.skip-2050:focus{position:static;display:block;text-align:center;padding:10px;background:var(--vif-pale);color:var(--noir);font-weight:600}
/* Sans JavaScript : 2026 puis 2050, l'un sous l'autre, avec leurs deux légendes */
html:not(.js) .story .media{display:flex;flex-direction:column;gap:12px;aspect-ratio:auto;overflow:visible}
html:not(.js) .story .media img{position:static;width:100%;height:auto;aspect-ratio:1376/768;border-radius:12px}
html:not(.js) .story .media .apres{display:block;clip-path:none}
html:not(.js) .story .annee,html:not(.js) .story .ligne{display:none}
html:not(.js) .story .fiction{position:static;align-self:flex-start}
html:not(.js) .story .scene input[type=range]{display:none}
