/* ==========================================
   RESTAURANT MENU - STYLES CSS - FINAL VERSION
   ========================================== */

/* ===== Variables de Couleurs ===== */
:root {
  --primary-color: #000000; /* Noir profond */
  --secondary-color: #d4af37; /* Or classique */
  --accent-color: #ffd700; /* Or brillant */
  --text-dark: #1a1a1a;
  --text-light: #4a4a4a;
  --background: #ffffff;
  --background-light: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.15);
  --shadow-hover: rgba(212, 175, 55, 0.3);
}

/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  padding: 0.75rem 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
  transition: all 0.3s ease;
}

.logo img:hover {
  filter: drop-shadow(0 6px 12px rgba(212, 175, 55, 0.5));
  transform: translateY(-2px) scale(1.05);
}

/* Responsive logo sizes */
@media (max-width: 968px) {
  .logo img {
    height: 60px;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 50px;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 45px;
  }
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s;
}

.main-nav a:hover {
  color: var(--secondary-color);
}

.main-nav a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* ===== Hero Section ===== */
.hero {
  margin-top: 80px;
  /* Background avec gradient overlay */
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)),
              url('images/2.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--secondary-color);
}

/* Fallback si l'image ne charge pas */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Si l'image ne charge pas, le fallback devient visible */
.hero.no-image::before {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 2rem;
  opacity: 1;
  font-family: "Inter", sans-serif;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* ===== Menu Section ===== */
.menu-section {
  padding: 4rem 0;
  background-color: var(--background-light);
}

.menu-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 2rem;
}

/* ===== Sidebar Navigation ===== */
.menu-sidebar {
  flex: 0 0 250px;
  position: sticky;
  top: 100px;
  height: fit-content;
  background: white;
  border-radius: 15px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.menu-sidebar h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.75rem;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-link {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-dark);
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.category-link:hover {
  background-color: var(--background-light);
  color: var(--secondary-color);
  transform: translateX(5px);
}

.category-link.active {
  background-color: var(--secondary-color) !important;
  color: white !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
  transform: translateX(5px);
}

/* Stronger selector for active state */
.category-nav .category-link.active,
a.category-link.active {
  background-color: #d4af37 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ===== Menu Content ===== */
.menu-content {
  flex: 1;
}

.menu-category {
  margin-bottom: 4rem;
  scroll-margin-top: 100px;
}

.category-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--secondary-color);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ===== Menu Item Card ===== */
.menu-item {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

.menu-item-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: var(--background-light);
}

.menu-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-item:hover .menu-item-image img {
  transform: scale(1.1);
}

.menu-item-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-item-name {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin: 0;
}

.menu-item-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  flex-grow: 1;
}

.menu-item-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary-color);
  font-family: "Playfair Display", serif;
}

.menu-item-price span {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.footer-section p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  opacity: 0.7;
}

/* ===== Responsive Design ===== */

/* Tablettes */
@media (max-width: 968px) {
  .menu-container {
    flex-direction: column;
  }

  .menu-sidebar {
    position: relative;
    top: 0;
    flex: none;
    width: 100%;
  }

  .category-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .category-link {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Mobiles */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero {
    padding: 4rem 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .menu-section {
    padding: 2rem 0;
  }

  .category-title {
    font-size: 2rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .menu-item-image {
    height: 200px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .menu-sidebar {
    padding: 1.5rem 1rem;
  }

  .category-nav {
    gap: 0.25rem;
  }

  .category-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-item {
  animation: fadeInUp 0.6s ease-out;
}

/* Décalage d'animation pour chaque élément */
.menu-item:nth-child(1) {
  animation-delay: 0.1s;
}
.menu-item:nth-child(2) {
  animation-delay: 0.2s;
}
.menu-item:nth-child(3) {
  animation-delay: 0.3s;
}
.menu-item:nth-child(4) {
  animation-delay: 0.4s;
}
.menu-item:nth-child(5) {
  animation-delay: 0.5s;
}
.menu-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* ===== Scroll Smooth & Highlight ===== */
.menu-category:target .category-title {
  animation: highlight 1s ease;
}

@keyframes highlight {
  0%,
  100% {
    color: var(--primary-color);
  }
  50% {
    color: var(--secondary-color);
    transform: scale(1.05);
  }
}

/* ===== Loading State (Optional) ===== */
.menu-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

.menu-item.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid var(--border-color);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== WhatsApp Floating Button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  text-decoration: none;
  flex-direction: column;
  gap: 0.25rem;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float span {
  font-size: 0.7rem;
  font-weight: 600;
  display: none;
}

.whatsapp-float:hover span {
  display: block;
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

/* ===== Google Maps Section ===== */
.maps-section {
  padding: 4rem 0;
  background-color: var(--background-light);
}

.maps-section .section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--secondary-color);
  display: inline-block;
  width: 100%;
}

.maps-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  border: 2px solid var(--secondary-color);
}

.maps-container iframe {
  display: block;
  width: 100%;
}

@media (max-width: 768px) {
  .maps-section {
    padding: 2rem 0;
  }

  .maps-container iframe {
    height: 300px !important;
  }
}

/* ===== FORCE ACTIVE STATE - HIGHEST PRIORITY ===== */
.category-nav a.category-link.active,
.menu-sidebar .category-link.active,
a.category-link.active,
.category-link.active {
  background-color: #d4af37 !important;
  background: #d4af37 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.5) !important;
  transform: translateX(5px) !important;
  border-left: 4px solid #ffd700 !important;
}

/* ===== Category Description & Notes ===== */
.category-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-style: italic;
}

.category-note {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.1),
    rgba(255, 215, 0, 0.05)
  );
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--secondary-color);
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: 500;
  color: var(--primary-color);
}

/* ===== Tacos Info Section ===== */
.tacos-info {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  margin-top: 3rem;
  box-shadow: 0 4px 15px var(--shadow);
}

.tacos-info h4 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.tacos-info h4:first-child {
  margin-top: 0;
}

.tacos-info ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tacos-info li {
  padding: 0.75rem 1rem;
  background: var(--background-light);
  border-radius: 8px;
  border-left: 3px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.tacos-info li:hover {
  background: rgba(212, 175, 55, 0.1);
  transform: translateX(5px);
}

/* ===== Sandwichs Grid Adjustment ===== */
#sandwichs .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

#sandwichs .menu-item {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.02),
    rgba(212, 175, 55, 0.05)
  );
  border-left: 4px solid var(--secondary-color);
}

/* ===== Snacks Simple Grid ===== */
#snacks .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

#snacks .menu-item {
  text-align: center;
}

#snacks .menu-item-name {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

#snacks .menu-item-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}