/* ==========================================================================
   ÉCRIN — Mise en page : conteneurs, sections, header, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Conteneurs
   -------------------------------------------------------------------------- */

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

.shell--narrow { max-width: var(--shell-narrow); }
.shell--wide { max-width: var(--shell-wide); }

/* --------------------------------------------------------------------------
   2. Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
}

.section--sm { padding-block: var(--section-y-sm); }

.section--tinted { background: var(--bg-tinted); }
.section--stone { background: var(--bg-stone); }

/* --------------------------------------------------------------------------
   3. En-têtes de section (numéro + surtitre + titre + chapô)
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-wine-deep);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-wine);
  flex: none;
}

.section-head--center .eyebrow { justify-content: center; }

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head > * + * { margin-top: var(--sp-5); }

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40ch;
}

.section-head--center .lead { margin-inline: auto; }

/* --------------------------------------------------------------------------
   3 bis. Bandeau « modèle de démonstration »
   Marque le site comme une maquette d'agence. Il coiffe le header : tout le
   reste de la page est décalé de --banner-h. Pour le retirer, supprimer le
   bloc <!-- demo-banner:start --> de chaque page et mettre --banner-h à 0px
   (ou lancer `node tools/rebrand.js` avec "retirerMentionDemo": true).
   -------------------------------------------------------------------------- */

.demo-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: calc(var(--z-menu) + 10);
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--c-noir);
  background-image: radial-gradient(rgba(243, 236, 226, 0.16) 1px, transparent 1px);
  background-size: 8px 8px;
  color: var(--text-on-dark);
  padding-inline: var(--sp-4);
}

.demo-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.demo-banner__badge {
  flex: none;
  padding: 0.28em 0.7em;
  border: 1px solid var(--c-wine-soft);
  color: var(--c-wine-soft);
  border-radius: var(--shape-xs);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
}

.demo-banner__sep { flex: none; opacity: 0.6; }

.demo-banner__text {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-banner__long { display: none; }

@media (min-width: 600px) {
  .demo-banner__long { display: inline; }
  .demo-banner__text { letter-spacing: 0.18em; }
}

@media (min-width: 768px) {
  .demo-banner__badge,
  .demo-banner__text { font-size: 0.6875rem; }
  .demo-banner__inner { gap: var(--sp-4); }
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: var(--banner-h);
  right: 0;
  left: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              height var(--dur) var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(246, 241, 234, 0.94);
  border-bottom-color: var(--border-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .site-header.is-scrolled { height: 72px; }
}

.site-header__inner {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* --- Logo --- */

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  line-height: 1;
  color: var(--c-ink);
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
}

.brand__tag {
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--c-wine-deep);
}

@media (min-width: 768px) {
  .brand__name { font-size: 1.85rem; }
  .brand__tag { font-size: 0.625rem; }
}

/* --- Navigation principale (desktop) --- */

.nav { display: none; }

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 0.5rem + 1.8vw, 2.5rem);
  }
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--c-ink);
  padding-block: var(--sp-2);
}

.nav__link::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--c-wine);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link[aria-current="page"] {
  color: var(--c-wine-deep);
}

.nav__link:hover::before,
.nav__link:focus-visible::before,
.nav__link[aria-current="page"]::before {
  opacity: 1;
  transform: scale(1);
}

/* --- Actions à droite --- */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex: none;
}

.header-phone {
  display: none;
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  transition: color var(--dur-fast) var(--ease-out);
}

.header-phone:hover { color: var(--c-wine-deep); }

@media (min-width: 1280px) {
  .header-phone { display: block; }
}

.header-actions .btn { display: none; }

@media (min-width: 1024px) {
  .header-actions .btn { display: inline-flex; }
}

/* --- Bouton burger --- */

.burger {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-right: -10px;
  flex: none;
}

@media (min-width: 1024px) {
  .burger { display: none; }
}

.burger__box {
  position: relative;
  width: 26px;
  height: 13px;
}

.burger__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--c-ink);
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out),
              width var(--dur) var(--ease-out);
}

.burger__bar:nth-child(1) { top: 0; }
.burger__bar:nth-child(2) { bottom: 0; width: 65%; }

.burger[aria-expanded="true"] .burger__bar:nth-child(1) {
  transform: translateY(5.75px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__bar:nth-child(2) {
  width: 100%;
  transform: translateY(-5.75px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. Menu mobile (panneau plein écran)
   -------------------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--c-paper-2);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--banner-h) + var(--header-h));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5rem);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

.mobile-menu__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-8) var(--shell-pad);
  overflow-y: auto;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.9rem, 1.2rem + 3.5vw, 2.75rem);
  color: var(--c-ink);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--dur-fast) var(--ease-out),
              padding-left var(--dur) var(--ease-out);
}

.mobile-menu__link:hover,
.mobile-menu__link[aria-current="page"] {
  color: var(--c-wine-deep);
  padding-left: var(--sp-3);
}

.mobile-menu__link .idx {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--c-ink-faint);
}

.mobile-menu__list li {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(90ms + var(--i, 0) * 55ms);
}

.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-muted);
  padding-top: var(--section-y-sm);
  font-size: var(--fs-sm);
}

.footer-grid {
  display: grid;
  gap: var(--sp-9) var(--gutter);
  padding-bottom: var(--sp-9);
  border-bottom: 1px solid var(--border-dark);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: var(--gutter);
  }
}

.footer-col__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-wine-soft);
  margin-bottom: var(--sp-5);
}

.footer-col ul { display: grid; gap: var(--sp-3); }

.footer-col a { transition: color var(--dur-fast) var(--ease-out); }
.footer-col a:hover { color: var(--c-white); }

.footer-brand .brand { margin-bottom: var(--sp-5); }
.footer-brand .brand__name,
.footer-brand .brand { color: var(--text-on-dark); }
.footer-brand .brand__tag { color: var(--c-wine-soft); }

.footer-brand p {
  max-width: 34ch;
  line-height: 1.7;
}

.hours-list { display: grid; gap: var(--sp-3); }

.hours-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  align-items: baseline;
}

.hours-list .day { color: var(--text-on-dark); }
.hours-list .time { color: var(--text-on-dark-muted); font-variant-numeric: tabular-nums; }
.hours-list .time--closed { color: var(--c-wine-soft); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
}

.demo-note {
  display: block;
  margin-top: var(--sp-2);
  color: var(--c-wine-soft);
  opacity: 0.9;
}

@media (min-width: 768px) {
  .demo-note { display: inline; margin-top: 0; margin-left: var(--sp-2); }
}

.footer-bottom a:hover { color: var(--c-white); }

/* --------------------------------------------------------------------------
   7. Grilles utilitaires
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--gutter); }

@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Deux colonnes texte / image, inversables */
.split {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
  .split--reverse > *:first-child { order: 2; }
}

.split__body > * + * { margin-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   8. Utilitaires
   -------------------------------------------------------------------------- */

.stack-sm > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-7); }

.text-wine { color: var(--c-wine-deep); }
.muted { color: var(--text-muted); }

.rule {
  width: 3.5rem;
  height: 1px;
  background: var(--c-stone-line);
  border: 0;
}

.rule--full {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  border: 0;
}
