/* =========================================================
   Accueil : une salle de cinéma, pas une vitrine.
   Le premier écran présente UNE histoire, plein cadre ; son ambiance
   (couleur, lumière, particules) teinte toute la page d'ouverture.
   Dessous : la sélection, la promesse, une dernière accroche.
   ========================================================= */

@property --tint { syntax: "<color>"; inherits: true; initial-value: #7a1c1c; }

.home {
  --wrap: 68rem;
  --cta: #e0a35c; --cta-ink: #15110a;
  background: color-mix(in srgb, var(--tint) 9%, #0a0d14);
  transition: --tint 1.6s ease;
}

/* ---------- En-tête, par-dessus l'image ---------- */
.home-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem calc(var(--gutter) + clamp(4.5rem, 10vw, 8.75rem)) 1.1rem var(--gutter);
  background: linear-gradient(to bottom, rgb(5 6 9 / .62), transparent);
}
.home-brand {
  font-family: var(--font-display); font-size: 1.3rem; text-decoration: none;
  position: relative; z-index: 1; white-space: nowrap;
}
.home-header__nav {
  display: flex; align-items: center; justify-content: flex-end; gap: .95rem;
  margin-left: auto; flex-wrap: wrap;
  padding: .48rem .8rem;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 999px;
  background: rgb(5 6 9 / .42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 32px rgb(0 0 0 / .20);
}
.home-nav, .home-lang {
  font-family: var(--font-ui); font-size: .84rem; color: var(--ink); text-underline-offset: .2em;
  white-space: nowrap;
}
@media (max-width: 64rem) {
  .home-header { padding-right: calc(var(--gutter) + 4.5rem); }
}
@media (max-width: 48rem) {
  .home-header {
    align-items: flex-start; flex-wrap: wrap;
    padding: 1rem var(--gutter) .6rem;
  }
  .home-header__nav {
    margin-left: auto;
    gap: .75rem;
    padding: .42rem .72rem;
  }
}
@media (max-width: 34rem) {
  .home-header__nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

/* ---------- Ouverture ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: clamp(44rem, 82svh, 54rem);
  display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 1fr); place-items: center;
  overflow: hidden; background: #05060a; text-align: center;
}
.hero__scenes { position: absolute; inset: 0; z-index: -4; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.scene.is-on { opacity: 1; }
.scene img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 34s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.04); }
  to   { transform: scale(1.15) translate(-1.2%, -.8%); }
}

/* Voile : le centre respire, les bords s'enfoncent dans le noir */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 46%, rgb(5 6 9 / .16), rgb(5 6 9 / .82) 100%),
    linear-gradient(to bottom, rgb(5 6 9 / .55), transparent 24%, transparent 58%, rgb(5 6 9 / .92));
}
.hero__canvas { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; }
.hero__fx { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero__grain {
  position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Une ambiance par histoire */
.hero[data-amb="ash"] .hero__fx {
  background: radial-gradient(ellipse 80% 50% at 50% 118%, rgb(208 20 28 / .42), transparent 70%);
  animation: breathe 7s ease-in-out infinite;
}
.hero[data-amb="dust"] .hero__fx {
  background: linear-gradient(112deg, transparent 26%, rgb(255 236 190 / .11) 42%, rgb(255 236 190 / .04) 54%, transparent 64%);
  animation: shaft 16s ease-in-out infinite alternate;
}
.hero[data-amb="mist"] .hero__fx {
  background: radial-gradient(42% 28% at 25% 66%, rgb(190 205 215 / .17), transparent 70%),
              radial-gradient(46% 30% at 75% 40%, rgb(190 205 215 / .12), transparent 70%);
  animation: drift 28s linear infinite alternate;
}
.hero[data-amb="flicker"] .hero__fx {
  background: radial-gradient(60% 50% at 82% 26%, rgb(255 214 150 / .20), transparent 70%);
  animation: lamp 7s infinite;
}
.hero[data-amb="candles"] .hero__fx {
  background: radial-gradient(circle at 9% 18%, rgb(255 188 92 / .38), transparent 28%),
              radial-gradient(circle at 27% 24%, rgb(255 188 92 / .16), transparent 22%);
  animation: lamp 5.5s infinite;
}
.hero[data-amb="gaslight"] .hero__fx {
  background: radial-gradient(40% 40% at 16% 24%, rgb(255 190 90 / .28), transparent 70%),
              radial-gradient(40% 40% at 84% 24%, rgb(255 190 90 / .24), transparent 70%);
  animation: lamp 6s infinite;
}
.hero[data-amb="rain"] .hero__fx {
  background:
    radial-gradient(34% 22% at 54% 76%, rgb(255 50 70 / .20), transparent 70%),
    radial-gradient(34% 22% at 60% 76%, rgb(70 100 255 / .18), transparent 70%),
    repeating-linear-gradient(104deg, transparent 0 5px, rgb(190 205 225 / .12) 5px 6px, transparent 6px 24px);
  background-size: auto, auto, 220px 220px;
  animation: rain-home .6s linear infinite;
}
@keyframes rain-home { to { background-position: 0 0, 0 0, -45px 220px; } }
@keyframes breathe { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes shaft   { from { transform: translateX(-4%); } to { transform: translateX(5%); } }
@keyframes drift   { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@keyframes lamp {
  0%, 100% { opacity: .9; } 14% { opacity: .72; } 31% { opacity: 1; } 47% { opacity: .8; }
  63% { opacity: .98; } 80% { opacity: .76; }
}

/* Contenu : caché tant que l'intro n'est pas finie */
.hero__content {
  position: relative; z-index: 2;
  width: min(100% - 2 * var(--gutter), 52rem);
  padding: clamp(5.25rem, 8vh, 6.25rem) 0 1rem;
  display: grid; justify-items: center; gap: .9rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
.is-ready .hero__content { opacity: 1; transform: none; }
.is-ready .hero__content.is-swap { opacity: 0; transform: translateY(8px); transition-duration: .3s; }
.hero__content--static { opacity: 1; transform: none; }

.hero__eyebrow {
  font-family: var(--font-ui); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}
.hero__title {
  font-family: var(--hero-display, var(--font-display));
  font-weight: var(--hero-weight, 400); text-transform: var(--hero-case, none);
  font-size: clamp(2.6rem, min(8.2vw, 14vh), 8.6rem); line-height: .92; letter-spacing: -.005em;
  text-wrap: balance; text-shadow: 0 4px 44px rgb(0 0 0 / .75);
}
.hero__hook {
  max-width: 30em; font-style: italic; line-height: 1.5; color: #ebe4d6;
  font-size: clamp(1.05rem, .95rem + .7vw, 1.4rem); text-shadow: 0 2px 24px rgb(0 0 0 / .9);
}
.hero__actions { margin-top: .9rem; display: grid; justify-items: center; gap: .8rem; }
.hero__cta {
  padding: 1rem 1.8rem; border-radius: 99px;
  background: var(--cta); color: var(--cta-ink);
  font-family: var(--font-ui); font-size: .88rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 0 46px color-mix(in srgb, var(--cta) 45%, transparent);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 0 64px color-mix(in srgb, var(--cta) 65%, transparent); }
.hero__alt { font-family: var(--font-ui); font-size: .85rem; color: var(--ink-muted); text-underline-offset: .2em; }
.hero__assure {
  font-family: var(--font-ui); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted);
}

/* Bas de l'ouverture : TOUTES les histoires restent visibles, avec un appel vers la suite */
.hero__bottom {
  position: relative; z-index: 3; width: 100%; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: .55rem; padding: 0 var(--gutter) .8rem;
  opacity: 0; transition: opacity 1.6s ease .5s;
}
.is-ready .hero__bottom { opacity: 1; }
#hero-pick { width: 100%; min-width: 0; display: grid; justify-items: center; gap: .75rem; }
.hero__count {
  font-family: var(--font-ui); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
}
.pick {
  list-style: none; margin: 0; padding: .3rem .2rem .5rem; width: min(100%, 76rem); min-width: 0;
  display: flex; gap: .7rem; overflow-x: auto; scrollbar-width: none;
}
.pick::-webkit-scrollbar { display: none; }
.pick li { flex: 1 1 0; min-width: 8.4rem; max-width: 11.8rem; }
.pick li:first-child { margin-left: auto; }
.pick li:last-child { margin-right: auto; }
.pick button {
  width: 100%; display: grid; gap: .25rem; text-align: left; padding: 0; background: none; border: 0;
  font-family: var(--font-ui); color: color-mix(in srgb, var(--ink) 62%, transparent);
}
.pick__img {
  display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; border: 2px solid transparent; opacity: .55;
  transition: opacity .3s, border-color .3s, transform .3s var(--ease-out);
}
.pick__img img { width: 100%; height: 100%; object-fit: cover; }
.pick__t { font-size: .8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick__m { font-size: .7rem; letter-spacing: .08em; opacity: .7; }
.pick button:hover, .pick button[aria-pressed="true"] { color: #fff; }
.pick button:hover .pick__img, .pick button:focus-visible .pick__img { opacity: .92; transform: translateY(-2px); }
.pick button[aria-pressed="true"] .pick__img { opacity: 1; border-color: var(--cta); }
.hero__cue {
  display: inline-grid; justify-items: center; gap: .1rem;
  font-family: var(--font-ui); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-muted); text-decoration: none;
}
.hero__cue:hover { color: var(--ink); }
.hero__cue svg { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Intro : une phrase après l'autre, dans le noir ---------- */
.intro {
  position: fixed; inset: 0; z-index: 60; display: none; place-content: center; gap: .2rem;
  padding: var(--gutter); text-align: center; background: #030304;
  transition: opacity 1s ease;
}
.is-intro .intro { display: grid; }
.intro.is-out { opacity: 0; pointer-events: none; }
.intro__line {
  margin: 0; font-family: var(--font-display); font-size: clamp(1.7rem, 1rem + 3.2vw, 3.2rem); line-height: 1.25; color: #ebe4d6;
  opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease, transform 1.2s ease;
}
.intro__line.is-in { opacity: 1; transform: none; }
.intro__skip {
  position: absolute; inset: auto 0 1.4rem 0; margin: 0;
  font-family: var(--font-ui); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgb(255 255 255 / .35);
}

/* ---------- On éteint la lumière avant d'ouvrir une histoire ---------- */
.curtain { position: fixed; inset: 0; z-index: 80; background: #000; opacity: 0; pointer-events: none; transition: opacity .65s ease; }
.is-leaving .curtain { opacity: 1; pointer-events: all; }

/* ---------- La sélection ---------- */
.home-list { max-width: var(--wrap); margin: 0 auto; padding: clamp(4rem, 11vh, 7rem) var(--gutter) 0; }
.home-list:focus { outline: none; }
.home-list__title { font-family: var(--font-display); font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); line-height: 1.05; }

.timepick { margin: 1.4rem 0 2rem; display: grid; gap: .7rem; }
.timepick__q { font-family: var(--font-ui); font-size: .85rem; color: var(--ink-muted); }
.timepick__btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.timepick__btns button {
  padding: .5rem 1rem; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; font-family: var(--font-ui); font-size: .85rem; color: var(--ink);
  transition: background .2s, border-color .2s;
}
.timepick__btns button:hover { border-color: var(--accent); }
.timepick__btns button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); }
.timepick__status { min-height: 1.3em; font-family: var(--font-ui); font-size: .85rem; color: var(--accent); }

.catalogue { display: grid; gap: 1.2rem; }
.story-card {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--c-bg); color: var(--c-ink);
  border-radius: 6px; overflow: hidden;
  transition: opacity .5s ease, filter .5s ease, transform .5s var(--ease-out);
}
.story-card.is-dim { opacity: .28; filter: grayscale(.7); }
@media (min-width: 46rem) {
  .story-card { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); min-height: 13.5rem; }
  .story-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
  .story-card:nth-child(even) .story-card__media { order: 2; }
}
.story-card__media { overflow: hidden; }
.story-card__media img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--ease-out); }
@media (min-width: 46rem) { .story-card__media img { aspect-ratio: auto; } }
.story-card:hover .story-card__media img { transform: scale(1.04); }

.story-card__body { display: flex; flex-direction: column; gap: .6rem; padding: clamp(1.2rem, 2.6vw, 1.9rem); justify-content: center; }
.story-card__kicker {
  font-family: var(--font-ui); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c-ink) 66%, transparent);
}
.story-card__title { font-family: var(--c-display); font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.05; }
.story-card__teaser { font-size: 1rem; line-height: 1.55; max-width: 36em; }
.story-card__author { font-family: var(--font-ui); font-size: .8rem; color: color-mix(in srgb, var(--c-ink) 72%, transparent); }
.story-card__author a { position: relative; z-index: 2; color: inherit; text-underline-offset: .2em; }
.story-card__author a:hover { color: var(--c-ink); }
.story-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .3rem; }
.story-card__meta { font-family: var(--font-ui); font-size: .78rem; color: color-mix(in srgb, var(--c-ink) 60%, transparent); }
.story-card__cta {
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  padding: .45rem .95rem; border-radius: 99px; background: var(--c-accent); color: #fff;
}

