/* ================================================================
   SCP: SITE-43 | RP FR — Design System
   Style: Moderne & Épuré | Dark Tactical
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ---- TOKENS ---- */
:root {
  /* Palette base */
  --bg-void:    #07080c;
  --bg-base:    #0d0f16;
  --bg-surface: #12151f;
  --bg-card:    #161a26;
  --bg-hover:   #1c2033;
  --bg-input:   #1a1e2d;

  /* Borders */
  --border:         rgba(255,255,255,0.06);
  --border-accent:  rgba(255,255,255,0.12);

  /* Brand accent */
  --accent:       #e8342a;
  --accent-soft:  rgba(232,52,42,0.15);
  --accent-glow:  rgba(232,52,42,0.35);

  /* Discord */
  --discord:      #5865f2;
  --discord-soft: rgba(88,101,242,0.15);

  /* Status */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Text */
  --text-primary:   #f0f2f8;
  --text-secondary: #8891a8;
  --text-muted:     #4d5467;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.6);

  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ---- SEASONAL OVERRIDES ---- */
body.theme-halloween {
  --accent:      #f97316;
  --accent-soft: rgba(249,115,22,0.15);
  --accent-glow: rgba(249,115,22,0.35);
}
body.theme-noel {
  --accent:      #22c55e;
  --accent-soft: rgba(34,197,94,0.15);
  --accent-glow: rgba(34,197,94,0.35);
}
body.theme-paques {
  --accent:      #a855f7;
  --accent-soft: rgba(168,85,247,0.15);
  --accent-glow: rgba(168,85,247,0.35);
}
body.theme-nouvel-an {
  --accent:      #eab308;
  --accent-soft: rgba(234,179,8,0.15);
  --accent-glow: rgba(234,179,8,0.35);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p  { color: var(--text-secondary); }
a  { color: inherit; text-decoration: none; }

/* ---- LAYOUT ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- HEADER / NAV ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,8,12,.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.site-header.scrolled {
  background: rgba(7,8,12,.95);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.logo-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.nav-links a.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: .45rem 1.25rem;
  font-weight: 600;
}
.nav-links a.nav-cta:hover {
  background: #d1291f;
  box-shadow: 0 0 20px var(--accent-glow);
}
.nav-links a.nav-discord {
  background: var(--discord-soft);
  color: #818cf8;
  border: 1px solid rgba(88,101,242,.2);
}
.nav-links a.nav-discord:hover {
  background: rgba(88,101,242,.25);
  color: #a5b4fc;
}

/* Mobile nav */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius-sm);
}
.mobile-nav-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7,8,12,.97);
  backdrop-filter: blur(24px);
  flex-direction: column;
  padding: 2rem;
}
.mobile-nav-panel.open { display: flex; }
.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  margin-bottom: 2rem;
}
.mobile-nav-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.mobile-nav-panel a {
  display: block;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.mobile-nav-panel a:hover,
.mobile-nav-panel a.active {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--bg-hover);
}
.mobile-nav-panel a.nav-cta {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 768px) {
  .site-header nav { display: none; }
  .mobile-toggle { display: block; }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #d1291f;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: rgba(255,255,255,.2);
  transform: translateY(-1px);
}
.btn-discord {
  background: var(--discord);
  color: #fff;
}
.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 0 20px rgba(88,101,242,.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}
.btn:disabled, .btn.disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-accent);
}
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(232,52,42,.2);
}
.card-icon.discord-icon {
  background: var(--discord-soft);
  border-color: rgba(88,101,242,.2);
}
.card-icon.success-icon {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.2);
}
.card-icon.warning-icon {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.2);
}
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.card-subtitle { font-size: .85rem; color: var(--text-muted); }

