/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.5s ease;
}
/* Home page: transparent until scroll */
.main-header.main-header-home {
  background: rgba(10, 8, 6, 0.0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.0);
}
/*.main-header.main-header-home.scrolled {
  background: #3d0001;
  
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(201, 168, 76, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}*/



/*.main-header.main-header-home.scrolled {
    background: rgba(61, 0, 1, 0.85);

    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom-color: rgba(201, 168, 76, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}*/


.main-header-home.scrolled {
    background: url('{{ asset('assets/images/footer.png') }}') center / cover no-repeat;
    background-color: transparent; /* Supprime toute couleur de fond de secours */
    border-bottom-color: rgba(201, 168, 76, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}



/* Inner pages: darker from the start */
.main-header.main-header-inner {
  background: rgba(10, 8, 6, 0.88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.main-header.scrolled {
  background: rgba(10, 8, 6, 0.95);
 -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(201, 168, 76, 0.25);
}

/* Force dark header (applies immediately on non-home pages when added server-side) */
/*.main-header.force-dark {
  background: rgba(10, 8, 6, 0.95) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  backdrop-filter: blur(18px) !important;
  border-bottom-color: rgba(201, 168, 76, 0.25) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;

}*/


/* ============================================
   FOND IMAGE POUR TOUTES LES PAGES (hors home)
   ============================================ */






.main-header.force-dark .header-link,
.main-header.force-dark .header-right,
.main-header.force-dark .header-logo {
  color: #ffffff !important;
  
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LEFT — Navigation */
.header-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: flex-start;
}

/* CENTER — Logo */
.header-logo {
  flex-shrink: 0;
  margin: 0 40px;
}


.header-logo:hover img {
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 1))
          drop-shadow(0 0 18px rgba(201, 168, 76, 0.85))
          drop-shadow(0 0 35px rgba(201, 168, 76, 0.6))
          drop-shadow(0 0 60px rgba(201, 168, 76, 0.3));
}

/* RIGHT — Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: flex-end;
}

/* ─── NAV LINKS ─── */
.nav-item {
  position: relative;
}

.header-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s;
}

.header-link:hover {
  color: #c9a84c;
}

/* ─── SEARCH ─── */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201, 168, 76, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.search-icon:hover {
  color: #c9a84c;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

/* Main fix for RTL support */
.search-input {
  position: absolute;
  /* Use logical properties instead of physical right/left */
  inset-inline-end: 40px;     /* This replaces "right: 40px" */
  width: 200px;
  background: rgba(20, 27, 40, 0.95);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  color: #e4e8f2;
  font-size: 14px;
  outline: none;
-webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* Optional: Better RTL padding */
.search-input {
  padding-inline-start: 16px;   /* left in LTR, right in RTL */
  padding-inline-end: 16px;     /* right in LTR, left in RTL */
}

.search-input::placeholder {
  color: rgba(201, 168, 76, 0.4);
}

.search-container:hover .search-input,
.search-input:focus {
  width: 200px;
  padding: 8px 16px;
}

.search-input:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.2);
}

/* ─── BUTTONS ─── */
.lang-btn {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: white;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.lang-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: #c9a84c;
}

.user-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 2px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: all 0.3s;
}

.user-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  padding: 6px 10px;
}

.mode-toggle {
  display: flex;
  align-items: center;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: all 0.3s;
}

.mode-toggle:hover {
  background: rgba(201, 168, 76, 0.15);
}

.btn-login {
  padding: 8px 20px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 6px;
  font-size: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login:hover {
  color: white;
  border-color: #c9a84c;
  background: rgba(201, 168, 76, 0.1);
}

/* ─── DROPDOWN MENU ─── */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(20, 27, 40, 0.95);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  min-width: 200px;
  padding: 8px 0;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
 -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: rgba(201, 168, 76, 0.15);
  color: #c9a84c;
  padding-left: 24px;
}

/* ─── MEGA MENU ─── */
.mega-menu {
  display: flex;
  gap: 40px;
  padding: 20px;
  min-width: 200px;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
}

.dropdown-column h4 {
  font-size: 14px;
  color: #c9a84c;
  margin-bottom: 10px;
  font-weight: 600;
  border-bottom: 2px solid #c9a84c;
  padding-bottom: 4px;
  text-transform: uppercase;
}

