/* ==========================================================================
   Le Comptoir Verrier — feuille de style unique
   Maquette WebnexLab. Aucune dépendance, aucun build.

   Registre : éditorial, centré, typographie sérif. Rien n'est partagé avec les
   autres maquettes — chaque modèle a sa propre grammaire visuelle.
   ========================================================================== */

/* --- 1. Jetons de couleur (une ambiance = un bloc) ----------------------- */

:root,
[data-palette="bordeaux"] {
  --bg: #fbf6f0;
  --bg-deep: #2a1417;
  --surface: #fffdfa;
  --ink: #241213;
  --muted: #7a6058;
  --line: #e7d9cc;
  --accent: #8e2c3b;
  --accent-soft: #f5e6e4;
  --accent-fg: #fdf7f2;
  --shadow: 42 20 23;
}

[data-palette="olivier"] {
  --bg: #f7f5ec;
  --bg-deep: #1e241a;
  --surface: #fffefa;
  --ink: #1f2418;
  --muted: #6b6f56;
  --line: #dfe0cd;
  --accent: #5c6b33;
  --accent-soft: #eaeddc;
  --accent-fg: #f9faf1;
  --shadow: 31 36 24;
}

[data-palette="ardoise"] {
  --bg: #f2f4f4;
  --bg-deep: #171a1d;
  --surface: #ffffff;
  --ink: #161a1c;
  --muted: #5f6b6f;
  --line: #d9e0e1;
  --accent: #3e6b76;
  --accent-soft: #e2ecee;
  --accent-fg: #f4f8f9;
  --shadow: 22 26 28;
}

[data-palette="soir"] {
  --bg: #15100f;
  --bg-deep: #0c0908;
  --surface: #1c1614;
  --ink: #f3e9dd;
  --muted: #a3907f;
  --line: #302623;
  --accent: #c98a3e;
  --accent-soft: #251c18;
  --accent-fg: #17100b;
  --shadow: 0 0 0;
}

/* --- 2. Jetons non colorés ---------------------------------------------- */

:root {
  --display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;

  --shell: 1080px;
  --gutter: clamp(1.15rem, 5vw, 3rem);
  --section: clamp(4.5rem, 10vw, 8rem);
  --ease: cubic-bezier(.2,.6,.3,1);
}

/* --- 3. Base ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* L'attribut `hidden` du HTML doit toujours gagner : sans ce garde-fou, un
   `display: grid` posé plus bas (fenêtre modale, panneau de menu, champ
   conditionnel) laisse l'élément visible alors qu'il est marqué caché. */
[hidden] { display: none !important; }

/* Vignette intégrée dans le site WebnexLab (`?apercu=1`) : pas de commandes de
   démonstration, pas de défilement, contenu affiché tout de suite. */
.is-apercu, .is-apercu body { overflow: hidden; }
.is-apercu .palette-picker,
.is-apercu .demo-flag { display: none; }
.is-apercu .reveal { opacity: 1; transform: none; transition: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
em { font-style: italic; color: var(--accent); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.2em; height: 1.2em; flex: none; }

.skip-link {
  position: fixed; top: .6rem; left: 50%; transform: translate(-50%, -200%);
  z-index: 200; padding: .6rem 1.1rem; border-radius: 2px;
  background: var(--ink); color: var(--bg); font-size: .85rem;
}
.skip-link:focus { transform: translate(-50%, 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.kicker {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .24em;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem;
}

/* --- 4. Apparition ------------------------------------------------------ */

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* --- 5. Boutons --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.7rem; border: 1px solid transparent;
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--accent); color: var(--accent-fg); }
.btn--solid:hover { filter: brightness(1.1); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bg); }
.btn--full { width: 100%; }

/* --- 6. Sélecteur de palette (sous l'en-tête, à gauche) ----------------- */

.palette-picker { position: fixed; top: 6.2rem; left: 1rem; z-index: 120; }

.palette-picker__toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem .5rem .8rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgb(var(--shadow) / .12);
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  transition: border-color .25s var(--ease);
}
.palette-picker__toggle:hover { border-color: var(--accent); }

.palette-picker__panel {
  margin-top: .5rem; width: 15.5rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgb(var(--shadow) / .16);
  animation: pop .28s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) } }

.palette-picker__title {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); font-weight: 600; margin-bottom: .7rem;
}
.palette-picker__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.palette-picker__grid button {
  display: flex; align-items: center; gap: .5rem; padding: .5rem;
  border: 1px solid var(--line); font-size: .78rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.palette-picker__grid button:hover { border-color: var(--accent); }
.palette-picker__grid button[aria-checked="true"] {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.palette-picker__grid button span {
  width: 1.1rem; height: 1.1rem; flex: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--sw1) 0 33%, var(--sw2) 33% 66%, var(--sw3) 66%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12);
}
.palette-picker__note { margin-top: .8rem; font-size: .72rem; line-height: 1.5; color: var(--muted); }

