/* ═══════════════════════════════════════════════════════
   CTF VERTIÈRES — Stylesheet
   Aesthetic: Dark colonial military / revolutionary
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Share+Tech+Mono&display=swap');

:root {
  --bg-primary:    #0a0905;
  --bg-secondary:  #111009;
  --bg-card:       #16130c;
  --bg-card-hover: #1d1810;
  --gold:          #c9a84c;
  --gold-light:    #e8c97a;
  --gold-dim:      #6b5520;
  --red:           #8b1a1a;
  --red-bright:    #c0392b;
  --cream:         #e8dfc8;
  --cream-dim:     #9e9278;
  --text-primary:  #d4c8a8;
  --text-secondary:#8a7d60;
  --border:        #2e2518;
  --border-gold:   #4a3a18;
  --mono:          'Share Tech Mono', monospace;
  --serif:         'Crimson Pro', Georgia, serif;
  --display:       'Cinzel', serif;
  --glow-gold:     0 0 20px rgba(201,168,76,0.25);
  --glow-red:      0 0 20px rgba(139,26,26,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(201,168,76,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(139,26,26,0.05) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%230a0905'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%2312100a' opacity='0.6'/%3E%3C/svg%3E");
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,9,5,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-brand span {
  color: var(--red-bright);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s;
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ── LAYOUT ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO ── */
.hero {
  position: relative;
  padding: 6rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(201,168,76,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0.85;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(201,168,76,0.3), 0 2px 0 rgba(0,0,0,0.8);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--display);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--red-bright);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2rem auto;
}

.hero-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
}

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  transition: border-color 0.3s, background 0.3s;
}

.card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--red));
  border-radius: 2px 0 0 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before { opacity: 1; }

.card-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.card h2, .card h3 {
  font-family: var(--display);
  color: var(--gold-light);
  margin-bottom: 1rem;
}

/* ── SECTION HEADING ── */
.section-heading {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.8rem 1.1rem;
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem 2.2rem;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-primary);
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: var(--glow-gold);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

.btn-danger {
  background: transparent;
  color: var(--red-bright);
  border: 1px solid var(--red);
}

.btn-danger:hover {
  background: rgba(139,26,26,0.2);
  box-shadow: var(--glow-red);
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
}

.badge-general {
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

.badge-empereur {
  background: rgba(139,26,26,0.2);
  color: var(--red-bright);
  border: 1px solid var(--red);
  animation: pulse-red 2s infinite;
}

.badge-admin { background: rgba(139,26,26,0.2); color: var(--red-bright); border: 1px solid var(--red); }
.badge-user { background: rgba(201,168,76,0.1); color: var(--gold); border: 1px solid var(--gold-dim); }

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 0 8px 2px rgba(192,57,43,0.15); }
}

/* ── ALERT / MESSAGES ── */
.alert {
  padding: 1rem 1.4rem;
  border-radius: 2px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid;
}

.alert-error {
  background: rgba(139,26,26,0.15);
  border-color: var(--red-bright);
  color: #e88;
}

.alert-success {
  background: rgba(39,174,96,0.12);
  border-color: #2ecc71;
  color: #7dd9a0;
}

.alert-warning {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ── FLAG ── */
.flag-box {
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.35);
  border-radius: 2px;
  padding: 1.4rem 2rem;
  margin-top: 1.5rem;
  text-align: center;
}

.flag-box .flag-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: #4caf50;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.flag-box .flag-value {
  font-family: var(--mono);
  font-size: 1.3rem;
  color: #69e87a;
  text-shadow: 0 0 20px rgba(105,232,122,0.5);
  letter-spacing: 0.05em;
}

/* ── REPORT NAV ── */
.report-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.report-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(201,168,76,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
  letter-spacing: 0.1em;
}

.report-nav a:hover,
.report-nav a.active {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── TERMINAL BLOCK ── */
.terminal {
  background: #0d0d0a;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #7ec87e;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal .prompt { color: var(--gold-dim); }
.terminal .comment { color: var(--text-secondary); }

/* ── QUOTE ── */
blockquote {
  border-left: 3px solid var(--gold-dim);
  padding: 0.8rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--cream-dim);
  background: rgba(201,168,76,0.04);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold-dim);
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ── GRID ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin-top: 5rem;
}

footer span { color: var(--gold-dim); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* ── UNAUTHORIZED ── */
.unauthorized-box {
  text-align: center;
  padding: 5rem 2rem;
}

.unauthorized-code {
  font-family: var(--display);
  font-size: 6rem;
  color: var(--red);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.unauthorized-title {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--red-bright);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* ── DASHBOARD STATS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--display);
  font-size: 2.5rem;
  color: var(--gold);
  display: block;
  line-height: 1.1;
}

.stat-card .stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .hero { padding: 3rem 1rem; }
  .container { padding: 0 1rem; }
  .card { padding: 1.5rem; }
}