/* assets/css/style.css - Académie Henri Barbusse (Effectifs & Recrutement Design) */

:root {
  --primary: #00EEFF;
  --primary-glow: rgba(0, 238, 255, 0.35);
  --accent-warm: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
  --bg-dark: #0A0F1D;
  --card-bg: rgba(18, 26, 43, 0.85);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover: rgba(26, 38, 62, 0.95);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 238, 255, 0.15);
  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
}

/* 🎨 THÈMES ÉVÉNEMENTIELS (Octobre Rose, Halloween, Noël, Été, Automne, Classique) */
body[data-theme="octobre_rose"], [data-theme="octobre_rose"] {
  --primary: #ff66b2;
  --primary-glow: rgba(255, 102, 178, 0.4);
  --accent-warm: #ff1493;
  --accent-gradient: linear-gradient(135deg, #ff66b2 0%, #ff1493 100%);
  --shadow-glow: 0 0 25px rgba(255, 102, 178, 0.25);
}

body[data-theme="halloween"], [data-theme="halloween"] {
  --primary: #ff6600;
  --primary-glow: rgba(255, 102, 0, 0.4);
  --accent-warm: #9333ea;
  --accent-gradient: linear-gradient(135deg, #ff6600 0%, #9333ea 100%);
  --shadow-glow: 0 0 25px rgba(255, 102, 0, 0.25);
}

body[data-theme="noel"], [data-theme="noel"] {
  --primary: #ef4444;
  --primary-glow: rgba(239, 68, 68, 0.4);
  --accent-warm: #10b981;
  --accent-gradient: linear-gradient(135deg, #ef4444 0%, #10b981 100%);
  --shadow-glow: 0 0 25px rgba(239, 68, 68, 0.25);
}

body[data-theme="summer"], [data-theme="summer"] {
  --primary: #00EEFF;
  --primary-glow: rgba(0, 238, 255, 0.35);
  --accent-warm: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #00eeff 0%, #f59e0b 100%);
  --shadow-glow: 0 0 25px rgba(0, 238, 255, 0.15);
}

body[data-theme="automne"], [data-theme="automne"] {
  --primary: #f97316;
  --primary-glow: rgba(249, 115, 22, 0.4);
  --accent-warm: #d97706;
  --accent-gradient: linear-gradient(135deg, #f97316 0%, #d97706 100%);
  --shadow-glow: 0 0 25px rgba(249, 115, 22, 0.25);
}

body[data-theme="classic"], [data-theme="classic"] {
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --accent-warm: #0284c7;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, var(--primary-glow) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-shadow: 0 0 8px var(--primary-glow);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Brand */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 29, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  color: #FFF;
  background: rgba(0, 238, 255, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.admin-link-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}

.admin-link-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #fff !important;
}

/* Announcement Bar */
.announcement-bar {
  background: var(--accent-gradient);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Hero Section */
.hero {
  padding: 60px 0 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(0, 238, 255, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Pill Buttons */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #0A0F1D;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--primary-glow);
  color: #0A0F1D;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #FFF;
  border: 1px solid var(--card-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0 50px 0;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.stat-card b {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(0, 238, 255, 0.4);
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 238, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 238, 255, 0.2);
  margin-bottom: 10px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-libre {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-complet {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Section Headers */
.section-head {
  text-align: center;
  margin-bottom: 32px;
}

.section-head span.eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0;
}

.section-head p {
  color: var(--text-muted);
}

/* Admin Dashboard Layout */
.admin-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 80px);
}

.admin-sidebar {
  background: #0d1527;
  border-right: 1px solid var(--card-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.admin-menu-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFF;
}

.admin-menu-btn.active {
  background: rgba(0, 238, 255, 0.15);
  color: #FFF;
  border-left: 3px solid var(--primary);
}

.admin-content {
  padding: 36px;
  background: #080c18;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(18, 26, 43, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #FFF;
  font-family: var(--font);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Admin Table */
.admin-table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 700;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* Alert Boxes */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.92rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Footer */
footer {
  margin-top: auto;
  background: #060913;
  border-top: 1px solid var(--card-border);
  padding: 50px 0 24px 0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-brand-name {
  font-weight: 800;
  font-size: 1.1rem;
}

footer h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #FFF;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 10px;
}

footer ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
}

#loadingOverlay {
  display: none !important;
}

.loader-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 0 30px var(--primary-glow);
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.loader-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-top: 16px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 100%;
  height: 100%;
  background: var(--primary);
  animation: fillBar 1.2s ease-in-out infinite;
}

@keyframes fillBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Discord Button Special */
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 12px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.discord-btn:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

/* Tickets Chat Bubbles */
.ticket-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 0.93rem;
  line-height: 1.6;
}

.chat-bubble.dir {
  background: rgba(0, 238, 255, 0.08);
  border-color: rgba(0, 238, 255, 0.25);
  margin-left: 20px;
}

.chat-bubble .who {
  font-weight: 700;
  color: var(--primary);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

/* Code Editor Styling */
.code-editor {
  font-family: 'Consolas', 'Monaco', monospace;
  background: #090e1a !important;
  color: #38bdf8 !important;
  line-height: 1.5;
}
