/* ═══════════════════════════════════════════════════════
   AREA Quiz Defense — base.css
   Reset, variables CSS, typographie
═══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --ink:     #0f0f0f;
  --paper:   #f4efe6;
  --surface: #faf7f2;
  --accent:  #b22222;
  --gold:    #c9922a;
  --blue:    #2aa7c9;
  --muted:   #7a7268;
  --border:  #d0c9bc;
  --correct: #2a6e47;
  --wrong:   #b22222;
  --admin:   #1a3a5c;
  --nav-w:   235px;

  /* Timer colors */
  --timer-ok:      #2a7a4f;
  --timer-warning: #c9922a;
  --timer-danger:  #b22222;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Typographie ── */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Utilitaires ── */
.hidden { display: none !important; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.section-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
}

.tag-green  { background: rgba(42,110,71,0.12);  color: var(--correct); border: 1px solid rgba(42,110,71,0.25); }
.tag-red    { background: rgba(178,34,34,0.10);  color: var(--accent);  border: 1px solid rgba(178,34,34,0.22); }
.tag-gold   { background: rgba(201,146,42,0.12); color: var(--gold);    border: 1px solid rgba(201,146,42,0.25); }
.tag-blue   { background: rgba(26,58,92,0.10);   color: #2a6090;        border: 1px solid rgba(26,58,92,0.20); }

/* Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.animate-fade-up { animation: fadeUp 0.32s ease; }

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.4s ease infinite;
  flex-shrink: 0;
}
