/* ============================================================
   Sion sous les Étoiles — Design system (démo BendeStudio)
   Concept « La nuit valaisanne ». DA figée dans direction-artistique.md.
   Chaque section a son environnement : la scène (hero vidéo), l'affiche
   (line-up météorique), le guichet (billets perforés), le carré or (VIP),
   la mémoire (rétro), sous le même ciel (newsletter).
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --nuit: #070B1C;
  --nuit-2: #0D1430;
  --nuit-3: #111a3d;
  --etoile: #F4F1E8;
  --etoile-60: rgba(244, 241, 232, .64);
  --etoile-40: rgba(244, 241, 232, .40);
  --or: #F0B43C;
  --or-vif: #FFCB5C;
  --aurore: #E4526E;
  --horizon: #1B2547;
  --horizon-2: #26325c;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, -apple-system, sans-serif;

  --fs-hero: clamp(2.75rem, 9vw, 8rem);
  --fs-h1: clamp(2.25rem, 6vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 4vw, 3rem);
  --fs-h3: clamp(1.25rem, 2.4vw, 1.75rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;

  --sp-1: 0.5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem;
  --sp-6: 3rem; --sp-8: 4rem; --sp-12: 6rem; --sp-16: 8rem;

  --maxw: 1240px;
  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 84px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --glow-or: 0 6px 30px -8px rgba(240, 180, 60, .55);
}

/* --- Reset doux --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--etoile);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Utilitaires -------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-3); }
.section { padding-block: var(--sp-12); position: relative; }
.section--alt { background: var(--nuit-2); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.eyebrow {
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: .04em; color: var(--or); margin-bottom: var(--sp-2);
}
.section-title { font-size: var(--fs-h2); margin-bottom: var(--sp-2); }
.section-lead { color: var(--etoile-60); max-width: 58ch; font-size: 1.125rem; }

/* --- Boutons : penchés comme le logo (signature UI) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .2em 1.5em;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .05em; text-transform: uppercase;
  border-radius: 3px;
  transform: skewX(-8deg);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: skewX(-8deg) translateY(-2px); }
.btn--or { background: var(--or); color: var(--nuit); box-shadow: var(--glow-or); }
.btn--or:hover { background: var(--or-vif); }
.btn--ghost { border: 2px solid var(--etoile); color: var(--etoile); }
.btn--ghost:hover { border-color: var(--or); color: var(--or); }
.btn--disabled { background: var(--horizon); color: var(--etoile-40); cursor: not-allowed; box-shadow: none; }

/* --- Bandeau défilant (façon affiche de rue) ------------------ */
.ticker {
  position: relative; z-index: 6;
  background: var(--or); color: var(--nuit);
  transform: rotate(-1.4deg) scale(1.03);
  margin-top: -2.2em;
  padding: .6em 0;
  overflow: hidden;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.ticker__track { display: inline-flex; width: max-content; animation: tick 30s linear infinite; }
.ticker__track span { padding-right: .5em; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* --- Ciel étoilé (signature 1) ------------------------------ */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sky--section { inset: 0 0 55% 0; }
.sky .star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: var(--etoile);
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.sky .star.big { width: 3px; height: 3px; }
@keyframes twinkle { 0%, 100% { opacity: .18; } 50% { opacity: .7; } }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.constellation line { stroke: var(--horizon-2); stroke-width: 1; }
.constellation circle { fill: var(--etoile); }

/* --- Horizon de Sion (signature 2) -------------------------- */
.horizon-sion { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; z-index: 3; pointer-events: none; }
.horizon-sion path.hill { fill: var(--nuit); }
.horizon-sion path.ridge { fill: none; stroke: var(--horizon-2); stroke-width: 1.5; }

/* --- Badges ------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-body); font-size: .8125rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase;
  padding: .3em .7em; border-radius: 999px;
}
.badge--complet { background: var(--aurore); color: #fff; }
.badge--dispo { background: rgba(240,180,60,.14); color: var(--or); }

/* --- Transitions au scroll (amples, façon WLG) --------------- */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }
.reveal { opacity: 0; transform: translateY(42px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(14% 4% 14% 4%); transform: scale(1.12); transition: clip-path 1.15s var(--ease-out), transform 1.15s var(--ease-out); }
.reveal-img.in { clip-path: inset(0 0 0 0); transform: none; }

/* Entrée du hero au chargement */
@keyframes fadeUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
.hero__content > * { animation: fadeUp 1s var(--ease-out) backwards; }
.hero__content > *:nth-child(2) { animation-delay: .1s; }
.hero__content > *:nth-child(3) { animation-delay: .2s; }
.hero__content > *:nth-child(4) { animation-delay: .3s; }
.hero__content > *:nth-child(5) { animation-delay: .4s; }
.hero__content > *:nth-child(6) { animation-delay: .5s; }

/* --- Fonds photo de section (parallaxe douce) ----------------- */
.section { overflow: hidden; isolation: isolate; }
.section > .wrap, .section > .sky { position: relative; z-index: 2; }
.section > .sky { position: absolute; }
.section-bg {
  position: absolute; inset: -14% 0; z-index: 0;
  background-size: cover; background-position: center;
  will-change: transform; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .sky .star { animation: none; opacity: .4; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero__video { display: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   NAV — le vrai logo du festival, rendu blanc étoile
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--solid { background: rgba(7, 11, 28, .87); backdrop-filter: blur(10px); border-bottom-color: var(--horizon); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav__brand img { height: 46px; width: auto; filter: brightness(0) invert(96%) sepia(4%) saturate(300%) hue-rotate(10deg); }
.nav__links { display: flex; align-items: center; gap: var(--sp-3); }
.nav__links > a { font-size: var(--fs-sm); font-weight: 500; color: var(--etoile); transition: color .2s var(--ease); }
.nav__links > a:not(.nav__cta):hover { color: var(--or); }
.nav__cta { color: var(--nuit); }
.nav__burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; }
.nav__burger span { display: block; height: 2px; width: 24px; margin-inline: auto; background: var(--etoile); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }

@media (max-width: 900px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 11, 28, .97); backdrop-filter: blur(12px);
    padding: var(--sp-2) var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--horizon);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .nav__links > a { padding: var(--sp-2) 0; font-size: 1.1rem; border-bottom: 1px solid var(--horizon); }
  .nav__cta { margin-top: var(--sp-2); border-bottom: none !important; }
  body.menu-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  body.menu-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
  body.menu-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   HERO — la scène : vidéo de la foule, logo officiel, dates géantes
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.hero__video, .hero video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(7,11,28,.55) 0%, rgba(7,11,28,.35) 35%, rgba(7,11,28,.78) 82%, var(--nuit) 100%);
}
.hero .sky { z-index: 2; inset: 0 0 50% 0; }
.hero__content {
  position: relative; z-index: 4;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: calc(var(--nav-h) + var(--sp-4)); padding-bottom: var(--sp-16);
}
.hero__logo {
  width: clamp(240px, 34vw, 460px); height: auto;
  filter: brightness(0) invert(96%) sepia(4%) saturate(300%) hue-rotate(10deg) drop-shadow(0 6px 40px rgba(7,11,28,.55));
}
.hero__dates {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.4rem, 7vw, 5.5rem); line-height: 1;
  margin-top: var(--sp-3);
  text-shadow: 0 2px 40px rgba(7,11,28,.6);
}
.hero__dates span { display: block; font-size: .32em; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--or); margin-top: .35em; }
.hero__place { color: var(--etoile-60); margin-top: var(--sp-2); font-size: 1.1rem; max-width: 42ch; }
.hero__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; margin-top: var(--sp-4); }

