/* ==========================================================
   Myriam Ellouz — Traiteur · Version 2 (éditoriale)
   Fond blanc, typographie Bodoni, filets dorés, beaucoup d'air.
   ========================================================== */

:root {
  --bg: #ffffff;
  --text: #1a1816;
  --soft: #4a4540;
  --muted: #6e6862;
  --line: #ebe6de;
  --gold: #a88657;          /* filets et ornements */
  --gold-text: #7d6039;     /* texte doré, contraste AA sur blanc */
  --tint: #faf8f4;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--text); color: #fff; padding: 8px 14px; }

.smallcaps {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---------- Barre de navigation ---------- */

.bar {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 30px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.mark {
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}

.mark-name {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: 0.01em;
}

.mark-role {
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  color: var(--gold-text);
}

.home .bar { justify-content: center; }
.home .mark { display: none; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(20px, 2.4vw, 36px);
}

.nav a {
  position: relative;
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav a:hover { color: var(--text); }

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%) scale(0);
  transition: transform 0.25s ease;
}

.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }

.nav .nav-home { display: none; }

.menu-btn {
  display: none;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

/* ---------- Accueil ---------- */

.hero {
  text-align: center;
  padding: clamp(20px, 3.5vw, 44px) var(--gutter) clamp(32px, 4vw, 48px);
}

.wordmark {
  font-size: clamp(50px, 8.4vw, 112px);
  letter-spacing: -0.01em;
  line-height: 1;
}

.hero-role {
  margin: clamp(10px, 1.4vw, 18px) 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.2;
  color: var(--gold-text);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: clamp(18px, 2.4vw, 28px) auto;
  color: var(--gold);
}

.ornament::before,
.ornament::after {
  content: "";
  width: 48px;
  height: 1px;
  background: currentColor;
}

.ornament span {
  width: 5px;
  height: 5px;
  background: currentColor;
  transform: rotate(45deg);
}

.tagline {
  color: var(--muted);
  margin: 0 auto;
  line-height: 1.9;
}

.hero-photo {
  margin: 0 auto;
  max-width: calc(1440px + 2 * var(--gutter));
  padding: 0 var(--gutter);
}

.hero-photo img {
  width: 100%;
  height: min(84vh, 58vw);
  object-fit: cover;
}

.hero-link {
  text-align: center;
  margin: clamp(44px, 6vw, 72px) 0 0;
}

/* Lien souligné élégant */
.link {
  display: inline-block;
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding-bottom: 8px;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.35s ease, color 0.25s ease;
}
.link:hover { color: var(--gold-text); background-size: 40% 1px; }

/* ---------- Pages ---------- */

.page-head {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(40px, 6vw, 80px);
  text-align: center;
}

.kicker {
  color: var(--gold-text);
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(44px, 7vw, 92px);
  letter-spacing: -0.01em;
}

.split {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 clamp(16px, 2.4vw, 32px);
  align-items: start;
}

.split-photo {
  grid-column: 1 / span 5;
  position: sticky;
  top: 48px;
  margin: 0;
}

.split-text {
  grid-column: 7 / span 6;
  align-self: center;
  max-width: 36em;
  padding: 24px 0;
}

/* Cadre doré centré autour des photos (même marge sur les 4 côtés) */
.frame {
  position: relative;
  isolation: isolate;
}

.frame::before {
  content: "";
  position: absolute;
  inset: -22px;
  border: 1px solid var(--gold);
  opacity: 0.55;
  z-index: -1;
}

.frame img {
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
}

.frame img.portrait { object-position: center 25%; }

.lead {
  font-family: var(--display);
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 1.3em;
}

.lead em { color: var(--gold-text); }

.split-text p:not(.lead) { color: var(--soft); }

.split-text .signature {
  margin-top: 40px;
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  color: var(--gold-text);
}

/* Offre */

.offer {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: offre;
}

.offer li {
  display: grid;
  grid-template-columns: 64px 1fr;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.offer li:first-child { padding-top: 0; }
.offer li:last-child { border-bottom: 0; padding-bottom: 0; }

.offer .num {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--gold-text);
  line-height: 1.5;
}

.offer h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  margin-bottom: 10px;
}

.offer p { color: var(--muted); margin: 0; }

/* Références */

.refs {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.refs li {
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 31px);
  line-height: 1.3;
  padding: 15px 0;
}

.refs li + li::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  margin: -15px auto 15px;
  background: var(--gold);
  opacity: 0.7;
  transform: translateY(-3px) rotate(45deg);
}

.refs-caption {
  text-align: center;
  color: var(--gold-text);
  margin-bottom: 26px;
}

/* Fournisseurs */

.pillars {
  list-style: none;
  margin: 44px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  color: var(--gold-text);
}

.pillars li { display: flex; align-items: center; }

.pillars li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 16px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Contact */

