/* ==========================================================================
   BBR — Design System
   Source des valeurs : design-tokens.md (racine du projet)

   À ajouter dans le <head> de chaque page (avant ce fichier) :

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
   <link rel="stylesheet" href="design-system.css">
   ========================================================================== */

:root {
  /* --- Couleurs : fond / surfaces (noir & anthracite) --- */
  --color-bg: #080808;
  --color-bg-alt: #111111;
  --color-bg-elevated: #1a1a1a;
  --color-border: #2c2c2c;

  /* --- Couleurs : accent doré --- */
  --color-accent: #d5ad52;
  --color-accent-light: #f2d786;

  /* --- Couleurs : texte --- */
  --color-text: #ffffff;
  --color-text-muted: #aaaaaa;

  /* --- Couleurs : statuts sémantiques --- */
  --color-success: #4ade80;
  --color-warning: #fbbf24;
  --color-danger: #fb7185;
  --color-info: #60a5fa;
  --color-accent-secondary: #c084fc;

  /* --- Typographie --- */
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', Arial, Helvetica, sans-serif;

  /* --- Espacements (échelle en rem, progression 4 / 8 / 16 / 24 / 40px) --- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;

  /* --- Rayons de bordure --- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  /* --- Ombres (pensées pour un fond sombre : noires et diffuses, avec une
     lueur dorée réservée aux éléments d'accent) --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 4px 16px rgba(213, 173, 82, 0.35);

  /* --- Transitions (durée/easing déjà en usage sur .btn-primary/.btn-secondary/
     .card ci-dessous — variables ajoutées pour que le reste du site s'aligne
     dessus au lieu de re-coder "0.2s ease" à chaque fois) --- */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
}

/* ==========================================================================
   Animations
   Sobres et réutilisables. Toute animation/transition du site est neutralisée
   ci-dessous pour les utilisateurs ayant activé "Réduire les animations" dans
   leur système — cette règle doit rester après les autres pour gagner la
   cascade sur la propriété "duration".
   ========================================================================== */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apparition au scroll : l'élément part masqué, un script (IntersectionObserver)
   ajoute .is-visible quand il entre dans le viewport. */

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-visible {
  animation: fade-in-up 0.6s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Composants de base
   Toutes les valeurs viennent des variables ci-dessus — aucune couleur,
   aucun espacement codé en dur.
   ========================================================================== */

/* --- Boutons --- */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: var(--color-accent-light);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-accent);
}

/* --- Carte --- */

.card {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

/* --- Badge --- */
/* Fond translucide dérivé de la couleur sémantique elle-même (color-mix),
   plutôt que des hex codés en dur comme "#4ade8024" trouvés dans le code
   existant : une seule variable pilote à la fois le texte et le fond. */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge--neutral {
  color: var(--color-text-muted);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
}

.badge--accent {
  color: var(--color-accent);
  background-color: color-mix(in srgb, var(--color-accent) 18%, transparent);
}

.badge--success {
  color: var(--color-success);
  background-color: color-mix(in srgb, var(--color-success) 18%, transparent);
}

.badge--warning {
  color: var(--color-warning);
  background-color: color-mix(in srgb, var(--color-warning) 18%, transparent);
}

.badge--danger {
  color: var(--color-danger);
  background-color: color-mix(in srgb, var(--color-danger) 18%, transparent);
}

.badge--info {
  color: var(--color-info);
  background-color: color-mix(in srgb, var(--color-info) 18%, transparent);
}

.badge--purple {
  color: var(--color-accent-secondary);
  background-color: color-mix(in srgb, var(--color-accent-secondary) 18%, transparent);
}

/* Modificateur optionnel : effet pilule (coins totalement arrondis).
   S'utilise en plus de .badge, ex: class="badge badge--success badge--pill".
   Ne change rien d'autre (couleurs, padding identiques). */

.badge--pill {
  border-radius: 999px;
}

/* Bouton qui a l'apparence d'un lien.

   Utile quand l'action est secondaire et s'insère dans une phrase
   (« renvoyer le lien », « annuler »). C'est un <button> et non un <a> :
   il déclenche une action, il ne mène pas à une adresse — les lecteurs
   d'écran et la navigation au clavier doivent pouvoir faire la
   différence. */

.lien-texte {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.lien-texte:hover {
  color: var(--color-accent);
}

.lien-texte:disabled {
  opacity: 0.55;
  cursor: default;
}
