/* ============================================================
   RESTAURANT AL MAIMOUNI — Bab Dar Dbagh, Tanger
   Identity sampled from the house's printed menu: midnight/ink
   blue ground, lantern amber-gold, warm cream. Editorial
   restraint: the palette of the menu, none of its clipart.
   Type: Libre Caslon Display (masthead) + Libre Caslon Text
   (body, carte) + Hanken Grotesk (functional labels).
   ============================================================ */

@font-face {
  font-family: "Libre Caslon Display";
  src: url("../fonts/libre-caslon-display-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-var-latin.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color — sampled from the printed menu */
  --ink: #16223c;
  --ink-deep: #0f1830;
  --ink-raise: #1c2a4c;
  --cream: #f3ecdb;
  --cream-dim: #c7c2b1;
  --amber: #e3a84e;
  --amber-bright: #f0be6b;
  --amber-deep: #8a5e1c;
  --paper: #f3ecdb;
  --paper-ink: #1b2543;
  --line: rgba(243, 236, 219, 0.16);
  --line-soft: rgba(243, 236, 219, 0.1);
  --wa: #128c7e;

  /* type */
  --display: "Libre Caslon Display", "Georgia", serif;
  --serif: "Libre Caslon Text", "Georgia", serif;
  --sans: "Hanken Grotesk", "Segoe UI", Arial, sans-serif;

  /* space (4pt base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem; --s-8: 2rem; --s-12: 3rem; --s-16: 4rem; --s-24: 6rem;

  /* z-scale */
  --z-nav: 10;
  --z-float: 20;
  --z-toast: 30;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--cream);
  background: var(--ink);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; }
::selection { background: var(--amber); color: var(--ink-deep); }

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

/* ---------- nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(15, 24, 48, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.7rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--cream);
}
.brand-tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-inline: auto;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--cream-dim);
  padding: 0.55rem 0;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--amber-bright); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-left: auto;
}
.nav-links + .nav-actions { margin-left: 0; }
.lang-switch {
  display: flex;
  gap: 2px;
  font-family: var(--sans);
}
.lang-switch button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  background: none;
  border: 0;
  color: var(--cream-dim);
  cursor: pointer;
}
.lang-switch .lang-fr {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.lang-switch .lang-en:hover { color: var(--cream); }
.btn-reserve {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid var(--amber);
  padding: 0.5rem 1.1rem;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-reserve:hover {
  background: var(--amber);
  color: var(--ink-deep);
}

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--line-soft);
}
.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 6vh, 4.5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-over {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--amber);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1 {
  font-size: clamp(3rem, 7.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0.1em 0 0.25em;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.hero-tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--cream);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
.hero-trust {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--cream-dim);
  margin-top: var(--s-3);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}
.hero-trust strong { color: var(--cream); font-weight: 600; }
.star { color: var(--amber); }
.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-6);
  margin-top: clamp(1.5rem, 3vh, 2.25rem);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-deep);
  background: var(--amber);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn-wa:hover {
  background: var(--amber-bright);
  transform: translateY(-1px);
}
.link-carte {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 5px;
  transition: color 0.25s ease;
}
.link-carte:hover { color: var(--amber-bright); }
.hero-photo {
  justify-self: end;
  width: min(100%, 480px);
}
.photo-frame {
  position: relative;
}
.photo-frame img {
  width: 100%;
  box-shadow: 0 24px 70px rgba(6, 10, 22, 0.6);
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid rgba(227, 168, 78, 0.45);
  pointer-events: none;
}
.hero-photo figcaption { padding-top: 1.6rem; }
.hero-photo figcaption,
.terrasse-photo figcaption,
.terrasse-photo-2 figcaption,
.dish-strip figcaption {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--cream-dim);
  padding-top: 0.7rem;
}

/* ---------- intro ---------- */
.intro {
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.intro-inner {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}
.orn-arch { color: var(--amber); margin-bottom: var(--s-6); }
.intro p {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.75;
  color: var(--cream);
}

/* ---------- section heads ---------- */
.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.1;
}
.section-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--cream-dim);
  margin-top: 0.5rem;
}

/* ---------- la terrasse ---------- */
.terrasse {
  border-top: 1px solid var(--line-soft);
  background: var(--ink-deep);
}
.terrasse-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.terrasse .section-head { margin-bottom: clamp(2.5rem, 5vh, 3.5rem); }
.terrasse-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
.terrasse-photo img {
  width: 100%;
  box-shadow: 0 30px 80px rgba(4, 8, 18, 0.65);
}
.terrasse-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding-top: var(--s-4);
}
.orn-lantern { color: var(--amber); }
.terrasse-body > p {
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.8;
  max-width: 34rem;
}
.terrasse-photo-2 {
  width: min(100%, 360px);
  margin-top: var(--s-4);
}
.terrasse-photo-2 img {
  width: 100%;
  box-shadow: 0 20px 60px rgba(4, 8, 18, 0.6);
}

