/* ===================================
   Le Palais du Maroc - Restaurant Website
   Styles CSS
   =================================== */

/* ===== CSS Variables ===== */
:root {
   /* Colors */
   --color-gold: #dbb669;
   --color-green: #1a5e3a; /* Émeraude doux */
   --color-dark-red: #300808;
   --color-light-bg: #f7fbf4;
   --color-white: #ffffff;
   --color-black: #000000;
   --color-overlay: rgba(48, 8, 8, 0.7);

   /* Fonts */
   --font-title: 'Uncial Antiqua', serif;
   --font-body: 'Crimson Pro', serif;

   /* Spacing */
   --section-padding: 120px 50px;
   --container-max-width: 1200px;

   /* Transitions */
   --transition-fast: 0.3s ease;
   --transition-medium: 0.5s ease;
}

/* ===== Reset & Base Styles ===== */
*,
*::before,
*::after {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
}

body {
   font-family: var(--font-body);
   font-size: 16px;
   line-height: 1.6;
   color: var(--color-dark-red);
   background-color: var(--color-dark-red);
}

a {
   text-decoration: none;
   color: inherit;
   transition: var(--transition-fast);
}

ul {
   list-style: none;
}

img {
   max-width: 100%;
   height: auto;
   display: block;
}

/* ===== Typography ===== */
h1,
h2,
h3 {
   font-family: var(--font-title);
   font-weight: 400;
   line-height: 1.2;
}

h1 {
   font-size: 72px;
}

h2 {
   font-size: 48px;
   color: var(--color-dark-red);
}

h3 {
   font-size: 32px;
}

p {
   font-size: 18px;
   line-height: 1.8;
}

/* ===== Container ===== */
.container {
   max-width: var(--container-max-width);
   margin: 0 auto;
   padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   padding: 12px 35px;
   border-radius: 8px;
   font-family: var(--font-body);
   font-weight: 700;
   font-size: 14px;
   text-transform: uppercase;
   cursor: pointer;
   transition: var(--transition-fast);
   border: none;
}

.btn-primary {
   background-color: var(--color-green);
   color: var(--color-white);
}

.btn-primary:hover {
   background-color: #124027; /* Vert plus sombre */
   transform: translateY(-2px);
   box-shadow: 0 6px 15px rgba(67, 129, 60, 0.26); /* Lueur dorée */
}

.btn-secondary {
   background-color: transparent;
   border: 2px solid var(--color-gold);
   color: var(--color-gold);
}

.btn-secondary:hover {
   background-color: var(--color-gold);
   color: var(--color-dark-red);
}

.btn svg,
.btn img {
   width: 20px;
   height: auto;
}

/* ===== Header & Navigation ===== */
.header {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 1000;
   padding: 20px 100px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   background: linear-gradient(180deg, rgba(48, 8, 8, 0.8) 0%, transparent 100%);
   transition: var(--transition-medium);
}

.header.scrolled {
   background: var(--color-dark-red);
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
   display: flex;
   align-items: center;
   gap: 15px;
}

.logo img {
   height: 50px;
   width: auto;
}

.logo-text {
   font-family: var(--font-title);
   font-size: 20px;
   color: var(--color-white);
}

.nav-menu {
   display: flex;
   gap: 40px;
}

.nav-link {
   font-family: var(--font-body);
   font-weight: 600;
   font-size: 16px;
   text-transform: uppercase;
   color: var(--color-gold);
   position: relative;
}

.nav-link::after {
   content: '';
   position: absolute;
   bottom: -5px;
   left: 0;
   width: 0;
   height: 2px;
   background-color: var(--color-gold);
   transition: var(--transition-fast);
}

.nav-link:hover::after {
   width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
   display: none;
   flex-direction: column;
   gap: 5px;
   cursor: pointer;
}

.menu-toggle span {
   width: 30px;
   height: 3px;
   background: var(--color-gold);
   transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
   position: relative;
   height: 100vh;
   min-height: 700px;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   text-align: center;
   padding: 0 20px;
   background: linear-gradient(rgba(48, 8, 8, 0.6), rgba(48, 8, 8, 0.6)),
      url('images/hero-real.png') center/cover no-repeat;
   background-attachment: fixed; /* désactivé sur mobile ci-dessous */
}

