/* ============================================================
   L'ATELIER · Crêperie de Meinier
   Direction : industriel moderne, épuré, très visuel
   ============================================================ */

:root {
  --cream:        #F5F1EB;
  --cream-deep:   #ECE5D9;
  --cream-card:   #FBF8F3;
  --ink:          #14110E;
  --ink-soft:     #4A433B;
  --ink-faint:    #8C8378;
  --terracotta:   #E67D0E;
  --terracotta-d: #A64E1E;
  --brick:        #7E4632;
  --line:         rgba(20, 17, 14, 0.12);
  --line-soft:    rgba(20, 17, 14, 0.07);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Manrope", system-ui, -apple-system, sans-serif;
  --mono:  "Space Mono", ui-monospace, monospace;

  --maxw: 1280px;
  --pad-x: clamp(20px, 5vw, 72px);
  --header-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

/* ---------- Shared typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 400;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 46ch;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.7em;
  border-radius: 2px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .35s ease, color .35s ease, border-color .35s ease, transform .25s ease;
  white-space: nowrap;
}
.btn--solid { background: var(--terracotta); color: #fff; }
.btn--solid:hover { background: var(--terracotta-d); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { background: #fff; color: var(--ink); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .4s ease, box-shadow .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.header__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header.scrolled {
  background: rgba(245, 241, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; transition: filter .4s ease; }
/* logo art is dark; keep dark on light header. When hero is showing, brighten */
.header:not(.scrolled) .brand img { filter: brightness(0) invert(1); }

/* sub-page (e.g. Galerie) — solid header from the very top, no hero behind it */
body.subpage { padding-top: var(--header-h); }
body.subpage .header,
body.subpage .header.scrolled {
  background: rgba(245, 241, 235, 0.95);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line-soft);
}
body.subpage .header .brand img { filter: none; }
body.subpage .header .nav a.nav-link,
body.subpage .header .nav-social { color: var(--ink); }
body.subpage .header .nav a.nav-link.is-active { color: var(--terracotta); }

/* On a standalone (reveal-gated) sub-page, never depend on the scroll observer —
   show content unconditionally so the page is never left blank. */
body.subpage .reveal { opacity: 1 !important; transform: none !important; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav-social {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); transition: color .3s ease;
}
.nav-social svg { width: 21px; height: 21px; display: block; }
.nav-social:hover { color: var(--terracotta); }
.header:not(.scrolled) .nav-social { color: rgba(255,255,255,.92); }
.nav a.nav-link {
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color .3s ease;
}
.header:not(.scrolled) .nav a.nav-link { color: rgba(255,255,255,.92); }
.nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--terracotta);
  transition: width .3s ease;
}
.nav a.nav-link:hover::after { width: 100%; }

.header:not(.scrolled) .nav .btn--outline {
  color: #fff; border-color: rgba(255,255,255,.55);
}
.header:not(.scrolled) .nav .btn--outline:hover { border-color:#fff; }

/* burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 120;
}
.burger span {
  width: 26px; height: 2px; background: var(--ink);
  transition: transform .35s ease, opacity .25s ease, background .3s ease;
}
.header:not(.scrolled) .burger span { background: #fff; }
.menu-open .burger span { background: var(--ink); }
.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 55%;
  will-change: transform;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(20,17,14,.74) 0%, rgba(20,17,14,.30) 38%, rgba(20,17,14,.12) 62%, rgba(20,17,14,.28) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(48px, 9vh, 96px);
  color: #fff;
}
.hero__eyebrow {
  color: #fff;
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 26px;
}
.hero__eyebrow::before {
  content: ""; width: 38px; height: 1px; background: var(--terracotta);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.1rem, 8.5vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  max-width: 16ch;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 24px;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 300;
  color: rgba(255,255,255,.9);
  max-width: 40ch;
}
.hero__cta { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; z-index: 2;
  right: var(--pad-x); bottom: clamp(48px, 9vh, 96px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .25em;
  text-transform: uppercase; color: rgba(255,255,255,.7);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 14px;
}
.hero__scroll::after { content:""; width:1px; height:48px; background: rgba(255,255,255,.4); }

/* ============================================================
   HISTOIRE
   ============================================================ */
.story { padding: clamp(80px, 12vh, 150px) 0; }
.story__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.story__text .section-title { margin: 18px 0 28px; }
.story__text p + p { margin-top: 20px; }
.story__meta {
  margin-top: 38px;
  display: flex; gap: 40px; flex-wrap: wrap;
  padding-top: 30px; border-top: 1px solid var(--line);
}
.story__meta .num {
  font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--terracotta);
}
.story__meta .lbl { font-size: .82rem; color: var(--ink-soft); margin-top: 6px; letter-spacing:.02em; }
.story__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.story__media img { width:100%; height:100%; object-fit: cover; }
.story__media figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 18px;
}

