body.theme-sombre {
  --main-bg: #181c1f;
  --bandeau-bg: linear-gradient(90deg, #23272b 0%, #1976d2 100%);
  --footer-bg: var(--bandeau-bg);
  --footer-fg: #fff;
  --accent: #168beb;
  --accent-hover: #1976d2;
  --card-bg: #23272bcc;
  --text: #f4f4f4;
  --shadow: 0 4px 24px rgba(0,0,0,0.2);
  background: var(--main-bg);
  color: var(--text);
  --lang-dropdown-bg: #23272b;   /* fond 100% opaque, sombre */
  --lang-dropdown-text: #e7f0ff;
  --lang-dropdown-border: #23272b;
  --lang-dropdown-hover: #23272b;
  /* Footer + chip (sombre) */
  --footer-bg: var(--bandeau-bg);
  --footer-fg: #fff;
  --footer-chip-bg: rgba(13, 27, 53, .50);    /* bleu marine translucide */
  --footer-chip-fg: #eaf2ff;                  /* texte clair */
  --footer-chip-border: rgba(255,255,255,.22);
}

body.theme-clair {
  --main-bg: #e3f2fd;
  --bandeau-bg: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
  --accent: #2989e9;
  --accent-hover: #1565c0;
  --card-bg: #ffffffee;
  --text: #222;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  background: var(--main-bg);
  color: var(--text);
  --lang-dropdown-bg: #ffffff;   /* fond 100% opaque */
  --lang-dropdown-text: #222222; /* couleur texte */
  --lang-dropdown-border: #c7c7c7;
  --lang-dropdown-hover: #e5e7eb;
  /* Footer + chip (clair) */
  --footer-bg: var(--bandeau-bg);
  --footer-fg: #fff;
  --footer-chip-bg: rgba(255,255,255,.92);    /* clair mais pas 100% */
  --footer-chip-fg: #0d2545;                  /* texte foncé lisible */
  --footer-chip-border: rgba(0,0,0,.12);
}

/* ===== Thème BLEU ===== */
body.theme-bleu {
  /* variables “globales” (mêmes noms que tes autres thèmes) */
  --main-bg: #0b1220; /* fond page */
  --bandeau-bg: linear-gradient(90deg, #0e1a2b 0%, #1976d2 100%);
  --footer-bg: var(--bandeau-bg);
  --footer-fg: #fff;
  --accent: #4aa3ff;        /* bleu principal (boutons, liens) */
  --accent-hover: #1f6fe0;  /* survol/actif */
  --card-bg: #101a33cc;     /* cartes */
  --text: #e7f0ff;          /* texte principal */
  --shadow: 0 4px 24px rgba(0,0,0,0.35);

  /* menus langue/param (tu les utilises déjà) */
  --lang-dropdown-bg: #0f1830;
  --lang-dropdown-text: #e7f0ff;
  --lang-dropdown-border: #20314e;
  --lang-dropdown-hover: #1a2a4a;

  background: var(--main-bg);
  color: var(--text);
  /* Footer + chip (bleu) */
  --footer-bg: var(--bandeau-bg);
  --footer-fg: #fff;
  --footer-chip-bg: rgba(11, 24, 45, .50);    /* ton bleu nuit */
  --footer-chip-fg: #e7f0ff;
  --footer-chip-border: rgba(255,255,255,.22);
}

/* Mise en évidence d’option active (cohérente avec tes règles existantes) */
.theme-bleu .drawer-opts .opt-btn[data-theme="theme-bleu"]{
  background: var(--accent);
  color:#fff;
  border-color: rgba(0,0,0,0.2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent) inset;
  font-weight: 700;
}
/* Harmoniser la couleur du menu Paramètres avec celle du menu Langue — Thème BLEU */
body.theme-bleu .settings-panel{
  background: var(--lang-dropdown-bg);
  color: var(--lang-dropdown-text);
  border: 1px solid var(--lang-dropdown-border);
}
/* (optionnel) si tu veux forcer aussi le menu Langue sous thème bleu */
body.theme-bleu .lang-dropdown{
  background: var(--lang-dropdown-bg);
  color: var(--lang-dropdown-text);
  border-color: var(--lang-dropdown-border);
}
body.theme-bleu .lang-dropdown .lang-option:hover{
  background: var(--lang-dropdown-hover);
}


:root {
  --main-bg: #e3f2fd;
  --bandeau-bg: linear-gradient(90deg, #4fc3f7 0%, #1976d2 100%);
  --accent: #1976d2;
  --accent-hover: #1565c0;
  --card-bg: #ffffffee;
  --text: #222;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Segoe UI',Arial, sans-serif;
  margin: 0;
  background: var(--main-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bandeau {
  width: 100%;
  background: var(--bandeau-bg);
  color: #fff;
  padding: 1.2em 0 0.5em 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 20;
}

.bandeau-title {
  font-size: 2.1em;
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  margin-bottom: 0.5em;
}

.bandeau .logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px #0006;
}

/* Logo + anneau de contraste dans le header */
.bandeau .bandeau-title .logo{
  height: 56px;            /* ajuste la taille si besoin */
  width: auto;
  padding: 4px;            /* espace pour que le badge soit visible */
  border-radius: 10px;     /* coins arrondis (ou 50% si tu veux rond) */
  background: rgb(233, 249, 250);     /* halo sombre */
  outline: 1px solid rgba(193, 233, 252, 0.5);    /* liseré clair */
  box-shadow: 0 2px 8px rgba(0,0,0,.35);       /* ombre douce */
  image-rendering: auto;    /* mets pixelated si pixel-art */
}
@media (max-width:640px){
  .bandeau .bandeau-title .logo{ height: 44px; }
}

.bandeau nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2em;
}

.bandeau nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  padding: 0.5em 1.2em;
  border-radius: 25px;
  transition: background 0.2s, color 0.2s;
}

.bandeau nav a.active,
.bandeau nav a:hover {
  background: var(--accent);
  color: #fff;
}

main {
  flex: 1;
  display: block;
  padding: 2em 1em;
  background: none;
}

.page {
  background: var(--card-bg);
  color: var(--text);
  padding: 2em 2.5em;
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: 320px;
  max-width: 1140px; /* plus large qu'avant */
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}

footer {
  background: var(--footer-bg, var(--bandeau-bg));
  color: var(--footer-fg, #fff);
  text-align: center;
  padding: 1em 0;
  font-size: 0.95em;
  margin-top: 2em;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  font-weight: bold;
}

/* Menu paramètres en haut à gauche */
/* Le bloc “langue + ⚙” est désormais ANCRÉ dans le bandeau, à droite */
.settings-menu{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);   /* centre vertical */
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-toggle {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6em;
  cursor: pointer;
  box-shadow: 0 2px 8px #0004;
  transition: background 0.2s;
}

.settings-toggle:hover {
  background: var(--accent-hover);
  color: #fff;
}

.settings-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  background: #fff;
  color: #222;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 1.2em 1.5em 1em 1.5em;
  min-width: 220px;
  font-size: 1em;
}

.settings-menu.open .settings-panel {
  display: block;
}

/* Tailles de police */
body.font-normal { font-size: 1em; }
body.font-grand { font-size: 1.2em; }
body.font-tres-grand { font-size: 1.4em; }

.theme-btns, .font-btns {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}
.theme-btn, .font-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.4em 1em;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s, color 0.2s;
}
.theme-btn.active, .font-btn.active,
.theme-btn:hover, .font-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  font-weight: bold;
  outline: 2px solid var(--accent-hover);
}

.underline {
  text-decoration: underline;
  text-decoration-color: #5699d1; /* couleur par défaut */
}

/* Couleur soulignement pour le thème sombre */
body.theme-sombre .underline {
  text-decoration-color: #69b5d8; /* bleu clair pour sombre */
}

.presentation-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.5em 2em;
  margin: 2em 0 1.5em 0;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.7s;
}

.cards-container {
  display: flex;
  flex-wrap: wrap; /* ✅ autorise le retour à la ligne */
  gap: 1px 20px; /* si tu veux garder un espacement */
}

