/* Le Saint Martin, Amilly
   Fond blanc, typographie noire, un seul accent : le rouge brique de la façade.
   Polices : Libre Caslon Display (titres) + Libre Franklin (texte) */

:root {
  --white: #ffffff;
  --black: #141414;
  --grey: #6b6966;
  --rule: #141414;
  --hair: #e4e2de;
  --soft: #f4f3f0;
  --red: #9b3322;
  --red-dark: #7d2819;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --text: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.1rem, 4vw, 2.5rem);
  --header: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.muted { color: var(--grey); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .7rem 1.4rem;
  font-size: .95rem; font-weight: 500;
  text-decoration: none; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--line { border-color: var(--black); }
.btn--line:hover { background: var(--black); color: var(--white); }
.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--black); color: var(--white); }

/* Bandeau maquette */
.mockup-note {
  background: var(--soft); color: var(--grey);
  font-size: .75rem; text-align: center; padding: .45rem 1rem;
}

/* En-tête */
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--hair);
}
.header__row { height: var(--header); display: flex; align-items: center; gap: 2rem; }
.logo { font-family: var(--display); font-size: 1.45rem; text-decoration: none; margin-right: auto; }
.logo:hover { color: var(--black); }
.nav { display: none; gap: 1.8rem; font-size: .92rem; }
.nav a { text-decoration: none; padding: .3rem 0; background: linear-gradient(var(--red), var(--red)) left bottom / 0 1px no-repeat; transition: background-size .25s; }
.nav a:hover { background-size: 100% 1px; }
.header__book { min-height: 2.5rem; padding: .4rem 1rem; font-size: .88rem; }
@media (min-width: 880px) { .nav { display: flex; } }

/* 1. Ouverture */
.opening { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.opening__over { font-size: .9rem; color: var(--grey); }
.opening__name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.3rem, 13.2vw, 12.5rem);
  line-height: .92; letter-spacing: -.02em;
  margin: .3rem 0 clamp(1.5rem, 4vw, 2.8rem) -.04em;
  white-space: nowrap;
}
.opening__grid { display: grid; gap: 2rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.opening__tagline { font-family: var(--display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.12; }
.opening__sub { margin-top: 1rem; color: var(--grey); max-width: 30rem; }
.opening__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.opening__actions .btn { flex: 1 1 auto; white-space: nowrap; }
.opening__facts { margin-top: 2.2rem; }
.opening__facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--hair); font-size: .93rem; }
.opening__facts dt { color: var(--grey); }
.opening__photo { order: -1; position: relative; }
.opening__photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.opening__photo::after {
  content: "Fait maison"; position: absolute; left: 0; bottom: 0;
  background: var(--white); color: var(--red);
  font-family: var(--display); font-size: 1.1rem; padding: .45rem .9rem .3rem;
}
.opening__tagline::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--red); margin-bottom: 1rem; }

@media (min-width: 880px) {
  .opening__grid { grid-template-columns: 5fr 7fr; gap: 3rem; }
  .opening__text { display: flex; flex-direction: column; }
  .opening__actions .btn { flex: none; }
  .opening__facts { margin-top: auto; padding-top: 2rem; }
  .opening__photo { order: 0; }
  .opening__photo img { aspect-ratio: 5 / 4; object-position: 50% 55%; }
}

/* Offre du jeudi */
.offer__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.5rem;
  border: 1px solid var(--red); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 5px rgba(155, 51, 34, .35);
  padding: 1.2rem 1.4rem; background: #fdf8f5;
  max-width: calc(1320px - 2 * var(--pad)); margin: 0 var(--pad);
}
@media (min-width: 1400px) { .offer__row { margin: 0 auto; } }
.offer__day { font-family: var(--display); font-size: 1.5rem; color: var(--red); }
.offer__day::before { content: "◆ "; font-size: .7em; vertical-align: .15em; }
.offer__text { font-size: .95rem; }
.offer__text span { color: var(--grey); }

