/* ============================================
   COMMON.CSS — Variables, reset, typographie
   Projet : Site composants informatiques
   Composant : Casques VR
   ============================================ */

/* --- Variables globales --- */
:root {
  /* Couleurs de base */
  --bg-primary:    #0d0d14;
  --bg-secondary:  #13131f;
  --bg-card:       #1a1a2e;
  --bg-card-hover: #1f1f38;

  /* Accent violet/indigo */
  --accent:        #7c3aed;
  --accent-light:  #a855f7;
  --accent-dark:   #5b21b6;
  --accent-glow:   rgba(124, 58, 237, 0.25);

  /* Texte */
  --text-primary:  #f0f0f8;
  --text-secondary:#a0a0c0;
  --text-muted:    #6060a0;

  /* Bordures */
  --border:        #2a2a4a;
  --border-accent: #7c3aed;

  /* États */
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  /* Dégradés */
  --grad-accent:   linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --grad-dark:     linear-gradient(135deg, #13131f 0%, #1a1a2e 100%);
  --grad-card:     linear-gradient(145deg, #1a1a2e 0%, #16162a 100%);

  /* Ombres */
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-accent: 0 4px 20px rgba(124,58,237,0.3);

  /* Dimensions */
  --sidebar-width: 260px;
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;

  /* Transitions */
  --transition:    all 0.2s ease;
}

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

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* --- Typographie --- */
h1, h2, h3, h4, h5 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--text-primary); }

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
li { margin-bottom: 0.3rem; }

strong { color: var(--text-primary); font-weight: 600; }
em { color: var(--accent-light); }
code {
  background: rgba(124,58,237,0.15);
  color: var(--accent-light);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

/* --- Utilitaires --- */
.text-accent   { color: var(--accent-light); }
.text-muted    { color: var(--text-muted); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* --- Scrollbar personnalisée --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