.cards-container .presentation-card {
  flex: 1;
  min-width: 300px;
  max-width: 380px; /* limite de largeur */
}

.presentation-card h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.3em;
}

.presentation-card p {
  margin-bottom: 1.2em;
}

.card-buttons {
  display: flex;
  gap: 1em;
}

.card-btn,
button.card-btn {
  display: inline-block;
  padding: 0.65em 1.4em; /* taille intermédiaire */
  font-size: 1.05em;     /* texte légèrement plus grand */
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #0002;
}

/* Bouton actif (filtre sélectionné) */
button.card-btn.active,
.card-btn.active {
  background: #1565c0; /* bleu plus foncé */
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.card-btn:hover,
button.card-btn:hover {
  background: var(--accent-hover);
}

.card-btn.curseforge {
  background: #f16436;
}
.card-btn.curseforge:hover {
  background: #d44a1e;
}

.card-btn.wiki {
  background: var(--accent);
}
.card-btn.wiki:hover {
  background: var(--accent-hover);
}
/* Couleur soulignement pour le thème clair */
body.theme-clair .underline {
  text-decoration-color: #0b4177; /* bleu foncé pour clair */
}

.presentation-card img {
  max-width: 200px; /* Largeur maximale */
  height: auto;     /* Garde les proportions */
  display: block;   /* Évite l'alignement bizarre avec le texte */
  margin: 0 auto 1em auto; /* Centrage + espace en bas */
}

.page-layout {
  display: flex;
  gap: 2em;
}

.side-menu {
  width: 200px;
  background: var(--card-bg);
  padding: 1em;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.side-menu h3 {
  margin-top: 0;
  font-size: 1.2em;
  margin-bottom: 1em;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li {
  margin-bottom: 0.5em;
}

.side-menu a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.side-menu a:hover {
  color: var(--accent-hover);
}

.page-content {
  flex: 1;
}

.side-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.side-buttons .card-btn {
  color: #fff !important; /* texte toujours blanc */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4); /* petite ombre pour lisibilité */
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1em;
}

.small-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1em;
  animation: fadeIn 0.4s;
}

.small-card h4 {
  margin: 0 0 0.5em 0;
}

.small-card p {
  margin: 0;
  font-size: 0.9em;
}

.search-bar {
  width: calc(100% - 1em); /* empêche le dépassement */
  padding: 0.5em;
  margin: 0 0 1em 0; /* marge en bas seulement */
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 1em;
  background: var(--card-bg);
  color: var(--text-color);
  transition: all 0.2s ease;
  box-sizing: border-box; /* compte le padding dans la largeur */
}

/* Wrapper + dropdown de suggestions pour la recherche */
.search-wrap { position: relative; }
.search-suggest{
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 260px; overflow: auto; z-index: 5;
  display: none;
}
.search-suggest.open{ display:block; }
.search-suggest button{
  display:block; width:100%; text-align:left;
  padding: 8px 10px; border:0; background:transparent; cursor:pointer;
}
.search-suggest button:hover, .search-suggest button[aria-selected="true"]{
  background: var(--accent); color: #fff;
}

.search-bar:focus {
  outline: none;
  border-color: var(--accent-hover);
  box-shadow: 0 0 8px var(--accent-hover);
}

.card-detail {
  background: var(--card-bg);
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s;
}

.card-detail h3 {
  margin-top: 0;
}
.top-nav {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.top-nav a {
  text-decoration: none;
  padding: 0.5em 1em;
  background: var(--accent);
  color: white;
  border-radius: 8px;
}

.top-nav a:hover {
  background: var(--accent-hover);
}

.patch-card {
  background: var(--card-bg);
  padding: 1em;
  margin-bottom: 1em;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.patch-card h3 {
  margin: 0;
}
.patch-detail {
  margin-top: 0.5em;
}

.discord-logo {
  text-align: center;
  margin-bottom: 0.5em;
}

.discord-logo a {
  display: inline-block;
  background-color: rgb(238, 238, 238);
  padding: 8px;
  border-radius: 50%;
}

.discord-logo img {
  width: 40px;
  height: 40px;
  display: block;
}

.patch-list {
  display: flex;
  flex-direction: column;
  gap: 0.8em; /* espace vertical entre chaque patch note */
}

.patch-entry {
  background: var(--card-bg);
  padding: 0.8em;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.patch-entry:hover {
  background: var(--accent);
  color: white;
}

.patch-item {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1em;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.patch-item h3 {
  margin: 0;
}

.patch-detail {
  display: none;
  margin-top: 0.5em;
}

.settings-section {
  margin-top: 1em;
}

.settings-section label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
}

.settings-section select {
  width: 100%;
  padding: 0.5em;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1em;
  cursor: pointer;
  box-shadow: var(--shadow);
  appearance: none; /* enlève le style natif */
}

.settings-section select:focus {
  outline: none;
  background: var(--accent-hover);
}

.dev-status {
  background: var(--card-bg);
  padding: 1em;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  width: 100%;
  margin-bottom: 1em; /* espace sous la barre */
}

.progress-bar {
  background: #ccc;
  border-radius: 5px;
  overflow: hidden;
  height: 20px;
  width: 100%; /* pleine largeur */
}

.progress-fill {
  background: var(--accent);
  height: 100%;
  width: 0;
  transition: width 0.4s ease;
}


.dev-status-percent {
  margin-top: 0.5em;
}

.update-panel {
  background: var(--card-bg);
  padding: 1.2em;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1em;
}
.update-panel h3 {
  margin-top: 0;
}

.progress-bar {
  background-color: #ccc;
  border-radius: 8px;
  overflow: hidden;
  height: 20px;
  margin-bottom: 10px;
}

.progress-fill {
  background-color: var(--accent-color);
  height: 100%;
  color: white;
  text-align: center;
  line-height: 20px;
}

/* Panneau Statut */
.update-panel {
  background: var(--card-bg);
  padding: 1.2em;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1em;
}

/* Badges d'état */
.status-badge {
  display: inline-block;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8em;
}
.status-badge.stable { background: #2e7d32; } /* vert */
.status-badge.beta   { background: #ef6c00; } /* orange */
.status-badge.dev    { background: #c62828; } /* rouge */

/* Mini barre de progression dans le panneau */
.status-progress {
  background: #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  height: 18px;
  margin: 0.5em 0 0.8em 0;
}
.status-progress .fill {
  background: var(--accent);
  height: 100%;
  width: 0;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9em;
}
.update-panel h3 {
  margin: 0 0 0.4em 0;
}
.update-panel ul {
  margin: 0.4em 0 0 1.2em;
}

.status-updated {
    margin-top: 12px;
    font-size: 0.9em;
    color: #bbb;
    font-style: italic;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-updated-inline {
  font-size: 0.9em;
  color: #666;
}

/* Carte “Nous aider” en pleine largeur dans la grille de l’accueil */
#accueil .cards-container .help-card {
  grid-column: 1 / -1;  /* pleine largeur, bien alignée */
  margin: 0;            /* pas de marge parasite */
}


/* Alignement des deux boutons de la carte */
.help-card .help-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

/* Optionnel : un soupçon de présence visuelle */
.help-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1em;
  animation: fadeIn 0.4s;
}

.full-width-card {
    grid-column: 1 / -1; /* prend toute la largeur */
    margin-top: 10px; /* espace réduit au-dessus */
    margin-bottom: 10px; /* pas d’espace en trop en dessous */
}

.full-width-card {
    grid-column: 1 / -1;
    margin-top: 10px;
    margin-bottom: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#accueil .cards-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; /* même espacement horizontal/vertical */
}

#accueil .cards-container .presentation-card {
  width: auto;      /* important si une width/flex existait */
  max-width: 100%;
}

.card-btn.btn-orange {
  background-color: rgb(243, 167, 69) !important;
  color: white !important;
}

.card-btn.btn-vert {
  background-color: rgb(40, 145, 40) !important;
  color: white !important;
}

.card-btn.btn-rouge {
  background-color: rgb(209, 50, 50) !important;
  color: white !important;
}

#langSelect option {
  font-size: 14px; /* taille générale du texte */
}

#langSelect option::first-letter {
  font-size: 16px; /* la taille de l'emoji */
}

#langSelect {
  font-size: 14px; /* taille du texte global */
  padding: 4px;
}

.lang-menu {
  display: inline-block;
  position: relative;
}

.lang-toggle {
  background: transparent;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  padding: 5px;
}

.lang-dropdown div {
  padding: 5px 10px;
  cursor: pointer;
}

.lang-dropdown div:hover {
  background: var(--hover-bg);
}

.flag-icon {
  width: 16px;
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Liste Patch Notes : vertical, espacement léger */
#patchnotes .patch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* Liste déroulante dès le départ */
  max-height: 320px; /* correspond à environ 4 patchnotes */
  overflow-y: auto;
  padding-right: 5px;
}

/* (optionnel) Scrollbar discrète + thème */
#patchnotes .patch-list::-webkit-scrollbar { width: 8px; }
#patchnotes .patch-list::-webkit-scrollbar-track { background: transparent; }
body.theme-clair #patchnotes .patch-list::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.3); border-radius: 4px; }
body.theme-sombre #patchnotes .patch-list::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.3); border-radius: 4px; }

#patchnotes .patch-list::-webkit-scrollbar {
  width: 8px;
}
#patchnotes .patch-list::-webkit-scrollbar-track {
  background: transparent;
}


/* Chaque entrée : carte compacte cliquable */
#patchnotes .patch-entry {
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between; /* titre à gauche, date à droite (si présente) */
}

