/*--------------------------------------------------------------
  OPUX360 — Premium Header Styles (MOBILE FIXED V4)
--------------------------------------------------------------*/

/* ============================================================
   HEADER BASE
   ============================================================ */
.cs_site_header.cs_style_1 {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: translateY(-20px);
  animation: headerReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes headerReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Initial state - transparent */
.cs_site_header.cs_style_1 .cs_main_header {
  background: rgba(250, 250, 248, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scrolled state - frosted glass effect */
.cs_site_header.cs_style_1.cs_sticky_active .cs_main_header {
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(13, 27, 42, 0.06);
  box-shadow: 0 4px 30px rgba(13, 27, 42, 0.04);
}

/* ============================================================
   HEADER CONTAINER
   ============================================================ */
.cs_main_header_in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  gap: 16px;
  position: relative;
  z-index: 1001;
  width: 100%;
}

.cs_sticky_active .cs_main_header_in {
  padding: 0.875rem 0;
}

/* ============================================================
   LOGO
   ============================================================ */
.cs_site_branding {
  display: flex;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.cs_site_branding img {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  width: auto;
  /* height: 50px; */
  /* max-width: 180px; */
}

.cs_site_branding:hover {
  opacity: 0.8;
}

/* ============================================================
   NAVIGATION DESKTOP
   ============================================================ */
.cs_nav {
  display: flex;
  align-items: center;
}

.cs_nav_list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs_nav_list > li {
  position: relative;
}

.cs_nav_list > li > a {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--premium-gray-600, #5c5a54);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs_nav_list > li > a:hover {
  color: var(--premium-primary, #0d1b2a);
}

/* ============================================================
   CTA
   ============================================================ */
.cs_header_cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--premium-primary, #0d1b2a);
  color: var(--premium-white, #fafaf8);
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs_header_cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--premium-accent, #60c4e3);
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.cs_header_cta span {
  position: relative;
  z-index: 1;
}

.cs_header_cta:hover {
  color: var(--premium-primary, #0d1b2a);
}

.cs_header_cta:hover::before {
  left: 0;
}

.cs_header_cta span::after {
  content: "→";
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.cs_header_cta:hover span::after {
  transform: translateX(3px);
}

/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */
.cs_menu_toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--premium-gray-200, #d4d2cd);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: auto;
  position: relative;
  z-index: 1002;
  flex-shrink: 0;
}

.cs_menu_toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--premium-primary, #0d1b2a);
  margin: 2px 0;
  transition: all 0.3s ease;
}

.cs_menu_toggle:hover {
  border-color: var(--premium-accent, #60c4e3);
}

.cs_menu_toggle:hover span {
  background: var(--premium-accent, #60c4e3);
}

.cs_menu_toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.cs_menu_toggle.active span:nth-child(2) {
  opacity: 0;
}
.cs_menu_toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================================
   OVERLAY
   ============================================================ */
.cs_header_overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 998;
}

.cs_header_overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   RESPONSIVE — MOBILE FULLSCREEN MENU (V4 - TOUT VISIBLE)
   ============================================================ */
@media (max-width: 991px) {
  .cs_menu_toggle {
    display: flex;
    top: 0 !important;
    right: 0 !important;
  }

  /* Menu PLEIN ÉCRAN */
  .cs_main_header_center {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height pour mobile */
    background: var(--premium-white, #fafaf8);
    padding: 0;
    box-shadow: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center; /* Centre verticalement */
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .cs_main_header_center.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Navigation wrapper - centré */
  .cs_nav {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    width: 100%;
    padding: 0 2rem;
  }

  /* Liste de navigation */
  .cs_nav_list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 320px;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .cs_nav_list > li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid var(--premium-gray-100, #e8e6e1);
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    text-align: center;
  }

  .cs_nav_list > li:first-child {
    border-top: 1px solid var(--premium-gray-100, #e8e6e1);
  }

  .cs_nav_list > li > a {
    display: block !important;
    width: 100% !important;
    padding: 1.1rem 0 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-align: center !important;
    text-transform: uppercase !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    color: var(--premium-gray-600, #5c5a54) !important;
    text-decoration: none !important;
    position: static !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: color 0.3s ease !important;
  }

  .cs_nav_list > li > a:hover {
    color: var(--premium-primary, #0d1b2a) !important;
  }

  /* CTA Button */
  .cs_header_cta {
    display: flex !important;
    width: 100%;
    max-width: 320px;
    justify-content: center;
    margin: 0 !important;
    padding: 1rem 2rem;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
  }

  /* Language dropdown */
  .lang-dropdown {
    display: flex !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
  }

  /* Bouton toggle au-dessus du menu */
  .cs_menu_toggle {
    z-index: 1005;
  }
}

/* Tablette */
@media (max-width: 991px) and (min-width: 768px) {
  .cs_site_branding img {
    /* height: 42px; */
    /* max-width: 150px; */
  }
  
  .cs_main_header_in {
    padding: 1rem 0;
    gap: 12px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .cs_site_branding img {
    height: 38px;
    max-width: 140px;
  }
  
  .cs_main_header_in {
    padding: 0.875rem 0;
  }
}

/* Petits écrans */
@media (max-width: 575px) {
  .cs_site_branding img {
    height: 32px;
    max-width: 120px;
  }

  .cs_main_header_in {
    padding: 0.75rem 0;
    gap: 8px;
  }
  
  .cs_menu_toggle {
    width: 40px;
    height: 40px;
  }
  
  .cs_menu_toggle span {
    width: 18px;
  }

  /* Réduire les espacements sur petits écrans */
  .cs_nav {
    gap: 1.5rem;
  }

  .cs_nav_list > li > a {
    padding: 1rem 0 !important;
    font-size: 0.95rem !important;
  }

  .cs_header_cta {
    padding: 0.875rem 1.5rem;
  }
}

/* Très petits écrans (iPhone SE, etc.) */
@media (max-width: 375px) {
  .cs_site_branding img {
    height: 28px;
    max-width: 100px;
  }
  
  .cs_main_header_in {
    gap: 6px;
  }
}

@media (max-width: 991px) and (max-width: 375px) {
  .cs_nav {
    gap: 1rem !important;
  }

  .cs_nav_list > li > a {
    padding: 0.85rem 0 !important;
    font-size: 0.875rem !important;
  }

  .cs_header_cta {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.7rem !important;
  }
}

/* ============================================================
   BODY LOCK
   ============================================================ */
body.cs_menu_open {
  overflow: hidden;
}