.countdown { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); justify-content: center; }
.countdown__item { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.countdown__item span { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1; }
.countdown__item small { font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--etoile-60); margin-top: .4em; }
.countdown__post { font-family: var(--font-display); font-size: 1.05rem; color: var(--or); }

/* ============================================================
   LINE-UP — l'affiche : cartes artistes, les visages d'abord
   ============================================================ */
.lineup { position: relative; overflow: hidden; background: var(--nuit); }
.section-title--xl { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 800; letter-spacing: -.02em; }

.cards { display: grid; gap: var(--sp-3); }
.cards--tete { grid-template-columns: repeat(3, 1fr); margin-top: var(--sp-6); }
.cards--reste { grid-template-columns: repeat(4, 1fr); margin-top: var(--sp-3); }

.card { display: block; min-width: 0; }
.card figure {
  margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px;
  background: var(--nuit-3);
}
.card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transition: transform .5s var(--ease), filter .5s var(--ease);
  filter: saturate(.92);
}
.card:hover img, .card:focus-visible img { transform: scale(1.06); filter: saturate(1.12); }
.card h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.6rem); font-weight: 700; letter-spacing: -.01em;
  margin-top: .55em; transition: color .2s var(--ease);
}
.card:hover h3 { color: var(--or-vif); }
.card p { color: var(--or); font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: .25em; }
.cards--reste .card h3 { font-size: 1.02rem; }
.cards--reste .card p { font-size: .74rem; }

