/* custom.css — Petit Train de Perpignan overrides
 *
 * Loaded AFTER:
 *   css/normalize.css
 *   css/webflow.css
 *   css/petit-train-perpignan.webflow.css
 *
 * Add overrides here. NEVER edit the Webflow files above —
 * they get regenerated on every Webflow re-export.
 */

/* ─── Language switcher (vanilla port of Morbihan's LanguageDropdown) ─── */

.lang-switcher {
  position: relative;
  display: inline-flex;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.lang-switcher_trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.3px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-switcher_trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-switcher_flag {
  font-size: 16px;
  line-height: 1;
}

.lang-switcher_code {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lang-switcher_chevron {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.lang-switcher.is-open .lang-switcher_chevron {
  transform: rotate(180deg);
}

.lang-switcher_panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 8px 0 0 0;
  padding: 6px;
  min-width: 200px;
  list-style: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: scale(0.96) translateY(-6px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 200;
}

.lang-switcher.is-open .lang-switcher_panel {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.lang-switcher_panel li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-switcher_option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #181d27;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.3px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-switcher_option:hover {
  background: #f5ebdd;
}

.lang-switcher_option.is-active {
  font-weight: 600;
}

.lang-switcher_check {
  margin-left: auto;
  color: #8C1C1C; /* Perpignan brand red */
  font-weight: 700;
}

/* Hide the mobile switcher on desktop; show inside the nav menu on tablet+below. */
.lang-switcher--mobile {
  display: none;
}

@media (max-width: 991px) {
  .lang-switcher--desktop {
    /* Keep the desktop switcher visible inline next to the burger button
     * on mobile too — small breakpoints already hide the CTA via Webflow's
     * `hide-mobile-landscape` class. The switcher stays as the visible
     * locale indicator. */
    margin-right: 8px;
  }
  .lang-switcher_trigger {
    height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 479px) {
  /* On phone portrait, the desktop chip stays compact; the full-size
   * switcher inside the open mobile menu becomes the primary picker. */
  .lang-switcher--mobile {
    display: inline-flex;
    margin-top: 16px;
    align-self: flex-start;
  }
  .lang-switcher--mobile .lang-switcher_trigger {
    height: 42px;
    padding: 10px 14px;
    font-size: 14px;
    border-color: rgba(0, 0, 0, 0.25);
  }
  .lang-switcher--mobile .lang-switcher_panel {
    right: auto;
    left: 0;
    transform-origin: top left;
  }
}

/* When the Webflow mobile menu is open, ensure the inline desktop switcher
 * still has a sensible background contrast (the menu drops a colored
 * overlay over the navbar on some breakpoints). */
.w-nav-overlay .lang-switcher_trigger {
  background: rgba(255, 255, 255, 0.85);
}