/* ============================================================
   CARTE
   ============================================================ */
.menu { padding: clamp(80px, 12vh, 150px) 0; background: var(--cream-deep); }
.menu__head { text-align: center; max-width: 640px; margin: 0 auto clamp(48px,7vh,80px); }
.menu__head .section-title { margin: 16px 0 0; }
.menu__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}
.menu__col h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.7rem; letter-spacing: .01em;
  padding-bottom: 18px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
}
.menu__col { min-width: 0; }
.menu__col h3 span {
  font-family: var(--mono); font-size: 11px; letter-spacing:.2em;
  color: var(--ink-faint); text-transform: uppercase;
  text-align: right;
}
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.menu-item__name { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: .005em; }
.menu-item__price { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; color: var(--terracotta); }
.menu-item__desc {
  grid-column: 1 / -1;
  font-size: .9rem; color: var(--ink-soft); margin-top: 2px;
}
/* grouped item with sub-options */
.menu-item--group { padding-bottom: 6px; border-bottom: none; }
.menu-item--sub {
  padding: 9px 0;
  padding-left: 22px;
  position: relative;
}
.menu-item--sub .menu-item__name { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.menu-item--sub::before {
  content: ""; position: absolute; left: 4px; top: 50%;
  width: 8px; height: 1px; background: var(--line);
}
.menu-item--sub + .menu-item:not(.menu-item--sub) { margin-top: 4px; }
/* drinks: category labels + secondary head */
.menu-cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--terracotta); margin: 32px 0 2px;
}
.menu__col h3 + .menu-cat { margin-top: 18px; }
.menu-cat span {
  font-family: var(--sans); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-faint); text-transform: none; margin-left: 10px;
}
/* bandeau petit déjeuner / formule midi / entrée, au-dessus des crêpes */
.menu__cols--intro {
  margin-bottom: clamp(48px, 6vh, 72px);
  padding-bottom: clamp(40px, 5vh, 56px);
  border-bottom: 1px solid var(--line);
}
.menu__cols--intro .menu-cat:first-child { margin-top: 0; }
.menu__cols--intro .menu-item__name { font-size: 1.2rem; }
.menu__head--sub {
  margin-top: clamp(64px, 8.5vh, 104px);
  padding-top: clamp(56px, 8vh, 96px);
  position: relative;
}
.menu__head--sub::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(var(--maxw), 100vw) - 2 * var(--pad-x));
  height: 1px;
  background: var(--line);
}
.pdf-link {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); display: inline-flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .3s, color .3s;
}
.pdf-link:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* Carrousel crêpes / boissons — actif uniquement sous 820px (voir RESPONSIVE) */
.menu__dots { display: none; justify-content: center; gap: 10px; margin-bottom: 28px; }
.menu__dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; background: var(--line);
  cursor: pointer; transition: background .25s, transform .25s;
}
.menu__dot.is-active { background: var(--terracotta); transform: scale(1.3); }
.menu__slide { display: contents; }

/* ============================================================
   PRODUCTEURS
   ============================================================ */
.prod { padding: clamp(80px, 12vh, 150px) 0; position: relative; }
.prod::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(var(--maxw), 100vw) - 2 * var(--pad-x));
  height: 1px;
  background: var(--line);
}
.prod__head { max-width: 720px; margin-bottom: clamp(40px, 6vh, 68px); }
.prod__head .section-title { margin: 16px 0 18px; }
.prod__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.prod-card {
  background: var(--cream-card);
  padding: 34px 28px 30px;
  display: flex; flex-direction: column;
  min-height: 230px;
  transition: background .35s ease, transform .35s ease;
}
.prod-card:hover { background: #fff; }
.prod-card__mono {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 500;
  margin-bottom: 26px;
}
.prod-card__name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.1; }
.prod-card__loc {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 8px;
}
.prod-card__product {
  margin-top: auto; padding-top: 20px;
  font-size: .95rem; color: var(--ink-soft);
}

/* ============================================================
   GALERIE
   ============================================================ */
