/* Language Switcher and Button styles - moved from index.html */

/* --- STYLES POUR LE BOUTON DE LANGUE ET SON CONTENEUR --- */
.language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  position: relative;
  z-index: 100;
}

.language-btn {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 40px;
  text-align: center;
  white-space: nowrap;
}

.language-btn:hover {
  background: none !important;
  transform: none;
}

/* Base styles for language parts */
.lang-part {
  opacity: 0.6 !important;
  color: #ffffff !important;
  transition: all 0.3s ease !important;
}

/* Gold Highlight for active language */
.lang-part.active {
  opacity: 1 !important;
  color: #d4af37 !important;
  font-weight: 700;
}

/* Dynamic Swap on Hover: Active becomes dimmed, Inactive becomes gold */
.language-btn:hover .lang-part.active,
.menu-item-language a:hover .lang-part.active {
  opacity: 0.6 !important;
  color: #ffffff !important;
}

.language-btn:hover .lang-part:not(.active),
.menu-item-language a:hover .lang-part:not(.active) {
  opacity: 1 !important;
  color: #d4af37 !important;
}

.language-btn .lang-sep,
.menu-item-language .lang-sep {
  display: inline-block;
  margin: 0 8px;
  opacity: 0.6;
  color: #ffffff !important;
}

/* Header state overrides (scrolled/mobile) */
.is-menu-toggled-on .language-btn,
.site-header.clone .language-btn {
  background: none !important;
}

/* Ensure active language is always gold, even in clone mode */
.site-header.clone .lang-part.active {
  color: #d4af37 !important;
  opacity: 1 !important;
}

/* In clone mode, inactive parts should be white (default text color) but slightly dimmed */
.site-header.clone .lang-part:not(.active) {
  color: #ffffff !important;
}

/* Fix Hover in Clone Mode: */
/* Ensure active part stays gold on hover, inactive part can brighten but stay white or turn gold? */
/* User complained: "once I scroll it becomes FR the hover active whereas the language is English" */
/* This implies they saw FR turn gold. My previous logic DID turn inactive (FR) gold on hover. */
/* Let's SIMPLIFY: On hover, just keep active GOLD, and make inactive WHITE (brighter). */

.site-header.clone .language-btn:hover .lang-part.active {
  opacity: 1 !important;
  color: #d4af37 !important;
  /* Keep Active Gold */
}

.site-header.clone .language-btn:hover .lang-part:not(.active) {
  opacity: 0.8 !important;
  color: #ffffff !important;
  /* Keep Inactive White */
}

/* Desktop alignment */
@media screen and (min-width: 992px) {
  .language-switcher {
    display: flex !important;
  }

  .menu-item-language {
    display: none !important;
  }
}