.lineup__more { margin-top: var(--sp-6); }

/* ============================================================
   BILLETTERIE — le guichet : billets perforés, tampon COMPLET
   ============================================================ */
.billetterie { background: var(--nuit-2); overflow: hidden; }
.billetterie__inner { position: relative; z-index: 2; }
.guichet { margin-top: var(--sp-6); display: flex; flex-direction: column; }

.billet {
  position: relative;
  display: grid; grid-template-columns: minmax(120px, 180px) 1fr auto;
  gap: var(--sp-3); align-items: center;
  padding: var(--sp-4) var(--sp-2);
  border-top: 2px dashed var(--horizon-2);
}
.billet:last-of-type { border-bottom: 2px dashed var(--horizon-2); }
/* encoches de ticket sur la perforation */
.billet::before, .billet::after {
  content: ""; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--nuit-2); border: 2px dashed var(--horizon-2);
}
.billet::before { left: -26px; }
.billet::after { right: -26px; }

.billet__num {
  font-family: var(--font-display); font-weight: 800; line-height: .9;
  font-size: clamp(3rem, 7vw, 5.5rem); color: var(--etoile);
}
.billet__num small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--or); margin-top: .4em; }
.billet__info h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: .3em; }
.billet__info p { color: var(--etoile-60); font-size: var(--fs-sm); max-width: 52ch; }
.billet__cta { justify-self: end; }

.billet--complet .billet__num, .billet--complet .billet__info h3 { color: var(--etoile-40); }
.billet--complet .billet__info p { color: var(--etoile-40); }
.stamp {
  display: inline-block; transform: rotate(-8deg);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .08em;
  color: var(--aurore); border: 3px solid var(--aurore); border-radius: 8px;
  padding: .25em .7em; text-transform: uppercase;
}

.billet--abo {
  margin-top: var(--sp-4); border: 2px solid var(--or); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(240,180,60,.12), rgba(240,180,60,.03) 60%);
  padding: var(--sp-4);
}
.billet--abo::before, .billet--abo::after { display: none; }
.billet--abo .billet__num { color: var(--or); font-size: clamp(2.2rem, 4.5vw, 3.4rem); }

/* ============================================================
   VIP — le carré or : pleine image, contenu par-dessus
   ============================================================ */
.vipfull { position: relative; min-height: 88vh; display: grid; align-items: center; isolation: isolate; overflow: hidden; }
.vipfull__bg {
  position: absolute; inset: 0; z-index: 0;
  background: url("../img/vip1.jpg") center 35%/cover no-repeat;
  transform: scale(1.03);
}
.vipfull__veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(7,11,28,.9) 0%, rgba(7,11,28,.72) 45%, rgba(7,11,28,.28) 100%);
}
.vipfull__content { position: relative; z-index: 2; padding-block: var(--sp-12); max-width: var(--maxw); }
.vipfull__content .section-lead { color: var(--etoile); }
.vipfull__list { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: .7em var(--sp-4); margin: var(--sp-4) 0 var(--sp-6); }
.vipfull__list li { position: relative; padding-left: 1.5em; color: var(--etoile-60); font-size: var(--fs-sm); }
.vipfull__list li::before { content: "✶"; position: absolute; left: 0; top: 0; color: var(--or); font-size: .85em; }

/* ============================================================
   RÉTROSPECTIVE — la mémoire
   ============================================================ */