.gallery { padding: clamp(60px,9vh,110px) 0 clamp(80px,12vh,150px); }
.gallery__head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom: 40px; flex-wrap: wrap; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
  grid-auto-flow: dense;
}
.gallery__grid figure { overflow: hidden; position: relative; }
.gallery__grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.gallery__grid figure:hover img { transform: scale(1.05); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ============================================================
   HORAIRES / CONTACT
   ============================================================ */
.contact { padding: clamp(80px,12vh,150px) 0; position: relative; }
.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(var(--maxw), 100vw) - 2 * var(--pad-x));
  height: 1px;
  background: var(--line);
}
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); }
.hours-table { margin-top: 28px; width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--line-soft); }
.hours-table td { padding: 14px 0; font-size: 1rem; }
.hours-table td:first-child { font-weight: 600; }
.hours-table td:last-child { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hours-table tr.today td { color: var(--terracotta); font-weight: 700; }
.hours-table tr.today td:last-child { color: var(--terracotta); font-weight: 700; }
.hours-table td.closed { color: var(--ink-faint); font-style: italic; }

.contact__info .section-title { margin: 16px 0 0; }
.info-block { margin-top: 36px; }
.info-block .info-label {
  font-family: var(--mono); font-size: 11px; letter-spacing:.16em; text-transform:uppercase; color: var(--ink-faint);
  display: block; margin-bottom: 6px;
}
.info-block .info-value { font-size: 1.12rem; }
.info-block a.info-value:hover { color: var(--terracotta); }
.contact__socials { margin-top: 36px; display: flex; gap: 14px; }
.contact__socials a {
  font-family: var(--mono); font-size: 11px; letter-spacing:.14em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 10px 18px; border-radius: 2px;
  transition: border-color .3s, color .3s;
}
.contact__socials a:hover { border-color: var(--terracotta); color: var(--terracotta); }

.map-wrap { position: relative; width: 100%; height: 100%; min-height: 420px; overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s ease; }
.map-wrap:hover iframe { filter: grayscale(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: rgba(245,241,235,.7); padding: clamp(56px,8vh,90px) 0 40px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(245,241,235,.14); }
.footer__brand img { height: 84px; width: auto; }
.footer__brand p { margin-top: 18px; font-size: .95rem; max-width: 30ch; color: rgba(245,241,235,.6); }
.footer__col a.footer__social {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 2px;
  color: rgba(245,241,235,.72);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  transition: color .3s ease;
}
.footer__social svg { flex: none; }
.footer__bottom-right { display: inline-flex; align-items: center; gap: clamp(16px, 3vw, 32px); flex-wrap: wrap; }
.footer__bottom-right .footer__social { margin-top: 0; font-size: 11px; }
.footer__social svg { width: 22px; height: 22px; display: block; }
.footer__social:hover { color: var(--terracotta); }
.footer__col h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing:.16em; text-transform:uppercase;
  color: var(--terracotta); margin-bottom: 18px; font-weight: 400;
}
.footer__col a, .footer__col p { display:block; font-size:.95rem; color: rgba(245,241,235,.72); margin-bottom: 9px; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  margin-top: 30px; display:flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: rgba(245,241,235,.45);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img { transform: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .prod__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 40px; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    flex-direction: column; justify-content: center; gap: 30px;
    background: var(--cream);
    transform: translateX(100%); transition: transform .45s cubic-bezier(.6,0,.2,1);
  }
  .menu-open .nav { transform: none; }
  .nav a.nav-link { font-size: 1.5rem; font-family: var(--serif); color: var(--ink) !important; }
  .header:not(.scrolled) .nav .btn--outline { color: var(--ink); border-color: var(--line); }
  .menu-open .header:not(.scrolled) .burger span { background: var(--ink); }
  .menu-open .header:not(.scrolled) .nav-social { color: var(--ink); }
  .burger { display: flex; }

  .story__grid { grid-template-columns: 1fr; gap: 44px; }
  .story__media { aspect-ratio: 4/3; }
  .menu__cols { grid-template-columns: 1fr; gap: 50px; }

  .menu__dots { display: flex; }
  .menu__carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--pad-x));
  }
  .menu__carousel::-webkit-scrollbar { display: none; }
  .menu__slide {
    display: block;
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding-inline: var(--pad-x);
  }

  .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .map-wrap { min-height: 340px; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer__brand img { margin-inline: auto; }
  .footer__brand p { margin-inline: auto; }
  .footer__col a.footer__social { justify-content: center; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .prod__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .g-wide { grid-column: span 2; }
  .menu-item__name { font-size: 1.25rem; }
  .menu__col h3 { font-size: 1.5rem; flex-wrap: wrap; gap: 2px 10px; }
  .menu__col h3 span { font-size: 10px; letter-spacing: .12em; }
  .story__meta { gap: 16px; flex-wrap: nowrap; }
  .story__meta > div { flex: 1; min-width: 0; }
  .story__meta .num { font-size: 1.5rem; }
  .story__meta .lbl { font-size: .72rem; }
  .hero__scroll { display: none; }
}
