/* ============================================
   JUNSPRO - LANGUAGE SELECTOR PREMIUM
   ============================================ */

/* Container du sélecteur de langue */
.header-area .more-option .item .language {
  position: relative;
}

/* Bouton du sélecteur de langue (Nice Select) */
.header-area .more-option .item .language .nice-select {
  min-width: 140px;
  height: 40px;
  padding: 0 16px 0 40px;
  background: linear-gradient(135deg, #1e40af 0%, #4c1d95 50%, #7c3aed 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 20px !important;
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  line-height: 40px;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.header-area .more-option .item .language .nice-select:hover {
  background: linear-gradient(135deg, #2563eb 0%, #5b21b6 50%, #8b5cf6 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.header-area .more-option .item .language .nice-select:focus,
.header-area .more-option .item .language .nice-select.open {
  background: linear-gradient(135deg, #2563eb 0%, #5b21b6 50%, #8b5cf6 100%) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.45);
  outline: none;
}

/* Icône globe avant le texte */
.header-area .more-option .item .language .nice-select::before {
  content: '🌐';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
}

/* Flèche du dropdown (remplace celle de Nice Select) */
.header-area .more-option .item .language .nice-select::after {
  content: '' !important;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.9);
  border-bottom: none !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 !important;
}

.header-area .more-option .item .language .nice-select.open::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Liste déroulante premium */
.header-area .more-option .item .language .nice-select .list {
  min-width: 180px;
  max-width: 220px;
  margin-top: 8px;
  padding: 6px;
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  position: absolute !important;
  z-index: 99999 !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 300px;
  overflow-y: auto;
}

.header-area .more-option .item .language .nice-select.open .list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Flèche vers le haut */
.header-area .more-option .item .language .nice-select .list::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #FFFFFF;
  filter: drop-shadow(0 -2px 4px rgba(15, 23, 42, 0.1));
  z-index: 1;
}

/* Scrollbar personnalisée */
.header-area .more-option .item .language .nice-select .list::-webkit-scrollbar {
  width: 6px;
}

.header-area .more-option .item .language .nice-select .list::-webkit-scrollbar-track {
  background: #F5F5F5;
  border-radius: 3px;
}

.header-area .more-option .item .language .nice-select .list::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.header-area .more-option .item .language .nice-select .list::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Items de la liste */
.header-area .more-option .item .language .nice-select .list .option {
  padding: 12px 16px !important;
  margin: 2px 4px;
  color: #111827 !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 44px;
  line-height: 1.4;
}

.header-area .more-option .item .language .nice-select .list .option:hover {
  background: #F5F3FF !important;
  color: #4F46E5 !important;
  transform: translateX(4px);
}

.header-area .more-option .item .language .nice-select .list .option.selected,
.header-area .more-option .item .language .nice-select .list .option.focus {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.header-area .more-option .item .language .nice-select .list .option.selected::before {
  content: '✓';
  position: absolute;
  left: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #FFFFFF;
}

.header-area .more-option .item .language .nice-select .list .option.selected {
  padding-left: 36px !important;
}

/* Responsive */
@media (max-width: 768px) {
  .header-area .more-option .item .language .nice-select {
    min-width: 120px;
    height: 36px;
    padding: 0 12px 0 36px;
    font-size: 13px;
    line-height: 36px;
  }

  .header-area .more-option .item .language .nice-select::before {
    left: 12px;
    font-size: 14px;
  }

  .header-area .more-option .item .language .nice-select .list {
    min-width: 160px;
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .header-area .more-option .item .language .nice-select {
    min-width: 100px;
    height: 32px;
    padding: 0 10px 0 32px;
    font-size: 12px;
    line-height: 32px;
  }

  .header-area .more-option .item .language .nice-select::before {
    left: 10px;
    font-size: 13px;
  }

  .header-area .more-option .item .language .nice-select .list {
    min-width: 140px;
    max-width: 160px;
  }
}

/* ============================================
   LANG SWITCHER LUXURY — dropdown premium globe
   ============================================ */

/* Container */
.lang-switcher-luxury {
  position: relative;
  display: inline-flex;
}

/* Trigger pill */
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.04);
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
  outline: none;
  line-height: 1;
}

.lang-trigger:hover,
.lang-switcher-luxury.open .lang-trigger {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.07);
  color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.lang-globe-icon {
  font-size: 13px;
  color: #7c3aed;
  transition: color 0.22s ease;
}

.lang-switcher-luxury.open .lang-trigger .lang-globe-icon,
.lang-trigger:hover .lang-globe-icon {
  color: #7c3aed;
}

.lang-current-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-chevron-icon {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.lang-switcher-luxury.open .lang-chevron-icon {
  transform: rotate(180deg);
  opacity: 0.9;
}

/* Dropdown panel */
.lang-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 172px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 12px 30px rgba(15, 23, 42, 0.11),
    0 24px 60px rgba(124, 58, 237, 0.07);
  z-index: 99999;
  padding: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition:
    opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.2s;
  pointer-events: none;
}

/* Caret arrow */
.lang-panel::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid rgba(124, 58, 237, 0.1);
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.lang-switcher-luxury.open .lang-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Panel items */
.lang-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  line-height: 1.3;
}

.lang-panel-item:hover {
  background: rgba(124, 58, 237, 0.06);
  color: #7c3aed;
  transform: translateX(2px);
}

.lang-panel-item--active {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.07) 0%, rgba(124, 58, 237, 0.09) 100%);
  color: #6d28d9;
  font-weight: 700;
  cursor: default;
}

.lang-panel-item--active:hover {
  transform: none;
}

.lang-flag {
  font-size: 19px;
  flex-shrink: 0;
  line-height: 1;
}

.lang-name {
  flex: 1;
}

.lang-check-icon {
  font-size: 11px;
  color: #7c3aed;
  margin-left: auto;
}

/* ── Dark header (v3) ── */
.header_v3 .lang-trigger {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.header_v3 .lang-trigger:hover,
.header_v3 .lang-switcher-luxury.open .lang-trigger {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.header_v3 .lang-globe-icon {
  color: rgba(255, 255, 255, 0.7);
}

.header_v3 .lang-trigger:hover .lang-globe-icon,
.header_v3 .lang-switcher-luxury.open .lang-trigger .lang-globe-icon {
  color: #fff;
}

/* ── Mobile ── */
@media (max-width: 1199px) {
  .lang-trigger {
    color: #1e293b !important;
    border-color: rgba(124, 58, 237, 0.22) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .lang-globe-icon {
    color: #7c3aed !important;
  }

  .lang-panel {
    right: auto;
    left: 0;
    transform-origin: top left;
  }

  .lang-panel::before {
    right: auto;
    left: 16px;
  }
}