/* Blocs éditoriaux : titre à gauche, contenu à droite */
.block {
  display: grid; gap: 1.5rem;
  padding-top: clamp(3.5rem, 8vw, 6rem);
}
.block + .block { margin-top: 0; }
.block__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem);
  line-height: 1;
  padding-top: 1rem; border-top: 2px solid var(--rule);
}
.block__title::after {
  content: ""; display: block; width: 2.5rem; height: 3px;
  background: var(--red); margin-top: 1.1rem;
}
.block__body { padding-top: 0; }
@media (min-width: 880px) {
  .block { grid-template-columns: 4fr 8fr; gap: 3rem; }
  .block__title { position: sticky; top: calc(var(--header) + 1.5rem); align-self: start; }
  .block__body { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
  /* La carte prend toute la largeur pour rester lisible */
  #carte .block__title { position: static; grid-column: 1 / -1; }
  #carte .block__body { grid-column: 1 / -1; border-top: 0; padding-top: 0; }
}

/* 2. La maison */
.maison { display: grid; gap: 2rem; }
.lead { font-family: var(--display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.2; margin-bottom: 1.2rem; }
.maison__text p + p { margin-top: .9rem; }
.maison__text p:not(.lead) { max-width: 36rem; }
.maison__photo img { width: 100%; }
figcaption { font-size: .82rem; color: var(--grey); margin-top: .5rem; }
@media (min-width: 1100px) {
  .maison { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
}

/* 3. La carte */
.switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.5rem; }
.switch button {
  background: var(--white); border: 1px solid var(--hair);
  padding: .6rem 1rem; font-size: .92rem; cursor: pointer;
}
.switch button:hover { border-color: var(--black); }
.switch button[aria-selected="true"] { background: var(--black); border-color: var(--black); color: var(--white); }

.menu {
  border: 1px solid var(--black);
  box-shadow: inset 0 0 0 6px var(--white), inset 0 0 0 7px var(--black);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 3rem);
  text-align: center;
}
.menu__prices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 34rem; margin: 0 auto; }
.price + .price { border-left: 1px solid var(--hair); }
.price { padding: 0 .5rem; }
.price__amount { font-family: var(--display); font-size: clamp(2.6rem, 2rem + 2.5vw, 4rem); line-height: 1; color: var(--red); }
.price__what { margin-top: .5rem; font-weight: 500; }
.price__wine { font-size: .88rem; color: var(--grey); margin-top: .2rem; }
.menu__when { margin-top: 1rem; font-size: .92rem; color: var(--grey); }

.menu__cols { display: grid; gap: 2.5rem; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--hair); }
.course h3 {
  font-family: var(--display); font-weight: 400; font-size: 1.75rem; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center; gap: .8rem;
}
.course h3::before, .course h3::after { content: ""; width: 1.6rem; height: 1px; background: var(--red); }
.course li { padding: .55rem 0; line-height: 1.45; }
.course li + li::before { content: "◆"; display: block; color: var(--red); font-size: .5rem; margin-bottom: .9rem; opacity: .8; }
.course__extra { margin-top: 1.2rem; padding: .7rem 1rem; border: 1px solid var(--black); display: inline-block; }
.supp { display: block; font-size: .82rem; color: var(--red); margin-top: .15rem; }
.menu__note { margin-top: 1.5rem; font-size: .88rem; color: var(--grey); text-align: center; font-style: italic; }
.js .menu[hidden] { display: none; }
@media (min-width: 760px) {
  .menu__cols { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .course + .course { border-left: 1px solid var(--hair); padding-left: 2rem; }
}

/* 4. Photos */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem .8rem; }
.photos__item button { display: block; width: 100%; padding: 0; border: 0; background: var(--soft); cursor: zoom-in; overflow: hidden; }
.photos__item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .2s; }
.photos__item button:hover img { opacity: .88; }
.p1 { grid-column: 1 / -1; }
.p1 img { aspect-ratio: 4 / 3; object-position: 50% 50%; }
.p3 img, .p4 img { aspect-ratio: 4 / 5; }
@media (min-width: 880px) {
  .photos { grid-template-columns: repeat(6, 1fr); gap: 2rem 1.2rem; }
  .p1 { grid-column: 1 / 5; }
  .p2 { grid-column: 5 / 7; align-self: end; }
  .p3 { grid-column: 1 / 3; }
  .p4 { grid-column: 3 / 5; margin-top: 4rem; }
  .p5 { grid-column: 5 / 7; }
}