/* Titre (mod + version) */
#patchnotes .patch-entry .pe-title {
  font-weight: 700;
}

/* Date optionnelle, plus discrète */
#patchnotes .patch-entry .pe-date {
  font-size: 0.9em;
  opacity: 0.8;
}

/* Bouton retour en style carte */
#patchnotes .card-detail .back-btn {
  margin-bottom: 10px;
  display: inline-block;
}

/* ===== Langue (bouton + dropdown) ===== */
.lang-selector { position: relative; display: inline-block; }

.lang-button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-color, #2989e9);
  border-radius: 8px;
  background: var(--button-bg, #2989e9);
  color: var(--text-color, #111);
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,0.08));
  cursor: pointer;
}
.lang-button:hover { background: var(--button-hover-bg, #1976d2); }
.lang-button img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lang-button .caret {
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}

/* Dropdown propre, sous le bouton */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;             /* ✅ aligne le menu sur le bord droit du bouton */
  left: auto;           /* ✅ évite de l’aligner sur la page */
  min-width: 200px;
  background: var(--lang-dropdown-bg);   /* ✅ fond OPAQUE défini plus haut */
  color: var(--lang-dropdown-text);
  border: 1px solid var(--lang-dropdown-border);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,0.12));
  padding: 6px;
  display: none;
  z-index: 1000;
}
.lang-selector.open .lang-dropdown { display: block; }

.lang-dropdown .lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0; color: inherit; text-align: left;
  border-radius: 8px; cursor: pointer;
}
.lang-dropdown .lang-option:hover {
  background: var(--lang-dropdown-hover);
}
.lang-dropdown .lang-option img { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }

/* Harmoniser la couleur du menu Paramètres avec celle du menu Langue */
body.theme-clair .settings-panel {
  background: var(--lang-dropdown-bg);
  color: var(--lang-dropdown-text);
  border: 1px solid var(--lang-dropdown-border);
}

body.theme-sombre .settings-panel {
  background: var(--lang-dropdown-bg);
  color: var(--lang-dropdown-text);
  border: 1px solid var(--lang-dropdown-border);
}

.mc-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 6px;
  font-size: 0.85em;
  border-radius: 999px;
  background: rgba(25, 118, 210, 0.12);
  color: var(--text);
  border: 1px solid rgba(25,118,210,0.35);
  vertical-align: baseline;
}
body.theme-sombre .mc-badge {
  background: rgba(40, 150, 255, 0.18);
  border-color: rgba(40,150,255,0.45);
}

/* barre outils */
.patch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.patch-toolbar input[type="search"],
.patch-toolbar select {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--lang-dropdown-border, #c7c7c7);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,0.06));
}
.patch-toolbar input[type="search"] { flex: 1 1 220px; min-width: 180px; }

.patch-see-more {
  margin: 10px auto 0 auto;
  display: block;
  padding: 0.5em 1.2em;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}
.patch-see-more:hover {
  background: var(--accent-hover);
}

/* Applique un contour bleu (comme la barre de recherche des mods) */
/* Patchnotes: champs de la barre outils */
#patchnotes #patchSearch,

#patchnotes #patchStageFilter:focus{
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Focus = bleu un peu plus fort, comme sur les mods */
#patchnotes #patchSearch:focus
/* Patchnotes — champs de la toolbar : style commun */
#patchnotes .patch-toolbar input[type="search"],
#patchnotes .patch-toolbar select {
  border: 2px solid var(--accent);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,0.06));
  outline: none;
}

/* Flèche custom + même espacement pour TOUTES les <select> */
#patchnotes .patch-toolbar select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    calc(100% - 2.2em) 50%;
  background-size: 6px 6px, 6px 6px, 1px 2.4em;
  background-repeat: no-repeat;
  padding-right: 2.4em; /* place pour la flèche */
}

/* Effet focus identique */
#patchnotes .patch-toolbar input[type="search"]:focus,
#patchnotes .patch-toolbar select:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Placeholder un peu adouci */
#patchnotes #patchSearch::placeholder {
  color: color-mix(in srgb, var(--text) 60%, transparent);
  opacity: 1;
}

/* Grille des cartes défilante pour chaque mod */
#mod1 .cards-grid,
#mod2 .cards-grid {
  max-height: 420px;       /* ≈ 2 à 3 rangées selon la taille des cartes */
  overflow-y: auto;        /* molette active */
  padding-right: 6px;      /* petit espace pour la scrollbar */
}

/* Scrollbar discrète, adaptative au thème */
#mod1 .cards-grid::-webkit-scrollbar,
#mod2 .cards-grid::-webkit-scrollbar {
  width: 8px;
}
#mod1 .cards-grid::-webkit-scrollbar-track,
#mod2 .cards-grid::-webkit-scrollbar-track {
  background: transparent;
}
body.theme-clair #mod1 .cards-grid::-webkit-scrollbar-thumb,
body.theme-clair #mod2 .cards-grid::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.3);
  border-radius: 4px;
}
body.theme-sombre #mod1 .cards-grid::-webkit-scrollbar-thumb,
body.theme-sombre #mod2 .cards-grid::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.3);
  border-radius: 4px;
}

/* (Optionnel) hauteur un peu plus faible sur mobile */
@media (max-width: 700px) {
  #mod1 .cards-grid,
  #mod2 .cards-grid {
    max-height: 320px;
  }
}

