/* WildChild Multilingual — Language Switcher */

.wcm-switcher { display: inline-flex; }

/* ── Liste horizontale (défaut) ──────────────────────────── */
.wcm-switcher--horizontal .wcm-switcher__list,
.wcm-switcher--vertical   .wcm-switcher__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.wcm-switcher--vertical .wcm-switcher__list {
  flex-direction: column;
  align-items: flex-start;
}

.wcm-switcher__link,
.wcm-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.wcm-switcher__link {
  color: inherit;
  border: 1px solid transparent;
}

.wcm-switcher__link:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}

.wcm-switcher__item--current .wcm-switcher__current {
  font-weight: 700;
  border-bottom: 2px solid currentColor;
}

.wcm-switcher__code {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wcm-switcher__name {
  font-size: 13px;
}

/* ── Dropdown ────────────────────────────────────────────── */
.wcm-switcher--dropdown {
  position: relative;
}

.wcm-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.wcm-switcher__toggle:hover { opacity: 1; }

.wcm-switcher__caret {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}

.wcm-switcher--dropdown.is-open .wcm-switcher__caret {
  transform: rotate(180deg);
}

.wcm-switcher__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 9999;
}

.wcm-switcher--dropdown.is-open .wcm-switcher__dropdown {
  display: block;
  animation: wcmDropIn 0.15s ease;
}

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

.wcm-switcher--dropdown .wcm-switcher__link,
.wcm-switcher--dropdown .wcm-switcher__current {
  display: flex;
  padding: 8px 14px;
  border-radius: 0;
  width: 100%;
  color: #1d2327;
}

.wcm-switcher--dropdown .wcm-switcher__link:hover {
  background: #f6f7f7;
}

.wcm-switcher--dropdown .wcm-switcher__item--current .wcm-switcher__current {
  border-bottom: none;
  background: #f0f6fc;
  color: #2271b1;
}

/* ── Unavailable lang in dropdown ─────────────────────────── */
.wcm-switcher__unavailable {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   Option A — Bouton flottant glassmorphism (bottom-right)
   ════════════════════════════════════════════════════════════ */
.wcm-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: inherit;
}

/* Toggle pill */
.wcm-float__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  white-space: nowrap;
}

.wcm-float__toggle:hover {
  background: rgba(255,255,255,0.28);
  box-shadow: 0 6px 28px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.4);
  transform: translateY(-1px);
}

.wcm-float__toggle:active {
  transform: translateY(0);
}

.wcm-float__globe {
  font-size: 15px;
  line-height: 1;
}

.wcm-float__lang {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.wcm-float__caret {
  font-size: 10px;
  opacity: 0.8;
  transition: transform 0.2s;
  display: inline-block;
}

.wcm-float.is-open .wcm-float__caret {
  transform: rotate(180deg);
}

/* Panel */
.wcm-float__panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: rgba(20,20,30,0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow: hidden;
}

.wcm-float.is-open .wcm-float__panel {
  display: block;
  animation: wcmFloatIn 0.18s cubic-bezier(0.22,1,0.36,1);
}

@keyframes wcmFloatIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)  scale(1);    }
}

/* Panel items */
.wcm-float__item {
  list-style: none;
}

.wcm-float__item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

a.wcm-float__item-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}

.wcm-float__item--current .wcm-float__item-link {
  color: #fff;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
}

.wcm-float__item--unavailable .wcm-float__item-link {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.wcm-float__item-code {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 2px 5px;
  flex-shrink: 0;
}

.wcm-float__item-name {
  font-size: 13px;
  flex: 1;
}

.wcm-float__item-check {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
}

/* Dark bg behind page so the glass reads on any bg */
@media (prefers-color-scheme: light) {
  .wcm-float__toggle {
    color: #1d2327;
    text-shadow: none;
    background: rgba(255,255,255,0.72);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
  }
  .wcm-float__toggle:hover {
    background: rgba(255,255,255,0.9);
  }
  .wcm-float__panel {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.1);
  }
  .wcm-float__item-link {
    color: #1d2327;
  }
  .wcm-float__item--current .wcm-float__item-link {
    color: #2271b1;
    background: rgba(34,113,177,0.08);
  }
  .wcm-float__item-code {
    background: rgba(0,0,0,0.07);
  }
  a.wcm-float__item-link:hover {
    background: rgba(0,0,0,0.05);
    color: #1d2327;
  }
}

/* ════════════════════════════════════════════════════════════
   Option B — Item dans le menu de navigation (header Astra)
   ════════════════════════════════════════════════════════════ */
.wcm-nav-lang-item {
  position: relative;
}

/* Align toggle with other menu items */
.wcm-nav-lang-item .wcm-switcher--nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.wcm-nav-lang-item .wcm-switcher__toggle {
  border-color: transparent;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 500;
  gap: 5px;
}

.wcm-nav-lang-item .wcm-switcher__dropdown {
  top: calc(100% + 2px);
  left: auto;
  right: 0;
  min-width: 170px;
}

/* Dark dropdown in Astra header */
.wcm-nav-lang-item .wcm-switcher__item--unavailable {
  opacity: 0.45;
  pointer-events: none;
}

/* Responsive: hide label on small screens */
@media (max-width: 768px) {
  .wcm-float {
    bottom: 16px;
    right: 16px;
  }
}
