/* ==========================================================================
   T'BITES Tamraght · Feuille de style
   Ordre : variables → base → navigation → accueil → carte → pages annexes
           → éléments flottants → pied de page → responsive
   ========================================================================== */

/* ---------- Variables ---------- */
:root {
  /* Palette */
  --brown: #6C230C;        /* terre d'ombre : titres, logo */
  --clay: #8A4F33;         /* texte secondaire */
  --terra: #A1562F;        /* terracotta : accents, liens */
  --olive: #575E2B;        /* vert olive : boutons principaux */
  --ink: #3A1808;          /* texte courant */
  --text: #4A2414;         /* paragraphes */
  --text-soft: #6E4330;    /* descriptions de plats */
  --cream: #F7F1E8;        /* fond général */
  --sand: #EEE2D1;         /* fond des sections de l'accueil */
  --beige: #DAC7AD;        /* texte du pied de page */
  --paper: #FFFDF8;        /* fond des cartes photo */
  --line: rgba(108, 35, 12, .18);
  --line-soft: rgba(108, 35, 12, .12);

  /* Typographies */
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

h2 { font-family: var(--serif); font-weight: 400; line-height: 1.2; color: var(--brown); }
.caps {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.25;
  text-align: center;
  color: var(--brown);
}
.logo { display: block; width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.page { display: none; }
.page.is-active { display: block; }

/* Boutons arrondis */
.pill {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--brown);
  border-radius: 999px;
  background: none;
  color: var(--brown);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.pill:hover { background: var(--terra); border-color: var(--terra); color: var(--cream); }
.pill--solid,
.pill--solid:hover { background: var(--olive); border-color: var(--olive); color: var(--cream); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: var(--cream);
  color: var(--brown);
  border-bottom: 1px solid var(--line);
}
.nav__home { width: 96px; background: none; border: 0; color: var(--brown); }
.nav__links { display: flex; gap: 20px; }
.nav__link {
  padding: 4px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--brown);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}
.nav__link[aria-current="page"] { border-bottom-color: var(--terra); }

.lang { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-size: 12px; }
.lang span { color: rgba(108, 35, 12, .35); }
.lang button {
  min-height: 40px;
  padding: 10px 4px;
  background: none;
  border: 0;
  color: var(--clay);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  opacity: .6;
}
.lang button[aria-pressed="true"] { opacity: 1; color: var(--terra); font-weight: 600; }

/* ---------- Accueil · en-tête ---------- */
.hero { background: var(--sand); }
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 8px;
  text-align: center;
}
.hero__logo { width: min(300px, 72%); color: var(--brown); }
.hero__kicker {
  margin-top: 36px;
  color: var(--terra);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.hero__tagline {
  max-width: 28ch;
  margin-top: 18px;
  color: var(--clay);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.7;
}
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }

/* ---------- Accueil · photos en cartes (carrousel) ---------- */
.photos { padding: 8px 0 56px; overflow: hidden; background: var(--sand); }
.photos__title {
  max-width: 680px;
  margin: 22px auto 4px;
  padding: 0 24px;
  color: var(--terra);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}
