/* Pia – Sacra Cucina Italiana : vert profond et or, comme l'affiche des horaires. */
:root {
  --green-950: #07140d;
  --green-900: #0c2217;
  --green-800: #123321;
  --green-700: #1b4a30;
  --gold: #d4ae5f;
  --gold-light: #ecd59a;
  --gold-dark: #a8823a;
  --cream: #f6efe0;
  --cream-dim: #d9cfba;
  --ink: #1d1a14;
  --it-green: #1f9a4c;
  --it-red: #ce2b37;
  --radius: 4px;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Great Vibes', 'Brush Script MT', cursive;
  --sans: Lato, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--green-950);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-light); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2rem, 4.5vw, 2.8rem); color: var(--gold); }
/* L'écriture de l'affiche (« Nos Horaires »), utilisée une seule fois sur la page. */
h2.script { font-family: var(--script); font-weight: 400; color: var(--gold-light); font-size: clamp(2.6rem, 6vw, 3.4rem); }

/* Boutons : couleur unie, angles discrets. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .8em 1.5em; border-radius: 4px; border: 1px solid var(--gold);
  font: 700 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-gold { background: var(--gold); color: var(--green-950); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

/* Annonce */
.announcement { background: var(--gold); color: var(--green-950); text-align: center; font-weight: 700; padding: .5em 1em; font-size: .95rem; }

/* Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem; padding: .6rem clamp(1rem, 4vw, 3rem);
  background: var(--green-950); border-bottom: 1px solid rgba(212, 174, 95, .2);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--gold); }
.brand img { border-radius: 50%; }
.brand span { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.topbar nav { display: flex; gap: 1.6rem; margin-left: auto; }
.topbar nav a, .topbar-phone { color: var(--cream-dim); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--gold-light); }
.topbar-phone { color: var(--gold-light); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Accueil : la photo du four en fond, assombrie, le logo au centre. */
.hero {
  position: relative; min-height: min(88vh, 820px); display: grid; place-items: center; text-align: center;
  padding: 4rem 1.25rem 5rem;
  background:
    radial-gradient(ellipse at center, rgba(7, 20, 13, .55), rgba(7, 20, 13, .92) 70%),
    url('/img/four.webp') center 30% / cover no-repeat;
}
.hero-inner { max-width: 720px; display: grid; justify-items: center; gap: 1rem; }
.hero-logo { width: clamp(150px, 26vw, 220px); height: auto; border-radius: 50%; box-shadow: 0 0 60px rgba(212, 174, 95, .25); }
.hero .script { font-family: var(--script); color: var(--gold-light); font-size: 1.9rem; margin: 0; line-height: 1.2; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 500; color: var(--cream); }
.hero-intro { margin: 0; max-width: 52ch; color: var(--cream-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: .6rem; }
.hero .btn { border-radius: 999px; }
.btn-ghost { background: transparent; color: var(--gold-light); }
.btn-ghost:hover { background: rgba(212, 174, 95, .12); }
.open-now { margin: 0; padding: .3em 1em; border-radius: 999px; font-size: .9rem; font-weight: 700; border: 1px solid currentColor; }
.open-now.is-open { color: #8fdca9; }
.open-now.is-closed { color: var(--cream-dim); }
.tricolore { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); display: flex; gap: 6px; }
.tricolore i { display: block; width: 46px; height: 3px; border-radius: 2px; }
.tricolore i:nth-child(1) { background: var(--it-green); }
.tricolore i:nth-child(2) { background: #f4f4f4; }
.tricolore i:nth-child(3) { background: var(--it-red); }

.tricolore-inline { display: inline-flex; gap: 4px; }
.tricolore-inline i { display: block; width: 26px; height: 3px; border-radius: 2px; }
.tricolore-inline i:nth-child(1) { background: var(--it-green); }
.tricolore-inline i:nth-child(2) { background: #f4f4f4; }
.tricolore-inline i:nth-child(3) { background: var(--it-red); }

/* Suggestion */
.suggestion {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 1100px; margin: clamp(3rem, 8vw, 6rem) auto; padding: 0 1.25rem;
}
.suggestion-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: var(--radius); }
.suggestion-text { display: grid; gap: .8rem; }
.suggestion-text h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); color: var(--cream); font-weight: 600; }
.suggestion-text p { margin: 0; color: var(--cream-dim); }
.suggestion-text .suggestion-price { font-family: var(--serif); font-size: 1.8rem; color: var(--gold); font-weight: 700; }