/* ===== Statut (mod1/mod2) ===== */
.update-panel {
  display: none;
  background: var(--card-bg, rgba(0,0,0,0.06));
  border: 1px solid var(--lang-dropdown-border, #374151);
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}

.status-header {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
  font-size: 1rem; margin-bottom: 8px;
}
.status-header .status-updated {
  opacity: 0.8; font-size: 0.92em;
}

.status-desc { margin: 6px 0 12px 0; }

.progress-wrap { margin: 10px 0 12px 0; }
.progress-label { margin-bottom: 6px; }

.progress-bar {
  width: 100%; height: 10px; border-radius: 999px;
  background: rgba(25,118,210,0.15);
  overflow: hidden;
  border: 1px solid rgba(25,118,210,0.35);
}
.progress-bar > span {
  display: block; height: 100%;
  width: 0%;
  background: var(--accent, #1976d2);
  transition: width 300ms ease;
}

.features-wrap h4 { margin: 10px 0 6px 0; font-size: 1rem; }
.features { margin: 0; padding-left: 18px; }

/* ==========================================================================
   SECTION MOBILE & TABLETTE — VERSION NETTOYÉE
   Place this at the very bottom of styles.css
   ========================================================================== */

/* ---------- Variables ---------- */
:root { --accent: var(--c-accent, #0ea5e9); }

/* ---------- Drawer (base, hors media query) ---------- */
.drawer{ position:fixed; inset:0; z-index:1200; pointer-events:none; }
.drawer[aria-hidden="true"]{ display:block; }
.drawer-backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.45); opacity:0; transition:opacity .2s;
}
.drawer-panel{
  position:absolute; top:0; right:0; width:min(86vw, 360px); height:100%;
  background:#111827; color:#e5e7eb;
  box-shadow:-8px 0 24px rgba(0,0,0,.4);
  transform:translateX(100%); transition:transform .25s;
  display:flex; flex-direction:column; gap:12px; padding-bottom:12px;
}
.drawer.open{ pointer-events:auto; }
.drawer.open .drawer-backdrop{ opacity:1; }
.drawer.open .drawer-panel{ transform:none; }

.theme-clair .drawer-panel{ background:#f8fafc; color:#0f172a; }

.drawer-header{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; }
.drawer-title{ font-weight:700; font-size:1.05rem; }
.drawer-close{ border:0; background:transparent; color:inherit; font-size:1.4rem; cursor:pointer; }
.drawer-sep{ height:1px; border:0; background:rgba(255,255,255,.12); margin:6px 0; }
.theme-clair .drawer-sep{ background:rgba(15,23,42,.12); }

.drawer-nav{ display:flex; flex-direction:column; padding:0 14px; gap:8px; }
.drawer-link{
  padding:12px 14px; min-height:42px; display:flex; align-items:center;
  border-radius:12px; text-decoration:none;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08); color:#f3f4f6;
  transition:background .15s, border-color .15s, transform .05s;
}
.drawer-link:hover{ background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.22); }
.drawer-link:active{ transform:translateY(1px); }
.theme-clair .drawer-link{
  background:rgba(15,23,42,.06); border-color:rgba(15,23,42,.12); color:#0f172a;
}
.theme-clair .drawer-link:hover{ background:rgba(15,23,42,.1); border-color:rgba(15,23,42,.18); }

.drawer-section{ padding:6px 14px 12px; }
.drawer-label{ opacity:.9; font-size:.9rem; margin:6px 0 8px; }
.drawer-row{ display:grid; grid-template-columns:1fr; gap:8px; margin:10px 0; }
.drawer-sub{ opacity:.9; font-size:.9rem; }
.drawer-opts{ display:flex; gap:10px; flex-wrap:wrap; }

.drawer-lang{ display:flex; gap:10px; flex-wrap:wrap; }
.drawer-lang-btn,
.drawer-opts .opt-btn,
.drawer-action{
  padding:8px 12px; min-height:40px;
  border-radius:12px; border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06); color:#e5e7eb;
  cursor:pointer;
  transition:background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.drawer-lang-btn:hover,
.drawer-opts .opt-btn:hover,
.drawer-action:hover{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.24); }
.drawer-lang-btn:active,
.drawer-opts .opt-btn:active,
.drawer-action:active{ transform:translateY(1px); }
.drawer-lang-btn:focus-visible,
.drawer-opts .opt-btn:focus-visible,
.drawer-action:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.drawer-lang-btn img{ width:18px; height:18px; border-radius:3px; }

.theme-clair .drawer-lang-btn,
.theme-clair .drawer-opts .opt-btn,
.theme-clair .drawer-action{
  background:rgba(15,23,42,.04); border-color:rgba(15,23,42,.14); color:#0f172a;
}
.theme-clair .drawer-lang-btn:hover,
.theme-clair .drawer-opts .opt-btn:hover,
.theme-clair .drawer-action:hover{
  background:rgba(15,23,42,.08); border-color:rgba(15,23,42,.22);
}

/* Bouton hamburger (mobile visible) */
.mobile-menu-btn{
  display:none; margin-left:auto; border:1px solid rgba(255,255,255,.24);
  border-radius:10px; padding:8px 10px; font-size:1.2rem;
  background:rgba(255,255,255,.14); color:#fff; cursor:pointer;
}
.mobile-menu-btn:hover{ background:rgba(255,255,255,.22); }
.theme-clair .mobile-menu-btn{
  background:rgba(15,23,42,.06); border-color:rgba(15,23,42,.14); color:#0f172a;
}
.theme-clair .mobile-menu-btn:hover{ background:rgba(15,23,42,.12); }

/* ---------- Desktop overrides (assure 2 colonnes sur l'accueil) ---------- */
@media (min-width: 769px){
  #accueil .mods-grid { display: contents !important; }
}

/* ---------- Tablettes (<= 992px) ---------- */
@media (max-width: 992px){
  /* grilles cartes : 2 colonnes */
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-detail, .update-panel { margin-top: 12px; }
}

/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px){
  /* entête + nav */
  .bandeau { position: sticky; top: 0; z-index: 1000; }
  .bandeau .bandeau-title { font-size: 1rem; gap: .5rem; }
  .bandeau .bandeau-title .logo { height: 40px; }
  .mobile-menu-btn{ display:inline-flex; align-items:center; justify-content:center; }
  .bandeau nav { display: none; } /* on utilise le drawer en mobile */

  /* page padding */
  .page { padding: 12px; }

  /* accueil : cartes mods en colonne */
  #accueil .mods-grid{
    display:grid; grid-template-columns:1fr; gap:12px;
  }
  #accueil .mods-grid img{
    width:100%; height:auto; max-height:180px; object-fit:cover; border-radius:10px;
  }

  /* menus latéraux des pages mod : barre horizontale défilable */
  .side-buttons{
    display:flex; gap:8px; overflow-x:auto; white-space:nowrap; padding:8px 0;
  }
  .side-buttons .card-btn{ flex:0 0 auto; }

  /* barres de recherche */
  .search-bar{ width:100%; box-sizing:border-box; }

  /* grille des cartes : 1 colonne */
  .cards-grid{ grid-template-columns:1fr; gap:10px; }

  /* patchnotes : liste en colonne */
  #patchnotes .patch-list{ flex-direction:column; gap:10px; }

  /* images fluides dans détails/statut */
  .card-detail img, .update-panel img { max-width:100%; height:auto; display:block; }
}

/* =========================
   Pages MOD : layout desktop/mobile (baseline simple)
   ========================= */

/* Desktop : 2 colonnes (menu à gauche + contenu) */
@media (min-width: 769px){
  #mod1 .page-layout,
  #mod2 .page-layout{
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: start;
  }
}

/* Mobile : empilement simple */
@media (max-width: 768px){
  /* on empile le menu et le contenu */
  #mod1 .page-layout,
  #mod2 .page-layout{
    display: block;
  }

  /* menu au-dessus, marge dessous */
  #mod1 .side-menu,
  #mod2 .side-menu{
    margin: 0 0 12px 0;
    width: 100%;
  }

  /* recherche pleine largeur */
  #mod1 .side-menu .search-bar,
  #mod2 .side-menu .search-bar{
    width: 100%;
    box-sizing: border-box;
  }

  /* catégories : défilement horizontal (pratique si ça déborde) */
  #mod1 .side-buttons,
  #mod2 .side-buttons{
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
  }
  #mod1 .side-buttons .card-btn,
  #mod2 .side-buttons .card-btn{
    flex: 0 0 auto;
  }

  /* grille : 1 colonne en mobile */
  #mod1 .cards-grid,
  #mod2 .cards-grid{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* détails/statut : images fluides */
  #mod1 .card-detail img, #mod2 .card-detail img,
  #mod1 .update-panel img, #mod2 .update-panel img{
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* =========================
   PATCH NOTES — desktop / mobile
   ========================= */

/* Desktop : 2 colonnes (menu à gauche + contenu) */
@media (min-width: 769px){
  #patchnotes .page-layout{
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: start;
  }
}

