/* =============================================
   LE PIGEON BALADEUR — Design System
   Typographie : Syne (titres) + DM Sans (corps)
   Palette : fond #0d0d0f, accent violet #7c5cfc
   ============================================= */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* =============================================
   VARIABLES CSS — Dark mode (défaut)
   ============================================= */
:root {
  /* Fonds */
  --bg:           #0d0d0f;
  --bg-secondary: #161618;
  --bg-card:      #1c1c1f;

  /* Texte */
  --text:       #f0eff4;
  --text-muted: #8884a0;

  /* Accent violet */
  --accent:        #7c5cfc;
  --accent-hover:  #9575ff;
  --accent-subtle: rgba(124, 92, 252, 0.12);

  /* Bordures */
  --border:        #2a2830;
  --border-accent: #3d3650;

  /* Effets */
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 40px rgba(124, 92, 252, 0.2);
  --nav-bg:       rgba(13, 13, 15, 0.88);

  /* Coins arrondis */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

/* =============================================
   LIGHT MODE — classe .light sur <body>
   ============================================= */
body.light {
  --bg:           #f7f6fb;
  --bg-secondary: #eeedf5;
  --bg-card:      #ffffff;

  --text:       #18171f;
  --text-muted: #6b6880;

  --accent:        #6c4ff0;
  --accent-hover:  #5a3dd8;
  --accent-subtle: rgba(108, 79, 240, 0.08);

  --border:        #dddbe8;
  --border-accent: #c4bfe0;

  --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 40px rgba(108, 79, 240, 0.15);
  --nav-bg:       rgba(247, 246, 251, 0.88);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Transition douce lors du changement de thème */
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* =============================================
   TYPOGRAPHIE
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Tailles fluides avec clamp() : s'adaptent à la largeur d'écran */
h1 { font-size: clamp(2.4rem, 6vw, 5rem);   font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; }

p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* =============================================
   LAYOUT — Conteneur principal
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem; /* Mobile : petites marges */
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem; /* Tablette/desktop : marges plus généreuses */
  }
}

/* Le <main> laisse de la place pour la nav fixe */
main {
  flex: 1;
  padding-top: 64px;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .nav-inner { padding: 0 2rem; }
}

/* Logo */
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-logo:hover { color: var(--accent); }
.nav-logo .logo-icon { font-size: 1.2rem; }

/* Liens desktop (masqués sur mobile) */
.nav-links {
  display: none;
  gap: 0.15rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-subtle);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* Groupe de boutons à droite */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Bouton toggle dark/light */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* Bouton hamburger (mobile seulement) */
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .nav-menu-btn { display: none; }
}

/* Menu déroulant mobile */
.nav-mobile {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* =============================================
   BOUTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Bouton principal (rempli) */
.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.4);
}

/* Bouton secondaire (contour) */
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

/* Bouton icône (petit, carré) */
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.btn-icon:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* =============================================
   BADGES / TAGS
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.badge-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1; /* prend toute la hauteur restante de la card */
}

/* La description s'étire pour pousser le bouton en bas */
.card-body > p {
  flex: 1;
}

/* Le div du bouton ne rétrécit jamais */
.card-body > .mt-3:last-child {
  margin-top: auto;
  padding-top: 1rem;
  flex-shrink: 0;
}

/* Placeholder visuel quand il n'y a pas d'image */
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
}

/* Vraie image dans une card */
.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.03);
}

/* =============================================
   GRILLES RESPONSIVES
   ============================================= */

/* 2 colonnes : 1 col mobile, 2 col tablette+ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* 3 colonnes : 1 col mobile, 2 col tablette, 3 col desktop */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

@media (min-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================
   SECTIONS
   ============================================= */
section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  section { padding: 5rem 0; }
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

/* Barre décorative colorée sous chaque titre h2 */
.section-header h2::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.75rem;
}

/* =============================================
   HERO — Page d'accueil
   ============================================= */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero { padding: 7rem 0 5rem; }
}

/* Halo lumineux décoratif en arrière-plan */
.hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

/* Nom dans le hero : taille confortable, poids léger — pas un billboard */
.hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Petite ligne introductive au-dessus du titre */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