/* Carte */
.menu { background: var(--green-900); padding: clamp(3rem, 8vw, 6rem) 1.25rem; }
.section-head { max-width: 1100px; margin: 0 auto 1.5rem; }
/* Onglets de la carte : collés sous la barre du haut tant qu'on est dans la carte. */
.menu-tabs {
  position: sticky; top: var(--topbar-h, 64px); z-index: 5;
  margin: 0 -1.25rem 2.5rem; padding: .7rem 1.25rem;
  transition: background .2s, box-shadow .2s;
}
.menu-tabs.is-stuck { background: var(--green-900); border-bottom: 1px solid rgba(212, 174, 95, .2); }
/* Onglets façon sommaire : le texte, et un trait doré sous la rubrique ouverte. */
.menu-tabs-inner {
  display: flex; gap: 2rem; max-width: 1100px; margin: 0 auto; overflow-x: auto; position: relative;
  border-bottom: 1px solid rgba(212, 174, 95, .25);
}
.menu-tabs.is-stuck .menu-tabs-inner { border-bottom-color: transparent; }
.menu-tabs a {
  padding: .3em 0 .45em; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--cream-dim);
  text-decoration: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; white-space: nowrap;
}
.menu-tabs a:hover { color: var(--cream); }
.menu-tabs a[aria-selected='true'] { color: var(--gold); border-bottom-color: var(--gold); }
.menu-tabs a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

/* Mode onglets (activé par site.js) : une rubrique à la fois, ses plats sur deux colonnes. */
.menu.has-tabs .menu-grid { display: block; }
.menu.has-tabs .menu-cat h3 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.menu.has-tabs .menu-note { margin: 0 0 1.5rem; }
.menu.has-tabs .menu-cat ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 1.4rem 4rem; margin: 0; }
.menu-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 2.5rem 4rem; }
.menu-cat h3 { font-size: 2.1rem; color: var(--gold); border-bottom: 1px solid rgba(212, 174, 95, .4); padding-bottom: .3rem; }
.menu-note { margin: .4rem 0 0; font-style: italic; color: var(--cream-dim); font-family: var(--serif); font-size: 1.15rem; }
.menu-cat ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.dish-line { display: flex; align-items: baseline; gap: .6rem; }
.dish h4 { font-size: 1.35rem; color: var(--cream); }
.dish .dots { flex: 1; border-bottom: 1px dotted rgba(212, 174, 95, .5); transform: translateY(-.3em); min-width: 1rem; }
.dish .price { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.dish p { margin: .1rem 0 0; color: var(--cream-dim); font-size: .95rem; }
.dish.is-off h4, .dish.is-off .price { opacity: .45; text-decoration: line-through; }
.tags { display: flex; gap: .4rem; margin-top: .35rem; flex-wrap: wrap; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .15em .6em; border-radius: 999px; }
/* Pictogrammes d'un plat (végétarien, sans gluten…), juste après son nom. */
.labels { display: inline-flex; gap: .3rem; align-self: center; }
.label {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  color: var(--label-color, var(--gold-light));
  background: color-mix(in srgb, var(--label-color, var(--gold)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--label-color, var(--gold)) 45%, transparent);
}
.label svg { width: 16px; height: 16px; }
.legend {
  list-style: none; max-width: 1100px; margin: 3rem auto 0; padding: 1.2rem 0 0;
  display: flex; flex-wrap: wrap; gap: .8rem 1.6rem;
  border-top: 1px solid rgba(212, 174, 95, .25); color: var(--cream-dim); font-size: .9rem;
}
.legend li { display: inline-flex; align-items: center; gap: .5rem; }
.legend + .menu-foot { margin-top: 1.5rem; }
.tag-off { background: rgba(255, 255, 255, .08); color: var(--cream-dim); }
.menu-foot { max-width: 1100px; margin: 3rem auto 0; color: var(--cream-dim); }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery img { width: 100%; height: clamp(220px, 32vw, 420px); object-fit: cover; }

/* Horaires et contact */
.infos {
  max-width: 1100px; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 1.25rem;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem);
}
.hours table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; font-size: 1.05rem; }
.hours th, .hours td { padding: .6rem .4rem; border-bottom: 1px solid rgba(212, 174, 95, .2); vertical-align: top; }
.hours th { text-align: left; font-family: var(--serif); font-size: 1.3rem; color: var(--cream); font-weight: 600; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours em { color: var(--cream-dim); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--gold-light); }
.hours tr.is-today th::after { content: ' · aujourd’hui'; font-family: var(--sans); font-size: .8rem; color: var(--cream-dim); }