/* Mobile : menu au-dessus, filtres full-width, liste en colonne */
@media (max-width: 768px){
  /* Empilement simple */
  #patchnotes .page-layout{ display: block; }

  /* Menu latéral compact au-dessus */
  #patchnotes .side-menu{
    margin: 0 0 12px 0;
    width: 100%;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(6px);
  }
  .theme-clair #patchnotes .side-menu{
    background: rgba(15,23,42,.06);
    border-color: rgba(15,23,42,.12);
  }
  /* (option) cacher le titre du panneau pour gagner de la place */
  #patchnotes .side-menu h3{ display:none; }

  /* Boutons : défilement horizontal si ça déborde */
  #patchnotes .side-buttons{
    display:flex; gap:8px; overflow-x:auto; white-space:nowrap; padding:6px 2px;
    scrollbar-width:none; -ms-overflow-style:none;
  }
  #patchnotes .side-buttons::-webkit-scrollbar{ display:none; }
  #patchnotes .side-buttons .card-btn{ flex:0 0 auto; }

  /* Filtres à droite (search + 2 selects) → full width en colonne */
  /* on couvre plusieurs noms de classes possibles */
  #patchnotes .patch-filters,
  #patchnotes .filters,
  #patchnotes .filters-row{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  /* Search full width */
  #patchnotes input[type="search"],
  #patchnotes input[type="text"].search-bar,
  #patchnotes .search-bar{
    width: 100%; box-sizing: border-box;
    height: 38px; border-radius: 10px;
  }

  /* Les 2 <select> (versions + tri) full width */
  #patchnotes select{
    width: 100%; height: 38px; border-radius: 10px;
  }

  /* Liste : une carte par ligne */
  #patchnotes .patch-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  /* (si la carte a une classe .patch ou .pn-card) */
  #patchnotes .patch-list .patch,
  #patchnotes .patch-list .pn-card{
    width: 100%;
  }

  /* Détail & bouton retour : marges + images fluides */
  #patchnotes .card-detail{ margin-top: 12px; }
  #patchnotes .card-detail img{ max-width:100%; height:auto; display:block; }
  #patchnotes .back-btn{ width: 100%; max-width: 280px; }
}

/* =========================
   Mobile: empêcher tout dépassement horizontal
   ========================= */

/* 1) Tous les calculs en border-box (évite les +2px qui débordent) */
*, *::before, *::after { box-sizing: border-box; }

/* 2) Le viewport ne défile jamais en X */
html, body { max-width: 100%; overflow-x: hidden; }

/* 3) Conteneurs principaux = jamais plus larges que l’écran */
@media (max-width: 768px){
  .bandeau { max-width: 100vw; overflow-x: clip; }
  .page, .page-layout, .cards-container,
  #accueil .mods-grid,
  #mod1 .side-menu, #mod2 .side-menu,
  #mod1 .cards-grid, #mod2 .cards-grid,
  #patchnotes .side-menu, #patchnotes .patch-list,
  #patchnotes .filters, #patchnotes .patch-filters, #patchnotes .filters-row {
    width: 100%;
    max-width: 100vw;
    margin-right: 0;
  }

  /* 4) Les médias ne dépassent pas */
  img, video, canvas, iframe { max-width: 100%; height: auto; display: block; }

  /* 5) Inputs / selects / boutons ne “poussent” pas le layout */
  input[type="text"], input[type="search"], select, button {
    max-width: 100%;
  }

  /* 6) Boutons du panneau latéral = largeur conteneur (sécurité) */
  .side-menu .card-btn { width: 100%; display: block; }
}

/* =========================
   Fix mobile : cacher le panneau desktop + plein large sur Accueil
   ========================= */
@media (max-width: 768px){
  /* 1) Cacher le menu paramètres/langue de la version desktop */
  #settingsMenu{ display: none !important; }

  /* 2) Accueil : forcer les cartes à prendre 100% de la largeur */
  #accueil .cards-container{
    display: block !important;           /* annule la grille 2 colonnes desktop */
    grid-template-columns: none !important;
    width: 100%;
    max-width: 100vw;
  }
  #accueil .mods-grid{
    display: block !important;           /* un simple flux vertical suffit */
    width: 100%;
  }
  #accueil .presentation-card{
    width: 100%;
    margin: 0 0 12px 0;                  /* espace entre les cartes */
  }
}

@media (max-width: 768px){
  .drawer-lang-btn img { width: 22px; height: 22px; } /* tu peux mettre 20–24px */
}

/* taille standard côté desktop */
.lang-button img,
.lang-option img { width: 18px; height: 18px; }

/* ====== Mobile: état ACTIF visible dans le drawer (taille, langue, etc.) ====== */
@media (max-width: 768px){
  /* Boutons d’options (ex: Taille : Normale/Grande/Très grande) */
  .drawer-opts .opt-btn.active,
  .drawer-opts .opt-btn[aria-pressed="true"]{
    background: var(--accent);
    color: #fff;
    border-color: color-mix(in srgb, var(--accent) 80%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent) inset;
    font-weight: 700;
  }

  /* Boutons de langue (FR/EN) */
  .drawer-lang .drawer-lang-btn.active,
  .drawer-lang .drawer-lang-btn[aria-pressed="true"]{
    background: var(--accent);
    color: #fff;
    border-color: color-mix(in srgb, var(--accent) 80%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent) inset;
    font-weight: 700;
  }
}

/* ===== Drawer: état sélectionné (sans JS supplémentaire) ===== */

/* 1) Sélection par ARIA (si tes boutons ont aria-pressed="true") */
.drawer-lang-btn[aria-pressed="true"],
.drawer-opts .opt-btn[aria-pressed="true"]{
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
}

/* 2) Sélection par classe .active (si tu l’emploies déjà) */
.drawer-lang-btn.active,
.drawer-opts .opt-btn.active{
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
}