.retro__film { position: relative; margin: var(--sp-6) 0 var(--sp-2); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; cursor: pointer; background: #000; }
.retro__poster { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.retro__film:hover .retro__poster { transform: scale(1.03); }
.retro__play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; background: var(--or); color: var(--nuit);
  box-shadow: var(--glow-or); transition: transform .25s var(--ease);
}
.retro__play svg { width: 34px; height: 34px; margin-left: 3px; }
.retro__film:hover .retro__play { transform: scale(1.08); }
.retro__film.is-playing { cursor: default; }
.retro__film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.retro__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); align-items: start; }
.retro__grid img { width: 100%; height: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius-sm); }
.retro__grid img:nth-child(2) { transform: translateY(22px) rotate(.6deg); }
.retro__grid img:nth-child(3) { transform: translateY(-14px) rotate(-.8deg); }
.retro__editions { margin-top: var(--sp-4); color: var(--etoile-40); font-size: var(--fs-sm); letter-spacing: .06em; }
.retro__editions b { color: var(--or); font-weight: 600; }

/* ============================================================
   NEWSLETTER — sous le même ciel
   ============================================================ */
.newsletter { overflow: hidden; }
.newsletter__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--sp-6); align-items: center; }
.newsletter__form { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: flex-end; }
.newsletter__form input {
  flex: 1; min-width: 200px; min-height: 48px; padding: .4em 0;
  background: transparent; border: none; border-bottom: 2px solid var(--horizon-2); border-radius: 0;
  color: var(--etoile); font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
}
.newsletter__form input::placeholder { color: var(--etoile-40); }
.newsletter__form input:focus { outline: none; border-bottom-color: var(--or); }
.newsletter__msg { flex-basis: 100%; margin-top: .4em; font-size: var(--fs-sm); color: var(--or); }
.newsletter__msg.is-error { color: var(--aurore); }

/* ============================================================
   PARTENAIRES + FOOTER
   ============================================================ */
.partners { background: var(--nuit-2); }
.partners__list { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); align-items: center; margin-top: var(--sp-4); }
.partners__list li { font-family: var(--font-display); font-weight: 500; font-size: clamp(1rem, 2vw, 1.3rem); color: var(--etoile-40); transition: color .2s var(--ease); }
.partners__list li:hover { color: var(--etoile-60); }

.footer { position: relative; background: var(--nuit-2); padding-top: var(--sp-16); margin-top: var(--sp-8); }
.footer__horizon { top: 0; bottom: auto; transform: rotate(180deg); }
.footer__horizon path.hill { fill: var(--nuit-2); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-4); padding-block: var(--sp-6); }
.footer__brand img { height: 64px; width: auto; filter: brightness(0) invert(96%) sepia(4%) saturate(300%) hue-rotate(10deg); }
.footer__brand p { margin-top: var(--sp-2); color: var(--etoile-60); font-size: var(--fs-sm); }
.footer__nav, .footer__social { display: flex; flex-direction: column; gap: .7em; }
.footer__nav a, .footer__social a { color: var(--etoile-60); font-size: var(--fs-sm); transition: color .2s var(--ease); }
.footer__nav a:hover, .footer__social a:hover { color: var(--or); }
.footer__legal { border-top: 1px solid var(--horizon); padding-block: var(--sp-3); }
.footer__legal p { color: var(--etoile-40); font-size: .8rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cards--tete { grid-template-columns: repeat(2, 1fr); }
  .cards--reste { grid-template-columns: repeat(2, 1fr); }
  .ticker { font-size: .82rem; margin-top: -1.6em; }
  .billet { grid-template-columns: 1fr; gap: var(--sp-2); padding: var(--sp-3) 0; }
  .billet__cta { justify-self: start; }
  .billet::before, .billet::after { display: none; }
  .vipfull__list { grid-template-columns: 1fr; }
  .vipfull__veil { background: linear-gradient(180deg, rgba(7,11,28,.88), rgba(7,11,28,.66)); }
  .newsletter__inner { grid-template-columns: 1fr; gap: var(--sp-4); }
  .retro__grid { grid-template-columns: 1fr 1fr; }
  .retro__grid img:first-child { grid-column: 1 / -1; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--sp-4); }
}
@media (max-width: 560px) {
  .countdown { gap: var(--sp-2); }
  .retro__grid { grid-template-columns: 1fr; }
  .retro__grid img:first-child { grid-column: auto; }
  .lineup__photo.is-active { opacity: .4; }
  .hero__logo { width: min(78vw, 340px); }
}