/* 5. Réservation */
.booking { background: var(--red); color: var(--white); margin-top: clamp(4rem, 9vw, 7rem); }
.booking__row { display: grid; gap: 1.5rem; padding-top: clamp(2.8rem, 6vw, 4.5rem); padding-bottom: clamp(2.8rem, 6vw, 4.5rem); align-items: end; }
.booking__title { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 1.6rem + 5vw, 6rem); line-height: .95; }
.booking__side p { max-width: 24rem; margin-bottom: 1.3rem; font-size: 1.05rem; }
.booking__side .btn { min-height: 3.4rem; padding: .8rem 2rem; }
.booking__title::before { content: "◆"; display: block; font-size: 1rem; margin-bottom: 1rem; opacity: .7; }
.booking__side a:not(.btn) { color: var(--white); white-space: nowrap; }
@media (min-width: 880px) { .booking__row { grid-template-columns: 8fr 4fr; gap: 3rem; } }

/* 6. Horaires et accès */
.infos { display: grid; border: 1px solid var(--black); }
.infos > div { padding: 1.4rem 1.4rem 1.6rem; }
.infos > div + div { border-top: 1px solid var(--hair); }
.infos h3 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; color: var(--red); margin-bottom: .6rem; }
.infos p + p { margin-top: .6rem; }
.infos a { text-decoration: none; }
.arrow { border-bottom: 1px solid currentColor; }
.arrow::after { content: " →"; }
.map { position: relative; background: var(--soft); border: 1px solid var(--black); border-top: 0; }
.map__static { display: block; position: relative; }
.map__static img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.map__open {
  position: absolute; left: .8rem; bottom: .8rem;
  background: var(--white); border: 1px solid var(--black);
  padding: .55rem .9rem; font-size: .88rem; font-weight: 500; text-decoration: none;
}
.map__static:hover .map__open { background: var(--black); color: var(--white); }
@media (min-width: 640px) {
  .map__static img { aspect-ratio: 16 / 9; }
}
@media (min-width: 640px) {
  .infos { grid-template-columns: repeat(3, 1fr); }
  .infos > div + div { border-top: 0; border-left: 1px solid var(--hair); }
}

/* Pied de page */
.footer { margin-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--rule); padding: 1.8rem 0 6rem; font-size: .9rem; }
.footer__row { display: grid; gap: .4rem; }
.footer__name { font-family: var(--display); font-size: 1.5rem; margin-bottom: .4rem; }
.footer a { text-decoration: none; }
@media (min-width: 880px) {
  .footer { padding-bottom: 2rem; }
  .footer__row { grid-template-columns: 1.4fr repeat(4, auto); gap: 2.5rem; align-items: baseline; }
  .footer__name { margin: 0; }
}

/* Bouton fixe mobile */
.mobile-book {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(3.4rem + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--red); color: var(--white);
  font-weight: 500; text-decoration: none;
  transform: translateY(100%); transition: transform .3s;
}
.mobile-book:hover { color: var(--white); }
.mobile-book.is-visible { transform: none; }
@media (min-width: 880px) { .mobile-book { display: none; } }

/* Visionneuse photo */
.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 3.5rem var(--pad) 4.5rem; border: 0;
  background: var(--white); color: var(--black);
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: var(--white); }
.viewer figure { text-align: center; }
.viewer img { max-height: calc(100vh - 10rem); width: auto; margin: 0 auto; }
.viewer button { background: none; border: 0; cursor: pointer; font-size: .92rem; padding: .5rem; border-bottom: 1px solid currentColor; }
.viewer button:hover { color: var(--red); }
.viewer__close { position: absolute; top: 1rem; right: var(--pad); }
.viewer__nav { position: absolute; left: 0; right: 0; bottom: 1.2rem; display: flex; justify-content: center; gap: 2rem; }

/* Apparition discrète */
.js .fade { opacity: 0; transition: opacity .8s ease; }
.js .fade.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .fade { opacity: 1; transition: none; }
}
