/* ==================================================================
   VAL' EN SCÈNE — Système de design
   Concept : le rideau se lève sur la scène culturelle de Val-de-Moder.
   Alternance de sections "plateau" (sombres, éclairées comme une
   scène) et "programme" (claires, papier crème d'un livret de salle),
   et cartes en forme de billet de spectacle déchiré.
   ================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600&display=swap");

:root {
  /* Couleurs — "le plateau" (sombre) */
  --rideau: #1c0f14;       /* fond scène / rideau de velours */
  --rideau-2: #2a1620;     /* dégradé plus clair pour la profondeur */
  --rideau-3: #170c10;     /* ombre la plus sombre */

  /* Couleurs — accents */
  --or: #e8b84b;           /* lumière de poursuite (spot) */
  --or-vif: #f3cf74;
  --or-dim: #9c7526;
  --grenat: #d52349;       /* rouge de la marque d'origine, conservé */
  --grenat-vif: #ef3a63;

  --craie: #f7f1e6;        /* texte clair sur fond sombre */

  /* Couleurs — "le programme" (clair, papier) */
  --toile: #faf5ec;        /* papier crème du livret de salle */
  --toile-2: #f2ead9;      /* léger relief / cartes */
  --encre: #221720;        /* texte sur papier, presque noir chaud */
  --encre-douce: #5b4f52;  /* texte secondaire */

  /* Saison (Noël, ponctuel, une seule carte) */
  --sapin: #2f5233;

  /* Typo */
  --f-display: 'Fraunces', ui-serif, Georgia, serif;
  --f-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Rythme */
  --container: 1180px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.68,0,1.01);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--toile);
  color: var(--encre);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.on-dark .eyebrow { color: var(--or); }
.on-light .eyebrow { color: var(--grenat); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--or);
  color: var(--rideau);
  padding: 0.85em 1.4em;
  z-index: 10000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-spot {
  background: var(--or);
  color: var(--rideau-3);
}
.btn-spot:hover { background: var(--or-vif); }
.btn-ghost-dark {
  background: transparent;
  color: var(--craie, #f7f1e6);
  border-color: rgba(247,241,230,0.35);
}
.btn-ghost-dark:hover { border-color: var(--or); color: var(--or); }
.btn-line {
  background: transparent;
  color: var(--grenat);
  border-color: var(--grenat);
  padding: 0.75em 1.3em;
}
.btn-line:hover { background: var(--grenat); color: var(--toile); }

/* ---------- Header / nav ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.1em 0;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
}
#site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--craie, #f7f1e6);
  transition: color .3s ease;
}
.brand img { height: 70px; width: auto; border-radius: 6px; }

#site-header.is-scrolled {
  background: rgba(28, 15, 20, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 0.7em 0;
}

#nav ul {
  list-style: none;
  display: flex;
  gap: 0.35em;
  margin: 0;
  padding: 0;
}
#nav a {
  display: inline-block;
  text-decoration: none;
  color: rgba(247,241,230,0.85);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55em 0.9em;
  border-radius: 999px;
  position: relative;
  transition: color .25s ease;
}
#nav a:hover { color: var(--or); }
#nav a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%;
  bottom: 0.3em;
  height: 2px;
  background: var(--or);
  transition: left .25s var(--ease), right .25s var(--ease);
}
#nav a:hover::after { left: 0.9em; right: 0.9em; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(247,241,230,0.35);
  border-radius: 8px;
  color: var(--craie, #f7f1e6);
  width: 42px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse 70% 55% at 50% 28%, rgba(232,184,75,0.16), transparent 60%), linear-gradient(180deg, var(--rideau) 0%, var(--rideau-3) 100%);
  color: var(--craie, #f7f1e6);
  overflow: hidden;
  padding: 8em 0 6em 0;
}

.spot {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232,184,75,0.22) 0%, rgba(232,184,75,0) 62%);
  pointer-events: none;
  animation: spot-breathe 9s ease-in-out infinite;
}
@keyframes spot-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* Rideau : deux pans qui s'ouvrent une fois au chargement */
.curtain-panel {
  position: absolute;
  top: 0; bottom: 0;
  width: 52%;
  background:
    repeating-linear-gradient(90deg, var(--rideau-2) 0 24px, var(--rideau) 24px 48px);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.55);
  z-index: 3;
  animation: curtain-open 1.1s 0.15s var(--ease) both;
}
.curtain-panel.left { left: 0; transform-origin: left; }
.curtain-panel.right { right: 0; transform-origin: right; }
@keyframes curtain-open {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .curtain-panel { display: none; }
}