.contact address { font-style: normal; font-family: var(--serif); font-size: 1.5rem; margin-top: 1rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 1rem 0 2.5rem; font-weight: 700; }
.contact-links a { text-underline-offset: .25em; }

.quick-message { display: grid; gap: .9rem; padding-top: 2rem; border-top: 1px solid rgba(212, 174, 95, .25); }
.quick-message h3 { font-size: 1.8rem; color: var(--gold); }
.quick-message > p { margin: 0; color: var(--cream-dim); font-size: .95rem; }
.quick-message label { display: grid; gap: .3rem; font-size: .9rem; color: var(--cream-dim); }
.quick-message input, .quick-message textarea {
  font: inherit; color: var(--cream); background: var(--green-950); border: 1px solid rgba(212, 174, 95, .35);
  border-radius: 8px; padding: .65em .8em;
}
.quick-message input:focus, .quick-message textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.quick-message button { justify-self: start; }
.quick-message .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 700; }
.form-status.is-ok { color: #8fdca9; }
.form-status.is-error { color: #f2939a; }

/* Pied de page */
.footer {
  display: grid; justify-items: center; gap: .9rem; padding: 3rem 1.25rem;
  border-top: 1px solid rgba(212, 174, 95, .2); color: var(--cream-dim); font-size: .9rem; text-align: center;
}
.footer img { border-radius: 50%; }
.footer p { margin: 0; }

/* Tooltip (public/js/tooltip.js) */
.tooltip {
  position: absolute; z-index: 100; max-width: min(260px, calc(100vw - 16px)); pointer-events: none;
  padding: .4em .75em; border-radius: 8px; font: 700 .8rem/1.3 var(--sans); letter-spacing: .02em;
  background: var(--cream); color: var(--green-950); box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.tooltip[data-side='bottom'] { transform: translateY(-4px); }
.tooltip.is-visible { opacity: 1; transform: none; }
.tooltip::after {
  content: ''; position: absolute; left: var(--arrow-x, 50%); width: 8px; height: 8px; background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.tooltip[data-side='top']::after { bottom: -4px; }
.tooltip[data-side='bottom']::after { top: -4px; }
.label[data-tooltip] { cursor: help; }

@media (max-width: 820px) {
  .topbar nav { display: none; }
  .topbar-phone { margin-left: auto; }
  /* Sur téléphone, les onglets défilent de côté plutôt que de passer à la ligne. */
  .menu-tabs-inner { gap: 1.4rem; scrollbar-width: none; }
  .menu-tabs-inner::-webkit-scrollbar { display: none; }
  .menu-tabs a { font-size: 1.25rem; }
  .suggestion, .infos { grid-template-columns: 1fr; }
  .suggestion-photo img { aspect-ratio: 4 / 3; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery img:last-child { grid-column: span 2; }
}
