/* ============================================================
   Brasserie Terroir & Savoirs — Feuille de style
   Site statique (HTML/CSS/JS) — palette cuivrée
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; margin: 0; padding: 0; }

:root {
  /* Palette cuivrée */
  --cream:     #f7f1e3;
  --beige:     #e8d5a9;
  --beige-dk:  #ddc491;
  --ocre:      #c89b3c;
  --cuivre:    #b5651d;
  --cuivre-lt: #d27c2c;
  --marron:    #5c3a1e;
  --marron-dk: #2d1a0a;
  --text:      #2d1a0a;
  --text-soft: #5c3a1e;
  --white:     #fffaf0;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow:    0 10px 30px rgba(45, 26, 10, 0.12);
  --shadow-lg: 0 20px 50px rgba(45, 26, 10, 0.22);
  --header-h: 78px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--marron-dk);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1rem; }

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

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 2rem;
  background: var(--cuivre);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(181, 101, 29, .35);
  transition: background .25s, transform .25s, box-shadow .25s;
}
.btn:hover { background: var(--marron); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(45,26,10,.3); }
.btn--outline {
  background: transparent;
  color: var(--cream);
  border: 2px solid rgba(247,241,227,.6);
  box-shadow: none;
}
.btn--outline:hover { background: var(--cream); color: var(--marron-dk); border-color: var(--cream); }

/* ---------- Bandeau légal ---------- */
.age-warning {
  background: var(--marron-dk);
  color: var(--beige);
  text-align: center;
  padding: .55rem 1rem;
  font-size: .82rem;
  letter-spacing: .03em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(45, 26, 10, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.site-header.scrolled {
  background: rgba(45, 26, 10, .98);
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.site-logo { display: flex; align-items: center; gap: .8rem; }
.site-logo img { height: 50px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.site-logo .site-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ocre);
  line-height: 1.1;
}
.site-logo .site-title small {
  display: block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  color: var(--beige);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.main-nav ul { display: flex; gap: 2.2rem; align-items: center; }
.main-nav a {
  color: var(--cream);
  font-weight: 500;
  font-size: .98rem;
  position: relative;
  padding: .35rem 0;
  transition: color .2s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--ocre);
  transition: width .28s;
}
.main-nav a:hover, .main-nav a.active { color: var(--ocre); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(45,26,10,.78) 0%, rgba(28,16,6,.82) 100%),
    url('../assets/img/hero.jpg') center/cover no-repeat;
  background-color: var(--marron-dk);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(200,155,60,.25), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(181,101,29,.28), transparent 50%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: 820px; }
.hero__eyebrow {
  display: inline-block;
  color: var(--ocre);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
  padding: .4rem 1.1rem;
  border: 1px solid rgba(200,155,60,.4);
  border-radius: 50px;
}
.hero h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero p {
  font-size: 1.2rem;
  max-width: 620px;
  margin: 0 auto 2.4rem;
  color: var(--beige);
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(247,241,227,.5);
  border-radius: 14px;
  z-index: 2;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--ocre);
  border-radius: 2px;
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ---------- Stats ---------- */
.stats {
  background: var(--marron-dk);
  color: var(--cream);
  padding: 2.8rem 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--ocre);
  line-height: 1;
}
.stat__label {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--beige);
}

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }
.section--alt { background: var(--beige); }

.section-title { text-align: center; margin-bottom: 3.5rem; }
.section-title span {
  display: block;
  color: var(--cuivre);
  font-size: .82rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: .6rem;
}
.section-title h2 { position: relative; display: inline-block; }
.section-title h2::after {
  content: '';
  display: block;
  width: 64px; height: 3px;
  background: var(--cuivre);
  border-radius: 2px;
  margin: .8rem auto 0;
}

/* ---------- À propos ---------- */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about__text p { color: var(--text-soft); }
.about__values {
  margin-top: 1.6rem;
  display: grid;
  gap: .7rem;
}
.about__values li {
  position: relative;
  padding-left: 1.9rem;
  font-weight: 500;
  color: var(--marron-dk);
}
.about__values li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--cuivre);
  box-shadow: inset 0 0 0 3px var(--beige);
}
.about__media { display: flex; justify-content: center; }
.about__logo-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(181,101,29,.15);
  max-width: 360px;
}
.about__logo-card img { width: 100%; }