/* 3) Auto-mise en surbrillance via les classes sur <html> (pas de JS de plus) */
/* Donne simplement un attribut data-* aux boutons. */
.theme-sombre  [data-theme="theme-sombre"],
.theme-clair   [data-theme="theme-clair"]{
  background: var(--accent, #0ea5e9);
  color:#fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
}

.font-normal      [data-font="font-normal"],
.font-grand       [data-font="font-grand"],
.font-tres-grand  [data-font="font-tres-grand"]{
  background: var(--accent, #0ea5e9);
  color:#fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
}

/* Légère variation au survol de l’option déjà sélectionnée (facultatif) */
.drawer-lang-btn.active:hover,
.drawer-opts .opt-btn.active:hover,
.drawer-lang-btn[aria-pressed="true"]:hover,
.drawer-opts .opt-btn[aria-pressed="true"]:hover{
  filter: brightness(0.98);
}

/* ===== Drawer: mettre en évidence l'option sélectionnée (mobile + desktop) ===== */

/* Langue : basé sur <html lang="..."> */
html[lang="fr"]  .drawer-lang-btn[data-lang="fr"],
html[lang="en"]  .drawer-lang-btn[data-lang="en"]{
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
  font-weight: 700;
}

/* Thème : basé sur la classe globale appliquée par ton JS */
.theme-sombre .drawer-opts .opt-btn[data-theme="theme-sombre"],
.theme-clair  .drawer-opts .opt-btn[data-theme="theme-clair"]{
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
  font-weight: 700;
}

/* Taille du texte : basé sur les classes globales font-... */
.font-normal     .drawer-opts .opt-btn[data-font="font-normal"],
.font-grand      .drawer-opts .opt-btn[data-font="font-grand"],
.font-tres-grand .drawer-opts .opt-btn[data-font="font-tres-grand"]{
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: rgba(0,0,0,.2);
  box-shadow: 0 0 0 2px rgba(14,165,233,.25) inset;
  font-weight: 700;
}

/* ===== Cartes Wiki — réglages MOBILE (≤480px) ===== */
:root{
  /* Tu peux ajuster ces 3 variables si besoin */
  --thumb-h-mobile: 88px;     /* hauteur des vignettes en carte */
  --left-scale: .85;          /* gauche un peu plus petite (images) */
  --left-sprite-scale: .85;   /* gauche un peu plus petite (sprites) */
  --right-sprite-scale: 1;    /* droite taille normale (sprites) */
}

@media (max-width: 480px){
  /* Conteneur des deux images (bloc+ingot) : centre + spacing un poil réduit */
  .small-card .thumb-pair{
    justify-content: center;
    gap: 8px;
  }

  /* Cartes avec UNE seule image (pas de paire) */
  .small-card img.thumb{
    height: var(--thumb-h-mobile) !important;
    max-height: var(--thumb-h-mobile) !important;
    width: auto !important;
    display: block;
    margin: 0 auto 8px !important;
  }

  /* Paires d'IMAGES : gauche plus petite que droite */
  .small-card .thumb-left{
    height: calc(var(--thumb-h-mobile) * var(--left-scale)) !important;
    max-height: calc(var(--thumb-h-mobile) * var(--left-scale)) !important;
    width: auto !important;
  }
  .small-card .thumb-right{
    height: var(--thumb-h-mobile) !important;
    max-height: var(--thumb-h-mobile) !important;
    width: auto !important;
  }

  /* Paires de SPRITES : on ne change pas leur width/height (pour ne pas casser l’anim),
     on ajuste visuellement avec un scale. */
  .small-card [data-sprite="1"].sprite-L{
    transform: scale(var(--left-sprite-scale));
    transform-origin: center;
  }
  .small-card [data-sprite="1"].sprite-R,
  .small-card [data-sprite="1"].sprite-Rsolo{
    transform: scale(var(--right-sprite-scale));
    transform-origin: center;
  }
}

/* ===== DÉTAIL DES CARTES — RÉGLAGES MOBILE ===== */
:root{
  /* ajuste ces valeurs si besoin */
  --detail-img-mobile: 140px;     /* hauteur des <img> dans le détail */
  --detail-sprite-scale: 0.8;     /* échelle visuelle des sprites animés */
}

@media (max-width: 480px){
  /* 1) Les deux visuels passent en colonne et restent centrés */
  .detail-pair{
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  /* 2) Images classiques <img> : on réduit la hauteur (override l'inline via !important) */
  .detail-pair img{
    height: var(--detail-img-mobile) !important;
    max-height: var(--detail-img-mobile) !important;
    width: auto !important;
  }

  /* 3) Sprites animés (div[data-sprite="1"]) :
        on NE change pas width/height (sinon frames décalées),
        on réduit visuellement par transform. */
  .detail-pair [data-sprite="1"]{
    transform: scale(var(--detail-sprite-scale));
    transform-origin: center top;
    display: inline-block; /* sécurise le centrage */
  }
}

/* Option : encore plus compact sur très petits écrans */
@media (max-width: 360px){
  :root{
    --detail-img-mobile: 120px;
    --detail-sprite-scale: 0.72;
  }
}

/* Drawer: lien actif */
.drawer-link.active{
  background: var(--c-accent, #0ea5e9);
  color:#fff;
  border-color: transparent;
}
.theme-clair .drawer-link.active{
  color:#fff;
}

/* Lien carte → carte : juste du bleu propre */
.card-detail a[data-card-id]{
  display: inline;                 /* pas de bloc spécial */
  padding-top: 0;                  /* retire l'espace qu'on avait ajouté */
  color: var(--c-accent, #0ea5e9);
  font-weight: 600;
  text-decoration-thickness: 2px;
  cursor: pointer;
}
/* annule la barre si l'ancien patch est encore là */
.card-detail a[data-card-id]::before{ content: none !important; }
.card-detail a[data-card-id]:hover{ opacity: .9; }

/* Patchnotes : header de détail + badges */
.pn-head{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:6px 0 10px; }
.pn-head h3{ margin:0; }
.pn-badges{ display:flex; gap:8px; align-items:center; }

/* Style commun aux badges */
.pn-badge{
  display:inline-flex; align-items:center;
  padding:2px 10px; border-radius:999px; font-weight:600;
  font-size:.85rem; line-height:1.3; border:1px solid transparent;
}

/* MC = pilule bleue (version finale) */
.pn-badge.mc{
  background: rgba(14,165,233,.18);  /* bleu léger */
  border-color: #0ea5e9;              /* contour bleu */
  color: #ffffff;                     /* texte blanc */
}
.theme-clair .pn-badge.mc{
  background:#0ea5e9;                 /* plein bleu */
  border-color:#0284c7;
  color:#ffffff;
}

/* Beta */
.pn-badge.beta{ background:#f59e0b; color:#fff; }
.theme-clair .pn-badge.beta{ background:#f59e0b; color:#fff; }

/* Images dans les sections des cartes */
.section-images .sec-figure{
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-images .sec-figure img{
  max-width: 220px;
  border-radius: 8px;
}

/* Légende au-dessus de l'image */
.section-images .sec-figcap{
  font-weight: 600;         /* style “titre court” */
  font-size: .95rem;
  opacity: .9;
  margin: 0;
}

.section-images{ display:flex; flex-direction:column; gap:12px; margin:8px 0; }
.section-images .sec-figure{ margin:0; display:flex; flex-direction:column; gap:6px; }
.section-images .sec-img{ max-width:220px; border-radius:8px; }
.section-images .sec-figcap{ font-weight:600; font-size:.95rem; opacity:.9; margin:0; }

/* Lien "Crédits" en pastille très visible */
footer .footer-credits{
  display: inline-block;
  padding: .45em .9em;
  margin-left: .5em;
  border-radius: 999px;
  background: #fff;                 /* max contraste sur le dégradé */
  color: #0c2038;                   /* texte très lisible */
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  transition: transform .15s ease, filter .15s ease;
}
footer .footer-credits:hover{
  transform: translateY(-1px);
  filter: brightness(1.04) saturate(1.05);
}
footer .footer-credits:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Lien "Crédits" — version compacte */
/* Lien "Crédits" — chip compact, cohérent avec le thème */
footer a.footer-credits,
footer a.footer-credits:visited{
  display:inline-block;
  line-height:1;
  padding:.25em .6em;
  margin-left:.45em;
  border-radius:12px;
  background: var(--footer-chip-bg, rgba(255,255,255,.9));
  color: var(--footer-chip-fg, #0d2545);
  font-weight:700;
  font-size:.95em;
  text-decoration:none;
  border:1px solid var(--footer-chip-border, rgba(0,0,0,.14));
  box-shadow:0 1px 6px rgba(0,0,0,.12);
  vertical-align:baseline;
  /* effet “verre” discret si dispo, sans casser ailleurs */
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
  transition:transform .12s ease, filter .12s ease;
}
footer a.footer-credits:hover{
  transform:translateY(-1px);
  filter:brightness(1.03) saturate(1.03);
}
footer a.footer-credits:focus-visible{
  outline:2px solid #fff;
  outline-offset:2px;
}

@media (max-width:480px){
  footer a.footer-credits{
    font-size:.9em;
    padding:.22em .5em;
    border-radius:10px;
  }
}

/* encore un poil plus petit sur très petit écran */
@media (max-width:480px){
  footer a.footer-credits{
    font-size:.9em;
    padding:.22em .5em;
    border-radius:10px;
  }
}

/* Badges de type de build */
.pn-badge.release{ 
  background:#16a34a; 
  border-color:#15803d; 
  color:#fff; 
}
.theme-clair .pn-badge.release{ 
  background:#22c55e; 
  border-color:#16a34a; 
  color:#fff; 
}

.pn-badge.beta{ 
  background:#f59e0b; 
  border-color:#d97706; 
  color:#fff; 
}
.theme-clair .pn-badge.beta{ 
  background:#f59e0b; 
  border-color:#d97706; 
  color:#fff; 
}

.pn-badge.alpha{ 
  background:#ee2929; 
  border-color:#801818; 
  color:#fff; 
}
.theme-clair .pn-badge.alpha{ 
  background:#ee2929; 
  border-color:#801818; 
  color:#0f172a; 
}

/* ===== Disposition des cartes (toggle 2×3 / 3×2) ===== */
.layout-toggle {
  margin: 0 0 1em 0;
  display: flex;
  align-items: center;
  gap: .6em;
}
.layout-toggle .layout-label {
  font-size: .9em;
  opacity: .8;
}
.layout-toggle .layout-buttons {
  display: flex;
  gap: .5em;
}
.layout-toggle .layout-btn {
  padding: .35em .6em;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.layout-toggle .layout-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Masqué sur mobile (≤768px), visible tablette & desktop */
@media (max-width: 768px) {
  .layout-toggle { display: none; }
}

/* Tablette (769–992 px) : 2 colonnes fixées par le CSS existant → on joue seulement sur la hauteur visible */
@media (min-width: 769px) and (max-width: 992px) {
  /* ~3 rangées visibles */
  #mod1.layout-2x3 .cards-grid,
  #mod2.layout-2x3 .cards-grid {
    max-height: 660px;  /* ajuste à 620–680 px si besoin selon tes cartes */
  }

  /* ~2 rangées visibles */
  #mod1.layout-3x2 .cards-grid,
  #mod2.layout-3x2 .cards-grid {
    max-height: 440px;  /* ajuste à 400–460 px si besoin */
  }
}

/* Forçage des colonnes + hauteur visible sur desktop seulement */
@media (min-width: 993px) {
  /* 2 colonnes × ~3 rangées */
  #mod1.layout-2x3 .cards-grid,
  #mod2.layout-2x3 .cards-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    max-height: 660px;          /* ≈ 3 rangées visibles, ajuste si besoin */
  }

  /* 3 colonnes × ~2 rangées */
  #mod1.layout-3x2 .cards-grid,
  #mod2.layout-3x2 .cards-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    max-height: 440px;          /* ≈ 2 rangées visibles, ajuste si besoin */
  }
}

.detail-actions{
  display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 12px;
}
.detail-actions .btn{
  border:1px solid rgba(0,0,0,.08); border-radius:8px; padding:6px 10px; cursor:pointer;
  background: var(--card-bg);
}
.detail-actions .btn:hover{ background: var(--accent); color:#fff; }

/* Barre d’actions du panneau détail (Retour + Copier le lien) */
.detail-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}

/* Le bouton "Copier le lien" va à droite */
.detail-toolbar .link-copy-btn{
  margin-left:auto;
}

/* Style plus visible pour le bouton "Copier le lien" */
.link-copy-btn{
  border:1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding:8px 12px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
}
.link-copy-btn:hover{
  background: var(--accent);
  color:#fff;
}

/* Uniformiser le fond du menu mobile (drawer) */
body.theme-sombre .drawer-panel{
  background: #23272b;   /* même ton que --main-bg du thème sombre */
  color: #f4f4f4;
  border-left: 1px solid #23272b;
}

body.theme-bleu .drawer-panel{
  background: #0b1220;   /* même ton que --main-bg du thème bleu */
  color: #e7f0ff;
  border-left: 1px solid #20314e;
}
/* (la version claire est déjà bonne : .theme-clair .drawer-panel {...}) */

/* ===== Chips de statut sous le header (Accueil) =====
   Bloc unique, propre et 100% thémable.
   Remplace tout ce qu’il y avait après ce commentaire.
   --------------------------------------------------- */

/* ---------- Variables par défaut (fallback) ---------- */
:root{
  /* Boîte autour des statuts (#home-status) */
  --status-wrap-bg:       #0f1830;     /* fond opaque */
  --status-wrap-fg:       #e7f0ff;     /* couleur du texte "Acatar :" */
  --status-wrap-border:   #20314e;     /* liseré */
  --status-wrap-shadow:   0 8px 20px rgba(0,0,0,.18);

  /* Espacements / arrondi */
  --status-gap:           1.1rem;
  --status-pad-y:         .50rem;
  --status-pad-x:         .95rem;
  --status-radius:        14px;

  /* Badges (couleurs) */
  --status-stable-bg:     #22c55e;  --status-stable-fg: #ffffff;
  --status-beta-bg:       #f59e0b;  --status-beta-fg:   #ffffff;
  --status-dev-bg:        #ee2929;  --status-dev-fg:    #ffffff;

  /* Sizing des pastilles */
  --badge-pad-y:          .28rem;
  --badge-pad-x:          .70rem;
  --badge-radius:         999px;
  --badge-font-weight:    800;
}

/* ---------- Overrides par thème (adapte ici) ---------- */
body.theme-clair{
  --status-wrap-bg:       #f7f8fa;
  --status-wrap-fg:       #000000;
  --status-wrap-border:   #e9ecf1;
  --status-wrap-shadow:   0 6px 16px rgba(0,0,0,.08);

  /* Exemple si tu veux des badges plus “clairs” :
     --status-beta-bg: #f59e0b; --status-beta-fg: #111; */
}

body.theme-sombre{
  --status-wrap-bg:       #2f32352d;
  --status-wrap-fg:       #ffffff;
  --status-wrap-border:   #222324;
  --status-wrap-shadow:   0 8px 22px rgba(0,0,0,.22);
}

body.theme-bleu{
  /* Exemple d’un autre thème */
  --status-wrap-bg:       #0f1638;
  --status-wrap-fg:       #e6efff;
  --status-wrap-border:   #070f27;
  --status-wrap-shadow:   0 8px 20px rgba(0,0,0,.18);
}

/* ---------- Rectangle autour des statuts ---------- */
#home-status{
  /* affiché/masqué par le JS sur Accueil */
  display: none;
  align-items: center;
  gap: var(--status-gap);

  /* le rectangle épouse le contenu et reste centré */
  width: fit-content;
  margin: .6rem auto 0;
  padding: var(--status-pad-y) var(--status-pad-x);
  border-radius: var(--status-radius);

  background: var(--status-wrap-bg) !important;
  color: var(--status-wrap-fg);
  border: 1px solid var(--status-wrap-border);
  box-shadow: var(--status-wrap-shadow);
}

/* ---------- Reset local des chips ---------- */
#home-status .status-chip{
  appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 .10rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .45rem; /* espace entre "Nom :" et la pastille */
}
#home-status .status-chip .mod-name{ font-weight: 600; opacity: .95; }
#home-status .status-chip:hover .mod-name{ text-decoration: underline; }
#home-status .status-chip:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Pastille à droite du libellé ---------- */
#home-status .status-pill{
  display: inline-block;
  padding: var(--badge-pad-y) var(--badge-pad-x);
  border-radius: var(--badge-radius);
  font-weight: var(--badge-font-weight);
  line-height: 1;
  margin-left: .35rem; /* après ":" */
}

/* ---------- Badges de couleur (communs)
   S’appliquent aux pastilles d’accueil (.status-pill)
   ET aux badges des panneaux (.status-badge)           */
.status-pill.stable, .status-badge.stable{ background: var(--status-stable-bg); color: var(--status-stable-fg); }
.status-pill.beta,   .status-badge.beta  { background: var(--status-beta-bg);   color: var(--status-beta-fg);   }
.status-pill.dev,    .status-badge.dev   { background: var(--status-dev-bg);    color: var(--status-dev-fg);    }

/* ---------- Sécurité : couper toute ancienne “bande” ---------- */
.status-rail{ display: none !important; }

/* === Hover ultra fluide : petit lift vers le haut, sans lueur ============ */
:root{
  /* timings & easing séparés pour l'entrée/sortie */
  --status-anim-in-dur:   220ms; /* hover-in un peu plus rapide */
  --status-anim-out-dur:  260ms; /* hover-out un peu plus long (plus doux) */
  --status-anim-in-ease:  cubic-bezier(.16,1,.3,1);   /* springy, “pop” clean */
  --status-anim-out-ease: cubic-bezier(.2,.8,.2,1);   /* ease-out smooth */
}

/* La chip se soulève légèrement (GPU-friendly) */
#home-status .status-chip{
  transform: translate3d(0,0,0);              /* état repos */
  transition: transform var(--status-anim-out-dur) var(--status-anim-out-ease);
  will-change: transform;
  backface-visibility: hidden;
}
#home-status .status-chip:hover{
  transform: translate3d(0,-3px,0);           /* petit lift */
  transition: transform var(--status-anim-in-dur) var(--status-anim-in-ease);
}
#home-status .status-chip:active{
  transform: translate3d(0,-2px,0);           /* feedback clic léger */
}

