/* AMX Dark Mode switch UI only (le thème sombre est géré par DarkModeAuto/dark-mode.js) */

:root{
  --amx-dm-btn-bg: rgba(0,0,0,0.08);
  --amx-dm-btn-text: #111;
  --amx-dm-btn-border: rgba(0,0,0,0.12);
  --amx-dm-btn-bg-hover: rgba(0,0,0,0.12);
}

html.amx-dm-active{
  --amx-dm-btn-bg: rgba(255,255,255,0.10);
  --amx-dm-btn-text: #f3f3f3;
  --amx-dm-btn-border: rgba(255,255,255,0.14);
  --amx-dm-btn-bg-hover: rgba(255,255,255,0.16);
}

/* Fallback pendant le chargement (évite un flash blanc quand mode=dark) */
html.html.amx-dm-preload, html.amx-dm-preload body{
  background:#0f1115 !important;
  color:#e6e6e6 !important;
}
html.amx-dm-active, html.amx-dm-active body{
  background:#0f1115 !important;
}

html.amx-dm-noanim *, html.amx-dm-noanim *::before, html.amx-dm-noanim *::after{
  transition:none !important;
  animation:none !important;
}

.amx-dm-switch{
  display:inline-block;
}

.amx-dm-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--amx-dm-btn-border);
  background:var(--amx-dm-btn-bg);
  color:var(--amx-dm-btn-text);
  font-size:13px;
  line-height:1;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

.amx-dm-icon{font-size:14px; line-height:1;}

/* hover seulement sur devices qui supportent hover */
@media (hover:hover){
  .amx-dm-btn:hover{ background:var(--amx-dm-btn-bg-hover); }
}

.amx-dm-btn:focus{ outline: none; }
.amx-dm-btn:focus-visible{ box-shadow: 0 0 0 2px rgba(98,176,42,0.25); }

/* Floating */
.amx-dm-style-floating{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
}

/* Mobile spacing */
@media (max-width: 480px){
  .amx-dm-style-floating{ right: 12px; bottom: 12px; }
}
