/* ============================================================
   FESTIVAL DE LOIRE — Coming Soon
   Feuille de style unique. Tokens issus de la charte de marque.
   Palette : 60% bleu nuit · 30% bleus accents · 10% or champagne.
   ============================================================ */

/* ---------- 1. TOKENS / VARIABLES ---------- */
:root {
  /* Fonds nuit */
  --ink: #04070F;        /* fond global le plus profond */
  --night: #071527;      /* panneaux, cartes */
  --night2: #0B1F38;     /* surfaces alternatives */

  /* Bleus accents */
  --royal: #1E4FD6;
  --lumiere: #5B93FF;
  --glacier: #B9D4FF;

  /* Or champagne (touche, jamais aplat dominant) */
  --gold1: #F2E0B0;
  --gold2: #D9BC82;
  --gold3: #BE9B58;
  --gold-grad: linear-gradient(120deg, #F2E0B0, #D9BC82 45%, #BE9B58);

  /* Textes */
  --pearl: #DDE2EC;      /* texte principal */
  --body: #A4AFC6;       /* paragraphes */
  --mut: #7E8FAD;        /* secondaire, labels */

  /* Lignes */
  --line: rgba(150, 178, 235, 0.13);
  --line-strong: rgba(150, 178, 235, 0.24);

  /* États formulaire */
  --error: #E8788A;
  --success: var(--glacier);

  /* Typo */
  --f-display: "Sora", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;

  /* Rythme */
  --pad-x: clamp(28px, 6vw, 96px);
  --pad-y: clamp(90px, 12vh, 150px);
  --col: 1180px;
  --radius: 18px;
  --radius-lg: 22px;

  /* Contrôle du mouvement (toggle + prefers-reduced-motion) */
  --play: running;
}

/* ---------- 2. RESET ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-body);
  font-weight: 300;
  color: var(--body);
  background: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(91, 147, 255, 0.28); color: #fff; }

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

/* ---------- 3. CALQUE D'AMBIANCE ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.ambient__halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  animation: glowDrift 11s ease-in-out infinite;
  animation-play-state: var(--play);
}
.ambient__halo--top {
  top: -22vh; left: 50%; transform: translateX(-50%);
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(46, 99, 224, 0.30), transparent 60%);
}
.ambient__halo--bottom {
  bottom: -28vh; left: -12vw;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(30, 79, 214, 0.18), transparent 62%);
  animation-delay: -5s;
}

.ambient__beam {
  position: absolute; top: -10%; width: 2px; height: 120%;
  background: linear-gradient(to bottom, transparent, var(--lumiere), transparent);
  filter: blur(1.5px);
  opacity: 0.2;
  animation: beamPulse 7s ease-in-out infinite;
  animation-play-state: var(--play);
}
.ambient__beam--1 { left: 22%; animation-delay: 0s; }
.ambient__beam--2 { left: 50%; animation-delay: -2.4s; opacity: 0.28; }
.ambient__beam--3 { left: 78%; animation-delay: -4.8s; }

.ambient__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.035) 1px, transparent 1px);
  background-size: 66px 66px;
  -webkit-mask-image: radial-gradient(circle at 50% 32%, #000, transparent 78%);
          mask-image: radial-gradient(circle at 50% 32%, #000, transparent 78%);
}

/* ---------- 4. CHROME : progression + toggle mouvement ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold2), var(--royal));
}

.motion-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mut);
  background: rgba(7, 21, 39, 0.7);
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.3s, border-color 0.3s;
}
.motion-toggle:hover { color: var(--glacier); border-color: var(--line-strong); }
.motion-toggle__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lumiere); box-shadow: 0 0 8px var(--lumiere);
}
.motion-toggle[aria-pressed="true"] .motion-toggle__dot {
  background: var(--mut); box-shadow: none;
}

/* ---------- 5. NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  transition: background 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.nav__brand { display: inline-flex; align-items: center; gap: 12px; }
.nav__mark { height: 26px; width: auto; }
.nav__name {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--pearl);
}
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav__links a {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mut);
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--glacier); }
.nav__cta {
  color: var(--gold2) !important;
  padding: 7px 16px;
  border: 1px solid var(--line-strong); border-radius: 100px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.nav__cta:hover { background: rgba(217, 188, 130, 0.08); border-color: var(--gold3); }

/* ---------- 6. ÉLÉMENTS PARTAGÉS ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--lumiere);
}
.kicker__dash { width: 26px; height: 1px; background: var(--gold2); }

.text-gold {
  background: var(--gold-grad);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s linear infinite;
  animation-play-state: var(--play);
}

.section {
  position: relative; z-index: 1;
  max-width: var(--col); margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.section__head { margin-bottom: clamp(34px, 5vw, 56px); }
.section__title {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(30px, 4vw, 52px); line-height: 1.05;
  letter-spacing: -0.01em; color: var(--pearl);
  margin-top: 16px;
}

/* ---------- 7. BOUTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; white-space: nowrap;
  padding: 15px 26px; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}
.btn--primary {
  color: var(--ink);
  background: var(--gold-grad); background-size: 160% auto;
  box-shadow: 0 10px 34px rgba(190, 155, 88, 0.22);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(190, 155, 88, 0.34);
  background-position: right center;
}
.btn--ghost {
  color: var(--glacier);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--lumiere); color: #fff;
  background: rgba(91, 147, 255, 0.07);
  transform: translateY(-2px);
}

/* ---------- 8. HERO ---------- */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 96px var(--pad-x) 72px;
}
.hero__inner {
  display: flex; flex-direction: column; align-items: center;
  max-width: 880px;
}
.hero__kicker { margin-bottom: 22px; }
.hero__logo {
  width: min(420px, 72vw); height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 14px 50px rgba(40, 90, 210, 0.42));
  animation: floatY 9s ease-in-out infinite;
  animation-play-state: var(--play);
}
.hero__title {
  font-family: var(--f-display); font-weight: 200;
  font-size: clamp(32px, 5vw, 64px); line-height: 1;
  letter-spacing: -0.02em; color: var(--pearl);
  margin-bottom: 22px;
}
.hero__lede {
  font-size: clamp(15px, 1.5vw, 17px); line-height: 1.75;
  color: var(--body); max-width: 540px; margin-bottom: 28px;
}
.hero__meta {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--glacier);
  margin-bottom: 32px;
}
.hero__meta-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--gold2); }
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--mut);
}
.scroll-cue__line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold2), transparent);
  animation: scrollCue 1.8s ease-in-out infinite;
  animation-play-state: var(--play);
  transform-origin: top;
}