/* La pastille suit très légèrement (adds finesse).
   NB: la transformation se cumule avec celle de la chip par héritage */
#home-status .status-pill{
  transform: translate3d(0,0,0);
  transition: transform var(--status-anim-out-dur) var(--status-anim-out-ease);
  will-change: transform;
  box-shadow: none !important;                 /* on s'assure: aucune lueur */
}
#home-status .status-chip:hover .status-pill{
  transform: translate3d(0,-1px,0);            /* +1px par rapport à la chip */
  transition: transform var(--status-anim-in-dur) var(--status-anim-in-ease);
}

/* Focus clavier = même feedback que hover (sans lueur) */
#home-status .status-chip:focus-visible{
  transform: translate3d(0,-3px,0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Accessibilité : réduit le mouvement si demandé par l’utilisateur */
@media (prefers-reduced-motion: reduce){
  #home-status .status-chip,
  #home-status .status-pill{
    transition: none !important;
    transform: none !important;
  }
}

/* === Interactivité : seule la PASTILLE est cliquable + animée ============ */
/* La chip (nom du mod) n'est pas interactive */
#home-status .status-chip{
  cursor: default;
  transition: none !important;
  transform: none !important;
}
#home-status .status-chip:hover .mod-name{
  text-decoration: none; /* on enlève l'effet hover sur le nom */
}