.hero-content {
   max-width: 900px;
}

.hero h1 {
   color: var(--color-white);
   margin-bottom: 30px;
   text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
   animation: fadeInUp 1s ease;
}

.hero-subtitle {
   color: var(--color-white);
   font-size: 20px;
   margin-bottom: 40px;
   opacity: 0.9;
   animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
   animation: fadeInUp 1s ease 0.4s both;
}

/* Scroll Mouse Indicator */
.scroll-indicator {
   position: absolute;
   bottom: 40px;
   left: 50%;
   transform: translateX(-50%);
   animation: fadeInUp 1s ease 0.6s both;
   cursor: pointer;
   z-index: 10;
   text-decoration: none;
}

.mouse {
   width: 26px;
   height: 40px;
   border: 2px solid var(--color-white);
   border-radius: 15px;
   position: relative;
   opacity: 0.7;
   transition: var(--transition-fast);
}

.scroll-indicator:hover .mouse {
   opacity: 1;
   border-color: var(--color-gold);
}

.wheel {
   width: 4px;
   height: 8px;
   background-color: var(--color-white);
   border-radius: 2px;
   position: absolute;
   top: 6px;
   left: 50%;
   transform: translateX(-50%);
   animation: scrollWheel 1.5s ease-out infinite;
}

.scroll-indicator:hover .wheel {
   background-color: var(--color-gold);
}

@keyframes scrollWheel {
   0% {
      opacity: 1;
      top: 6px;
   }
   100% {
      opacity: 0;
      top: 20px;
   }
}

.hero-decoration {
   position: absolute;
   bottom: 0;
   left: 0;
   right: 0;
   height: 8px;
   background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-dark-red) 50%, var(--color-gold) 100%);
}

/* ===== About Section ===== */
.about {
   padding: var(--section-padding);
   background-color: var(--color-dark-red);
}

/* New Detail: Zig-Zag Layout */
.about-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 60px;
   align-items: center;
   margin-bottom: 80px;
}

.about-row:last-child {
   margin-bottom: 0;
}

.about-image-single {
   position: relative;
   border-radius: 0;
   overflow: hidden;
   box-shadow: 20px 20px 0 var(--color-gold);
}

.about-image-single img {
   width: 100%;
   height: 400px;
   object-fit: cover;
   transition: var(--transition-medium);
   border: 2px solid var(--color-gold);
}

.about-image-single:hover img {
   transform: scale(1.05);
}

.about-content h2 {
   margin-bottom: 30px;
   position: relative;
   color: var(--color-white);
}

.about-content h2::after {
   content: '';
   position: absolute;
   bottom: -10px;
   left: 0;
   width: 80px;
   height: 3px;
   background-color: var(--color-gold);
}

.about-content p {
   margin-bottom: 20px;
   color: var(--color-white);
}

/* ===== Menu Section ===== */
/* ===== Menu Section ===== */
.menu {
   padding: var(--section-padding);
   position: relative;
   z-index: 1;
   color: var(--color-dark-red);
   transform: translateY(20px);
   max-width: 1200px;
   margin: 0 auto;
}

.menu::before {
   content: '';
   position: absolute;
   inset: 0;
   z-index: -1;
   background-color: var(--color-light-bg);
   
   /* Utilisation du SVG statique comme masque pour garder la couleur */
   -webkit-mask-image: url('images/bg1.svg');
   -webkit-mask-size: 100% 100%;
   -webkit-mask-repeat: no-repeat;
   mask-image: url('images/bg1.svg');
   mask-size: 100% 100%;
   mask-repeat: no-repeat;
}

.menu-header {
   text-align: center;
   margin-bottom: 40px;
}

.menu-header h2 {
   color: var(--color-dark-red);
   margin-bottom: 20px;
}

.menu-header p {
   color: var(--color-gold);
   max-width: 600px;
   margin: 0 auto;
}