.coords {
  margin: 0 0 44px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.coords li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.coords .smallcaps { color: var(--muted); }

.coords a { text-decoration: none; }
.coords a:hover { color: var(--gold-text); }

.todo { color: var(--muted); font-style: italic; }

.button {
  display: inline-block;
  padding: 17px 40px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.button:hover { background: var(--text); color: #fff; }

.button-solid { background: var(--text); color: #fff; }
.button-solid:hover { background: #fff; color: var(--text); }

.quote {
  scroll-margin-top: 24px;
  margin-top: 64px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--tint);
}

.quote h2 {
  font-size: clamp(30px, 3vw, 38px);
  margin-bottom: 8px;
}

.quote > p { color: var(--muted); margin-bottom: 30px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 26px;
}

.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }

.field label {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d9d2c6;
  border-radius: 0;
  padding: 9px 0;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--gold); }

.form-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.form-note { margin: 0; font-size: 14px; color: var(--muted); }

.req { color: var(--gold-text); }

.form-result {
  margin-top: 34px;
  padding: 26px 0 0;
  border-top: 1px solid var(--gold);
  outline: none;
}

.form-result h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.form-result p { color: var(--soft); }

.form-result a { color: var(--text); text-decoration-color: var(--gold); text-underline-offset: 3px; }

.form-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.form-result-actions .button { padding: 14px 24px; }

.copy-feedback {
  min-height: 1.8em;
  margin-top: 12px;
  font-size: 14px;
  color: var(--gold-text);
}

/* ---------- Galerie ---------- */

.gallery {
  max-width: calc(1440px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}

.gallery a {
  display: block;
  overflow: hidden;
  background: var(--tint);
}

/* Les photos panoramiques occupent toute la largeur, sans être rognées */
.gallery a.large { grid-column: 1 / -1; }

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 0.9s cubic-bezier(.2,.6,.2,1), opacity 0.4s ease;
}

.gallery a.large img { height: auto; aspect-ratio: 1280 / 586; }

.gallery a:hover img { transform: scale(1.025); }

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: #fff;
}

.lightbox::backdrop { background: #fff; }

.lightbox[open] { display: flex; align-items: center; justify-content: center; }

.lightbox figure {
  margin: 0;
  padding: 72px 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  width: auto;
  object-fit: contain;
}

.lightbox figcaption {
  margin-top: 20px;
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
}

.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.lb-btn svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1; }
.lb-btn:hover { color: var(--gold-text); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Pied de page ---------- */

.footer {
  margin-top: clamp(96px, 12vw, 168px);
  padding: clamp(56px, 7vw, 88px) var(--gutter) 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.1;
}

.footer-role {
  font-family: var(--display);
  font-style: italic;
  font-size: 25px;
  color: var(--gold-text);
  margin-top: 6px;
}

.footer .ornament { margin: 26px auto; }

.footer-tagline { color: var(--muted); font-size: 15px; }

.footer-nav {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.footer-nav a:hover { color: var(--text); }

/* Encart mentions légales */
.legal {
  max-width: 760px;
  margin: 44px auto 0;
  padding: 26px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.legal h2 {
  color: var(--gold-text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.legal p { margin: 0; }

.legal span { display: inline-block; }

.legal span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--gold);
}

.legal a { text-decoration: none; }
.legal a:hover { color: var(--text); }

.copyright {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Apparition douce au chargement ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

main > * { animation: rise 0.9s cubic-bezier(.2,.6,.2,1) both; }
main > *:nth-child(2) { animation-delay: 0.12s; }
main > *:nth-child(3) { animation-delay: 0.24s; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .js .menu-btn { display: block; }
  .js .home .bar { justify-content: flex-end; }

  .js .nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 72px 20px 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
  }

  /* visibilité immédiate à l'ouverture (sinon le focus ne peut pas entrer dans le menu) */
  .js .menu-open .nav { opacity: 1; visibility: visible; transition: opacity 0.35s ease, visibility 0s; }
  .js .menu-open { overflow: hidden; }

  .js .nav ul { flex-direction: column; align-items: center; gap: 6px; margin: auto 0; }
  .js .nav .nav-home { display: block; }

  .js .nav a {
    font-family: var(--display);
    font-size: clamp(28px, 7vw, 40px);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    padding: 6px 0;
  }

  .js .nav a[aria-current="page"] { font-style: italic; color: var(--gold-text); }
  .js .nav a::after { display: none; }

  .nav-close {
    position: fixed;
    top: 30px;
    right: var(--gutter);
  }

  /* Sans JavaScript : menu visible, sur plusieurs lignes */
  html:not(.js) .bar { flex-wrap: wrap; justify-content: center; }
  html:not(.js) .nav ul { flex-wrap: wrap; justify-content: center; }
}

@media (min-width: 1081px) {
  .nav-close { display: none; }
}

@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .split-photo,
  .split-text { grid-column: 1 / -1; }

  .split-photo { position: relative; top: auto; margin: 22px 22px 64px; }
  .split-text { padding: 0; max-width: none; }

  .frame img { max-height: 70vh; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar { padding-top: 22px; padding-bottom: 22px; }
  .mark-name { font-size: 20px; }
  .mark-role { font-size: 14px; }

  .hero-photo { padding: 0; }
  .hero-photo img { height: auto; }

  .frame::before { inset: -14px; }
  .split-photo { margin: 14px 14px 48px; }

  .offer li { grid-template-columns: 44px 1fr; }
  .coords li { grid-template-columns: 1fr; gap: 2px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }

  /* Téléphone : une seule colonne, photos entières et ordre exact */
  .gallery { grid-template-columns: 1fr; }
  .gallery a.large { grid-column: auto; }
  .gallery img, .gallery a.large img { aspect-ratio: auto; height: auto; }

  .legal span { display: block; }
  .legal span + span::before { content: none; }

  .lightbox figure { padding: 64px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