/* === Pastille : lift + pop BIEN MARQUÉ (sans rotation, sans lueur) ======= */
:root{
  /* intensité : ajuste librement ces 2 valeurs */
  --status-lift-y:     -20px;   /* hauteur du saut au hover (ex: -14px / -18px) */
  --status-scale:      1.26;    /* grossissement au hover (ex: 1.18 / 1.26) */

  /* timings/courbes (entrée punchy, sortie douce) */
  --status-anim-in-dur:   300ms;
  --status-anim-out-dur:  420ms;
  --status-anim-in-ease:  cubic-bezier(.2,1.25,.24,1);
  --status-anim-out-ease: cubic-bezier(.2,.8,.2,1);
}

/* Le nom du mod (chip) n'est pas interactif */
#home-status .status-chip{
  cursor: default;
  transition: none !important;
  transform: none !important;
}
#home-status .status-chip:hover .mod-name{ text-decoration: none; }

/* === SEULE la pastille est interactive === */
#home-status .status-pill{
  position: relative;
  cursor: pointer;

  /* état repos */
  transform: translate3d(0,0,0) scale(1);
  transform-origin: center;

  /* on coupe toute ancienne anim (keyframes) si elle existe */
  animation: none !important;

  /* transitions lisses */
  transition:
    transform var(--status-anim-out-dur) var(--status-anim-out-ease),
    filter   140ms linear;
  will-change: transform;
  box-shadow: none !important; /* jamais de lueur */
}

/* Ombre au sol (neutre) pour renforcer la hauteur */
#home-status .status-pill::after{
  content:"";
  position:absolute;
  left:10%; right:10%; bottom:-4px; height:6px;
  background: rgba(0,0,0,0.35);
  filter: blur(6px);
  opacity: 0;
  transform: translateY(0) scaleX(.6);
  transition:
    opacity  var(--status-anim-in-dur) var(--status-anim-in-ease),
    transform var(--status-anim-in-dur) var(--status-anim-in-ease);
  pointer-events:none;
}

/* Hover : LIFT + POP (sans rotation) */
#home-status .status-pill:hover{
  animation: none !important; /* au cas où */
  transform: translate3d(0,var(--status-lift-y),0) scale(var(--status-scale));
  transition: transform var(--status-anim-in-dur) var(--status-anim-in-ease);
  filter: brightness(1.06) contrast(1.03); /* lisibilité subtile */
}
#home-status .status-pill:hover::after{
  opacity: .9;
  transform: translateY(3px) scaleX(1.35);
}

/* Press (mousedown) : retombée contrôlée */
#home-status .status-pill:active{
  transform: translate3d(0, calc(var(--status-lift-y) / 2), 0) scale(1.10);
}

/* Focus clavier = même feedback que hover (sans rotation) */
#home-status .status-pill:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
  animation: none !important;
  transform: translate3d(0,var(--status-lift-y),0) scale(var(--status-scale));
}

/* Accessibilité : moins de mouvement si demandé */
@media (prefers-reduced-motion: reduce){
  #home-status .status-pill{ transition:none !important; transform:none !important; }
  #home-status .status-pill::after{ opacity:0 !important; }
}

/* ===== Mobile : empiler les statuts (un par ligne) ====================== */
@media (max-width: 640px){
  /* le rectangle prend la largeur, avec marge intérieure + extérieure */
  #home-status{
    flex-direction: column;
    align-items: stretch;          /* étire chaque ligne */
    gap: .55rem;

    width: auto;                   /* au lieu de fit-content */
    max-width: none;
    margin: .6rem 12px 0;          /* un peu d’air sur les côtés */
    padding: .55rem .75rem;
  }

  /* chaque statut = une ligne */
  #home-status .status-chip{
    display: flex;
    justify-content: space-between;/* nom à gauche, pastille à droite */
    align-items: center;
    width: 100%;
    padding: .15rem .10rem !important; /* neutralise d’éventuels anciens padding */
  }

  /* évite que la pastille passe à la ligne */
  #home-status .status-pill{
    margin-left: .75rem;
    white-space: nowrap;
    padding: .32rem .80rem;        /* cible tactile un peu plus grande */
  }
}

/* Bonus : très petits écrans */
@media (max-width: 380px){
  #home-status{ font-size: .95rem; }   /* réduit un chouïa la taille du texte */
}

/* --- Titre "Statut :" devant les puces ---------------------------------- */
#home-status .status-title{
  font-weight: 600;
  opacity: .9;
  margin-right: .6rem;
  pointer-events: none;   /* jamais cliquable */
  white-space: nowrap;
  color: inherit;
}

/* Mobile : le titre passe au-dessus et centré */
@media (max-width: 640px){
  #home-status .status-title{
    display: block;
    margin: 0 0 .35rem 0;
    text-align: center;
  }
}

/* Bouton "Haut de page" */
.back-to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: none;                 /* caché par défaut */
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 1000;
}
.back-to-top.show{ display: flex; }  /* montré après le seuil sur pages autorisées */
.back-to-top:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 640px){
  .back-to-top{ right: 12px; bottom: 12px; width: 48px; height: 48px; font-size: 20px; }
}

/* ===== Bouton "Haut de page" (thémé, léger transparent) ===== */
.back-to-top{
  position: fixed;            /* on le place par JS au milieu du conteneur */
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.85);   /* clair par défaut */
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  color: #111;
  font-size: 20px;
  line-height: 1;
  display: none;              /* caché sans .show */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: opacity .25s ease, transform .25s ease;
  opacity: 0;
  transform: translateY(8px);
  backdrop-filter: blur(6px);
}

.back-to-top.show{
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:active{ transform: scale(.98); }

/* Thèmes */
body.theme-sombre .back-to-top{
  background: rgba(27, 28, 31, 0.65);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}

body.theme-bleu .back-to-top{
  background: rgba(16,24,48,.70);
  border-color: rgba(96,132,255,.35);
  color: #e7f0ff;
}

/* Mobile : un poil plus gros */
@media (max-width: 640px){
  .back-to-top{ width: 48px; height: 48px; font-size: 22px; }
}

