/* ==========================================================================
   LA TABLE DU MAROC - DESIGN SYSTEM & STYLESHEET
   Location: Le Mans · Chef Abel Salik
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --bg-main: #FAF6F0;
  --bg-card: #FFFFFF;
  --bg-dark: #0A201A;
  --bg-emerald: #0F2E23;
  --bg-sand: #F3ECE1;
  
  --primary: #0F2E23;
  --primary-light: #184536;
  --gold: #D4AF37;
  --gold-hover: #B89628;
  --gold-light: #F5E8C7;
  --terracotta: #C85A32;
  --terracotta-hover: #A74522;
  
  --text-dark: #1A2421;
  --text-body: #4A5551;
  --text-muted: #7A8581;
  --text-light: #FAF6F0;
  
  --border-light: rgba(212, 175, 55, 0.2);
  --border-glass: rgba(255, 255, 255, 0.15);
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(15, 46, 35, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 46, 35, 0.1);
  --shadow-lg: 0 20px 40px rgba(10, 32, 26, 0.2);
  --shadow-gold: 0 8px 25px rgba(212, 175, 55, 0.25);
  
  /* Fonts */
  --font-heading: 'Marcellus', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--primary);
  line-height: 1.25;
}

p {
  color: var(--text-body);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section--sand {
  background-color: var(--bg-sand);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section--dark h2, .section--dark h3 {
  color: var(--gold-light);
}

.section--dark p {
  color: rgba(250, 246, 240, 0.8);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #C49F2A 100%);
  color: #0A201A;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #E6C280 0%, var(--gold) 100%);
}

.btn-secondary {
  background-color: var(--primary);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border-color: var(--gold);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

.btn-outline-light {
  border-color: var(--gold-light);
  color: var(--text-light);
  background: transparent;
}

.btn-outline-light:hover {
  background-color: var(--gold-light);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(10, 32, 26, 0.95);
  backdrop-filter: blur(12px);
  padding: 0.8rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-glass);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  flex-direction: column;
  margin-right: 2.5rem;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: rgba(250, 246, 240, 0.7);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-link {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: relative;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--gold);
  transition: var(--transition);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(10, 32, 26, 0.35) 0%, rgba(10, 32, 26, 0.15) 60%, rgba(10, 32, 26, 0.5) 100%),
              url('../assets/img/hero.jpg') center/cover no-repeat;
  color: var(--text-light);
  padding-top: 5rem;
}

.hero-content {
  max-width: 750px;
  text-align: center;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  color: #FFFFFF;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero .lead {
  font-size: 1.35rem;
  color: #FFFFFF;
  margin-bottom: 2.5rem;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 32, 26, 0.6);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.badge-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #F5E8C7;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.badge-text span {
  font-size: 0.92rem;
  font-weight: 600;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* Feature Split Section */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.split-media img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.split-media:hover img {
  transform: scale(1.03);
}

.split-media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  pointer-events: none;
}

.feature-list {
  list-style: none;
  margin: 1.5rem 0 2rem 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.feature-icon {
  color: var(--gold);
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

/* Menu Section & Tabs */
.menu-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tab-btn {
  padding: 0.7rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--primary);
  color: var(--gold-light);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.dish-name {
  font-size: 1.3rem;
  color: var(--primary);
}

.dish-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--terracotta);
  font-weight: 600;
}

.dish-desc {
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.dish-tags {
  display: flex;
  gap: 0.5rem;
}

.dish-tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: var(--bg-sand);
  color: var(--primary);
  font-weight: 600;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 260px;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 32, 26, 0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

/* Traiteur Section */
.traiteur-box {
  background: linear-gradient(135deg, #0A201A 0%, #153C2F 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  border: 1px solid var(--border-glass);
  color: var(--text-light);
  box-shadow: var(--shadow-lg);
}

/* Reviews & Testimonials */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.review-stars {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.review-quote {
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.review-author strong {
  display: block;
  color: var(--primary);
  font-size: 0.95rem;
}

.review-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Hours & Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.hours-list {
  list-style: none;
  margin: 1.5rem 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
  font-size: 0.95rem;
}

.hours-list li.closed {
  color: var(--terracotta);
}

.map-container {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Modal System */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 32, 26, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-main);
  width: 90%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gold);
  position: relative;
  transform: translateY(30px);
  transition: var(--transition);
}

.modal-backdrop.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--terracotta);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(15, 46, 35, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #FFFFFF;
  color: var(--text-dark);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: rgba(250, 246, 240, 0.7);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--border-glass);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: var(--gold-light);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

/* Responsive Media Queries & Advanced Smartphone Optimization */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.5rem; }
  .split-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  /* Base typography & container touch spacing */
  body { font-size: 15px; }
  .section { padding: 3.5rem 0; }
  .container { padding: 0 1.2rem; }

  /* Header & Brand Title for Mobile */
  .brand-title { font-size: 1.4rem; }
  .brand { margin-right: 0; }
  .header { padding: 0.8rem 0; }
  .header.scrolled { padding: 0.6rem 0; }
  
  /* Full-Screen Mobile Drawer Menu */
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(10, 32, 26, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2.5rem 1.5rem;
    gap: 1.6rem;
    display: none;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
  }

  .nav-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFFFFF;
    padding: 0.6rem 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  }

  .mobile-toggle {
    display: block;
    font-size: 1.8rem;
    padding: 0.4rem 0.6rem;
    touch-action: manipulation;
  }

  /* Hero Section Mobile Optimization */
  .hero { min-height: auto; padding-top: 6.5rem; padding-bottom: 3.5rem; }
  .hero h1 { font-size: 2rem; line-height: 1.25; margin-bottom: 1rem; }
  .hero .lead { font-size: 1.1rem; line-height: 1.5; margin-bottom: 1.8rem; }
  .hero-buttons { flex-direction: column; width: 100%; gap: 0.9rem; }
  .hero-buttons .btn { width: 100%; text-align: center; padding: 1.1rem; font-size: 1.05rem; }
  
  .hero-badges { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 1.2rem; 
    margin-top: 2.2rem; 
    padding-top: 1.5rem; 
  }
  .badge-item { width: 100%; }

  /* Horizontal Scrollable Filter Tabs on Touchscreens */
  .menu-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.8rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0.6rem;
  }

  .tab-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0.65rem 1.1rem;
    font-size: 0.88rem;
    touch-action: manipulation;
  }

  /* Menu Cards & À Emporter on Mobile */
  .menu-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .menu-card { padding: 1.2rem; }
  .menu-card-header { flex-wrap: wrap; gap: 0.4rem; }
  .dish-name { font-size: 1.15rem; }
  .dish-price { font-size: 1.15rem; }

  /* Gallery Grid on Mobile (Side by Side 2 Columns) */
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.8rem !important; }
  .gallery-item img { height: 160px; }

  /* Touch Form Modals Optimization (Prevents iOS Auto Zoom) */
  .modal-box {
    width: 94%;
    padding: 1.8rem 1.2rem;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
  }

  .form-input, .form-select, .form-textarea {
    font-size: 16px !important; /* Prevents automatic zoom on iPhone Safari */
    padding: 0.9rem 1rem;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-links li { margin-bottom: 0.8rem; }
}

@media (max-width: 480px) {
  .brand-title { font-size: 1.25rem; }
  .hero h1 { font-size: 1.75rem; }
  .gallery-grid { grid-template-columns: 1fr !important; }
}
