@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* === Variables CSS globales (reste global — valeurs pour body.theme-winter actif) === */
:root {
  --bg-0: #050a14;
  --bg-1: #0a1424;
  --bg-2: #142440;
  --bg-3: #1f3458;
  --border: #1e3556;
  --border-strong: #2d4670;
  --text-0: #e8f1ff;
  --text-1: #a8c0e0;
  --text-2: #6a83a8;
  --accent: #60a5fa;
  --accent-bright: #93c5fd;
  --accent-dim: rgba(96, 165, 250, 0.3);
  --accent-bg: rgba(96, 165, 250, 0.1);
  --accent-glow: rgba(96, 165, 250, 0.5);
  --green: #67e8f9;
  --green-bg: rgba(103, 232, 249, 0.1);
  --green-dim: rgba(103, 232, 249, 0.3);
  --red: #f87171;
  --amber: #fbbf24;
  --font-mono: 'JetBrains Mono', monospace;
}

/* === Scopé body.theme-winter : s'applique UNIQUEMENT quand ce thème est actif === */

body.theme-winter,
body.theme-winter button,
body.theme-winter input,
body.theme-winter select,
body.theme-winter textarea { font-family: var(--font-mono) !important; }

/* Background : gradient nuit polaire avec aurora */
body.theme-winter {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 70%, rgba(103, 232, 249, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #050a14 0%, #0a1424 100%) !important;
  background-attachment: fixed !important;
}

/* Flocons animés en fond */
body.theme-winter::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20% 10%, white, transparent),
    radial-gradient(1px 1px at 60% 30%, white, transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 30% 80%, white, transparent),
    radial-gradient(2px 2px at 70% 90%, white, transparent),
    radial-gradient(1px 1px at 10% 50%, white, transparent),
    radial-gradient(1.5px 1.5px at 50% 70%, white, transparent),
    radial-gradient(1px 1px at 85% 20%, white, transparent);
  background-size: 200px 200px;
  background-repeat: repeat;
  opacity: 0.3;
  animation: snow 20s linear infinite;
}

@keyframes snow {
  0%   { transform: translateY(0) translateX(0); }
  100% { transform: translateY(200px) translateX(50px); }
}

/* Composants */
body.theme-winter .sidebar { background: linear-gradient(180deg, rgba(3, 6, 16, 0.95) 0%, rgba(10, 20, 36, 0.95) 100%) !important; border-right: 1px solid var(--border) !important; backdrop-filter: blur(10px); position: relative; z-index: 1; }
body.theme-winter #main { position: relative; z-index: 1; }

body.theme-winter .nav-item.active { background: linear-gradient(90deg, var(--accent-bg) 0%, transparent 100%) !important; color: var(--accent-bright) !important; border-left: 2px solid var(--accent) !important; padding-left: 10px !important; }
body.theme-winter .btn-primary  { background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%) !important; color: #051127 !important; box-shadow: 0 0 12px var(--accent-glow) !important; font-weight: 700; }
body.theme-winter .btn-start    { background: linear-gradient(135deg, #67e8f9 0%, #06b6d4 100%) !important; color: #04111a !important; }
body.theme-winter .btn-stop     { background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%) !important; color: #fff !important; }
body.theme-winter .btn-restart  { background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%) !important; color: #1a0f00 !important; }
body.theme-winter .server-card  { background: linear-gradient(180deg, rgba(10, 20, 36, 0.85) 0%, rgba(6, 12, 24, 0.85) 100%) !important; border: 1px solid var(--border) !important; backdrop-filter: blur(10px); }
body.theme-winter .stat-box     { background: rgba(0, 10, 30, 0.4) !important; border: 1px solid var(--border) !important; }
body.theme-winter input, body.theme-winter select, body.theme-winter textarea, body.theme-winter .form-input { background: var(--bg-0) !important; border: 1px solid var(--border) !important; color: var(--text-0) !important; font-family: var(--font-mono) !important; }
body.theme-winter input:focus, body.theme-winter select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-glow) !important; }
body.theme-winter .login-logo-mark { color: var(--accent-bright) !important; }
body.theme-winter .login-logo-mark svg { filter: drop-shadow(0 0 12px var(--accent-glow)); }
body.theme-winter .login-logo-version, body.theme-winter .sidebar-logo-version { background: var(--accent-bg) !important; color: var(--accent-bright) !important; border: 1px solid var(--accent-dim) !important; }
body.theme-winter ::selection { background: var(--accent-dim); }

/* Login page : fond transparent pour laisser passer les particules */
body.theme-winter #login-page,
body.theme-winter .login-page-wrap { background: transparent !important; }

/* Fix BETA centré sans cadre parasite */
body.theme-winter .login-logo-version { display: inline-block !important; padding: 3px 12px !important; border-radius: 20px !important; box-shadow: none !important; }
body.theme-winter .login-logo { background: none !important; border: none !important; box-shadow: none !important; padding: 24px 0 !important; }

/* Modal de confirmation */
body.theme-winter .gp-confirm-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: gp-confirm-fadein 0.15s ease;
}
body.theme-winter .gp-confirm-modal {
  background: rgba(12, 15, 21, 0.92); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  width: 420px; max-width: 92vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: gp-confirm-popin 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-mono); overflow: hidden;
}
body.theme-winter .gp-confirm-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
body.theme-winter .gp-confirm-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
body.theme-winter .gp-confirm-icon.warning { background: rgba(255, 176, 32, 0.15); color: #ffb020; }
body.theme-winter .gp-confirm-icon.danger  { background: rgba(255, 77, 109, 0.15); color: #ff4d6d; }
body.theme-winter .gp-confirm-title { font-size: 16px; font-weight: 700; color: var(--text-0); }
body.theme-winter .gp-confirm-body { padding: 20px 24px; color: var(--text-1); font-size: 13px; line-height: 1.6; }
body.theme-winter .gp-confirm-body strong { color: var(--text-0); }
body.theme-winter .gp-confirm-actions { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: rgba(0, 0, 0, 0.2); }
body.theme-winter .gp-confirm-btn { padding: 8px 16px; border-radius: 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; border: 1px solid var(--border); }
body.theme-winter .gp-confirm-btn-cancel { background: var(--bg-2); color: var(--text-1); }
body.theme-winter .gp-confirm-btn-cancel:hover { background: var(--bg-3); color: var(--text-0); }
body.theme-winter .gp-confirm-btn-confirm-stop { background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%); color: #fff; border: 1px solid var(--red); }
body.theme-winter .gp-confirm-btn-confirm-restart { background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%); color: #1a0f00; border: 1px solid var(--amber); }
body.theme-winter .gp-confirm-btn-confirm-stop:hover,
body.theme-winter .gp-confirm-btn-confirm-restart:hover { transform: translateY(-1px); filter: brightness(1.1); }

@keyframes gp-confirm-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes gp-confirm-popin  { from { opacity: 0; transform: scale(0.9) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