/* --- 7. Bandeau démonstration ------------------------------------------ */

.demo-flag { position: fixed; right: 1rem; bottom: 1rem; z-index: 120; max-width: min(23rem, calc(100vw - 2rem)); }
.demo-flag__row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }

.demo-flag__admin {
  display: inline-flex; align-items: center;
  padding: .55rem 1rem;
  background: var(--surface, #fff); color: var(--ink, #111);
  border: 1px solid var(--line, #ddd);
  font-size: .76rem; font-weight: 600;
  box-shadow: 0 10px 26px rgb(var(--shadow, 0 0 0) / .16);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.demo-flag__admin:hover { transform: translateY(-2px); border-color: currentColor; }

.demo-flag__btn {
  display: flex; align-items: center; gap: .5rem; margin-left: auto;
  padding: .55rem 1rem .55rem .8rem;
  background: var(--ink); color: var(--bg);
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  box-shadow: 0 10px 26px rgb(var(--shadow) / .2);
  transition: transform .25s var(--ease);
}
.demo-flag__btn:hover { transform: translateY(-2px); }
.demo-flag__note {
  margin-top: .6rem; padding: 1.05rem 1.15rem;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .8rem; line-height: 1.6; color: var(--muted);
  box-shadow: 0 18px 44px rgb(var(--shadow) / .16);
  animation: pop .28s var(--ease);
}
.demo-flag__note p + p { margin-top: .6rem; }
.demo-flag__note strong { color: var(--ink); font-weight: 600; }

/* --- 8. En-tête --------------------------------------------------------- */

.head {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.head.is-stuck { border-bottom-color: var(--line); }

.head__in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 1rem; min-height: 5.2rem;
}

.brand { grid-column: 2; text-align: center; display: grid; justify-items: center; gap: .1rem; }
.brand__rule { width: 2.5rem; height: 1px; background: var(--accent); margin-bottom: .35rem; }
.brand__name { font-family: var(--display); font-size: 1.25rem; letter-spacing: .01em; }
.brand__sub { font-size: .64rem; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }

.nav {
  grid-column: 3; display: flex; justify-content: flex-end; gap: 1.5rem;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 500;
}
.nav a { color: var(--muted); transition: color .25s var(--ease); }
.nav a:hover { color: var(--accent); }

.burger {
  grid-column: 1; display: none; width: 2.4rem; height: 2.4rem;
  place-items: center; border: 1px solid var(--line);
}

/* --- 9. Héros ----------------------------------------------------------- */

.hero { position: relative; padding-block: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; overflow: hidden; }

.hero__wash {
  position: absolute; top: -18%; left: 50%; transform: translateX(-50%);
  width: 44rem; max-width: 120%; aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.hero__in { position: relative; }
.hero__over { font-size: .72rem; text-transform: uppercase; letter-spacing: .26em; color: var(--muted); margin-bottom: 1.6rem; }
.hero h1 { margin-bottom: 1.6rem; }
.hero__lede { max-width: 40ch; margin-inline: auto; color: var(--muted); font-size: 1.05rem; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.4rem; }

.hero__hours {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.hero__hours p { display: grid; gap: .1rem; font-size: .88rem; }
.hero__hours strong { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-weight: 600; }
.hero__hours span { color: var(--muted); }

.hero__strip {
  display: flex; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-block: 2rem;
  color: var(--accent); opacity: .55;
}
.hero__strip svg { width: clamp(2.4rem, 6vw, 3.6rem); height: auto; }
.hero__strip svg:nth-child(even) { transform: translateY(.9rem); }

/* --- 10. Titre de bloc -------------------------------------------------- */

.head-block { text-align: center; max-width: 44ch; margin: 0 auto 3rem; }
.head-block__note { margin-top: 1rem; color: var(--muted); font-size: .96rem; }

/* --- 11. Carte ---------------------------------------------------------- */

.menu-switch {
  display: flex; justify-content: center; gap: 0; margin-bottom: 3rem;
  border: 1px solid var(--line); width: max-content; margin-inline: auto;
}
.menu-switch button {
  padding: .7rem 1.6rem; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .14em; font-weight: 600; color: var(--muted);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.menu-switch button.is-on { background: var(--accent); color: var(--accent-fg); }

.menu { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
.menu__title {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .2em;
  font-family: var(--sans); font-weight: 600; color: var(--accent);
  padding-bottom: .7rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line);
}

.dishes li {
  display: flex; align-items: baseline; gap: .6rem;
  padding-block: .75rem; font-size: 1rem;
}
.dish__name { font-family: var(--display); font-size: 1.08rem; line-height: 1.35; }
.dish__dots { flex: 1; border-bottom: 1px dotted var(--line); min-width: 1.5rem; transform: translateY(-.3rem); }
.dish__price { font-weight: 600; font-size: .95rem; white-space: nowrap; color: var(--accent); }

.dish__flag {
  display: inline-block; margin-left: .6rem; padding: .1rem .5rem;
  font-family: var(--sans); font-style: normal; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line); vertical-align: .12em;
}
.dish__flag--veg { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.menu__legal { margin-top: 2.5rem; text-align: center; font-size: .8rem; color: var(--muted); }

/* --- 12. Bande cave ----------------------------------------------------- */

.band { background: var(--bg-deep); color: #f4ece4; padding-block: var(--section); }
[data-palette="soir"] .band { border-block: 1px solid var(--line); }

.band__in { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: center; }
.band .kicker { color: var(--accent); }
.band h2 { margin-bottom: 1.2rem; }
.band__text > p { color: rgb(244 236 228 / .72); max-width: 44ch; }

.cave-list { margin-top: 2.2rem; display: grid; gap: .1rem; }
.cave-list li {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem;
  padding-block: 1rem; border-top: 1px solid rgb(244 236 228 / .16);
}
.cave-list strong { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.cave-list span { grid-column: 1; font-size: .84rem; color: rgb(244 236 228 / .6); }
.cave-list em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 600; font-size: .9rem; color: var(--accent); }

.band__art { margin: 0; display: grid; place-items: center; color: var(--accent); opacity: .75; }
.band__art svg { width: 100%; max-width: 14rem; height: auto; }

/* --- 13. Colonnes maison ------------------------------------------------ */

.cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.col h3 { margin-bottom: .6rem; }
.col p { color: var(--muted); font-size: .95rem; }
.col { padding-top: 1.4rem; border-top: 2px solid var(--accent); }

.pull {
  margin: clamp(3rem, 7vw, 5rem) auto 0; max-width: 40ch; text-align: center;
}
.pull p { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.4; font-style: italic; }
.pull footer { margin-top: 1.2rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }

/* --- 14. Réservation ---------------------------------------------------- */

.reserve__in { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
.reserve__text > p { color: var(--muted); margin-top: 1rem; }
.reserve__facts { margin-top: 1.8rem; display: grid; gap: .6rem; }
.reserve__facts li { position: relative; padding-left: 1.3rem; font-size: .9rem; color: var(--muted); }
.reserve__facts li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 2.2rem); display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; font-size: .95rem;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.form-status { font-size: .82rem; line-height: 1.55; color: var(--accent); }
.form-status:empty { display: none; }

/* --- 15. Pied de page --------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; }
.foot__in { display: grid; gap: 1.4rem; text-align: center; justify-items: center; font-size: .88rem; color: var(--muted); }
.foot__name { font-family: var(--display); font-size: 1.15rem; color: var(--ink); }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; }
.foot__nav a:hover { color: var(--accent); }
.foot__legal { font-size: .76rem; opacity: .8; }
.foot__legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin-top: .85rem; }
.foot__legal-links a { font-size: .85rem; opacity: .85; padding-block: .35rem; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: currentColor; }
.foot__legal-links a:hover, .foot__legal-links a:focus-visible { opacity: 1; }

/* --- 16. Adaptations ---------------------------------------------------- */

@media (min-width: 861px) {
  .menu { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 860px) {
  .band__in, .reserve__in { grid-template-columns: 1fr; }
  .band__art { order: -1; }
  .band__art svg { max-width: 9rem; }
}

@media (max-width: 760px) {
  .burger { display: grid; }
  .head__in { grid-template-columns: auto 1fr auto; min-height: 4.6rem; }
  .brand { grid-column: 2; }
  .nav {
    position: fixed; inset: 4.6rem 0 auto; z-index: 88;
    flex-direction: column; justify-content: flex-start; gap: 0;
    padding: .5rem var(--gutter) 1.4rem; background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .35s var(--ease);
  }
  .nav.is-open { transform: none; }
  .nav a { padding-block: .9rem; border-bottom: 1px solid var(--line); font-size: .82rem; }

  .palette-picker { top: 5.4rem; }
  .demo-flag { max-width: calc(100vw - 9rem); }
  .demo-flag__note { max-height: 55vh; overflow-y: auto; }

  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:first-child { grid-column: 1 / -1; }
  .hero__strip { gap: 1rem; padding-block: 1.4rem; }
  .hero__strip svg:nth-child(n+5) { display: none; }
}

@media (max-width: 420px) {
  .palette-picker__toggle span, .demo-flag__btn span { display: none; }
  .palette-picker__panel { width: min(17rem, calc(100vw - 2rem)); }
  .dish__name { font-size: 1rem; }
}