/* ---------- 9. UNIVERS ---------- */
.univers__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.univers__lede {
  font-size: clamp(18px, 2.2vw, 26px); line-height: 1.55;
  font-weight: 300; color: var(--pearl); letter-spacing: -0.01em;
}
.univers__words {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px; align-content: start;
}
.univers__words li {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--glacier);
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px;
  transition: border-color 0.3s, color 0.3s;
}
.univers__words li:hover { border-color: var(--gold3); color: var(--gold1); }

/* ---------- 10. EXPÉRIENCE — cartes ---------- */
.cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 22px);
}
.card {
  position: relative; overflow: hidden;
  padding: clamp(28px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(7, 21, 39, 0.55), rgba(11, 31, 56, 0.35));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.4s, transform 0.4s cubic-bezier(.2,.7,.2,1), background 0.4s;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lumiere), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover {
  border-color: var(--line-strong); transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(11, 31, 56, 0.6), rgba(7, 21, 39, 0.4));
}
.card:hover::before { opacity: 0.7; }
.card__index {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em;
  color: var(--gold2); display: block; margin-bottom: 18px;
}
.card__title {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(19px, 2vw, 23px);
  color: var(--pearl); margin-bottom: 12px; letter-spacing: -0.01em;
}
.card__text { font-size: 15px; line-height: 1.75; color: var(--body); }

/* ---------- 11. PRÉVENTE ---------- */
.prevente { max-width: 980px; }
.prevente__panel {
  position: relative; overflow: hidden;
  padding: clamp(36px, 5vw, 72px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(30, 79, 214, 0.22), transparent 60%),
    rgba(7, 21, 39, 0.5);
  text-align: center;
}
.prevente__beam {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, var(--lumiere), transparent 70%);
  filter: blur(1.5px); opacity: 0.4;
  animation: beamPulse 6s ease-in-out infinite;
  animation-play-state: var(--play);
}
.prevente__head { position: relative; max-width: 560px; margin: 0 auto; }
.prevente .kicker { justify-content: center; }
.prevente__lede {
  font-size: clamp(15px, 1.6vw, 17px); color: var(--body); margin-top: 16px;
}

/* Formulaire */
.form {
  position: relative; max-width: 540px; margin: 36px auto 0; text-align: left;
}
.form__row { display: flex; gap: 12px; }
.form__input {
  flex: 1; min-width: 0;
  font-family: var(--f-body); font-size: 15px; color: var(--pearl);
  padding: 15px 18px;
  background: rgba(4, 7, 15, 0.6);
  border: 1px solid var(--line-strong); border-radius: 100px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form__input::placeholder { color: var(--mut); }
.form__input:focus {
  outline: none; border-color: var(--lumiere);
  box-shadow: 0 0 0 3px rgba(91, 147, 255, 0.16);
}
.form__input.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.14);
}
.form__submit { flex-shrink: 0; }

