/* =========================================================================
   Pizza Sicilia — feuille de styles unique
   Thème « ardoise noire », logo vert/rouge. Mobile-first.
   Aucune webfont réseau (polices système) : perf + offline + pas de tracking.
   ========================================================================= */

/* ----------------------------- Design tokens ---------------------------- */
:root {
  /* Fond ardoise + surfaces */
  --bg:        #16181a;
  --bg-2:      #1e2125;
  --bg-3:      #272b30;
  --bg-hero:   #0e0f11;

  /* Texte (off-white, contraste AA sur --bg ~15:1) */
  --fg:        #f3efe8;
  --fg-soft:   #d8d3c9;
  --fg-muted:  #a9a396;   /* AA sur --bg (~5.7:1) — réservé au texte secondaire */

  /* Couleurs du logo : aplats décoratifs */
  --green:     #12a150;
  --red:       #d8283a;
  /* Versions éclaircies pour le TEXTE (AA sur fond ardoise) */
  --green-txt: #47cc7d;
  --red-txt:   #ff6f77;

  /* Lignes / ombres */
  --line:      rgba(243, 239, 232, 0.12);
  --line-soft: rgba(243, 239, 232, 0.07);
  --shadow:    0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);

  /* Rythme */
  --wrap: 1120px;
  --radius: 14px;
  --radius-sm: 9px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* ------------------------------- Reset léger ---------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 50% -10%, #23262b 0%, rgba(35,38,43,0) 60%),
    linear-gradient(180deg, #17191c 0%, #131518 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--fg); }

/* Focus visible accessible (clavier) */
:focus-visible {
  outline: 3px solid var(--green-txt);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Lien d'évitement (accessibilité) */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: #111; padding: 10px 16px; z-index: 200;
  border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ------------------------------- Conteneur ------------------------------ */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section--tight { padding: clamp(32px, 5vw, 56px) 0; }

/* --------------------------------- Titres ------------------------------- */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }

.eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-txt); margin-bottom: .7rem;
}
.eyebrow--red { color: var(--red-txt); }

.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--fg-soft); max-width: 60ch; }

/* --------------------------------- Boutons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none; letter-spacing: .01em;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  min-height: 48px;                      /* cible tactile ≥ 44px */
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

.btn--primary { background: var(--green); color: #06180d; border-color: var(--green); }
.btn--primary:hover { background: #15b159; border-color: #15b159; }

.btn--ghost { background: rgba(243,239,232,.04); color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--fg-soft); background: rgba(243,239,232,.09); }

.btn--red { background: var(--red); color: #fff; border-color: var(--red); }
.btn--red:hover { background: #e6404f; border-color: #e6404f; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------ En-tête site ---------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 20, 22, .86);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo img { height: 26px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none; color: var(--fg-soft); font-weight: 700; font-size: .96rem;
  padding: 9px 12px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { color: var(--fg); background: rgba(243,239,232,.06); }
.site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--red));
}
.site-nav .btn { padding: .5em .95em; min-height: 40px; font-size: .92rem; }

/* Sur petits écrans, l'en-tête se resserre : le lien « Accueil » est redondant
   avec le logo (qui pointe déjà vers l'accueil) → on le masque pour laisser
   respirer « La Carte » + le bouton « Appeler ». */
@media (max-width: 560px) {
  .site-header__inner { gap: 8px; }
  .site-nav { gap: 2px; }
  .site-nav > a[href="index.html"] { display: none; }
  .site-header__logo img { height: 24px; }
}

/* ---------------------------------- Héro -------------------------------- */
.hero { position: relative; isolation: isolate; background: var(--bg-hero); overflow: hidden; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%; z-index: -2;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,15,17,.55) 0%, rgba(14,15,17,.35) 35%, rgba(14,15,17,.82) 100%),
    radial-gradient(120% 90% at 50% 20%, rgba(0,0,0,0) 40%, rgba(0,0,0,.5) 100%);
}
.hero__content {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 22px;
  min-height: min(88svh, 760px);
  padding: 90px 0 64px;
  justify-content: center;
}
.hero__logo { width: min(78vw, 340px); height: auto; filter: drop-shadow(0 6px 22px rgba(0,0,0,.5)); }
.hero__tagline {
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);
  font-weight: 700; color: #fff; margin: 0; max-width: 20ch;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.hero__sub {
  margin: 0; color: var(--fg-soft); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; font-size: .82rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.hero .btn-row { justify-content: center; margin-top: 6px; }

