/* Sélecteur de direction visuelle — styles autonomes, lisibles sur clair comme sur sombre */

.theme-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #16181d;
  color: #f4f6f8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 10px 24px -6px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-fab:hover { transform: translateY(-2px); }
.theme-fab::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: conic-gradient(#e8e4d9 0 25%, #101317 0 50%, #1d4ed8 0 75%, #5e6ad2 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.theme-sheet {
  position: fixed;
  right: 18px;
  bottom: 70px;
  z-index: 401;
  width: min(370px, calc(100vw - 36px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 14px;
  background: #16181d;
  color: #f4f6f8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 24px 48px -12px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: inherit;
}
.theme-sheet[hidden] { display: none; }

.theme-sheet h2 {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.3;
}
.theme-sheet > p {
  margin: 0 0 16px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: #9aa3af;
}

.theme-tier { margin-bottom: 14px; }
.theme-tier:last-of-type { margin-bottom: 0; }
.theme-tier-label {
  margin: 0 0 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7c8694;
}

.theme-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 5px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
}
.theme-opt:hover { background: rgba(255, 255, 255, 0.11); }
.theme-opt[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.theme-dot {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.theme-opt-body { display: grid; gap: 1px; min-width: 0; }
.theme-opt-body strong { font-size: 0.87rem; font-weight: 600; color: #fff; }
.theme-opt-body span { font-size: 0.76rem; line-height: 1.4; color: #9aa3af; }

.theme-note {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #7c8694;
}
.theme-note a { color: #b8c1cc; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 680px) {
  .theme-fab { right: 12px; bottom: 12px; height: 38px; padding: 0 13px; font-size: 0.8rem; }
  .theme-sheet { right: 12px; left: 12px; bottom: 58px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-fab { transition: none; }
}
