/* Choix du thème : un bouton qui montre l'état courant et ouvre une carte avec les trois choix (clair, système, sombre) */
.ff-theme {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.ff-theme__menu {
  position: absolute;
  top: calc(100% + var(--ff-space-2));
  right: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: var(--ff-space-half);
  box-sizing: border-box;
  width: 200px;
  padding: var(--ff-space-2);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-m);
  background: var(--ff-surface);
  box-shadow: 0 8px 24px var(--ff-shadow-overlay);
}

.ff-theme__menu[hidden] {
  display: none;
}

.ff-theme__opt {
  all: unset;
  display: flex;
  align-items: center;
  gap: var(--ff-space-3);
  box-sizing: border-box;
  height: 44px;
  padding: 0 var(--ff-space-3);
  border-radius: var(--ff-radius-control);
  color: var(--ff-text);
  font-family: var(--ff-font-body);
  font-size: var(--ff-font-size-s);
  font-weight: 500;
  line-height: normal;
  cursor: pointer;
}

.ff-theme__opt > .fa-regular:first-child {
  width: 18px;
  color: var(--ff-text-muted);
  font-size: 18px;
  text-align: center;
}

.ff-theme__opt > span {
  flex: 1 1 0;
}

.ff-theme__check {
  visibility: hidden;
  color: var(--ff-series-accent);
  font-size: 14px;
}

.ff-theme__opt[aria-checked="true"] {
  background: var(--ff-series-tint);
  color: var(--ff-series-accent);
  font-weight: 600;
}

.ff-theme__opt[aria-checked="true"] > .fa-regular:first-child {
  color: var(--ff-series-accent);
}

.ff-theme__opt[aria-checked="true"] .ff-theme__check {
  visibility: visible;
}

.ff-theme__opt:hover {
  background: var(--ff-surface-alt);
}

.ff-theme__opt[aria-checked="true"]:hover {
  background: var(--ff-series-tint);
}

.ff-theme__opt:focus-visible {
  outline: 2px solid var(--ff-focus);
  outline-offset: -2px;
}