.form__consent {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--mut);
  cursor: pointer;
}
.form__consent input {
  appearance: none; -webkit-appearance: none;
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: rgba(4, 7, 15, 0.6); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.form__consent input:checked {
  background: var(--gold-grad); border-color: var(--gold3);
}
.form__consent input:checked::after {
  content: ""; position: absolute; left: 5px; top: 1.5px;
  width: 5px; height: 9px; border: solid var(--ink);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.form__consent input:focus-visible { outline: 2px solid var(--lumiere); outline-offset: 2px; }
.form__consent a { color: var(--glacier); text-decoration: underline; text-underline-offset: 2px; }

.form__hint {
  margin-top: 16px; font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.06em; color: var(--mut); text-align: center;
}
.form__msg {
  margin-top: 14px; font-size: 14px; text-align: center; line-height: 1.5;
}
.form__msg--error { color: var(--error); }
.form__msg--success { color: var(--glacier); }

/* État succès : on remplace le formulaire par le message */
.form.is-success .form__row,
.form.is-success .form__consent,
.form.is-success .form__hint { display: none; }

/* ---------- 12. FOOTER ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: var(--col); margin: 0 auto;
  padding: clamp(50px, 7vw, 80px) var(--pad-x) 40px;
  border-top: 1px solid var(--line);
}
.footer__top {
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: space-between; align-items: flex-start;
  margin-bottom: 48px;
}
.footer__brand { display: flex; align-items: center; gap: 18px; }
.footer__mark { height: 38px; width: auto; }
.footer__loc {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mut); line-height: 1.8;
}
.footer__contact { display: flex; flex-direction: column; gap: 6px; }
.footer__contact-label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--mut);
}
.footer__contact a {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em;
  color: var(--gold2); transition: color 0.3s;
}
.footer__contact a:hover { color: var(--gold1); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.footer__copy,
.footer__legal a {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mut);
}
.footer__legal { display: flex; gap: 22px; }
.footer__legal a { transition: color 0.3s; }
.footer__legal a:hover { color: var(--glacier); }

/* ---------- 13. REVEAL AU SCROLL ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 14. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .univers__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__name { display: none; }
  .nav__links { gap: 16px; }
  .form__row { flex-direction: column; }
  .form__submit { width: 100%; }
  /* Boutons : autoriser le retour à la ligne et resserrer pour ne pas déborder sur petit écran */
  .btn { white-space: normal; letter-spacing: 0.1em; padding-left: 18px; padding-right: 18px; text-align: center; }
  .hero__meta { flex-direction: column; gap: 8px; }
  .hero__meta-sep { display: none; }
  .scroll-cue { display: none; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* Masquer l'indicateur de défilement sur écrans peu hauts (évite tout chevauchement) */
@media (max-height: 860px) {
  .scroll-cue { display: none; }
}

/* ---------- 15. PAGES LÉGALES ---------- */
.legal {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: clamp(110px, 14vh, 160px) var(--pad-x) clamp(60px, 8vh, 100px);
}
.legal__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mut); margin-bottom: 40px;
  transition: color 0.3s;
}
.legal__back:hover { color: var(--glacier); }
.legal h1 {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(30px, 4.5vw, 46px); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--pearl); margin-bottom: 12px;
}
.legal__updated {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mut); margin-bottom: 48px;
}
.legal h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(19px, 2.4vw, 24px); color: var(--glacier);
  letter-spacing: -0.01em; margin: 44px 0 14px;
}
.legal p, .legal li {
  font-size: 15px; line-height: 1.8; color: var(--body);
}
.legal p { margin-bottom: 14px; }
.legal ul { list-style: none; margin: 0 0 14px; padding: 0; }
.legal li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.legal li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 7px; height: 1px; background: var(--gold2);
}
.legal a { color: var(--glacier); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--lumiere); }
.legal strong { color: var(--pearl); font-weight: 500; }
.legal__todo {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  background: rgba(217, 188, 130, 0.12); border: 1px solid rgba(217, 188, 130, 0.3);
  color: var(--gold1); font-family: var(--f-mono); font-size: 12px;
}
.legal__note {
  margin-top: 40px; padding: 18px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(7, 21, 39, 0.5);
  font-size: 13.5px; color: var(--mut);
}

/* ---------- 16. RÉDUCTION DU MOUVEMENT ---------- */
@media (prefers-reduced-motion: reduce) {
  :root { --play: paused; }
  html { scroll-behavior: auto; }
  [data-reveal] { transition-duration: 0.01ms; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