/* Slider Styles */
.menu-slider-container {
   max-width: 1100px;
   /* Agrandissement de la zone de menu */
   margin: 0 auto;
   position: relative;
   padding: 0 60px;
   /* Space for arrows */
}

.menu-viewport {
   overflow: hidden;
   border-radius: 8px;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
   border: 4px solid var(--color-gold);
}

.menu-slider {
   display: flex;
   transition: transform 0.5s ease-in-out;
}

.menu-slide {
   min-width: 50%;
   /* 2 slides per view on desktop */
   box-sizing: border-box;
   border-right: 1px solid rgba(0, 0, 0, 0.1);
   /* Separator */
}

.menu-slide img {
   width: 100%;
   height: auto;
   display: block;
}

.slider-btn {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   background-color: transparent;
   color: var(--color-gold);
   border: 2px solid var(--color-gold);
   width: 50px;
   height: 50px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: all 0.3s ease;
   z-index: 10;
}

.slider-btn:hover {
   background-color: var(--color-gold);
   color: var(--color-dark-red);
}

.slider-btn.prev {
   left: 0;
}

.slider-btn.next {
   right: 0;
}

.slider-dots {
   display: flex;
   justify-content: center;
   gap: 15px;
   margin-top: 30px;
}

.dot {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   border: 1px solid var(--color-gold);
   background-color: transparent;
   cursor: pointer;
   transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
   background-color: var(--color-gold);
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
   .menu-slider-container {
      padding: 0;
   }

   .slider-btn {
      width: 40px;
      height: 40px;
      background-color: rgba(48, 8, 8, 0.8);
   }

   .slider-btn.prev {
      left: 10px;
   }

   .slider-btn.next {
      right: 10px;
   }

   .menu-slide {
      min-width: 100%;
      /* 1 slide per view on mobile */
      border-right: none;
   }
}


/* ===== Events/Traiteur Section ===== */
.events {
   padding: var(--section-padding);
   background-color: var(--color-green);
   color: var(--color-white);
}

.events-container {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 80px;
   align-items: center;
}

/* Reorder for Desktop: Text Left, Image Right */
.events-content {
   order: -1;
}

.events-image {
   position: relative;
   border-radius: 0;
   overflow: hidden;
   box-shadow: 20px 20px 0 rgba(0, 0, 0, 0.2);
   border: 2px solid var(--color-gold);
}

.events-image img {
   width: 100%;
   height: 500px;
   object-fit: cover;
}

.events-content h2 {
   margin-bottom: 30px;
   position: relative;
   color: var(--color-white);
}

.events-content h2::after {
   content: '';
   position: absolute;
   bottom: -10px;
   left: 0;
   width: 80px;
   height: 3px;
   background-color: var(--color-gold);
}

.events-content p {
   margin-bottom: 20px;
}

.events-features {
   margin: 30px 0;
}

.events-feature {
   display: flex;
   align-items: center;
   gap: 15px;
   margin-bottom: 15px;
}

.events-feature-icon {
   width: 40px;
   height: 40px;
   background: var(--color-gold);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   color: var(--color-dark-red);
}

/* ===== Contact Section ===== */
/* ===== Contact Section ===== */
.contact-section {
   padding: 80px 20px;
   background-color: var(--color-green);
   background-image: url('images/gide.svg');
   /* Pattern */
   background-repeat: repeat;
   background-size: 100%;
   /* Adjust pattern size as needed */
   display: flex;
   justify-content: center;
   align-items: center;
}

/* Contact Card (Centered Content) */
.contact-card {
   max-width: 1000px;
   width: 100%;
   border-radius: 20px;
   position: relative;
   z-index: 1;
   /* Establish stacking context */
   /* No overflow hidden, let wiggle breathe */
   /* Shadow moved to pseudo if needed, or kept here if square shadow is ok. 
    Actually, shadow should wiggle too? 
    If shadow is here, it won't wiggle. 
    Let's put shadow on ::before to wiggle it. */
   display: flex;
   flex-direction: column;
   /* Fallback or enhancement: ensure smooth rendering */
   transform: translateZ(0);
}

