/* Fade & Co — thème « béton & néon »
   Les variables sont injectées depuis site.config.js par main.js ;
   les valeurs ci-dessous servent de fallback identique. */

:root {
  --c-bg: #14100C;
  --c-surface: #1E1812;
  --c-text: #F4EFE5;
  --c-muted: #A79B85;
  --c-accent: #45E6A0;
  --c-line: #2E271D;
  --c-overlay: rgba(12, 9, 6, .5);
  --font-heading: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --scene-len: 650vh;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: .01em; margin: 0 0 1.2rem; }
p  { margin: 0 0 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ loader */
#loader {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.1rem; background: var(--c-bg);
  transition: opacity .7s ease, visibility .7s;
}
#loader.is-done { opacity: 0; visibility: hidden; }
.loader-mono {
  font-family: var(--font-heading); font-size: 2rem;
  letter-spacing: .55em; padding-left: .55em; color: var(--c-text);
}
.loader-bar {
  width: min(260px, 60vw); height: 1px; background: var(--c-line);
  position: relative; overflow: hidden;
}
#loader-fill {
  position: absolute; inset: 0 100% 0 0; background: var(--c-accent);
  transition: inset .25s ease;
}
#loader-pct { font-size: .75rem; letter-spacing: .2em; color: var(--c-muted); }
.loader-hint {
  font-size: .7rem; color: var(--c-muted); opacity: 0;
  max-width: 80vw; text-align: center;
  animation: loader-hint-in .5s ease 6s forwards; /* visible même si le JS ne démarre pas (file://) */
}
#loader.is-slow .loader-hint { opacity: .8; }
@keyframes loader-hint-in { to { opacity: .8; } }

/* ------------------------------------------------------------------ header */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  color: var(--c-text);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s;
}
#site-header.is-scrolled {
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-color: var(--c-line);
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 34px; width: auto; }

#main-nav { display: flex; gap: 1.6rem; margin-left: auto; }
#main-nav a {
  color: var(--c-muted); text-decoration: none;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  transition: color .25s;
}
#main-nav a:hover { color: var(--c-text); }

.header-actions { display: flex; align-items: center; gap: .9rem; }

#lang-switch { display: flex; gap: .1rem; }
#lang-switch button {
  background: none; border: 0; color: var(--c-muted); cursor: pointer;
  font: inherit; font-size: .72rem; letter-spacing: .14em;
  padding: .3rem .45rem; text-transform: uppercase;
}
#lang-switch button[aria-pressed="true"] { color: var(--c-accent); }
#lang-switch button:hover { color: var(--c-text); }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; color: var(--c-text);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  transition: border-color .25s;
}
.icon-btn:hover { border-color: var(--c-line); }
.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--c-accent); color: #17130D;
  font-size: .62rem; font-weight: 600; line-height: 16px; text-align: center;
}

/* ------------------------------------------------------------------- scène */
#scene { height: var(--scene-len); position: relative; }
#stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
#seq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#poster-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .5s;
}
body.reduced-motion #poster-fallback,
body.seq-failed #poster-fallback { opacity: 1; }

#chapters { position: absolute; inset: 0; pointer-events: none; }
.chapter {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 4vh) clamp(1.4rem, 7vw, 7rem) 10vh;
  opacity: 0; pointer-events: none;
}
.chapter[data-align="center"] { justify-content: center; text-align: center; }
.chapter[data-align="left"]   { justify-content: flex-start; }
.chapter[data-align="right"]  { justify-content: flex-end; text-align: right; }

.chapter-inner {
  max-width: 34rem;
  padding: 1.8rem 2.2rem;
  background: radial-gradient(120% 130% at 50% 50%, var(--c-overlay) 0%, transparent 72%);
}
.chapter-inner::before {
  content: ""; display: block; width: 54px; height: 1px;
  background: var(--c-accent); margin: 0 0 1.3rem;
}
.chapter[data-align="center"] .chapter-inner::before { margin-inline: auto; }
.chapter[data-align="right"]  .chapter-inner::before { margin-left: auto; }

.chapter h2 {
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  margin: 0 0 .9rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.55);
}
.chapter p {
  color: var(--c-text);
  font-size: clamp(.95rem, 1.4vw, 1.08rem);
  text-shadow: 0 1px 14px rgba(0,0,0,.6);
  margin: 0;
}
.chapter .chapter-cta { margin-top: 1.6rem; pointer-events: none; }
.chapter.is-active .chapter-cta { pointer-events: auto; }

#scroll-hint {
  position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  color: var(--c-muted); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  opacity: 1; transition: opacity .5s;
}
#scroll-hint.is-hidden { opacity: 0; }
.hint-line { width: 1px; height: 44px; background: linear-gradient(var(--c-accent), transparent); }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(4rem, 9vh, 7rem) clamp(1.4rem, 6vw, 6rem); }
.section-narrow { max-width: 46rem; }
#about p, #contact p { color: var(--c-muted); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem;
  justify-content: space-between; margin-bottom: 2.2rem;
}
.section-head h2 { margin: 0; }

.text-link { color: var(--c-accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--c-accent) 45%, transparent); }
.text-link:hover { border-color: var(--c-accent); }

/* ------------------------------------------------------- vitrine : la carte */
.menu-grid {
  display: grid; gap: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  max-width: 72rem;
}

.menu-block {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 3px; padding: 1.7rem 1.8rem 1.4rem;
}
.menu-block h3 {
  margin: 0 0 1.2rem; font-size: 1.5rem; color: var(--c-accent);
}
.menu-block h3::after {
  content: ""; display: block; width: 44px; height: 1px;
  background: color-mix(in srgb, var(--c-accent) 55%, transparent); margin-top: .7rem;
}

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: .85rem 0; border-bottom: 1px solid var(--c-line); }
.menu-item:last-child { border-bottom: 0; }

