@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-spring actif) === */
:root {
  --bg-0: #07090d;
  --bg-1: #0c0f15;
  --bg-2: #131820;
  --bg-3: #1c2330;
  --border: #1e2530;
  --border-strong: #2d3648;
  --text-0: #f0f4f9;
  --text-1: #b4bcc7;
  --text-2: #6a7280;
  --accent: #4ade80;
  --accent-bright: #86efac;
  --accent-dim: rgba(74, 222, 128, 0.3);
  --accent-bg: rgba(74, 222, 128, 0.1);
  --accent-glow: rgba(74, 222, 128, 0.5);
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.1);
  --green-dim: rgba(74, 222, 128, 0.3);
  --red: #ff4d6d;
  --amber: #ffb020;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body.theme-spring {
  background:
    radial-gradient(ellipse 60% 40% at 30% 0%, rgba(74, 222, 128, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(134, 239, 172, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #07090d 0%, #0a0d12 100%) !important;
  background-attachment: fixed !important;
}

body.theme-spring::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 25% 15%, rgba(134, 239, 172, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 65% 35%, rgba(74, 222, 128, 0.4), transparent),
    radial-gradient(2px 2px at 85% 65%, rgba(134, 239, 172, 0.4), transparent),
    radial-gradient(1px 1px at 35% 85%, rgba(74, 222, 128, 0.5), transparent),
    radial-gradient(2px 2px at 75% 90%, rgba(134, 239, 172, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 15% 55%, rgba(74, 222, 128, 0.4), transparent);
  background-size: 280px 280px;
  background-repeat: repeat;
  opacity: 0.4;
  animation: floatSpring 35s linear infinite;
}

@keyframes floatSpring {
  0%   { transform: translateY(0) translateX(0); }
  50%  { transform: translateY(-100px) translateX(40px); }
  100% { transform: translateY(-280px) translateX(0); }
}

body.theme-spring .sidebar { background: linear-gradient(180deg, #050709 0%, #0a0d12 100%) !important; border-right: 1px solid var(--border) !important; position: relative; z-index: 1; }
body.theme-spring #main { position: relative; z-index: 1; }
body.theme-spring .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-spring .btn-primary  { background: linear-gradient(135deg, var(--accent) 0%, #16a34a 100%) !important; color: #042010 !important; box-shadow: 0 0 12px var(--accent-glow) !important; font-weight: 700; }
body.theme-spring .btn-start    { background: linear-gradient(135deg, var(--accent) 0%, #22c55e 100%) !important; color: #042010 !important; }
body.theme-spring .btn-stop     { background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%) !important; color: #fff !important; }
body.theme-spring .btn-restart  { background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%) !important; color: #1a0f00 !important; }
body.theme-spring .server-card  { background: linear-gradient(180deg, var(--bg-1) 0%, #080b10 100%) !important; border: 1px solid var(--border) !important; }
body.theme-spring .stat-box     { background: rgba(0, 0, 0, 0.4) !important; border: 1px solid var(--border) !important; }
body.theme-spring input, body.theme-spring select, body.theme-spring textarea, body.theme-spring .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-spring input:focus, body.theme-spring select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-glow) !important; }
body.theme-spring .login-logo-mark { color: var(--accent-bright) !important; }
body.theme-spring .login-logo-mark svg { filter: drop-shadow(0 0 12px var(--accent-glow)); }
body.theme-spring .login-logo-version, body.theme-spring .sidebar-logo-version { background: var(--accent-bg) !important; color: var(--accent-bright) !important; border: 1px solid var(--accent-dim) !important; }
body.theme-spring ::selection { background: var(--accent-dim); }

body.theme-spring #login-page,
body.theme-spring .login-page-wrap { background: transparent !important; }

body.theme-spring .login-logo-version { display: inline-block !important; padding: 3px 12px !important; border-radius: 20px !important; box-shadow: none !important; }
body.theme-spring .login-logo { background: none !important; border: none !important; box-shadow: none !important; padding: 24px 0 !important; }

/* Modal de confirmation */
body.theme-spring .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-spring .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-spring .gp-confirm-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
body.theme-spring .gp-confirm-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
body.theme-spring .gp-confirm-icon.warning { background: rgba(255, 176, 32, 0.15); color: #ffb020; }
body.theme-spring .gp-confirm-icon.danger  { background: rgba(255, 77, 109, 0.15); color: #ff4d6d; }
body.theme-spring .gp-confirm-title { font-size: 16px; font-weight: 700; color: var(--text-0); }
body.theme-spring .gp-confirm-body { padding: 20px 24px; color: var(--text-1); font-size: 13px; line-height: 1.6; }
body.theme-spring .gp-confirm-body strong { color: var(--text-0); }
body.theme-spring .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-spring .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-spring .gp-confirm-btn-cancel { background: var(--bg-2); color: var(--text-1); }
body.theme-spring .gp-confirm-btn-cancel:hover { background: var(--bg-3); color: var(--text-0); }
body.theme-spring .gp-confirm-btn-confirm-stop { background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%); color: #fff; border: 1px solid var(--red); }
body.theme-spring .gp-confirm-btn-confirm-restart { background: linear-gradient(135deg, var(--amber) 0%, #d97706 100%); color: #1a0f00; border: 1px solid var(--amber); }
body.theme-spring .gp-confirm-btn-confirm-stop:hover,
body.theme-spring .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); } }