/* ---------- Produits ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(181,101,29,.08);
  transition: transform .3s, box-shadow .3s;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-card .img-wrap {
  background: linear-gradient(160deg, var(--cream), var(--beige));
  padding: 2rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .img-wrap img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(45,26,10,.25));
  transition: transform .3s;
}
.product-card:hover .img-wrap img { transform: scale(1.06) rotate(-2deg); }
.product-card__cat {
  display: inline-block;
  margin: 1.1rem auto 0;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cuivre);
  font-weight: 600;
}
.product-card h3 { padding: .4rem 1rem 0; color: var(--marron-dk); }
.product-card .tagline {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-soft);
  font-size: .92rem;
  flex: 1;
}
.product-card .more {
  background: var(--marron-dk);
  color: var(--ocre);
  padding: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  font-size: .8rem;
  text-transform: uppercase;
  transition: background .25s, color .25s;
}
.product-card:hover .more { background: var(--cuivre); color: var(--white); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.is-open { display: flex; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 16, 6, .82);
  backdrop-filter: blur(4px);
}
.modal__content {
  position: relative;
  z-index: 2;
  background: var(--cream);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  box-shadow: var(--shadow-lg);
  animation: modalIn .35s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute;
  top: .6rem; right: .9rem;
  font-size: 2rem;
  color: var(--marron-dk);
  line-height: 1;
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  transition: background .2s;
}
.modal__close:hover { background: rgba(45,26,10,.1); }
.modal__media {
  background: linear-gradient(160deg, var(--beige), var(--beige-dk));
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__media img { max-height: 340px; width: auto; filter: drop-shadow(0 12px 24px rgba(45,26,10,.3)); }
.modal__body { padding: 2.5rem; overflow-y: auto; }
.modal__eyebrow {
  display: block;
  color: var(--cuivre);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: .5rem;
}
.modal__body h3 { color: var(--marron-dk); font-size: 2rem; margin-bottom: 1rem; }
.modal__body p { color: var(--text-soft); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}
.contact-info__item h3 {
  font-size: 1rem;
  color: var(--cuivre);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}
.contact-info__item p { color: var(--text-soft); margin: 0; }
.contact-info__item a:hover { color: var(--cuivre); }

.contact-form {
  background: var(--cream);
  padding: 2.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.2rem;
}
.form-row { display: grid; gap: .4rem; }
.form-row label { font-weight: 600; font-size: .9rem; color: var(--marron-dk); }
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: .85rem 1rem;
  border: 1px solid var(--beige-dk);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cuivre);
  box-shadow: 0 0 0 3px rgba(181,101,29,.15);
}
.contact-form input.invalid,
.contact-form textarea.invalid { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-feedback { margin: 0; font-weight: 500; font-size: .92rem; }
.form-feedback.success { color: #1e7d4c; }
.form-feedback.error { color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--marron-dk);
  color: var(--beige);
  padding: 3.5rem 0 1.8rem;
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(232,213,169,.18);
}
.site-logo--footer img { height: 46px; }
.site-footer__tagline { margin: 1rem 0 0; color: var(--beige); opacity: .8; font-size: .92rem; }
.site-footer__nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.site-footer__nav a { color: var(--beige); transition: color .2s; }
.site-footer__nav a:hover { color: var(--ocre); }
.site-footer__bottom {
  margin-top: 1.8rem;
  text-align: center;
  font-size: .85rem;
  color: rgba(232,213,169,.7);
}
.site-footer__bottom p { margin: .2rem 0; }

/* ---------- Animations au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero__scroll span { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .modal__content { grid-template-columns: 1fr; }
  .modal__media { padding: 2rem; }
  .modal__media img { max-height: 220px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: var(--marron-dk);
    padding: calc(var(--header-h) + 1.5rem) 2rem 2rem;
    transform: translateX(100%);
    transition: transform .35s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.4);
    z-index: 90;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .main-nav li { border-bottom: 1px solid rgba(232,213,169,.15); }
  .main-nav a { display: block; padding: 1rem 0; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 80;
    opacity: 0; visibility: hidden;
    transition: opacity .3s;
  }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  .section { padding: 4.5rem 0; }
  .contact-info { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .site-logo .site-title { font-size: 1.1rem; }
  .contact-form { padding: 1.5rem; }
}