.dropdown-column a {
  padding: 6px 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-column a:hover {
  color: #fff;
  padding-left: 10px;
  background: rgba(201, 168, 76, 0.15);
}

/* ─── USER DROPDOWN ─── */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: white;
  min-width: 180px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown-item {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}

.user-dropdown-item:hover {
  background: #f5f5f5;
}

/* ─── LANGUAGE SWITCHER ─── */
.custom-lang-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(20, 27, 40, 0.95);
  border: 1px solid rgba(201, 168, 76, 0.55);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.custom-lang-btn:hover {
  transform: scale(1.1);
  background: rgba(201, 168, 76, 0.15);
  border-color: #c9a84c;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 54px;
  right: 0;
  background: rgba(10, 8, 6, 0.97);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
  overflow: hidden;
  min-width: 110px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 99999;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  color: rgba(240, 236, 227, 0.85);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-dropdown button:last-child {
  border-bottom: none;
}

.lang-dropdown button:hover {
  background: rgba(201, 168, 76, 0.12);
  color: #c9a84c;
  padding-left: 22px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 992px) {
  .header-nav   { gap: 20px; font-size: 13.5px; }
  .header-inner { padding: 0 24px; }
  .dropdown-menu { min-width: 180px; }
  .search-input  { right: 32px; }
}

/* Dynamic Logo Coloring */
.header-logo img {
  height: 56px;
  width: auto;
  filter: brightness(1.05);
  transition: filter 0.4s ease, opacity 0.3s ease;
}

/* Light logo (for dark backgrounds) */
.logo-light img {
    filter: brightness(0) invert(1);   /* turns dark logo into white */
}

/* Dark logo (for light backgrounds) */
.logo-dark img {
    filter: none;
}

/* Green logo (for green sections) */
.logo-green img {
    filter: hue-rotate(80deg) saturate(1.8) brightness(1.1);   /* shifts to green tone */
}

/* ============================================
   HEADER LOGO - AUCUN EFFET
   ============================================ */

.header-logo,
.header-logo:hover,
.header-logo:focus,
.header-logo:active,
.header-logo:visited {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    cursor: default !important;
}

.header-logo img,
.header-logo:hover img,
.header-logo:focus img,
.header-logo:active img,
.header-logo:visited img {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    cursor: default !important;
    pointer-events: none !important;
    scale: 1 !important;
}

.header-logo {
    display: inline-block;
    line-height: 0;
    font-size: 0;
    cursor: pointer !important;
}

.header-logo img {
    pointer-events: none !important;
    cursor: default !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.header-logo:hover,
.header-logo:focus,
.header-logo:active {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* Lang dropdown */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 120px;
    display: none;
    overflow: hidden;
    z-index: 1000;
    margin-top: 10px;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.lang-dropdown a,
.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-dropdown a:hover,
.lang-dropdown button:hover {
    background: rgba(199, 163, 74, 0.1);
    color: var(--gold);
}

.custom-lang-btn {
    position: relative;
    cursor: pointer;
}

/* User dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 200px;
    display: none;
    overflow: hidden;
    z-index: 1000;
    margin-top: 10px;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: rgba(199, 163, 74, 0.1);
    color: var(--gold);
}

.logout-btn {
    width: 100%;
    text-align: left;
    border-top: 1px solid #eee;
}

.user-name-header {
    cursor: default;
}

.user-name-header:hover {
    background: transparent;
    color: var(--gold);
}

.user-menu {
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════
   MOBILE HAMBURGER & RESPONSIVE MENU
═══════════════════════════════════════════════ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
    margin-inline-end: 10px;
}
.hamburger-btn span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: #fff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 992px) {
    .hamburger-btn {
        display: flex;
    }
    .header-nav {
        position: fixed;
        top: 80px;                /* height of header */
        left: 0;
        right: 0;
        background: rgba(10, 8, 6, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px 30px;
        transform: translateY(-120%);
        transition: transform 0.35s ease;
        z-index: 1500;
        border-bottom: 1px solid rgba(201,168,76,0.2);
        max-height: 80vh;
        overflow-y: auto;
    }
    .header-nav.nav-open {
        transform: translateY(0);
    }
    .nav-item {
        width: 100%;
    }
    .header-link {
        display: block;
        padding: 14px 0;
        font-size: 17px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .dropdown-menu {
        position: static;
        background: transparent;
        border: none;
        padding: 0 0 10px 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
    }
    .nav-item:hover .dropdown-menu {
        /* keep static */
    }
    .mega-menu {
        flex-direction: column;
        gap: 12px;
    }
    .dropdown-column {
        width: 100%;
    }
    .dropdown-column h4 {
        border-bottom-color: rgba(201,168,76,0.4);
    }
    .dropdown-column a {
        padding: 8px 0;
        font-size: 15px;
    }
}

/* Further adjustments for very small screens */
@media (max-width: 576px) {
    .header-right {
        gap: 10px;
    }
    .search-input {
        width: 160px;
    }
}