/* Wiggling Background Layer */
.contact-card::before {
   content: '';
   position: absolute;
   inset: 0;
   z-index: -1;
   border-radius: 20px;
   /* Hard-stop gradient to simulate split */
   background: linear-gradient(to bottom, #f7fbf4 var(--intro-height, 250px), #300808 var(--intro-height, 250px));
   
   /* Remplacement du filtre lourd par un masque statique SVG */
   -webkit-mask-image: url('images/bg2.svg');
   -webkit-mask-size: 100% 100%;
   -webkit-mask-repeat: no-repeat;
   mask-image: url('images/bg2.svg');
   mask-size: 100% 100%;
   mask-repeat: no-repeat;
}

/* Contact Intro (Light Part of Card) */
.contact-intro {
   background-color: transparent;
   /* Transparent to show wiggling bg */
   padding: 60px 40px;
   text-align: center;
   color: #4a1313;
   position: relative;
   z-index: 2;
}

.contact-intro-content {
   max-width: 800px;
   margin: 0 auto;
}

.contact-intro h2 {
   font-family: 'Uncial Antiqua', serif;
   font-size: 48px;
   color: #4a1313;
   margin-bottom: 20px;
}

.contact-intro p {
   font-size: 18px;
   color: #4a1313;
   margin-bottom: 0;
   line-height: 1.6;
}

/* Contact Info (Dark Part of Card) */
.contact-info-dark {
   background-color: transparent;
   /* Transparent to show wiggling bg */
   color: var(--color-white);
   padding: 60px 60px;
   position: relative;
   z-index: 2;
}

.contact-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 40px;
   max-width: 100%;
   margin: 0 auto;
}

.contact-column h4 {
   color: var(--color-gold);
   font-family: var(--font-body);
   font-size: 16px;
   font-weight: 700;
   text-transform: uppercase;
   margin-bottom: 25px;
   letter-spacing: 1px;
}

.contact-column ul li {
   margin-bottom: 15px;
   font-size: 15px;
   color: #cccccc;
   display: flex;
   align-items: center;
   gap: 10px;
}

.contact-column p {
   font-size: 15px;
   color: #cccccc;
   margin-bottom: 15px;
}

.contact-map-small {
   width: 100%;
   height: 150px;
   border-radius: 8px;
   overflow: hidden;
   border: 1px solid rgba(255, 255, 255, 0.1);
   margin-top: 5px;
}

.contact-map-small iframe {
   width: 100%;
   height: 100%;
   border: 0;
}

/* ===== Footer ===== */
.footer {
   background-color: var(--color-dark-red);
   padding: 40px 100px;
}

.footer-content {
   display: grid;
   grid-template-columns: auto auto;
   grid-template-rows: auto auto;
   justify-content: space-between;
   align-items: center;
   gap: 20px 0;
   padding-bottom: 30px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
   grid-column: 1;
   grid-row: 1;
   display: flex;
   align-items: center;
   gap: 15px;
}

.footer-logo img {
   height: 50px;
}

.footer-logo-text {
   font-family: var(--font-title);
   font-size: 20px;
   color: var(--color-white);
}

.footer-nav {
   grid-column: 2;
   grid-row: 1;
   display: flex;
   gap: 40px;
}

.footer-nav a {
   font-weight: 600;
   font-size: 14px;
   text-transform: uppercase;
   color: var(--color-white);
}

.footer-nav a:hover {
   color: var(--color-gold);
}

.footer-social {
   grid-column: 1 / 3;
   grid-row: 2;
   display: flex;
   flex-wrap: wrap;
   gap: 15px;
   justify-content: center;
}

.footer-social a {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 12px 24px;
   background: transparent;
   border: 2px solid var(--color-gold);
   border-radius: 30px;
   color: var(--color-gold);
   font-size: 14px;
   font-weight: 600;
   transition: var(--transition-fast);
}

.footer-social a svg,
.footer-social a img {
   width: 18px;
   height: 18px;
   flex-shrink: 0;
}

.footer-social a:hover {
   background: var(--color-gold);
   color: var(--color-dark-red);
}


