/* =========================================================
   L'iberico — feuille de style principale
   Couleurs inspirées des étiquettes de conserves espagnoles :
   olive profonde, pimentón, safran, papier.
   ========================================================= */

:root {
  --olive-900: #25301a;
  --olive-800: #2f3b21;
  --olive-600: #4b5a33;
  --pimenton: #9b2a1c;
  --pimenton-dark: #7d2015;
  --azafran: #e9b949;
  --azafran-soft: #f6e3b0;
  --paper: #fffcf5;
  --paper-2: #f5efe2;
  --ink: #221c16;
  --muted: #6b6257;
  --line: #e6ddcb;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 6px;
  --radius-m: 12px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--pimenton);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--saffron { background: var(--azafran); color: var(--ink); }
.btn--ghost-light { border-color: rgba(255, 252, 245, 0.45); color: var(--paper); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--outline { border-color: var(--ink); color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .btn--saffron:hover { background: #f1c65e; }
  .btn--ghost-light:hover { border-color: var(--paper); }
  .btn--ink:hover { background: var(--olive-800); }
  .btn--outline:hover { background: var(--ink); color: var(--paper); }
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 245, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}
.brand-logo { display: block; height: 72px; width: auto; }
.footer-logo { display: block; height: 96px; width: auto; }
@media (max-width: 520px) { .brand-logo { height: 60px; } }
.brand-text { display: none; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--pimenton);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--ink);
  transition: background-color 150ms ease;
}
.nav a[aria-current="page"] { background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background: var(--paper-2); }
}
.header-cta { min-height: 42px; padding: 0 18px; font-size: 0.95rem; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}
.menu-toggle:active { transform: scale(0.97); }

/* Menu mobile : panneau qui glisse depuis le haut, origine = bouton */
.mobile-nav {
  position: fixed;
  inset: var(--header-h, 88px) 0 auto 0;
  z-index: 49;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(34, 28, 22, 0.35);
  padding: 8px var(--gutter) 24px;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}
.mobile-nav[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s;
}
.mobile-nav a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
}
.mobile-nav a[aria-current="page"] { color: var(--pimenton); }
.mobile-nav a.btn {
  display: flex;
  margin-top: 20px;
  width: 100%;
  padding: 0 22px;
  border-bottom: 0;
  font: 600 1rem/1 var(--font-body);
}

@media (max-width: 960px) {
  .site-header .wrap { min-height: 76px; }
  .mobile-nav { --header-h: 76px; }
  .nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 961px) {
  .mobile-nav { display: none; }
}

/* ---------- Statut d'ouverture ---------- */
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.open-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.open-status[data-state="open"]::before { background: #6fbf5a; box-shadow: 0 0 0 4px rgba(111, 191, 90, 0.2); }
.open-status[data-state="closed"]::before { background: #d4553f; }
.open-status:empty { display: none; }

/* ---------- Héros (accueil) ---------- */
.hero {
  background: var(--olive-900);
  color: var(--paper);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 104px);
}
.hero h1 { color: var(--paper); max-width: 12ch; }
.hero-lead {
  margin-top: 24px;
  max-width: 46ch;
  font-size: 1.15rem;
  color: rgba(255, 252, 245, 0.82);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .open-status { margin-top: 28px; color: rgba(255, 252, 245, 0.85); }

.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-m);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(233, 185, 73, 0.22), transparent 55%),
    var(--olive-800);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .ph-mark { color: rgba(233, 185, 73, 0.5); }