/* Lien étiré : toute la carte est cliquable, un seul arrêt clavier */
.story-card__link { text-decoration: none; }
.story-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.story-card:hover .story-card__link { text-decoration: underline; text-decoration-thickness: 1px; }
.story-card__link:focus-visible { outline: none; }
.story-card:has(.story-card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.catalogue-fallback { line-height: 2; }

/* ---------- La promesse ---------- */
.home-promise { max-width: 44rem; margin: 0 auto; padding: clamp(5rem, 16vh, 9rem) var(--gutter) 2rem; text-align: center; }
.promise__big { font-family: var(--font-display); font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); line-height: 1.08; text-wrap: balance; }
.promise__small { margin-top: 1.4rem; font-family: var(--font-ui); font-size: .95rem; letter-spacing: .08em; color: var(--accent); }
.promise__tips { margin: 2rem auto 0; max-width: 32em; font-size: .92rem; line-height: 1.65; color: var(--ink-muted); }

/* ---------- La dernière accroche ---------- */
.home-last { padding: clamp(3rem, 9vh, 5rem) var(--gutter) clamp(4rem, 12vh, 7rem); text-align: center; display: grid; justify-items: center; gap: 1.2rem; }
.home-last h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
.home-last__link {
  padding: .9rem 1.6rem; border-radius: 99px; border: 1px solid var(--accent);
  font-family: var(--font-ui); font-size: .88rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: background .25s;
}
.home-last__link::after { content: " →"; }
.home-last__link:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.home-last__pick { min-height: 1.4em; font-family: var(--font-ui); font-size: .82rem; color: var(--ink-muted); }