.carousel {
  display: flex;
  gap: 28px;
  padding: 18px max(24px, calc((100vw - 300px) / 2)) 34px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel figure {
  flex: 0 0 min(70vw, 300px);
  padding: 12px 12px 18px;
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(58, 24, 8, .16);
  scroll-snap-align: center;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .3s;
}
.carousel figure:hover { transform: rotate(0) translateY(-4px); }
.carousel img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #E5D5C0; }
.carousel figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7em;
  margin-top: 14px;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
}
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 6px; }
.carousel__controls[hidden] { display: none; }
.carousel__controls button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: none;
  border: 1px solid var(--terra);
  border-radius: 50%;
  color: var(--terra);
  font-size: 20px;
  line-height: 1;
}
.carousel__controls button:hover { background: var(--terra); color: #FAF2E8; }
.carousel__count { min-width: 64px; color: var(--clay); font-size: 12px; letter-spacing: .24em; text-align: center; }

/* ---------- Accueil · présentation ---------- */
.intro { max-width: 680px; margin: 0 auto; padding: 72px 24px 64px; text-align: center; }
.intro p { margin-top: 28px; color: var(--text); font-family: var(--serif); font-size: 17px; line-height: 1.85; }
.intro .intro__note { margin-top: 14px; color: var(--clay); font-size: 15px; font-style: italic; }

/* ---------- Accueil · accès à la carte ---------- */
.teaser {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 56px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 90px 24px 166px;
}
.teaser .caps { text-align: left; }
.teaser p { max-width: 40ch; margin-top: 18px; color: var(--text); font-family: var(--serif); font-size: 16px; line-height: 1.8; }
.teaser__links { border-top: 1px solid rgba(108, 35, 12, .25); }
.teaser__links button {
  display: flex;
  align-items: baseline;
  gap: 20px;
  width: 100%;
  padding: 22px 4px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(108, 35, 12, .25);
  color: var(--brown);
  text-align: left;
  transition: color .2s, padding .2s;
}
.teaser__links button:hover { padding-left: 12px; color: var(--terra); }
.teaser__no { color: var(--terra); font-size: 12px; letter-spacing: .15em; }
.teaser__name { flex: 1; font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); }
.teaser__arrow { font-size: 18px; }

/* ---------- Accueil · infos pratiques ---------- */
.info { padding: 96px 0; background: var(--sand); border-top: 1px solid var(--line-soft); }
.info__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; margin-top: 56px; text-align: center; }
.info h3 { margin-bottom: 12px; color: var(--brown); font-family: var(--serif); font-size: 17px; font-weight: 700; }
.info p, .info li { color: var(--text); font-size: 15px; list-style: none; }
.info li { display: flex; justify-content: center; gap: 16px; padding: 3px 0; }
.info li span { white-space: nowrap; }
.info li span:first-child::after { content: " :"; }
.info a { color: var(--terra); font-weight: 500; }
.info a.pill--solid { color: var(--cream); }
.info .info__more { margin-top: 12px; }
.info .info__more--wide { margin-top: 14px; }

/* ---------- Accueil · message à la patronne ---------- */
.feedback { padding: 96px 0; color: var(--brown); border-top: 1px solid var(--line-soft); }
.feedback .wrap { max-width: 620px; text-align: center; }
.feedback__quote {
  max-width: 24ch;
  margin: 0 auto;
  color: var(--terra);
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-style: italic;
  line-height: 1.4;
}
.feedback__lead { max-width: 46ch; margin: 20px auto 0; color: var(--clay); font-size: 15px; }

.form { display: grid; gap: 18px; max-width: 620px; margin: 48px auto 0; text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: block; margin-bottom: 6px; color: var(--brown); font-size: 13px; font-weight: 500; }
.form input, .form textarea {
  width: 100%;
  padding: 10px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(108, 35, 12, .35);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(108, 35, 12, .4); }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--terra); }
.form textarea { min-height: 110px; resize: vertical; }
.form__error { display: none; margin-top: 6px; color: var(--terra); font-size: 13px; }
.form__error.is-visible { display: block; }
.form__submit {
  justify-self: center;
  padding: 13px 30px;
  background: var(--terra);
  border: 1px solid var(--terra);
  border-radius: 999px;
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.form__thanks {
  display: none;
  max-width: 34ch;
  margin: 40px auto 0;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
}
.form.is-sent { display: none; }
.form.is-sent + .form__thanks { display: block; }
.review { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); text-align: center; }
.review p { margin-bottom: 18px; color: var(--clay); font-family: var(--serif); font-size: 16px; font-style: italic; }

/* ---------- Page carte ---------- */
.menu-head { padding: 80px 24px 0; text-align: center; }
.menu-head h1 { color: var(--brown); font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); font-weight: 400; }
.menu-head p { margin-top: 10px; color: var(--clay); font-family: var(--serif); font-size: 15px; font-style: italic; }

.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  max-width: 760px;
  margin: 44px auto 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  padding: 14px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--clay);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--brown); border-bottom: 2px solid var(--olive); }