.menu-item-head { display: flex; align-items: baseline; gap: .6rem; }
.menu-item-name { font-family: var(--font-heading); font-size: 1.12rem; }
.menu-item-dots {
  flex: 1; min-width: 1.2rem;
  border-bottom: 1px dotted color-mix(in srgb, var(--c-muted) 45%, transparent);
  transform: translateY(-.28em);
}
.menu-item-price { color: var(--c-accent); font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.menu-item-desc { margin: .25rem 0 0; font-size: .82rem; color: var(--c-muted); }

.menu-note {
  grid-column: 1 / -1; margin: 0;
  font-size: .78rem; color: var(--c-muted); font-style: italic;
}

/* ------------------------------------------------ vitrine : infos pratiques */
.infos-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  max-width: 72rem;
}

.info-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 3px; padding: 1.7rem 1.8rem;
}
.info-card h3 { margin: 0 0 1.1rem; font-size: 1.4rem; }

.hours-table {
  display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.6rem; margin: 0;
  font-size: .9rem;
}
.hours-table dt { color: var(--c-muted); }
.hours-table dd { margin: 0; text-align: right; }

.info-line { margin: 0 0 .45rem; color: var(--c-muted); font-size: .9rem; }
.info-line:first-of-type { color: var(--c-text); font-size: 1rem; }

/* --------------------------------------------------- vitrine : réservation */
#reservation-root .resa-body { color: var(--c-muted); }
.resa-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.4rem 0 1.2rem; }
.resa-actions .btn { text-transform: none; letter-spacing: .06em; font-size: .9rem; }
.resa-note {
  font-size: .74rem; color: var(--c-muted);
  border: 1px dashed var(--c-line); border-radius: 2px;
  padding: .6rem .8rem; margin: 0;
}

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-block; cursor: pointer;
  font: inherit; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .8rem 1.5rem; border-radius: 2px;
  background: transparent; color: var(--c-text);
  border: 1px solid var(--c-accent);
  text-decoration: none; text-align: center;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--c-accent); color: #17130D; }
.btn-solid { background: var(--c-accent); color: #17130D; }
.btn-solid:hover { background: color-mix(in srgb, var(--c-accent) 85%, white); }
.btn[disabled] { opacity: .38; pointer-events: none; }
.btn-ghost { border-color: var(--c-line); color: var(--c-muted); }
.btn-ghost:hover { background: var(--c-surface); color: var(--c-text); }

/* ------------------------------------------------------------------ footer */
#site-footer {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 2rem clamp(1.4rem, 6vw, 6rem);
  border-top: 1px solid var(--c-line);
  color: var(--c-muted); font-size: .78rem; letter-spacing: .06em;
}

/* ------------------------------------------------- reduced motion / mobile */
body.reduced-motion #scene { height: auto; }
body.reduced-motion #stage { position: static; height: 72vh; }
body.reduced-motion #seq-canvas, body.reduced-motion #scroll-hint { display: none; }
body.reduced-motion #chapters { position: static; }
body.reduced-motion .chapter {
  position: static; opacity: 1 !important; transform: none !important;
  pointer-events: auto; padding: 3.2rem clamp(1.4rem, 7vw, 7rem); height: auto;
}
body.reduced-motion .chapter .chapter-cta { pointer-events: auto; }
body.reduced-motion #chapters { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 720px) {
  #main-nav { display: none; }

  /* En portrait, le sujet converge au CENTRE du cadre : on remonte le texte
     dans la zone sombre du haut plutôt que de le superposer au sujet.
     Bloc resserré pour dégager le sujet, et voile dégradé (haut opaque ->
     transparent) qui garantit la lisibilité quelles que soient les pièces
     qui passent derrière. */
  .chapter {
    align-items: flex-start;
    padding: calc(var(--header-h) + 1.5vh) clamp(1.1rem, 5vw, 2rem) 10vh;
  }
  .chapter-inner {
    padding: 1.1rem 1.2rem 1.3rem;
    border-radius: 3px;
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--c-bg) 90%, transparent) 0%,
      color-mix(in srgb, var(--c-bg) 74%, transparent) 62%,
      color-mix(in srgb, var(--c-bg) 44%, transparent) 88%,
      transparent 100%);
  }
  .chapter-inner::before { margin-bottom: .8rem; }
  .chapter h2 {
    font-size: clamp(1.7rem, 7.4vw, 2.3rem);
    margin-bottom: .55rem;
  }
  .chapter p { font-size: .92rem; line-height: 1.5; }
  .chapter .chapter-cta { margin-top: 1.1rem; }
  .chapter .chapter-cta .btn { padding: .7rem 1.2rem; }
}

/* Écrans courts (petits téléphones, ou barre d'adresse déployée) : le bloc de
   texte occupe proportionnellement plus de hauteur et risquerait de déborder
   sur le cadran (zone claire ~38-52%). On le resserre pour rester au-dessus. */
@media (max-width: 720px) and (max-height: 700px) {
  .chapter { padding-top: calc(var(--header-h) + 1vh); }
  .chapter-inner { padding: .8rem 1rem .9rem; }
  .chapter-inner::before { margin-bottom: .5rem; }
  .chapter h2 { font-size: clamp(1.35rem, 6vw, 1.9rem); margin-bottom: .4rem; }
  .chapter p { font-size: .84rem; line-height: 1.45; }
  .chapter .chapter-cta { margin-top: .7rem; }
  .chapter .chapter-cta .btn { padding: .6rem 1rem; font-size: .72rem; }
}
