/* ═══════════════════════════════════════════════════════
   JONAS PARFUMS — Currency Selector PRO
   Custom dropdown avec drapeaux + fond noir luxe
   ═══════════════════════════════════════════════════════ */

/* Container */
.currency-switcher-pro {
  position: relative;
  display: flex;
  align-items: center;
}

/* Bouton principal (selected currency) */
.currency-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(201, 161, 74, 0.3);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 130px;
  justify-content: space-between;
  user-select: none;
}

.currency-btn:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(201, 161, 74, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.currency-btn:active {
  transform: scale(0.98);
}

/* Flag emoji */
.currency-btn__flag {
  font-size: 16px;
  line-height: 1;
}

/* Currency code */
.currency-btn__code {
  flex: 1;
  text-align: left;
  color: rgba(255, 255, 255, 0.95);
}

/* Chevron */
.currency-btn__chevron {
  font-size: 10px;
  color: rgba(201, 161, 74, 0.7);
  transition: transform 0.25s;
}

.currency-btn.active .currency-btn__chevron {
  transform: rotate(180deg);
}

/* Dropdown menu */
.currency-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: rgba(15, 10, 8, 0.98);
  border: 1px solid rgba(201, 161, 74, 0.25);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
              0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px 0;
}

.currency-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Option item */
.currency-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.currency-option:hover {
  background: rgba(201, 161, 74, 0.12);
  color: #fff;
  border-left-color: rgba(201, 161, 74, 0.4);
}

.currency-option.selected {
  background: rgba(201, 161, 74, 0.18);
  color: #fff;
  border-left-color: var(--gold);
  font-weight: 600;
}

.currency-option__flag {
  font-size: 18px;
  line-height: 1;
  width: 24px;
  text-align: center;
}

.currency-option__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-option__code {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  min-width: 42px;
}

.currency-option__symbol {
  color: rgba(201, 161, 74, 0.8);
  font-size: 12px;
}

.currency-option__check {
  margin-left: auto;
  color: var(--gold);
  font-size: 14px;
  opacity: 0;
}

.currency-option.selected .currency-option__check {
  opacity: 1;
}

/* Divider entre options */
.currency-dropdown hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .currency-btn {
    min-width: 110px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .currency-btn__flag {
    font-size: 14px;
  }

  .currency-dropdown {
    min-width: 160px;
    right: -10px; /* Align à droite sur mobile */
  }

  .currency-option {
    padding: 12px 12px;
  }

  .currency-option__flag {
    font-size: 16px;
  }
}

/* Animation entrance */
@keyframes currencySlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.currency-dropdown.active {
  animation: currencySlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close sur click outside */
body.currency-open {
  /* Optionnel: overlay semi-transparent */
}

/* Accessibility - Focus states */
.currency-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.currency-option:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* Dark topbar integration */
.topbar .currency-switcher-pro {
  margin-left: 8px;
}

/* Hide old select */
.currency-switcher select.currency-select {
  display: none;
}