/* ---------- Pied de page ---------- */
.home-footer { max-width: var(--wrap); margin: 0 auto; padding: 1.6rem var(--gutter) 2.5rem; border-top: 1px solid var(--line); display: grid; gap: 1.2rem; }
.lang-box--home { width: 100%; max-width: none; margin: 0; }
.home-footer__legal { font-family: var(--font-ui); font-size: .82rem; color: var(--ink-muted); }

/* V98 : hauteur d'introduction plus compacte */
@media (max-width: 64rem) {
  .hero { min-height: clamp(42rem, 86svh, 50rem); }
}
@media (max-width: 48rem) {
  .hero { min-height: clamp(40rem, 88svh, 48rem); }
}
@media (max-width: 34rem) {
  .hero { min-height: clamp(38rem, 90svh, 46rem); }
}

/* ---------- Moins de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  .scene img, .hero__fx, .hero__grain, .hero__cue svg { animation: none !important; }
  .scene, .hero__content, .hero__bottom, .story-card { transition: none; }
}

/* V4 : rail extensible 12 → 30 histoires */
.pick-wrap{position:relative;width:min(100%,82rem);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.35rem}.pick-wrap::before,.pick-wrap::after{content:"";position:absolute;top:0;bottom:0;width:2.5rem;z-index:2;pointer-events:none}.pick-wrap::before{left:2.2rem;background:linear-gradient(90deg,var(--bg,#08090d),transparent)}.pick-wrap::after{right:2.2rem;background:linear-gradient(-90deg,var(--bg,#08090d),transparent)}.pick{width:100%;scroll-snap-type:x proximity;padding-inline:1rem}.pick li{flex:0 0 clamp(7.6rem,10vw,10.5rem);scroll-snap-align:center}.pick li:first-child,.pick li:last-child{margin:0}.pick-arrow{position:relative;z-index:3;width:2rem;height:3.2rem;border:1px solid rgb(255 255 255/.18);border-radius:999px;background:rgb(0 0 0/.35);color:#fff;cursor:pointer}.pick-arrow:disabled{opacity:.2;cursor:default}.pick-arrow:focus-visible{outline:2px solid #fff;outline-offset:2px}@media(max-width:38rem){.pick-wrap{grid-template-columns:1.8rem minmax(0,1fr) 1.8rem}.pick-wrap::before{left:1.8rem}.pick-wrap::after{right:1.8rem}.pick-arrow{width:1.8rem;height:2.8rem}}


/* V5.2 : Léka au Coin lecture : intégration à droite, sous le menu, sans masquer la navigation */
.hero__content {
  width: min(100% - 2 * var(--gutter), 50rem);
  padding-right: clamp(0rem, 10vw, 7rem);
}
.hero__leka{
  position:absolute;
  z-index:4;
  top:clamp(8rem,18vh,11.5rem);
  right:clamp(1rem,4vw,3rem);
  width:clamp(96px,10vw,148px);
  pointer-events:none;
  user-select:none;
  opacity:.96;
  filter:drop-shadow(0 16px 32px rgb(0 0 0 / .48));
}
.hero__leka::before{
  content:"";
  position:absolute;
  inset:auto -8% -10% -10%;
  height:38%;
  border-radius:999px;
  background:radial-gradient(circle, rgb(255 214 150 / .10), transparent 72%);
  z-index:-1;
}
.hero__leka img{width:100%;height:auto;display:block}
@media(max-width:64rem){
  .hero__content{padding-right:clamp(0rem, 6vw, 4rem)}
  .hero__leka{top:8.4rem;right:1rem;width:118px}
}
@media(max-width:48rem){
  .hero__content{padding-top:7.2rem;padding-right:0;width:min(100% - 2 * var(--gutter), 42rem)}
  .hero__leka{top:7.8rem;right:1rem;width:88px;opacity:.92}
}
@media(max-width:34rem){
  .hero__content{padding-top:8rem}
  .hero__leka{top:8.9rem;right:.8rem;width:72px;opacity:.88}
}
@media(prefers-reduced-motion:reduce){.hero__leka{transition:none}}