/* --------------------------- Blocs d'information ------------------------ */
.split { display: grid; gap: clamp(24px, 5vw, 56px); align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split--rev > :first-child { order: 2; } }

.media-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft); background: var(--bg-2);
}
.media-frame img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; }

/* Trio de photos produit */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.photo-strip img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
}
/* Les <picture> (grid items) doivent se comporter comme des blocs qui remplissent la cellule */
.photo-strip picture, .media-frame picture { display: block; }
@media (max-width: 560px) { .photo-strip > :nth-child(3) { display: none; } .photo-strip { grid-template-columns: 1fr 1fr; } }

/* Carte "infos pratiques" (horaires / accès) */
.info-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
.info-card {
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 22px 22px 24px; box-shadow: var(--shadow);
}
.info-card h3 { display: flex; align-items: center; gap: .5em; margin-bottom: .35em; }
.info-card h3 svg { width: 1.2em; height: 1.2em; color: var(--green-txt); }
.info-card p { margin: .2em 0; color: var(--fg-soft); }
.info-card strong { color: var(--fg); }
.hours { list-style: none; margin: .3em 0 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.hours li:last-child { border-bottom: 0; }
.hours .day { color: var(--fg); font-weight: 600; }
.hours .time { color: var(--fg-soft); }

.delivery-note {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(216,40,58,.10); border: 1px solid rgba(216,40,58,.30); color: var(--fg-soft);
  font-size: .95rem;
}

/* Bloc traiteur (accent) */
.traiteur { background: linear-gradient(180deg, #191c1f 0%, #14161a 100%); border-block: 1px solid var(--line-soft); }
.traiteur .tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 20px; padding: 0; list-style: none; }
.traiteur .tags li {
  font-size: .88rem; font-weight: 700; color: var(--fg-soft);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}

/* --------------------------------- Footer ------------------------------- */
.site-footer { background: #101214; border-top: 1px solid var(--line-soft); padding: 48px 0 40px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h4 { margin: 0 0 .7em; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-txt); }
.site-footer p, .site-footer li { color: var(--fg-soft); margin: .25em 0; }
.site-footer a { color: var(--fg-soft); text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 12px; }
.footer-contact ul, .footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; gap: .5em; padding: 4px 0; }
.footer-map { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--green-txt) !important; }
.footer-map svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.footer-bottom {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  font-size: .85rem; color: var(--fg-muted);
}

/* --------------------- Bouton « Appeler » flottant (mobile) ------------- */
.call-fab {
  position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px;
  display: none;                          /* activé en mobile via media query */
  align-items: center; justify-content: center; gap: .6em;
  padding: 15px 20px; border-radius: 999px;
  background: var(--green); color: #06180d; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; box-shadow: 0 8px 26px rgba(0,0,0,.5), 0 0 0 4px rgba(18,161,80,.18);
  transform: translateY(140%); transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.call-fab svg { width: 1.25em; height: 1.25em; }
.call-fab.is-visible { transform: translateY(0); }
@media (max-width: 768px) { .call-fab { display: inline-flex; } body { --fab-space: 84px; } }
@media (prefers-reduced-motion: reduce) { .call-fab { transition: none; } }

/* =========================================================================
   PAGE CARTE
   ========================================================================= */

/* Bandeau de tête */
.carte-banner { position: relative; isolation: isolate; background: var(--bg-hero); overflow: hidden; }
.carte-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; z-index: -2; }
.carte-banner__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,15,17,.62) 0%, rgba(14,15,17,.72) 60%, rgba(22,24,26,.96) 100%);
}
.carte-banner__content { padding: clamp(40px, 8vw, 70px) 0 clamp(28px, 5vw, 44px); text-align: center; }
.carte-banner__content h1 {
  margin: 0; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
.carte-banner__content p { margin: .5em auto 0; max-width: 46ch; color: var(--fg-soft); text-shadow: 0 1px 10px rgba(0,0,0,.6); }

/* Onglets Sur place / À emporter */
.carte-tabs {
  position: sticky; top: 62px; z-index: 90;
  display: flex; gap: 8px; padding: 12px 20px;
  background: var(--bg); border-bottom: 1px solid var(--line-soft);
  justify-content: center;
}
.carte-tab {
  flex: 1 1 auto; max-width: 240px;
  appearance: none; cursor: pointer;
  background: var(--bg-2); color: var(--fg-soft);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 12px 18px; font-size: 1rem; font-weight: 800; font-family: inherit;
  min-height: 48px; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.carte-tab:hover { color: var(--fg); border-color: var(--fg-muted); }
.carte-tab.is-active {
  background: var(--green); color: #06180d; border-color: var(--green);
}

/* Panneau + catégories */
.carte-panel { padding: 8px 0 20px; }
.carte-panel[hidden] { display: none; }
.menu-wrap { width: min(100% - 40px, 760px); margin-inline: auto; }

.menu-cat { margin: 0 0 clamp(30px, 5vw, 44px); }
.menu-cat__title {
  display: inline-block; margin: 0 0 2px; font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800; letter-spacing: -0.01em;
}
.menu-cat__title::after {
  content: ""; display: block; height: 3px; width: 62px; margin-top: 8px; border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--green) 130%);
}
.menu-cat__note {
  margin: 6px 0 16px; font-size: .9rem; font-style: italic; color: var(--fg-muted);
}
.menu-cat:not(:first-child) { padding-top: clamp(8px, 2vw, 16px); }