/* ---------- la carte ---------- */
.carte {
  border-top: 1px solid var(--line-soft);
}
.carte-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) clamp(1.25rem, 4vw, 2.5rem);
}
.carte .section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
}
.dish-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.dish-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 16px 44px rgba(6, 10, 22, 0.5);
}
.carte-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
.carte-cat + .carte-cat { margin-top: clamp(2.5rem, 5vh, 3.5rem); }
.carte-cat h3 {
  font-size: 1.5rem;
  color: var(--amber);
}
.carte-cat h3::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1px;
  background: var(--amber);
  opacity: 0.55;
  margin-top: 0.6rem;
}
.carte-cat-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--cream-dim);
  margin-top: 0.5rem;
}
.carte-list { margin-top: var(--s-4); }
.carte-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.carte-list li:last-child { border-bottom: 0; }
.carte-row {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
}
.carte-name { flex: 1; }
.carte-price {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--amber-bright);
}
.carte-callout {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 0.3rem;
}
.carte-callout span { margin-right: 0.3rem; }
.carte-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--cream-dim);
  text-align: center;
  margin-top: clamp(3rem, 6vh, 4rem);
}

/* ---------- avis ---------- */
.avis {
  background: var(--paper);
  color: var(--paper-ink);
}
.avis-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.avis .section-head { text-align: center; }
.avis .section-sub { color: var(--amber-deep); }
.avis-list {
  margin-top: clamp(2.5rem, 5vh, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4.5vh, 3rem);
}
.avis blockquote {
  margin: 0;
  max-width: 36rem;
}
.avis blockquote:nth-child(2) { align-self: flex-end; text-align: right; }
.avis blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.45;
}
.avis blockquote footer {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber-deep);
  margin-top: 0.7rem;
}

/* ---------- infos ---------- */
.infos {
  border-top: 1px solid var(--line-soft);
}
.infos-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.infos .section-head { margin-bottom: clamp(2.5rem, 5vh, 3.5rem); }
.infos-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.infos-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.info-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.info-value { font-size: 1.1rem; }
.tel-link {
  font-size: 1.1rem;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 5px;
}
.tel-link:hover { color: var(--amber-bright); }
.btn-wa-infos {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-deep);
  background: var(--amber);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  margin-top: var(--s-2);
  transition: background 0.25s ease;
}
.btn-wa-infos:hover { background: var(--amber-bright); }
.infos-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--cream-dim);
  max-width: 30rem;
}
.map-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--ink-raise);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.map-card:hover {
  border-color: rgba(227, 168, 78, 0.55);
  transform: translateY(-2px);
}
.map-card svg { color: var(--amber); }
.map-title {
  font-family: var(--display);
  font-size: 1.45rem;
}
.map-sub {
  font-size: 0.98rem;
  color: var(--cream-dim);
  line-height: 1.6;
}
.map-cta {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber-bright);
  margin-top: var(--s-2);
}

/* ---------- footer ---------- */
.footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--line-soft);
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(3rem, 6vh, 4rem) clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}
.footer-name {
  font-family: var(--display);
  font-size: 1.8rem;
}
.footer-rating {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--cream-dim);
}
.footer-rating strong { color: var(--cream); font-weight: 600; }
.footer-google {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--amber-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-google:hover { color: var(--amber); }
.footer-copy {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--cream-dim);
  margin-top: var(--s-2);
}

/* ---------- whatsapp float ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: var(--z-float);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(4, 8, 18, 0.55);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: scale(1.07); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: var(--z-toast);
  transform: translate(-50%, 12px);
  background: var(--ink-raise);
  color: var(--cream);
  border: 1px solid rgba(227, 168, 78, 0.5);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.7rem 1.3rem;
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- reveals (html.js only; sans JS tout reste visible) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: clamp(2.5rem, 6vh, 4rem);
  }
  .hero-photo { justify-self: start; width: min(100%, 480px); }
  .terrasse-grid { grid-template-columns: 1fr; }
  .terrasse-body { padding-top: 0; }
  .infos-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .carte-cols { grid-template-columns: 1fr; gap: 0; }
  .carte-col + .carte-col { margin-top: clamp(2.5rem, 5vh, 3.5rem); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  .dish-strip { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .brand-tag { display: none; }
  .avis blockquote:nth-child(2) { align-self: stretch; text-align: left; }
}

/* ---------- touch targets ---------- */
@media (pointer: coarse) {
  .lang-switch button { padding: 0.75rem 0.6rem; }
  .btn-reserve { padding: 0.7rem 1.1rem; }
  .link-carte, .tel-link, .footer-google { display: inline-block; padding-block: 0.5rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-over, .hero h1, .hero-tagline, .hero-trust, .hero-cta-row { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn-wa, .btn-wa-infos, .map-card, .wa-float, .toast { transition: none; }
  .btn-wa:hover, .map-card:hover, .wa-float:hover { transform: none; }
}
