/* Thème Stargate minimal, sans build, pour Tailwind CDN */
:root {
  --sg-bg: #0b1020;
  --sg-bg-2: #060a17;
  --sg-card: #11162a;
  --sg-primary: #00c2ff;
  --sg-accent: #ffd166;
  --sg-border: #1c2541;
}

/* Légère couche d'étoiles scintillantes */
html.dark body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 20% 65%, rgba(255,255,255,.9) 40%, transparent 41%);
  opacity: .18;
  animation: sg-twinkle 6s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  html.dark body::before { animation: none; }
}

@keyframes sg-twinkle {
  from { opacity: .14; filter: brightness(1); }
  to   { opacity: .24; filter: brightness(1.15); }
}

/* Cartes et boutons utilitaires */
.sg-card {
  background-color: var(--sg-card);
  box-shadow: 0 0 0 1px rgba(0,194,255,.12), 0 8px 24px rgba(0,0,0,.45);
  border-radius: .5rem;
  border: 1px solid var(--sg-border);
}

.sg-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: .375rem;
  font-weight: 600;
}
.sg-btn-primary {
  color: #001018;
  background: linear-gradient(180deg, #3ae1ff 0%, var(--sg-primary) 100%);
}
.sg-btn-primary:hover { filter: brightness(1.05); }

/* Anneau Stargate décoratif (hero) */
.sg-gate {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
  background:
    radial-gradient(closest-side, rgba(0,194,255,.06), rgba(0,194,255,.03) 60%, transparent 65%),
    repeating-conic-gradient(from 0deg, rgba(0,194,255,.45) 0 8deg, transparent 8deg 12deg);
  box-shadow: inset 0 0 0 2px var(--sg-border), 0 12px 40px rgba(0,0,0,.55);
  animation: sg-ring-spin 18s linear infinite;
}
.sg-gate::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, rgba(0,194,255,.18), rgba(0,194,255,.04));
  box-shadow: inset 0 0 0 1px rgba(0,194,255,.25);
}
.sg-gate::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(0,194,255,.27), rgba(0,194,255,.08)),
    repeating-radial-gradient(circle at 50% 50%, rgba(0,194,255,.14) 0 2px, transparent 2px 6px);
  filter: blur(.4px);
  animation: sg-worm 12s linear infinite;
}
@keyframes sg-ring-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sg-worm { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

/* Onglets d’auth actifs (legacy) */
.tab-btn.is-active {
  background: linear-gradient(180deg, #3ae1ff 0%, var(--sg-primary) 100%);
  color: #001018 !important;
}

/* Cadre d’auth dédié */
.sg-card-auth {
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,194,255,.16), 0 18px 48px rgba(0,0,0,.55);
}
.sg-card-auth .sg-card-title { color: var(--sg-primary); }
.sg-card-auth .sg-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(0,194,255,.05), rgba(0,194,255,.25), rgba(0,194,255,.05));
}