.menu-items { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.menu-item:last-child { border-bottom: 0; }
.menu-item__head { display: flex; align-items: baseline; gap: 8px; }
.menu-item__name { font-weight: 700; color: var(--fg); font-size: 1.05rem; }
.menu-item__leader {
  flex: 1 1 auto; align-self: flex-end;
  border-bottom: 1px dotted rgba(243,239,232,.28); transform: translateY(-5px); min-width: 20px;
}
.menu-item__price { font-weight: 800; color: var(--fg); white-space: nowrap; }

/* Prix multi-formats (vins, pichets, San Benedetto…) */
.menu-item__price--multi { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.price-size { display: inline-flex; align-items: baseline; gap: 8px; font-size: .95rem; }
.price-size__label { color: var(--fg-muted); font-weight: 600; font-size: .82rem; }
.price-size__val { color: var(--fg); font-weight: 800; min-width: 3.2em; text-align: right; }

.menu-item__desc { margin: 4px 0 0; color: var(--fg-soft); font-size: .95rem; line-height: 1.5; max-width: 60ch; }

/* État de chargement / erreur (fallback JSON) */
.menu-loading { padding: 40px 0; text-align: center; color: var(--fg-muted); }
.menu-error {
  margin: 20px 0; padding: 22px 24px; text-align: center;
  background: rgba(216,40,58,.10); border: 1px solid rgba(216,40,58,.35); border-radius: var(--radius);
}
.menu-error h3 { margin: 0 0 .4em; color: var(--red-txt); }
.menu-error p { margin: 0 0 14px; color: var(--fg-soft); }

/* =========================================================================
   PAGE MENTIONS LÉGALES (prose)
   ========================================================================= */
.legal { width: min(100% - 40px, 760px); margin-inline: auto; padding: clamp(40px, 7vw, 72px) 0 clamp(48px, 8vw, 88px); }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 .3em; }
.legal .legal-updated { color: var(--fg-muted); font-size: .9rem; margin: 0 0 1.5em; }
.legal h2 { font-size: 1.15rem; margin: 2em 0 .5em; color: var(--green-txt); }
.legal p, .legal li { color: var(--fg-soft); }
.legal address { font-style: normal; color: var(--fg-soft); }
.legal a { color: var(--green-txt); }
.legal ul { padding-left: 1.2em; }
.legal .todo {
  display: inline-block; background: rgba(216,40,58,.14); border: 1px solid rgba(216,40,58,.4);
  color: var(--fg); font-weight: 700; padding: 1px 8px; border-radius: 6px; font-size: .92em;
}

/* Petites utilités */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