.menu { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.menu__cat { margin-top: 72px; }
.menu__cat:first-child { margin-top: 0; }
.menu__cat h2 { margin-bottom: 20px; font-size: 22px; text-align: center; }
.menu__note { margin: -8px 0 26px; color: var(--terra); font-family: var(--serif); font-size: 14px; font-style: italic; text-align: center; }
.dish { padding: 12px 0; text-align: center; }
.dish__line { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.dish__name { color: var(--brown); font-family: var(--serif); font-size: 16.5px; font-weight: 700; }
.dish__tag { display: none; } /* étiquettes (Vegan…) : présentes dans les données, masquées pour l'instant */
.dish__price { color: var(--terra); font-size: 14px; font-weight: 500; white-space: nowrap; }
.dish__price::before { content: "· "; color: rgba(108, 35, 12, .4); }
.dish__desc {
  max-width: 52ch;
  margin: 4px auto 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.65;
}
.menu__footer { margin-top: 56px; color: var(--clay); font-family: var(--serif); font-size: 14px; font-style: italic; line-height: 1.8; text-align: center; }

/* ---------- Mentions légales ---------- */
.legal { max-width: 680px; margin: 0 auto; padding: 72px 24px; }
.legal h1 { margin-bottom: 28px; color: var(--brown); font-family: var(--serif); font-size: 34px; font-weight: 400; }
.legal h3 { margin: 24px 0 6px; color: var(--brown); font-family: var(--serif); font-size: 17px; }
.legal p { color: var(--text); font-size: 15px; }

/* ---------- Page 404 ---------- */
.notfound { text-align: center; }
.notfound img { display: block; margin: 0 auto 40px; }

/* ---------- Bouton WhatsApp flottant ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--olive);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(108, 35, 12, .25);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: none;
}
.wa-float:hover { background: var(--brown); }

/* ---------- Pied de page ---------- */
.footer {
  padding: 56px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--brown);
  color: var(--beige);
}
.footer .logo { max-width: 130px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.footer p { font-size: 14px; line-height: 1.8; }
.footer__address { margin-top: 16px; }
.footer__right { text-align: right; }
.footer button { margin-top: 8px; background: none; border: 0; color: var(--beige); font-size: 13px; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (min-width: 1100px) {
  .carousel { padding-right: 24px; padding-left: 24px; }
  .carousel figure { flex-basis: 215px; }
  .carousel figure:first-child { margin-left: auto; }
  .carousel figure:last-child { margin-right: auto; }
}
@media (max-width: 900px) {
  .info__grid { grid-template-columns: 1fr; gap: 44px; max-width: 420px; margin-right: auto; margin-left: auto; }
}
@media (max-width: 860px) {
  .hero__text { padding: 34px 22px 4px; }
  .hero__logo { width: min(230px, 62%); }
  .hero__kicker { margin-top: 20px; }
  .hero__tagline { margin-top: 10px; font-size: 16px; }
  .hero__cta { margin-top: 20px; }
  .carousel figure { flex-basis: min(58vw, 240px); }
  .intro { padding-bottom: 48px; }
  .teaser { grid-template-columns: 1fr; gap: 32px; padding: 72px 24px 120px; }
  .teaser .caps { text-align: center; }
  .teaser p { margin: 18px auto 0; text-align: center; }
  .footer { padding-bottom: 96px; }
}
@media (max-width: 760px) {
  .form__row { grid-template-columns: 1fr; }
  .nav__links { gap: 14px; }
  .tabs { gap: 0; }
}
@media (max-width: 420px) {
  .nav__links { gap: 10px; }
  .nav__link { font-size: 12.5px; }
  .wa-float { padding: 14px; }
  .wa-float span { display: none; }
}
@media (max-width: 400px) {
  .nav__home { width: 84px; }
  .tabs button { padding: 14px 8px; font-size: 12.5px; }
}
@media (max-width: 340px) {
  .nav__links { gap: 6px; }
  .nav__link { font-size: 12px; }
  .tabs button { padding: 14px 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html, .carousel { scroll-behavior: auto; }
  .carousel figure, .pill, .teaser__links button { transition: none; }
}
