/* Généré depuis les sélecteurs du site principal. */

.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: var(--fs-0-8rem);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-0-45rem);
  padding: 0.15rem 0.3rem;
}
.locale-switcher__link {
  text-decoration: none;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-0-3rem);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s ease;
}
.locale-switcher__link:hover {
  color: var(--text-heading);
}
.locale-switcher__link.is-active {
  color: var(--accent-primary);
  background: var(--accent-subtle);
  font-weight: 600;
}
.theme-switcher-wrapper {
  position: relative;
}
.theme-switcher-pill-group {
  display: inline-flex;
  align-items: center;
  width: 7.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-0-45rem);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  overflow: hidden;
  flex-shrink: 0;
}
.theme-switcher-pill-group:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}
.theme-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-size: var(--fs-0-8rem);
  font-weight: 500;
  color: var(--text-main);
  background: transparent;
  border: none;
  padding: 0.3rem 0.35rem 0.3rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.theme-switcher-btn__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.theme-switcher-btn:hover {
  color: var(--text-heading);
  background: var(--bg-surface-hover);
}
.theme-switcher-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -1px;
}
.theme-switcher-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.45rem;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-switcher-arrow-btn:hover {
  color: var(--text-heading);
  background: var(--bg-surface-hover);
}
.theme-switcher-arrow-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -1px;
}
.theme-swatch-icon {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: var(--radius-999px);
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  background: linear-gradient(135deg, var(--swatch-bg) 50%, var(--swatch-accent) 50%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--specular) 20%, transparent);
  flex-shrink: 0;
}
.theme-dropdown-modal {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: var(--z-120);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-0-85rem);
  padding: 0.65rem;
  box-shadow: var(--shadow-card-hover);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(22rem, calc(100vw - 2rem));
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-inset);
  padding: 0.25rem;
  border-radius: var(--radius-0-55rem);
  gap: 0.25rem;
  border: 1px solid var(--border-subtle);
}
.theme-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-0-45rem);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-0-775rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-segment-btn:hover {
  color: var(--text-heading);
}
.theme-segment-btn.is-active {
  background: var(--bg-card);
  color: var(--text-heading);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
.theme-segment-count {
  font-size: var(--fs-0-675rem);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-999px);
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-weight: 700;
}
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  max-height: 18.5rem;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}
.theme-grid::-webkit-scrollbar {
  width: 5px;
}
.theme-grid::-webkit-scrollbar-track {
  background: transparent;
}
.theme-grid::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-999px);
}
.theme-card-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-0-55rem);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.theme-card-option:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-vibrant);
  color: var(--text-heading);
  transform: translateY(-1px);
}
.theme-card-option.is-active {
  background: var(--accent-subtle);
  border-color: var(--border-vibrant);
  box-shadow: 0 0 0 1px var(--border-vibrant);
  color: var(--text-heading);
  font-weight: 600;
}
.theme-card-option__swatch-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-card-option__swatch {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: var(--radius-999px);
  display: block;
  background: linear-gradient(135deg, var(--swatch-bg) 50%, var(--swatch-accent) 50%);
  box-shadow: 0 0 0 1px var(--border-subtle), 0 2px 4px color-mix(in srgb, var(--ink) 15%, transparent);
}
.theme-card-option__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.theme-card-option__name {
  font-size: var(--fs-0-775rem);
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-card-option__desc {
  font-size: var(--fs-0-65rem);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-card-option__check {
  font-size: var(--fs-0-75rem);
  color: var(--accent-primary);
  font-weight: 800;
  margin-left: auto;
}
.mobile-drawer-panel .theme-dropdown-modal {
  position: absolute;
  top: auto;
  bottom: calc(100% + 0.5rem);
  right: 0;
  width: min(19.5rem, calc(100vw - 3rem));
  z-index: var(--z-150);
  box-shadow: 0 -8px 30px color-mix(in srgb, var(--ink) 45%, transparent);
}
.locale-switcher,
.theme-switcher-pill-group {
  background: var(--glass-card-bg);
  -webkit-backdrop-filter: blur(var(--glass-card-blur)) saturate(var(--saturate-rich));
  backdrop-filter: blur(var(--glass-card-blur)) saturate(var(--saturate-rich));
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--glass-edge), var(--shadow-sm);
  transition: transform 0.22s var(--ease-spring-pill), border-color 0.2s ease, box-shadow 0.2s ease;
}
.locale-switcher:hover,
.theme-switcher-pill-group:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 50%, var(--glass-card-border));
  box-shadow: var(--glass-edge), 0 6px 18px color-mix(in srgb, var(--accent-primary) 14%, transparent);
}
.theme-dropdown-modal {
  background: var(--glass-floating-bg);
  -webkit-backdrop-filter: blur(var(--glass-floating-blur)) saturate(var(--saturate-rich));
  backdrop-filter: blur(var(--glass-floating-blur)) saturate(var(--saturate-rich));
  border: 1px solid var(--glass-floating-border);
  box-shadow: var(--glass-card-highlight), var(--shadow-card-hover);
}
.locale-switcher__link,
.theme-segment-btn,
.theme-card-option {
  transition:
    transform 0.2s var(--ease-spring-pill),
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.18s ease;
}
.locale-switcher__link:hover {
  transform: translateY(-1px) scale(1.04);
}
.theme-card-option:hover {
  transform: translateY(-2px) scale(1.025);
  border-color: color-mix(in srgb, var(--accent-primary) 48%, var(--glass-card-border));
}
.theme-switcher-btn:active,
.theme-switcher-arrow-btn:active,
.theme-segment-btn:active,
.theme-card-option:active,
.locale-switcher__link:active {
  transform: scale(0.96) !important;
  filter: brightness(0.94);
  transition-duration: 0.1s;
}
@media (prefers-reduced-motion: reduce) {
  .locale-switcher__link,
.theme-card-option {
    transition: none !important;
    transform: none !important;
  }
}
.chevron-flip {
  transition: transform 0.2s ease;
  transform: rotate(0);
}
.chevron-flip.is-open {
  transform: rotate(180deg);
}
/* Icônes de marque : masque rempli d'une couleur, donc lisible dans les 16 thèmes (couleur officielle seulement si le
   contraste le permet, sinon la couleur du texte). Les logos multicolores sont affichés tels quels, sans fond. Voir src/lib/assets.ts. Spécificité nulle : une classe du site peut
   imposer sa taille. */