/* Partie du titre colorée en dégradé */
.hero h1 .highlight {
  background: linear-gradient(125deg, var(--accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =============================================
   HERO IDENTITY — Reveal des deux identités
   ============================================= */

.hero-handle {
  font-family: ui-monospace, 'SF Mono', 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.hero-desc {
  font-size: 1.1rem;
  max-width: 540px;
  margin-bottom: 2.25rem;
  margin-top: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* =============================================
   PAGE HEADER — Pages intérieures
   ============================================= */
.page-header {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header .badge {
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 580px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand .footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.footer-brand .footer-logo:hover { color: var(--accent); }

.footer-brand p {
  font-size: 0.9rem;
}

.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-link-icone {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  vertical-align: middle;
  line-height: 1;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================
   SEPARATEUR
   ============================================= */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  transition: background 0.3s ease;
}

/* =============================================
   UTILITAIRES
   ============================================= */
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-muted); }

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

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1        { gap: 0.5rem; }
.gap-2        { gap: 1rem; }
.items-center { align-items: center; }
.flex-1       { flex: 1; }

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

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Classe de base pour les éléments animés */
.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* Délais en cascade pour animer les éléments un par un */
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* =============================================
   SCROLL REVEAL
   Les éléments .scroll-reveal sont masqués
   jusqu'à ce que IntersectionObserver ajoute .in-view.
   Désactivé si l'utilisateur préfère moins de mouvement.
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .scroll-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   ACCESSIBILITÉ — Focus visible
   ============================================= */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================
   IFRAME jeux intégrés
   ============================================= */
.game-iframe-wrapper {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


/* =============================================
   ACCESSIBILITÉ — Variables et classes
   ============================================= */

/* Les valeurs sont pilotées par le panneau JS via setProperty sur :root */
body {
  letter-spacing: var(--a11y-letter-spacing, 0em);
  line-height: var(--a11y-line-height, 1.6);
}

/* Fond crème (#FDF6E3) — réduit la fatigue visuelle */
body.a11y-creme {
  --bg:           #FDF6E3;
  --bg-secondary: #F0E9D2;
  --bg-card:      #F7F0DC;
  --text:         #3d3221;
  --text-muted:   #7a6a52;
  --border:       rgba(61, 50, 33, 0.18);
  --border-accent:rgba(61, 50, 33, 0.3);
  --nav-bg:       rgba(253, 246, 227, 0.92);
}

/* Texte non justifié */
body.a11y-non-justifie,
body.a11y-non-justifie p,
body.a11y-non-justifie li,
body.a11y-non-justifie td,
body.a11y-non-justifie .article-body * {
  text-align: left !important;
}

/* Lignes de guidage : grille fixe ancrée au viewport (comme du papier réglé).
   --a11y-line-px est calculé en JS : fontSize × lineHeight → valeur exacte en px. */
body.a11y-lignes {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent               0px,
    transparent               var(--a11y-line-px, 25.6px),
    rgba(124, 92, 252, 0.06)  var(--a11y-line-px, 25.6px),
    rgba(124, 92, 252, 0.06)  calc(var(--a11y-line-px, 25.6px) * 2)
  );
  background-attachment: fixed;
}
body.a11y-creme.a11y-lignes {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent              0px,
    transparent              var(--a11y-line-px, 25.6px),
    rgba(160, 120, 40, 0.1)  var(--a11y-line-px, 25.6px),
    rgba(160, 120, 40, 0.1)  calc(var(--a11y-line-px, 25.6px) * 2)
  );
  background-attachment: fixed;
}

/* Largeur de colonne (pilotée via JS sur .container) */
body.a11y-col .container {
  max-width: var(--a11y-col-width, 1200px);
}

/* =============================================
   PANNEAU ACCESSIBILITÉ
   ============================================= */

.a11y-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.a11y-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.06);
  box-shadow: 0 4px 24px rgba(124, 92, 252, 0.2);
}

.a11y-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.a11y-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.a11y-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 100vw);
  z-index: 9999;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.a11y-panel.open { transform: translateX(0); }

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.a11y-panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1;
}
.a11y-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
}
.a11y-close:hover {
  background: var(--border);
  color: var(--text);
}

.a11y-body {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow-y: auto;
}

.a11y-section-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

/* Polices */
.a11y-font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.a11y-font-btn {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  text-align: left;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.a11y-font-btn:hover { border-color: var(--border-accent); }
.a11y-font-btn.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

/* Sliders */
.a11y-slider-row { display: flex; flex-direction: column; gap: 0.45rem; }
.a11y-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  color: var(--text);
}
.a11y-slider-val {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
input[type="range"].a11y-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--border-accent);
  outline: none;
  cursor: pointer;
}
input[type="range"].a11y-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}
input[type="range"].a11y-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }
input[type="range"].a11y-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* Toggles */
.a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.a11y-toggle-info { display: flex; flex-direction: column; gap: 0.2rem; }
.a11y-toggle-label { font-size: 0.85rem; color: var(--text); }
.a11y-toggle-desc  { font-size: 0.72rem; color: var(--text-muted); }

.a11y-switch {
  flex-shrink: 0;
  width: 38px;
  height: 21px;
  border-radius: 11px;
  background: var(--border-accent);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.a11y-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.a11y-switch.on { background: var(--accent); }
.a11y-switch.on::after { transform: translateX(17px); }

/* Footer */
.a11y-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.a11y-reset {
  width: 100%;
  padding: 0.55rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.a11y-reset:hover { border-color: var(--text-muted); color: var(--text); }

/* =============================================
   BOUTON RETOUR EN HAUT
   ============================================= */
.retour-haut {
  position: fixed;
  bottom: 5.5rem; /* Au-dessus du bouton a11y (1.5rem + 44px ≈ 4.25rem) */
  right: 1.5rem;
  z-index: 9996;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease,
              background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.retour-haut.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.retour-haut:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.2);
}