/* ---- ALERTS ---- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.alert strong { font-weight: 700; font-size: .95rem; }
.alert p { margin: 0; font-size: .9rem; }

.alert-info    { background: rgba(59,130,246,.1);  border-color: rgba(59,130,246,.25);  color: #93c5fd; }
.alert-success { background: rgba(34,197,94,.1);   border-color: rgba(34,197,94,.25);   color: #86efac; }
.alert-warning { background: rgba(245,158,11,.1);  border-color: rgba(245,158,11,.25);  color: #fcd34d; }
.alert-danger  { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.25);   color: #fca5a5; }
.alert-maint   { background: rgba(148,163,184,.08);border-color: rgba(148,163,184,.2);  color: #94a3b8; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-warn-active   { background: #ef4444; color: #fff; }
.badge-warn-semi     { background: #f59e0b; color: #000; }
.badge-warn-inactive { background: #475569; color: #cbd5e1; }
.badge-ban           { background: #991b1b; color: #fecaca; }
.badge-kick          { background: #374151; color: #9ca3af; }
.badge-unban         { background: #14532d; color: #86efac; }
.badge-mute          { background: #374151; color: #9ca3af; }
.badge-unmute        { background: #14532d; color: #86efac; }
.badge-pending       { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.badge-success       { background: rgba(34,197,94,.15);  color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.badge-error         { background: rgba(239,68,68,.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}
.form-label .required { color: var(--danger); margin-left: .2rem; }
.form-control {
  width: 100%;
  padding: .7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.form-control {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.form-hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .35rem;
}
.char-counter {
  text-align: right;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .3rem;
}
.char-counter.warn { color: var(--danger); }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color var(--transition);
}
.checkbox-label:hover { border-color: var(--border-accent); }
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ---- TABLE ---- */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-height: 560px;
}
.table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg-surface); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 99px; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg-surface);
  padding: .875rem 1.1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: .875rem 1.1rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in .2s ease;
}
.modal-box::-webkit-scrollbar { width: 6px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 99px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.2rem; }
.modal-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
  border-radius: var(--radius-sm);
  padding: .2rem .4rem;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.modal-footer {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.modal-footer .btn { flex: 1; }

/* ---- TOAST ---- */
#toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  padding: .875rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9rem;
  max-width: 380px;
  display: none;
  animation: slide-up .3s ease;
  border: 1px solid;
}
#toast.success { background: rgba(34,197,94,.15);  border-color: rgba(34,197,94,.3);  color: #86efac; }
#toast.error   { background: rgba(239,68,68,.15);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }
@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---- STATS GRID ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat-box.danger { border-color: rgba(239,68,68,.4); animation: pulse-red 2s infinite; }
.stat-box.caution { border-color: rgba(245,158,11,.3); }
.stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: .25rem; }
@keyframes pulse-red {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 16px rgba(239,68,68,.25); }
}

/* ---- APP LAYOUT (dashboard) ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: fixed;
  top: 64px; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 99px; }
.sidebar-section-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 700;
  padding: .5rem .75rem;
  margin-bottom: .25rem;
  margin-top: .75rem;
}
.sidebar-section-label:first-child { margin-top: 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}
.sidebar-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.sidebar-link.active { color: var(--text-primary); background: var(--accent-soft); }
.sidebar-link .icon { width: 18px; text-align: center; flex-shrink: 0; }

.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 2rem;
  min-width: 0;
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
}

.page-header { margin-bottom: 2rem; }
.page-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .25rem; }
.page-subtitle { color: var(--text-muted); font-size: .9rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-secondary); transition: color var(--transition); }
.site-footer a:hover { color: var(--text-primary); }
.footer-divider { margin: 0 .5rem; opacity: .3; }

/* ---- SECTION (public pages) ---- */
.section { padding: 100px 0; }
.section-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-title { margin-bottom: 1rem; }
.section-body { color: var(--text-secondary); max-width: 52ch; line-height: 1.75; }

/* ---- SNOWFLAKES ---- */
.snowflake-layer {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 5; overflow: hidden;
}
.snowflake {
  position: absolute; top: -20px;
  color: rgba(255,255,255,.6);
  animation: snow-fall linear infinite;
}
@keyframes snow-fall { to { transform: translateY(110vh); } }

/* ---- HALLOWEEN LEAVES ---- */
.leaf-layer { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.leaf { position: absolute; top: -20px; animation: leaf-fall linear infinite; }
@keyframes leaf-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ---- EASTER CONFETTI ---- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.confetti-dot { position: absolute; top: -10px; border-radius: 50%; animation: confetti-fall linear infinite; }
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg) scale(.5); opacity: 0; }
}

/* ---- NYE SPARKS ---- */
.spark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.spark { position: absolute; animation: spark-rise linear infinite; }
@keyframes spark-rise {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-110vh) scale(0); opacity: 0; }
}

/* ---- MISC ---- */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.fw-bold     { font-weight: 700; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .modal-footer { flex-direction: column; }
  .btn-lg { padding: .8rem 1.25rem; }
}