/* Le seul moment orchestré : l'arrivée du héros */
@media (prefers-reduced-motion: no-preference) {
  .hero [data-enter] {
    animation: enter 400ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
  @keyframes enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 4 / 3; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tint { background: var(--paper-2); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Catégories (accueil) ---------- */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
.category {
  display: block;
  text-decoration: none;
}
.category-media {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-m);
  overflow: hidden;
  position: relative;
  background: var(--paper-2);
}
.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease-out), opacity 300ms ease;
}
.category { -webkit-tap-highlight-color: transparent; }
.category-media { transition: transform 160ms var(--ease-out); }
.category:active .category-media { transform: scale(0.98); }
.category h3 { margin-top: 14px; }
.category p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
@media (hover: hover) and (pointer: fine) {
  .category:hover .category-media img { transform: scale(1.03); }
  .category:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
}
@media (max-width: 900px) { .categories { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Carte du jour (sandwichs / tapas) ---------- */
.carta {
  background: var(--olive-900);
  color: var(--paper);
}
.carta .section-head p { color: rgba(255, 252, 245, 0.75); }
.carta-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 96px);
}
.carta h3 {
  color: var(--azafran);
  font-size: 1.6rem;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 252, 245, 0.18);
}
.carta-list { list-style: none; margin: 0; padding: 0; }
.carta-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255, 252, 245, 0.16);
}
.carta-list strong { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.carta-list span { color: rgba(255, 252, 245, 0.7); }
.carta-note { margin-top: 28px; color: rgba(255, 252, 245, 0.7); }
@media (max-width: 820px) { .carta-cols { grid-template-columns: 1fr; } }

/* ---------- À propos (bloc texte + image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split-media {
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-m);
  overflow: hidden;
  position: relative;
  background: var(--paper-2);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.prose p + p { margin-top: 1em; }
.prose p { max-width: 62ch; }
.prose .btn { margin-top: 28px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Infos pratiques ---------- */
.visit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.visit h3 { margin-bottom: 14px; }
.visit address { font-style: normal; }
.visit .muted { color: var(--muted); }
.visit .btn { margin-top: 18px; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 7px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; color: var(--pimenton); }
.hours .closed { color: var(--muted); }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-list a { font-weight: 500; }

@media (max-width: 900px) { .visit { grid-template-columns: 1fr; } }

/* ---------- En-tête de page (pages produits) ---------- */
.page-head {
  background: var(--olive-900);
  color: var(--paper);
  padding-block: clamp(44px, 7vw, 84px) clamp(36px, 5vw, 56px);
}
.page-head h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.page-head p { margin-top: 16px; max-width: 58ch; font-size: 1.12rem; color: rgba(255, 252, 245, 0.8); }
.crumbs { margin-bottom: 18px; font-size: 0.92rem; color: rgba(255, 252, 245, 0.65); }
.crumbs a { color: rgba(255, 252, 245, 0.85); }

/* ---------- Filtres ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.chip {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 500 0.95rem/1 var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip small { color: var(--muted); font-size: 0.85em; margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] small { color: rgba(255, 252, 245, 0.7); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { border-color: var(--ink); }
}

/* ---------- Grille produits ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.product[hidden] { display: none; }
.product:target .product-media { box-shadow: 0 0 0 3px var(--azafran); }
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--paper-2);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.product h3 { font-size: 1.12rem; line-height: 1.25; }
.product .weight { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.price {
  flex: none;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--radius-s);
  background: var(--azafran-soft);
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reserve {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--pimenton);
}
@media (hover: hover) and (pointer: fine) {
  .reserve:hover { color: var(--pimenton-dark); }
}

@media (max-width: 600px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .product-body { flex-direction: column; gap: 8px; margin-top: 10px; }
  .product h3 { font-size: 1rem; }
  .price { font-size: 0.88rem; padding: 4px 8px; }
  .reserve { font-size: 0.85rem; margin-top: 8px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filters {
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }
}

.products-note {
  margin-top: 48px;
  padding: 22px 24px;
  border-radius: var(--radius-m);
  background: var(--paper-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.products-note p { max-width: 60ch; }

/* ---------- Emplacements photo (avant l'ajout des vraies photos) ---------- */
.ph-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: rgba(75, 90, 51, 0.28);
  user-select: none;
  pointer-events: none;
}
.ph-mark { transition: opacity 200ms ease; }
.has-photo .ph-mark { opacity: 0; }
.product-media img, .split-media img, .hero-media img { transition: opacity 300ms ease; }
.product-media img, .category-media img, .split-media img, .hero-media img { opacity: 0; }
.has-photo img { opacity: 1; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 252, 245, 0.78);
  padding-block: 56px 32px;
  font-size: 0.97rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer .brand-text { color: var(--azafran); font-size: 2rem; }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 12px;
  letter-spacing: 0;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 252, 245, 0.85); text-decoration: none; }
.site-footer address { font-style: normal; }
@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover { color: var(--azafran); }
}
.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 252, 245, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255, 252, 245, 0.55);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Pages de texte (mentions légales) ---------- */
.legal > * { max-width: 720px; }
.legal h2 { font-size: 1.6rem; margin-top: 48px; margin-bottom: 12px; }
.legal p, .legal ul { margin-bottom: 1em; }

/* ---------- Mouvement réduit : moins de mouvement, pas zéro ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .chip:active, .menu-toggle:active,
  .category:active .category-media { transform: none; }
  .category:hover .category-media img { transform: none; }
  .mobile-nav, .mobile-nav[data-open="true"] { transform: none; }
}