.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero-inner h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  color: var(--craie, #f7f1e6);
}
.hero-inner h1 em {
  font-style: normal;
  color: var(--or);
}
.hero-lede {
  font-size: 1.15rem;
  color: rgba(247,241,230,0.82);
  max-width: 46ch;
  margin-bottom: 2em;
}
.hero-actions {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

.hero-ticket {
  position: absolute;
  right: 6%;
  bottom: 8%;
  z-index: 2;
  opacity: 0.9;
}
@media (max-width: 900px) { .hero-ticket { display: none; } }

/* ---------- Sections génériques ---------- */
.section { padding: 6.5em 0; }
.section.on-dark { background: var(--rideau); color: var(--craie, #f7f1e6); }
.section.on-light { background: var(--toile); color: var(--encre); }
.section-head { max-width: 640px; margin-bottom: 3em; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.on-dark .section-head h2 { color: var(--craie, #f7f1e6); }
.on-light .section-head h2 { color: var(--encre); }
.section-head p { color: var(--encre-douce); font-size: 1.05rem; }
.on-dark .section-head p { color: rgba(247,241,230,0.75); }

/* ---------- Billets (cartes) ---------- */
.tickets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 980px) { .tickets { grid-template-columns: 1fr; } }

.ticket {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(34,23,32,0.08);
  border-radius: var(--radius);
  padding: 2.1em 1.9em 1.9em 1.9em;
  box-shadow: 0 2px 8px rgba(34,23,32,0.05);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  opacity: 0;
  transform: translateY(18px);
}
.ticket.is-visible { opacity: 1; transform: translateY(0); }
.ticket:hover { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(34,23,32,0.14); }

.ticket-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grenat);
  border: 1px solid var(--grenat);
  border-radius: 999px;
  padding: 0.3em 0.75em;
  margin-bottom: 1.1em;
}
.ticket.is-noel .ticket-tag { color: var(--sapin); border-color: var(--sapin); }

.ticket-badge {
  display: block;
  align-items: center;
  height: 60px;
  max-width: 148px;
  margin-bottom: 1.3em;
}
.ticket-badge img { height: 100%; width: auto; object-fit: contain; border-radius: 6px; }

.ticket h3 { font-size: 1.3rem; margin-bottom: 0.55em; color: var(--encre); }
.ticket p { color: var(--encre-douce); font-size: 0.98rem; }

.ticket-perf {
  position: relative;
  margin: 1.5em 0;
  border-top: 1.5px dashed rgba(34,23,32,0.22);
}
.ticket-perf::before, .ticket-perf::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--toile);
}
.ticket-perf::before { left: -1.9em; }
.ticket-perf::after { right: -1.9em; }

.ticket-actions { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }

.ticket-socials { display: flex; gap: 0.5em; list-style: none; margin: 0; padding: 0; }
.ticket-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(34,23,32,0.06);
  color: var(--encre);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.ticket-socials a:hover { background: var(--grenat); color: var(--toile); transform: translateY(-2px); }

/* ---------- Agenda (plateau) ---------- */
.agenda-frame {
  border: 1px solid rgba(232,184,75,0.35);
  border-radius: var(--radius);
  padding: 3em 2.2em;
  text-align: center;
  background: linear-gradient(180deg, rgba(232,184,75,0.05), transparent);
}
.agenda-frame p.lead {
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--craie, #f7f1e6);
  max-width: 32ch;
  margin: 0 auto 0.6em auto;
}
.agenda-frame p.sub { color: rgba(247,241,230,0.65); margin-bottom: 1.6em; }

/* ---------- Bureau (liste de troupe) ---------- */
.troupe {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 2.5rem;
}
@media (max-width: 700px) { .troupe { grid-template-columns: 1fr; } }
.troupe li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  padding: 0.9em 0;
  border-bottom: 1px solid rgba(34,23,32,0.12);
}
.troupe .role {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grenat);
  white-space: nowrap;
}
.troupe .name {
  font-family: var(--f-display);
  font-size: 1.08rem;
  text-align: right;
}

/* ---------- Missions ---------- */
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9em; }
.missions li {
  display: flex; gap: 0.85em; align-items: flex-start;
  font-size: 1.02rem; color: rgba(247,241,230,0.7);
}
.missions li svg { flex: none; width: 18px; height: 18px; margin-top: 0.35em; color: var(--or); }

/* ---------- Contact / footer (rideau ferme) ---------- */
#site-footer {
  background: var(--rideau-3);
  color: rgba(247,241,230,0.85);
  padding: 6em 0 2.5em 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 3em;
  padding-bottom: 3em;
  border-bottom: 1px solid rgba(247,241,230,0.12);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 2.2em; } }
.footer-grid h3 {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 0.9em;
}
.footer-grid address, .footer-grid p { font-style: normal; color: rgba(247,241,230,0.7); margin: 0 0 0.5em 0; }
.footer-grid a { color: rgba(247,241,230,0.85); text-decoration: none; }
.footer-grid a:hover { color: var(--or); }
.footer-socials { display: flex; gap: 0.6em; list-style: none; margin: 1em 0 0 0; padding: 0; }
.footer-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(247,241,230,0.08);
  transition: background-color .2s ease, transform .2s ease;
}
.footer-socials a:hover { background: var(--or); color: var(--rideau); transform: translateY(-2px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
  padding-top: 1.8em;
  font-size: 0.85rem;
  color: rgba(247,241,230,0.5);
}
.footer-bottom a { text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .ticket { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  #nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    height: 100vh;
    background: rgba(28,15,20,0.98);
    backdrop-filter: blur(10px);
    padding: 6em 2em 2em 2em;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 400;
  }
  #nav.is-open { transform: translateX(0); }
  #nav ul { flex-direction: column; gap: 0.3em; }
  #nav a { display: block; font-size: 1.05rem; }
}

/* ---------- Details / Sections spacing tweaks ---------- */
.lede-strong { font-family: var(--f-display); font-weight: 500; color: var(--encre); }
.on-dark .lede-strong { color: var(--craie, #f7f1e6); }
