/* Café Andalous — palette : vert cèdre, terracotta, crème */
:root {
  --green: #1d3a32;
  --terra: #a4462a;
  --cream: #f4ece0;
  --ink: #1d3a32;
  --line: rgba(29, 58, 50, .14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 7vw, 60px); }
p { margin: 0; }
section[id] { scroll-margin-top: 64px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--pad); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin-bottom: 14px; }
.muted { opacity: .78; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn-wa { background: var(--terra); color: #fff; }
.btn-wa:hover { background: #9c4425; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 15px; background: var(--green); color: var(--cream); }

/* Bandeau démo */
.demo-bar {
  background: var(--green); color: var(--cream);
  font-size: 12.5px; text-align: center; padding: 7px 16px; letter-spacing: .02em;
}

/* En-tête */
.header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad);
  background: rgba(244, 236, 224, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font: 400 22px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.logo em { font-style: italic; color: var(--terra); }
.nav { display: none; gap: 32px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.nav a:hover { opacity: 1; }

/* Accueil */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 100px);
  display: flex; align-items: flex-end;
  color: #fff;
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 50% 40%; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 32, 27, .05) 10%, rgba(16, 32, 27, .55) 40%, rgba(16, 32, 27, .85) 85%);
}
.hero-content { position: relative; padding: 0 var(--pad) calc(150px + env(safe-area-inset-bottom)); max-width: 760px; }
.hero .eyebrow { color: #f2c9a8; }
.hero h1 { font-size: clamp(42px, 11vw, 88px); margin-bottom: 18px; }
.hero-sub { font-size: 18px; max-width: 30em; opacity: .9; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-actions .btn { flex: 1 1 220px; }
.hero-open { display: flex; align-items: center; gap: 10px; font-size: 14.5px; opacity: .9; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #7bd88f; box-shadow: 0 0 0 4px rgba(123, 216, 143, .25); }
.dot.closed { background: #f2a07b; box-shadow: 0 0 0 4px rgba(242, 160, 123, .25); }

/* À propos */
.about { display: grid; gap: 40px; padding-block: clamp(72px, 12vw, 140px); }
.about-text h2 { margin-bottom: 20px; }
.about-text p:last-child { font-size: 18px; max-width: 32em; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.about-photos img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-photos img:last-child { margin-top: 48px; }

/* Menu */
.menu { background: var(--green); color: var(--cream); padding-block: clamp(72px, 12vw, 130px); }
.menu .eyebrow { color: #e8a37f; }
.section-head { margin-bottom: 36px; }
.section-head h2 { margin-bottom: 10px; }
.tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1) 32px; padding: 0 var(--pad) 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid rgba(244, 236, 224, .3); background: transparent; color: var(--cream);
  font: 500 15px/1 var(--sans); cursor: pointer; transition: background-color .25s, color .25s;
}
.tabs button[aria-selected="true"] { background: var(--cream); color: var(--green); border-color: var(--cream); }
.menu-grid { display: grid; gap: 32px; }
.menu-photo { display: none; border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.items { list-style: none; margin: 0; padding: 0; }
.items li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid rgba(244, 236, 224, .16);
}
.items h3 { font-size: 21px; margin-bottom: 4px; }
.items p { font-size: 15px; opacity: .7; }
.price { flex: none; font: 500 19px/1 var(--serif); color: #f2c9a8; white-space: nowrap; }

/* Galerie */
.gallery { padding-block: clamp(72px, 12vw, 130px) 0; overflow: hidden; }
.gallery-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--pad) 8px; outline: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.g { flex: none; width: 76vw; margin: 0; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; }
.g img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }

/* Avis */
.reviews { padding-block: clamp(72px, 12vw, 130px); }
.review-list { display: grid; gap: 16px; }
.review { margin: 0; padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stars { color: var(--terra); letter-spacing: 3px; margin-bottom: 14px; }
.stars .off { opacity: .25; }
.review blockquote { margin: 0 0 18px; font: 400 21px/1.35 var(--serif); }
.review figcaption { font-weight: 600; font-size: 15px; }
.review figcaption span {
  margin-left: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 6px; background: rgba(181, 83, 47, .12); color: var(--terra);
}

/* Infos */
.infos { padding-bottom: clamp(72px, 12vw, 130px); }
.infos-grid { display: grid; gap: 36px; }
.infos h2 { margin-bottom: 24px; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 17px; }
.hours th, .hours td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today th, .hours tr.today td { font-weight: 600; color: var(--terra); }
.address { margin-bottom: 26px; font-size: 17px; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px; background: #e6dccd; display: grid; place-items: center; }
.map-fallback { font-weight: 600; color: var(--green); }
.map iframe { position: absolute; inset: 0; }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: saturate(.7); }

/* Appel final */
.final { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 120px var(--pad); }
.final-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final::after { content: ""; position: absolute; inset: 0; background: rgba(16, 32, 27, .72); }
.final-content { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }
.final h2 { margin-bottom: 12px; }
.final p { font-size: 18px; opacity: .85; margin-bottom: 30px; }

.footer { padding: 40px var(--pad) 190px; font-size: 14px; text-align: center; display: grid; gap: 6px; }

/* Bouton WhatsApp flottant */
.wa-float {
  position: fixed; z-index: 50;
  right: max(16px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 66px); /* au-dessus du badge Netlify */
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.wa-circle {
  position: relative; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.wa-circle svg { width: 30px; height: 30px; }
.wa-circle::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}
.wa-float:hover .wa-circle { transform: scale(1.08); }
.wa-label {
  display: none; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--green);
  font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

/* Apparitions (cachées seulement si les animations sont actives) */
.anim .reveal, .anim .reveal-hero { opacity: 0; }
.anim .wa-float { opacity: 0; transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-circle::before { animation: none; }
}

/* Ordinateur */
@media (min-width: 768px) {
  .nav { display: flex; }
  .hero { min-height: calc(100vh - 110px); align-items: center; }
  .hero-content { padding-bottom: 0; margin-top: 40px; }
  .hero-shade { background: linear-gradient(90deg, rgba(16, 32, 27, .82) 0%, rgba(16, 32, 27, .5) 45%, rgba(16, 32, 27, .08) 75%); }
  .hero-actions .btn { flex: none; }
  .about { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 72px; }
  .menu-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
  .menu-photo { display: block; position: sticky; top: 100px; }
  .tabs { margin-inline: 0; padding-inline: 0; }
  .g { width: 30vw; max-width: 420px; }
  .g-tall { width: 36vw; max-width: 500px; }
  .g:hover img { transform: scale(1.04); }
  .review-list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .infos-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: stretch; }
  .map, .map iframe { min-height: 460px; }
  .final { padding-block: 170px; }
  .wa-label { display: block; }
  .footer { padding-bottom: 48px; }
}
@media (min-width: 1200px) {
  .gallery-track { padding-left: calc((100vw - 1200px) / 2 + var(--pad)); }
}

/* Flèches de la galerie (ordinateur) */
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.arrows { display: none; gap: 10px; }
.arrows button {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--green); font-size: 20px; cursor: pointer; transition: background-color .25s, color .25s;
}
.arrows button:hover { background: var(--green); color: var(--cream); }
@media (min-width: 768px) { .arrows { display: flex; } }

/* Bouton flottant effacé quand il passerait sur un bouton, un lien ou un texte */
.wa-float > * { transition: opacity .25s ease, transform .25s ease; }
.wa-float.is-hidden { pointer-events: none; }
.wa-float.is-hidden > * { opacity: 0; }

.wa-float.is-hidden > *, .wa-float.is-hidden .wa-label { opacity: 0 !important; }

/* Clavier : contour visible sur la galerie qui défile */
.gallery-track:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; border-radius: 12px; }

/* Cible tactile du logo : au moins 24 px de haut */
.logo { display: inline-block; padding-block: 4px; }