@media (max-width: 768px) {
   .footer-social a {
      width: 100%;
      max-width: 280px;
      justify-content: center;
   }
}

.footer-bottom {
   text-align: center;
   padding-top: 30px;
}

.footer-bottom p {
   font-size: 12px;
   color: rgba(255, 255, 255, 0.6);
   text-transform: uppercase;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
   from {
      opacity: 0;
      transform: translateY(30px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

@keyframes fadeIn {
   from {
      opacity: 0;
   }

   to {
      opacity: 1;
   }
}

/* Morph Animation for Contact Card (Organic Blob) */
@keyframes morph {
   0% {
      border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
   }

   50% {
      border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
   }

   100% {
      border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
   }
}

/* Gentler Morph for Menu (Rectangular-ish) */
@keyframes morph-gentle {
   0% {
      border-radius: 10px;
   }

   25% {
      border-radius: 20px 10px 15px 5px;
   }

   50% {
      border-radius: 10px 20px 5px 15px;
   }

   75% {
      border-radius: 15px 5px 20px 10px;
   }

   100% {
      border-radius: 10px;
   }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
   :root {
      --section-padding: 60px 50px;
   }

   h1 {
      font-size: 56px;
   }

   h2 {
      font-size: 40px;
   }

   .header {
      padding: 20px 50px;
   }

   .about-row,
   .events-container,
   .contact-grid {
      grid-template-columns: 1fr;
      gap: 40px;
   }

   .reverse-mobile {
      /* Ensure image comes first on mobile or last? */
      /* Usually stacking is Image then Text or Text then Image. */
      /* If "Image Left, Text Right" becomes 1 col, Image is top. */
      /* If we want Text then Image for all: */
      /* No special handling needed if DOM order is maintained, but row 2 has img first. */
      /* So on mobile row 2 img is on top of row 2 text. That's fine. */
   }

   .about-image-single,
   .events-image {
      order: -1;
      /* If you want images always on top of their text block */
   }
}

@media (max-width: 768px) {
   :root {
      --section-padding: 50px 20px;
   }

   h1 {
      font-size: 40px;
   }

   h2 {
      font-size: 32px;
   }

   p, .hero-subtitle {
      font-size: 16px;
   }

   .hero-subtitle {
      margin-bottom: 25px;
   }

   .hero {
      background-attachment: scroll;
   }

   /* Suppression des masques SVG sur mobile car leurs proportions se déforment sur un écran vertical étriqué */
   .menu::before,
   .contact-card::before {
      -webkit-mask-image: none;
      mask-image: none;
      border-radius: 20px;
   }

   .header {
      padding: 15px 20px;
   }

   .contact-intro,
   .contact-info-dark {
      padding: 40px 20px;
   }

   .nav-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--color-dark-red);
      flex-direction: column;
      padding: 20px;
      gap: 20px;
      text-align: center;
   }

   .nav-menu.active {
      display: flex;
   }

   .menu-toggle {
      display: flex;
   }

   .menu-grid {
      grid-template-columns: 1fr;
   }

   .footer {
      padding: 40px 20px;
   }

   .footer-content {
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      gap: 24px;
      text-align: center;
   }

   .footer-logo {
      grid-column: 1;
      grid-row: auto;
      justify-content: center;
   }

   .footer-nav {
      grid-column: 1;
      grid-row: auto;
      flex-wrap: wrap;
      justify-content: center;
      gap: 16px;
   }

   .footer-social {
      grid-column: 1;
      grid-row: auto;
      justify-content: center;
   }
}

/* ===== Utility Classes ===== */
.text-center {
   text-align: center;
}

.text-gold {
   color: var(--color-gold);
}

.text-white {
   color: var(--color-white);
}

.mb-20 {
   margin-bottom: 20px;
}

.mb-40 {
   margin-bottom: 40px;
}

.section-title {
   position: relative;
   display: inline-block;
}

.section-title::after {
   content: '';
   position: absolute;
   bottom: -10px;
   left: 50%;
   transform: translateX(-50%);
   width: 80px;
   height: 3px;
   background-color: var(--color-gold);
}