:where(.brand-icon) {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
}

:where(.brand-icon:not(img):not(.brand-icon--image)) {
  --brand-icon-color: currentColor;
  background-color: var(--brand-icon-color);
  -webkit-mask: var(--brand-icon-src) center / contain no-repeat;
  mask: var(--brand-icon-src) center / contain no-repeat;
}

:where(.brand-icon--image),
:where(img.brand-icon),
.brand-icon--image,
img.brand-icon {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: middle;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-mask: none !important;
  mask: none !important;
}

/* Aucun support derrière un logo : les visuels sont transparents et reposent sur la surface du thème. Un logo dont une
   couleur se confond avec une surface d'un thème (voir `halo` dans assets.json et check-assets.mjs) reçoit un fin
   liseré de la couleur du texte, qui suit le thème, au lieu d'un fond. */
:where(.brand-icon--halo) {
  filter: drop-shadow(0 0 0.6px color-mix(in srgb, var(--text-main) 85%, transparent))
    drop-shadow(0 0 0.6px color-mix(in srgb, var(--text-main) 85%, transparent));
}

.theme-swatch-icon[data-theme="charbon"], [data-theme-value="charbon"] { --swatch-bg: #f5f5f7; --swatch-accent: #1d1d1f; }
.theme-swatch-icon[data-theme="clair"], [data-theme-value="clair"] { --swatch-bg: #f8f5f6; --swatch-accent: #be123c; }
.theme-swatch-icon[data-theme="miel"], [data-theme-value="miel"] { --swatch-bg: #f8f6f2; --swatch-accent: #b45309; }
.theme-swatch-icon[data-theme="menthe"], [data-theme-value="menthe"] { --swatch-bg: #f4f7f5; --swatch-accent: #047857; }
.theme-swatch-icon[data-theme="ciel"], [data-theme-value="ciel"] { --swatch-bg: #f4f6f9; --swatch-accent: #0071e3; }
.theme-swatch-icon[data-theme="lavande"], [data-theme-value="lavande"] { --swatch-bg: #f6f5f9; --swatch-accent: #6d28d9; }
.theme-swatch-icon[data-theme="beige"], [data-theme-value="beige"] { --swatch-bg: #f7f6f2; --swatch-accent: #854d0e; }
.theme-swatch-icon[data-theme="coco"], [data-theme-value="coco"] { --swatch-bg: #f4f5f7; --swatch-accent: #475569; }
.theme-swatch-icon[data-theme="les-mills-sombre"], [data-theme-value="les-mills-sombre"] { --swatch-bg: #000000; --swatch-accent: #e4002b; }
.theme-swatch-icon[data-theme="charbon-sombre"], [data-theme-value="charbon-sombre"] { --swatch-bg: #050507; --swatch-accent: #e5e5ea; }
.theme-swatch-icon[data-theme="automne"], [data-theme-value="automne"] { --swatch-bg: #060504; --swatch-accent: #ff9f0a; }
.theme-swatch-icon[data-theme="hiver"], [data-theme-value="hiver"] { --swatch-bg: #040608; --swatch-accent: #2997ff; }
.theme-swatch-icon[data-theme="lune"], [data-theme-value="lune"] { --swatch-bg: #050507; --swatch-accent: #818cf8; }
.theme-swatch-icon[data-theme="chili"], [data-theme-value="chili"] { --swatch-bg: #070405; --swatch-accent: #ff453a; }
.theme-swatch-icon[data-theme="orchidee"], [data-theme-value="orchidee"] { --swatch-bg: #060408; --swatch-accent: #bf5af2; }
.theme-swatch-icon[data-theme="taupe"], [data-theme-value="taupe"] { --swatch-bg: #040705; --swatch-accent: #eab308; }
