/* ===== THEME COLORS & VARIABLES ===== */
:root {
  /* Design fixe (pas de mode sombre adaptatif) : empêche le navigateur de
     redessiner les champs de formulaire en sombre selon le thème du système. */
  color-scheme: light;

  --color-primary: #1f6feb;
  --color-primary-hover: #1862d6;
  --color-navy: #0b2545;
  --color-navy-light: #123a6b;
  --color-accent-blue: #3b9bff;
  --color-accent-gold: #ffb020;
  --color-secondary: #6b7280;
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #1f6feb;
  --color-danger: #dc2626;

  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-dark: #1f2937;

  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;

  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  --rounded-sm: 0.25rem;
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* ===== THEME-SPECIFIC STYLES ===== */
h1 { color: var(--color-primary); }
h2 { color: var(--text-dark); }
h3 { color: var(--text-dark); }

a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: #0284c7;
}

/* Category Colors */
.category-chute {
  color: #f97316;
  background-color: #fff1e6;
  border-left: 4px solid #f97316;
}

.category-electrique {
  color: #ca8a04;
  background-color: #fef9c3;
  border-left: 4px solid #ca8a04;
}

.category-ergonomie {
  color: #0ea5e9;
  background-color: #e0f2fe;
  border-left: 4px solid #0ea5e9;
}

.category-incendie {
  color: #ef4444;
  background-color: #fee2e2;
  border-left: 4px solid #ef4444;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-primary {
  background-color: var(--color-primary);
  color: white;
}

.badge-success {
  background-color: var(--color-success);
  color: white;
}

.badge-error {
  background-color: var(--color-error);
  color: white;
}

/* Card */
.card {
  background: var(--bg-white);
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}
