/* ============================================================
   BASE.CSS — Styles partagés par toutes les pages Mezzo di Pasta
   (variables, reset, typographie, header, hero de page, footer,
   bandeau Arlequin, chargement, hamburger + menu mobile)
   ============================================================ */

:root {
  --vert-fonce: #025946;
  --vert-vif: #4fa123;
  --vert-clair: #fdffae;
  --jaune-citron: #ddd54c;
  --jaune-soleil: #fed444;
  --peche: #f99f7a;
  --ivoire: #fffdf4;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--ivoire);
  color: var(--vert-fonce);
  line-height: 1.6;
}
.gothic { font-family: 'League Gothic', sans-serif; letter-spacing: 0.02em; }
.lilita { font-family: 'Lilita One', cursive; }
.script { font-family: 'Caveat', cursive; }

/* Pattern swirls SVG officiel Mezzo en background */
.swirl-bg { position: relative; overflow: hidden; }
.swirl-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("../img/swirl.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
}
.swirl-light::before { opacity: 0.25; }

/* ============ HEADER ============ */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ivoire);
  border-bottom: 2px solid var(--vert-fonce);
  padding: 16px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { width: 64px; height: 64px; display: block; }
.logo img { width: 100%; height: 100%; display: block; }
nav ul {
  display: flex; gap: 36px; list-style: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
nav a {
  color: var(--vert-fonce);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover { color: var(--vert-vif); }
nav a.active { color: var(--vert-vif); }
.btn-locator {
  background: var(--vert-vif);
  color: var(--ivoire);
  padding: 12px 24px;
  border-radius: 40px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.btn-locator:hover { background: var(--vert-fonce); transform: translateY(-2px); }

/* ============ HERO DE PAGE (pages secondaires : carte, restaurants...) ============ */
.page-hero {
  background: var(--vert-fonce);
  color: var(--ivoire);
  padding: 80px 48px 60px;
  position: relative;
  text-align: center;
}
.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-hero .breadcrumb {
  font-family: 'Caveat', cursive;
  color: var(--jaune-soleil);
  font-size: 22px;
  transform: rotate(-2deg);
  display: inline-block;
  margin-bottom: 8px;
}
.page-hero h1 {
  font-family: 'League Gothic', sans-serif;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 0.92;
  color: var(--ivoire);
  margin-bottom: 16px;
}
.page-hero h1 .vif { color: var(--vert-clair); }
.page-hero p.lead {
  font-size: 18px;
  color: var(--vert-clair);
  max-width: 600px;
  margin: 0 auto;
}

/* Bandeau pattern losanges Arlequin officiel Mezzo
   Le double margin négatif (-16px haut ET bas) fait chevaucher le bandeau
   à moitié sur la section précédente ET à moitié sur la suivante. */
.pattern-band {
  height: 32px;
  background-image: url("../img/Arlequin.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  position: relative;
  margin-top: -16px;
  margin-bottom: -16px;
  z-index: 60;
}

/* ============ FOOTER ============ */
footer {
  background: var(--vert-fonce);
  color: var(--ivoire);
  padding: 64px 48px 32px;
  position: relative;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  position: relative; z-index: 2;
}
.footer-brand h3 {
  font-family: 'League Gothic', sans-serif;
  font-size: 48px;
  color: var(--jaune-soleil);
  margin-bottom: 16px;
}
.footer-brand p {
  font-family: 'Caveat', cursive;
  color: var(--vert-clair);
  font-size: 22px;
  transform: rotate(-2deg);
  display: inline-block;
  font-weight: 700;
}
footer h4 {
  font-family: 'Lilita One', cursive;
  color: var(--jaune-soleil);
  font-size: 18px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a {
  color: var(--ivoire);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  opacity: 0.85;
}
footer a:hover { opacity: 1; color: var(--vert-clair); }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.social {
  width: 40px; height: 40px;
  background: var(--vert-vif);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ivoire);
  font-weight: 900;
  text-decoration: none;
}
.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(253, 255, 174, 0.2);
  text-align: center;
  font-size: 13px;
  color: var(--vert-clair);
  position: relative; z-index: 2;
}

@media (max-width: 900px) {
  footer { padding: 48px 24px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand h3 { font-size: 36px; }
}

/* ============ ÉTAT DE CHARGEMENT (spinner) ============ */
.loading {
  text-align: center;
  padding: 60px 24px;
  color: var(--vert-fonce);
}
.loading .spinner {
  display: inline-block;
  width: 40px; height: 40px;
  border: 4px solid var(--jaune-citron);
  border-top-color: var(--vert-fonce);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ HAMBURGER + MENU MOBILE ============ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hamburger {
  display: none;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--vert-fonce);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--vert-fonce);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 40px 24px;
  overflow: hidden;
}
.mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("../img/swirl.svg");
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  pointer-events: none;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close {
  position: absolute;
  top: 20px; right: 24px;
  background: transparent;
  border: none;
  color: var(--jaune-soleil);
  font-size: 48px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 8px 16px;
  z-index: 2;
  transition: color 0.2s, transform 0.2s;
}
.mobile-menu-close:hover { color: var(--peche); transform: rotate(90deg); }
.mobile-nav {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.mobile-nav ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-nav ul a {
  font-family: 'League Gothic', sans-serif;
  font-size: 44px;
  color: var(--ivoire);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  line-height: 1;
}
.mobile-nav ul a:hover, .mobile-nav ul a.active { color: var(--jaune-soleil); }
.mobile-nav .mobile-cta {
  background: var(--vert-vif);
  color: var(--ivoire);
  padding: 16px 36px;
  border-radius: 40px;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 8px;
}
.mobile-nav .mobile-cta:hover { background: var(--jaune-soleil); color: var(--vert-fonce); transform: translateY(-2px); }
body.menu-open { overflow: hidden; }

/* ============ RESPONSIVE COMMUN ============ */
@media (max-width: 900px) {
  header nav { display: none; }
  header .hamburger { display: flex; }
  header { padding: 16px 24px; }
}
@media (max-width: 480px) {
  .header-actions .btn-locator { display: none; }
}