/* Accessibilité */
a { text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Formulaires généraux (Stargate) */
.sg-input,
.sg-input[type="text"],
.sg-input[type="email"],
.sg-input[type="password"],
.sg-input[type="search"],
.sg-input[type="url"],
.sg-input[type="tel"],
.sg-input[type="number"],
select.sg-input,
textarea.sg-input {
  background-color: var(--sg-input-bg, rgba(17,22,42,.85));
  border: 1px solid var(--sg-input-border, var(--sg-border));
  color: var(--sg-input-text, #e5edf5);
  padding: .5rem .75rem;
  border-radius: .375rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.sg-input::placeholder { color: var(--sg-input-placeholder, #86a1b8); opacity: .9; }

.sg-input:hover { border-color: rgba(0,194,255,.35); }
.sg-input:focus {
  outline: none;
  border-color: var(--sg-input-focus-border, var(--sg-primary));
  box-shadow: 0 0 0 2px var(--sg-input-focus-ring, rgba(0,194,255,.28));
  background-color: rgba(17,22,42,.95);
}
.sg-input:disabled, .sg-input[readonly] {
  opacity: .7; cursor: not-allowed;
  background-color: rgba(17,22,42,.6);
}

textarea.sg-input { resize: vertical; min-height: 110px; }

/* Sélecteurs (flèche custom légère) */
select.sg-input { appearance: none; background-repeat: no-repeat; background-position: right .6rem center; background-size: 1rem; padding-right: 2rem; }
select.sg-input { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='rgb(0,194,255)' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5'/></svg>"); }

/* Entrées number sans spinners */
.sg-input[type=number]::-webkit-outer-spin-button,
.sg-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg-input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

/* Fleet UI harmonisation (Stargate) */
.fleet-ui [class*="bg-white/10"] {
  background-color: var(--sg-card);
  border: 1px solid var(--sg-border);
  box-shadow: 0 0 0 1px rgba(0,194,255,.12), 0 8px 24px rgba(0,0,0,.45);
  border-radius: .5rem;
}
.fleet-ui select,
.fleet-ui input[type="number"],
.fleet-ui input[type="text"],
.fleet-ui input[type="email"],
.fleet-ui input[type="password"] {
  background-color: rgba(17,22,42,.85);
  border: 1px solid var(--sg-border);
  color: #e5edf5;
}
.fleet-ui select:focus,
.fleet-ui input[type="number"]:focus {
  outline: none;
  border-color: var(--sg-primary);
  box-shadow: 0 0 0 2px rgba(0,194,255,.25);
}
.fleet-ui .font-semibold { color: var(--sg-primary); }

/* Boutons Fleet → thème Stargate */
.fleet-ui button.bg-blue-600,
.fleet-ui button.bg-blue-700 { /* Préparer */
  background: linear-gradient(180deg, #3ae1ff 0%, var(--sg-primary) 100%) !important;
  color: #001018 !important;
  border: 0;
}
.fleet-ui button.bg-blue-600:hover,
.fleet-ui button.bg-blue-700:hover { filter: brightness(1.05); }

.fleet-ui button.bg-green-600,
.fleet-ui button.bg-green-700 { /* Lancer la mission */
  background: linear-gradient(180deg, #ffe084 0%, var(--sg-accent) 100%) !important;
  color: #2a1a00 !important;
  border: 0;
}
.fleet-ui button.bg-green-600:hover,
.fleet-ui button.bg-green-700:hover { filter: brightness(1.05); }

/* Petits liens d’action */
.fleet-ui .underline { color: var(--sg-primary); }

/* Inputs number: retirer les flèches (spinners) */
.fleet-ui input[type=number]::-webkit-outer-spin-button,
.fleet-ui input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fleet-ui input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

/* Scrollbars: masquer visuellement mais conserver le scroll */
.fleet-ui *, .fleet-ui *::before, .fleet-ui *::after { scrollbar-width: none; }
.fleet-ui *::-webkit-scrollbar { width: 0; height: 0; }
.fleet-ui *::-webkit-scrollbar-thumb { background: transparent; }
.fleet-ui *::-webkit-scrollbar-track { background: transparent; }

input[type="number"] {
  appearance: textfield;
}

/* Classe utilitaire : glow Stargate pour les icônes du Top 3 */
.sg-star {
  filter: drop-shadow(0 0 6px rgba(0,194,255,.25));
}

/* Micro-polish tableau (hover doux) */
.sg-table-row { transition: background-color .2s ease; }
.sg-table-row:hover { background-color: rgba(17,22,42,.55); }

/* ====== Icônes & animations légères pour le jeu ====== */
.sg-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,194,255,.14), 0 8px 16px rgba(0,0,0,.35);
  background: radial-gradient(closest-side, rgba(0,194,255,.06), rgba(0,194,255,.03) 60%, transparent 70%);
}
.sg-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-icon::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0,194,255,.18);
  pointer-events: none;
}
.sg-icon-float { animation: sg-float 4.5s ease-in-out infinite; }
@keyframes sg-float { 0% { transform: translateY(0px); } 50% { transform: translateY(-2.5px); } 100% { transform: translateY(0px); } }

.sg-icon-glow { filter: drop-shadow(0 0 6px rgba(0,194,255,.25)); }

/* Icône par défaut (si image absente) */
.sg-icon-default {
  width: 100%; height: 100%;
  background:
    radial-gradient(closest-side, rgba(0,194,255,.18), rgba(0,194,255,.06)),
    linear-gradient(180deg, rgba(17,22,42,.9), rgba(17,22,42,.7));
}
.sg-icon-default svg { width: 70%; height: 70%; opacity: .9; }