:root {
  --fond: #0B1120;
  --surface: #111A2E;
  --bordure: #1E2A44;
  --brand: #2563EB;
  --accent1: #22D3EE;
  --accent2: #A3E635;
  --texte: #E2E8F0;
  --texte2: #94A3B8;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--fond);
  color: var(--texte);
  font-family: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}

/* Focus visible accessible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent1);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Cartes articles */
.carte-article {
  background-color: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: block;
}
.carte-article:hover {
  transform: translateY(-4px);
  border-color: var(--accent1);
}

/* Titre de section avec trait accent */
.titre-section {
  position: relative;
  padding-left: 0.9rem;
}
.titre-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: var(--accent1);
}

/* Chip catégorie */
.chip {
  display: inline-block;
  background: rgba(163, 230, 53, 0.12);
  color: var(--accent2);
  border: 1px solid rgba(163, 230, 53, 0.4);
  border-radius: 9999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Fade-in au scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accordéon FAQ */
.faq summary { cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chevron { transition: transform 0.2s ease; }
.faq details[open] summary .chevron { transform: rotate(180deg); }

/* Tableaux */
.tableau-pro {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}
.tableau-pro th, .tableau-pro td {
  border: 1px solid var(--bordure);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.tableau-pro th { background: rgba(37, 99, 235, 0.15); }
.tableau-pro tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

/* Encadrés éditoriaux */
.encadre {
  border-left: 4px solid var(--accent1);
  background: rgba(34, 211, 238, 0.07);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
}
.encadre-lime {
  border-left-color: var(--accent2);
  background: rgba(163, 230, 53, 0.07);
}
.encadre-rouge {
  border-left-color: #F87171;
  background: rgba(248, 113, 113, 0.07);
}

/* Lien interne texte */
.lien-cyan { color: var(--accent1); text-decoration: underline; text-underline-offset: 3px; }
.lien-cyan:hover { color: #67E8F9; }

/* Barre de progression lecture */
#barre-lecture {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  width: 0%;
  z-index: 60;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
