.donate-progress-text {
  font-size: clamp(0.7rem, 10cqh, 1.22rem);
}
.dpt-kicker {
  font-size: clamp(0.54rem, 8.2cqh, 0.98rem);
}
.dpt-subject {
  font-size: clamp(0.68rem, 11cqh, 1.22rem);
}
.dpt-bravo {
  font-size: clamp(0.54rem, 8.2cqh, 1.02rem);
}
#user-menu-container .dropdown-menu #btnLogout,
#user-menu-container .dropdown-menu #menu-parametres-link,
#user-menu-container .dropdown-menu #menu-statistiques-link,
#user-menu-container .dropdown-menu #menu-statistiques-generales-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 1.1rem);
  max-width: 220px;
  margin: 0.15rem auto;
  border-radius: 999px;
  text-align: center;
}

#user-menu-container .dropdown-menu #menu-parametres-link {
  gap: 0.35rem;
}

#user-menu-container .dropdown-menu #menu-statistiques-link {
  gap: 0.35rem;
}

#user-menu-container .dropdown-menu #menu-statistiques-generales-link {
  gap: 0.35rem;
}

#user-menu-container .dropdown-menu #btnLogout {
  gap: 0.35rem;
}

#user-menu-container .dropdown-menu #menu-parametres-link .material-symbols-outlined {
  font-size: 20px;
  color: #1f1f1f;
}

#user-menu-container .dropdown-menu #menu-statistiques-link .material-symbols-outlined {
  font-size: 20px;
  color: #1f1f1f;
}

#user-menu-container .dropdown-menu #menu-statistiques-generales-link .material-symbols-outlined {
  font-size: 20px;
  color: #1f1f1f;
}

#user-menu-container .dropdown-menu #btnLogout .material-symbols-outlined {
  font-size: 20px;
  color: #1f1f1f;
}

@keyframes register-pill-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(175, 124, 0, 0.18);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(175, 124, 0, 0.08);
  }
}

#top-btn-register.top-register-finalize,
#mobile-btn-register.top-register-finalize {
  background: linear-gradient(135deg, #fff2b6 0%, #e1bb54 45%, #c5922b 100%);
  border: 1px solid #b88418;
  color: #5d3f00;
  font-weight: 700;
  animation: register-pill-pulse 2.2s ease-in-out infinite;
}

#top-btn-register.top-register-finalize:hover,
#top-btn-register.top-register-finalize:focus-visible,
#mobile-btn-register.top-register-finalize:hover,
#mobile-btn-register.top-register-finalize:focus-visible {
  filter: brightness(0.97);
  color: #5d3f00;
  box-shadow: 0 6px 12px rgba(120, 83, 2, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  #top-btn-register.top-register-finalize,
  #mobile-btn-register.top-register-finalize {
    animation: none;
  }
}

/* =================================================
STYLES PERSONNALISÉS & COMPATIBILITÉ JEU
================================================= */

html { scroll-behavior: smooth; }

/* Fond de page avec un dégradé subtil qui s'adapte au thème Bootstrap */
body {
  font-family: 'Manrope', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bs-body-bg);
  background-image: radial-gradient(circle at top, var(--mmc-body-gradient-top, #F0F4F8) 0%, var(--bs-body-bg) 70%);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

[data-bs-theme="dark"] body {
  --mmc-body-gradient-top: #171b21;
}

.container.py-4 {
  padding-top: 0 !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  padding: 0.55rem 1.5rem 0.55rem 0.85rem;
  border: 0 !important;
  border-bottom: 1.5px solid rgba(13, 110, 253, 0.09) !important;
  background: linear-gradient(135deg,
  rgba(248, 251, 255, 0.97) 0%,
  rgba(237, 244, 255, 0.95) 100%);
  backdrop-filter: blur(14px) saturate(1.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.7);
  box-shadow:
  0 4px 32px rgba(18, 55, 180, 0.08),
  0 1px 6px rgba(0, 0, 0, 0.045),
  inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: padding 0.56s ease 1s, box-shadow 0.56s ease 1s;
}

[data-bs-theme="dark"] .site-header {
  border-bottom-color: rgba(13, 110, 253, 0.28) !important;
  background: linear-gradient(135deg,
  rgba(23, 26, 30, 0.97) 0%,
  rgba(18, 21, 25, 0.95) 100%);
  box-shadow:
  0 4px 32px rgba(0, 0, 0, 0.35),
  0 1px 6px rgba(0, 0, 0, 0.30),
  inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header.compact {
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
  box-shadow:
  0 2px 16px rgba(18, 55, 180, 0.10),
  0 1px 4px rgba(0, 0, 0, 0.06),
  inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-bs-theme="dark"] .site-header.compact {
  box-shadow:
  0 2px 16px rgba(0, 0, 0, 0.38),
  0 1px 4px rgba(0, 0, 0, 0.32),
  inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-tagline {
  overflow: hidden;
  max-height: 3rem;
  opacity: 1;
  transition: max-height 0.56s ease 1s, opacity 0.36s ease 1s, margin-top 0.56s ease 1s;
}

.site-header.compact .brand-tagline {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
}

.invisible-keep-space {
  visibility: hidden !important;
  pointer-events: none !important;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1f1f1f;
  user-select: none;
}

/* ── Vercel-style nav: desktop inline links, mobile hamburger ── */
.nav-maps {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 1.1rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.brand-pending .nav-maps {
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
}

.nav-maps-link {
  position: relative;
  display: inline-block;
  padding: 0.22rem 0.52rem;
  border: 0;
  background: transparent;
  color: #000;
  font-family: 'Caveat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.23rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: color 150ms ease;
  white-space: nowrap;
}

.nav-maps-link:hover {
  color: #000;
}

.nav-maps-link::after {
  content: '';
  position: absolute;
  left: 0.52rem;
  right: 0.52rem;
  bottom: 0;
  height: 1.5px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.nav-maps-link:hover::after {
  transform: scaleX(1);
}

.nav-maps-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-maps-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  padding: 0.35rem 0.35rem 0.35rem;
  padding-top: 0.55rem;
  border: 1px solid #ececec;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 1060;
}

.nav-maps-group:hover .nav-maps-dropdown,
.nav-maps-group:focus-within .nav-maps-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-maps-dropdown .nav-maps-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.3rem 0.52rem;
  font-size: 1.16rem;
  border-radius: 0.45rem;
}

/* Hamburger button – hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  margin-left: 0.7rem;
}

.nav-hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4.5px;
  width: 18px;
  height: 18px;
}

.nav-hamburger-icon span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #111;
  border-radius: 1px;
  transition: transform 250ms ease, opacity 200ms ease;
}

/* Hamburger → X animation */
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile dropdown panel */
.nav-mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eaeaea;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 0.5rem 0;
  z-index: 1050;
}

.nav-mobile-panel.open {
  display: block;
}

.nav-mobile-panel .nav-mobile-link {
  display: block;
  width: 100%;
  padding: 0.65rem 1.2rem;
  border: 0;
  background: transparent;
  color: #000;
  font-family: 'Caveat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.32rem;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.nav-mobile-panel .nav-mobile-link:hover {
  background: #fafafa;
  color: #000;
}

.nav-mobile-auth {
  display: none;
  gap: 0.55rem;
  padding: 0.65rem 1.2rem 0.4rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0.25rem;
}

/* Responsive: hide desktop links, show hamburger on small screens */
@media (max-width: 640px) {
  .nav-maps {
    display: none;
  }
  
  .header-controls {
    margin-left: auto;
  }
  
  .nav-hamburger {
    display: flex;
  }
  
  #guest-auth-buttons {
    display: none !important;
  }
  
  .nav-mobile-auth {
    display: flex;
  }
  
  .site-brand .brand-logo {
    width: 76.5%;
  }
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: 14.7ch;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.brand-pending .site-brand {
  opacity: 0;
  transform: translateY(-2px);
}

/* Evite tout flash (landing/carte) avant resolution de l'etat de connexion,
tout en gardant la barre de menu du haut visible. */
body.auth-pending .container.py-4 > :not(.site-header) {
  visibility: hidden;
}

body.auth-pending #guest-auth-buttons,
body.auth-pending #user-menu-container,
body.auth-pending #nav-mobile-auth-buttons {
  visibility: hidden;
  pointer-events: none;
}

.site-brand .brand-logo {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: left center;
  transition: transform 0.56s ease 1s;
}

/* Logo foncé : sur fond sombre, on l'affiche sur une pastille claire pour rester lisible */
[data-bs-theme="dark"] .site-brand .brand-logo {
  background: #f8f9fa;
  padding: 0.18rem 0.4rem;
  border-radius: 0.5rem;
  box-sizing: border-box;
}

.site-header.compact .brand-logo {
  transform: scale(0.75);
}

.brand-tagline {
  display: block;
  margin-top: 0.12rem;
  white-space: nowrap;
  font-family: 'Caveat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--bs-secondary);
}

:root {
  --mmc-logo-red: #d64545;
  --mmc-dept-stroke: #222; /* Contour des départements en mode clair */
}

[data-bs-theme="dark"] {
  --mmc-dept-stroke: #ced4da; /* Contour des départements en mode sombre */
}

/* --- Styles de la Carte SVG (CRITIQUE POUR LE JEU) --- */

.map-wrap {
  /* Conteneur de la carte */
  position: relative;
  overflow: hidden;
  background-color: transparent; 
  transition: background-color 0.3s ease;
}

#carte-container svg {
  background: transparent;
  overflow: visible;
  width: 100%;
  height: auto;
  max-height: 110vh;
  --mmc-zoom-scale: 1;
}

#carte-container svg.panzoom-enabled {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

#carte-container {
  overflow: hidden;
}

#carte-container.is-grabbing svg.panzoom-enabled,
#carte-container.is-grabbing svg.panzoom-enabled .dept {
  cursor: grabbing !important;
}

/* Pendant un drag panzoom : désactiver physiquement les clics sur les pays */
#carte-container.panzoom-dragging .dept,
#carte-container.panzoom-dragging .hit {
  pointer-events: none !important;
}

/* Départements */
#carte-container svg .dept {
  cursor: pointer; /* Indique que c'est cliquable */
  stroke-width: calc(1px / var(--mmc-zoom-scale, 1)); /* Épaisseur visuellement constante malgré le zoom */
  vector-effect: non-scaling-stroke; /* Empêche l'épaisseur du trait de changer lors du zoom */
  fill: var(--bs-body-bg, #f8f9fa); /* fond doux, s'adapte au thème Bootstrap */
  stroke: var(--mmc-dept-stroke); /* Couleur bordure par défaut, s'adapte au thème */
  paint-order: stroke fill; /* Ordre de peinture : trait puis remplissage */
  stroke-linejoin: round; /* Arrondi des jonctions */
  stroke-linecap: round; /* Arrondi des extrémités */
  transition: fill 0.2s ease, stroke 0.2s ease; /* Transition fluide pour la couleur */
}

#carte-container svg.pyramid-kelsen .dept:not(.hovering):not(.colorized):not(.good):not(.bad) {
  fill: #fff;
}

@media (hover: hover) and (pointer: fine) {
  /* Survol d'un département NON colorisé : colorisation temporaire */
  #carte-container svg .dept.hovering:not(.colorized) {
    fill: #ffd3a1;
    opacity: .7;
    transition: fill .15s, opacity .08s;
  }
  
  /* Survol d'un département DÉJÀ colorisé : atténuation de l'opacité */
  #carte-container svg .dept.hovering.colorized {
    opacity: 0.45 !important;
    transition: opacity .08s;
  }
}

/* --- NOUVEAU : Feedback visuel (Colorisation directe) --- */

/* Bonne réponse : Vert */
#carte-container svg .dept.good {
  fill: var(--bs-success) !important;
  fill-opacity: 1;
  stroke: var(--bs-success-text-emphasis) !important;
  stroke-width: calc(1px / var(--mmc-zoom-scale, 1));
}

/* Mauvaise réponse : Rouge */
#carte-container svg .dept.bad {
  fill: var(--bs-danger) !important;
  fill-opacity: 1;
  stroke: var(--bs-danger-text-emphasis) !important;
  stroke-width: calc(1px / var(--mmc-zoom-scale, 1));
}

/* Effet vague (shimmer) pour le message de chargement de la question */
.question-loading {
  /* Style de base (inspiré de .highlight-dept) */
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.08em 0.8em;
  border-radius: 1em;
  border: 1px solid var(--bs-primary-border-subtle, #cfe2ff);
  font-size: 0.98em;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px 0 rgba(13,110,253,0.04);
  color: var(--bs-primary-text-emphasis, #0d6efd);
  font-style: italic;
  
  /* Animation Shimmer */
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, #f8f9fa 30%, #e3f0ff 50%, #f8f9fa 70%);
  background-size: 200% 100%;
  animation: question-shimmer 1.4s infinite linear;
}

@keyframes question-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.question-loading .spinner-border {
  --bs-spinner-width: 0.9em;
  --bs-spinner-height: 0.9em;
  border-width: 0.15em;
  color: var(--bs-primary, #0d6efd);
}

.question-floating-shell {
  position: relative;
  flex: 1 1 auto;
  min-width: min(18rem, 100%);
  max-width: 100%;
}

#question {
  display: inline-block;
  max-width: 100%;
  line-height: 1.35;
}

.question-pinned-clone {
  position: fixed;
  top: calc(var(--mmc-sticky-header-offset, 0px) + 0.7rem);
  z-index: 1015;
  display: none;
  pointer-events: none;
  line-height: 1.35;
  transform-origin: top left;
  will-change: transform;
  /* Fond opaque pour garantir la lisibilité du texte au-dessus de la carte */
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  padding: 0.15rem 0.4rem;
  border-radius: 0.5rem;
}

.question-pinned-clone.show {
  display: block;
}

#question-tools-row {
  position: relative;
  z-index: 2;
}

@media (max-width: 991.98px) {
  .question-floating-shell {
    width: 100%;
  }
  
  .question-pinned-clone {
    top: 0.4rem;
    pointer-events: auto;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* --- Styles pour le contenu généré par JS --- */

/* Surlignage du département dans la question */
.highlight-dept {
  display: inline-block;
  color: var(--bs-primary-text-emphasis, #0d6efd);
  background: var(--bs-light, #f8f9fa);
  font-weight: 700;
  padding: 0.08em 0.6em;
  border-radius: 1em;
  border: 1px solid var(--bs-primary-border-subtle, #cfe2ff);
  font-size: 0.98em;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px 0 rgba(13,110,253,0.04);
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.highlight-dept::before {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.32em;
  vertical-align: middle;
  position: relative;
  top: -0.06em;
  background: url('data:image/svg+xml;utf8,<svg width="11" height="11" xmlns="http://www.w3.org/2000/svg"><polygon points="2,2 9,5.5 2,9" fill="%230d6efd"/></svg>') no-repeat center/contain;
  opacity: 0.7;
}

/* Mode sombre : le fond --bs-light de Bootstrap reste clair, on force des teintes lisibles */
[data-bs-theme="dark"] .highlight-dept {
  color: var(--bs-primary-text-emphasis, #6ea8fe);
  background: var(--bs-primary-bg-subtle, #031633);
  border-color: var(--bs-primary-border-subtle, #084298);
}
/* Panneau d'infos (structure générée par renderDeptInfo) */
.info-wrap { /* Conteneur principal */
  display: flex; 
  gap: 1rem; 
  align-items: flex-start; 
}
.info-blason { /* Conteneur du blason */
  width: 80px; min-width: 80px; height: 80px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: #fff; /* Les blasons sont souvent sur fond blanc */
  display: grid; place-items: center; overflow: hidden;
  padding: 4px;
}
.info-blason img { /* Image du blason */
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
}
.info-grid { /* Conteneur des infos textuelles */
  display: flex; 
  flex-direction: column; 
  gap: 0.25rem; 
  font-size: 0.95rem; 
}
.info-title { /* Titre du département */
  font-weight: 700; 
  font-size: 1.1rem; 
  margin-bottom: 0.25rem; 
  color: var(--bs-emphasis-color, #212529); 
}
.info-line { /* Ligne d'info */
  color: var(--bs-body-color); 
}
.info-line .key { /* Clé d'info */
  color: var(--bs-secondary); 
  font-weight: 500; 
}
.info-empty { /* Texte par défaut quand pas d'info */
  color: var(--bs-secondary); 
  font-style: italic; 
  text-align: center; 
  padding: 2rem 0; 
}
.pill {
  min-width: 6.8em;
  text-align: center; /* Pour centrer le texte si besoin */
  display: inline-block;
  color: var(--bs-warning-text-emphasis, #caa613);
  background: var(--bs-warning-bg-subtle, #fffbe6);
  font-weight: 700;
  padding: 0.064em 0.48em; 
  border: 1px solid var(--bs-warning-border-subtle, #ffe8a1);
  font-size: 0.784em;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px 0 rgba(202,166,19,0.04);
  transition: background 0.2s, color 0.2s, border 0.2s;
}

/* Permet à #click-hint de se déplacer physiquement vers le curseur */
#click-hint {
  position: relative;
  z-index: 20;
  will-change: transform;
  pointer-events: none;
}
.pill::before {
  content: '';
  display: inline-block;
  width: 0.44em;
  height: 0.44em;
  margin-right: 0.256em;
  vertical-align: middle;
  position: relative;
  top: -0.048em;
  background: url('data:image/svg+xml;utf8,<svg width="11" height="11" xmlns="http://www.w3.org/2000/svg"><circle cx="5.5" cy="5.5" r="4.5" fill="%23caa613"/></svg>') no-repeat center/contain;
  opacity: 0.7;
}

@keyframes save-session-drop-in {
  0% {
    opacity: 0;
    transform: translateY(-120px) scale(0.92);
    box-shadow: 0 20px 28px rgba(13, 110, 253, 0.14);
  }
  46% {
    opacity: 1;
    transform: translateY(12px) scale(1.03);
    box-shadow: 0 10px 16px rgba(13, 110, 253, 0.2);
  }
  62% {
    transform: translateY(-8px) scale(0.995);
  }
  76% {
    transform: translateY(5px) scale(1.01);
  }
  88% {
    transform: translateY(-2px) scale(0.998);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 6px rgba(13, 202, 240, 0.3);
  }
}

/* Style du bouton "Enregistrer la session" */
.save-session-pill {
  display: inline-block;
  text-decoration: none;
  color: #fff; /* Texte blanc pour le contraste */
  background: linear-gradient(135deg, #0dcaf0, #0d6efd); /* Dégradé "flashy" */
  font-weight: 600;
  padding: 0.4em 1.2em;
  border-radius: 2em;
  border: none;
  font-size: 0.9em;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(13, 202, 240, 0.3); /* Ombre colorée */
  
  /* Nécessaire pour le positionnement de l'effet vague */
  position: relative;
  overflow: hidden;
  z-index: 1;
  animation: save-session-drop-in 1.15s cubic-bezier(0.2, 0.9, 0.22, 1.18) 1 both;
}

.save-session-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(13, 202, 240, 0.4);
  color: #fff;
}

.save-session-pill .material-symbols-outlined {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .save-session-pill {
    animation: none;
  }
}

/* Animation de vague via pseudo-élément (pour ne pas écraser le fond coloré) */
.save-session-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dégradé blanc semi-transparent pour l'effet de brillance */
  background: linear-gradient(
  120deg,
  transparent 30%,
  rgba(255, 255, 255, 0.6) 50%,
  transparent 70%
  );
  background-size: 200% 100%;
  background-position: 100% 0;
  animation: wave-shimmer 7s infinite; /* Animation toutes les 7s */
  z-index: 2;
  pointer-events: none;
}

@keyframes wave-shimmer {
  0% {
    background-position: 100% 0;
  }
  20% {
    /* La vague passe en ~1.4s (20% de 7s) */
    background-position: -100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 768px) {
  #save-session-container .save-session-pill {
    font-size: 0.74em;
  }
  
  #click-hint {
    font-size: 0.55em; /* Environ 2x plus petit que la normale */
    min-width: auto;   /* Permet au badge de rétrécir */
    padding: 0.1em 0.4em;
  }
}

/* --- Bouton Ampoule (Indice) --- */
.hint-bulb-btn {
  height: 36px;
  border: 1px solid var(--bs-warning-border-subtle, #ffe8a1);
  background: var(--bs-warning-bg-subtle, #fff7d6);
  color: #b8860b;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-shadow: 0 2px 8px rgba(202, 166, 19, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  padding: 0 0.7rem;
  line-height: 1;
  border-radius: 2em;
}
.hint-bulb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(202, 166, 19, 0.28);
}
.hint-bulb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
/* --- Bulle BD (panneau indice) --- */
.hint-bubble-wrap {
  position: relative; /* ancre du bouton */
  overflow: visible;  /* autorise la bulle à sortir de la colonne */
  z-index: 1070;
}

.hint-bubble { /* bulle superposée à la colonne d'info (desktop) */
  position: absolute;
  top: 0;
  left: calc(100% + 0.75rem); /* pousse la bulle vers la colonne de droite */
  right: auto;
  width: min(34vw, 460px);
  min-width: 300px;
  min-height: 320px;
  background: var(--bs-body-bg, #fff);
  border: 2.5px solid var(--bs-secondary, #6c757d);
  border-radius: 18px;
  box-shadow: 4px 4px 0px var(--bs-secondary, #6c757d);
  padding: 0.85rem 1rem 1rem;
  opacity: 0;
  transform: translateX(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 1080;
  margin-top: 0;
}

/* force la flèche à gauche (la définition principale est plus bas) */
.hint-bubble::before {
  top: 22px !important;
  left: -12px !important;
  right: auto !important;
  transform: rotate(-45deg) !important;
}

.hint-bubble.open {
  transform: translateX(0) scale(1);
}

/* mobile/tablette : inline – pousse le contenu vers le bas */
@media (max-width: 991.98px) {
  .hint-bubble-wrap {
    width: 100%;
    text-align: right;
    margin-top: 0.75rem; /* espace entre la carte et le bouton */
  }
  
  .hint-bubble {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin-top: 0.5rem;
    transform: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-width: 0;
    box-shadow: none;
    transition: opacity 0.25s ease, max-height 0.35s ease,
    padding 0.25s ease, border-width 0.15s ease;
    pointer-events: none;
  }
  
  .hint-bubble.open {
    opacity: 1;
    max-height: 600px; /* assez pour contenir carte + texte */
    padding: 0.85rem 1rem 1rem;
    border-width: 2.5px;
    box-shadow: 4px 4px 0px var(--bs-secondary, #6c757d);
    pointer-events: auto;
    transform: none;
  }
  
  .hint-bubble::before {
    display: none !important; /* pas de flèche en mode inline */
  }
}

.hint-bubble::before { /* Flèche (visible sur mobile) */
  content: '';
  position: absolute;
  top: -12px;
  right: 24px;
  left: auto;
  width: 20px;
  height: 20px;
  background: var(--bs-body-bg, #fff);
  border-left: 2.5px solid var(--bs-secondary, #6c757d);
  border-top: 2.5px solid var(--bs-secondary, #6c757d);
  transform: rotate(45deg);
}
.hint-bubble.open { /* Classe à ajouter pour ouvrir la bulle */
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hint-answer { /* Texte de la réponse dans la bulle */
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bs-success-text-emphasis, #0a3622);
  margin-bottom: 0.5rem;
}
.hint-map-container { /* Conteneur de la carte dans la bulle */
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 12px;
  padding: 0.4rem;
  background: linear-gradient(135deg, #eaf4fb 0%, #f0f7ee 100%);
  overflow: hidden;
}
.hint-map-container svg { /* Style de la carte dans la bulle */
  width: 100%;
  height: auto;
  max-height: 400px;
}
.hint-bubble svg .dept { /* Style des départements dans la carte de la bulle (version "désactivée" par défaut) */
  stroke-width: 0.8px;
  vector-effect: non-scaling-stroke;
  cursor: default;
  fill: var(--bs-body-bg, #f8f9fa) !important;
  stroke: var(--mmc-dept-stroke) !important;
}
.hint-bubble svg .dept.hint-correct { /* Style du département correct dans la carte de la bulle (colorisation directe) */
  fill: var(--bs-success) !important;
  fill-opacity: 1;
  stroke: var(--bs-success-text-emphasis) !important;
  stroke-width: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .hint-bubble svg .dept.hovering:not(.hint-correct) {
    fill: #dceaff !important;
    stroke: #5c7ec9 !important;
    stroke-width: 1.3px;
  }
}

/* (petits écrans : géré par le breakpoint 991.98px ci-dessus en mode inline) */
.cursor-question-bubble {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(14px, 14px);
  z-index: 1090;
  pointer-events: none;
  display: none;
  max-width: min(280px, 70vw);
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--bs-warning-border-subtle, #ffe8a1);
  background: var(--bs-warning-bg-subtle, #fffbe6);
  color: var(--bs-warning-text-emphasis, #caa613);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(202, 166, 19, 0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cursor-question-bubble.show {
  display: block;
}
@media (max-width: 991.98px), (pointer: coarse) {
  .cursor-question-bubble,
  .cursor-question-bubble.show {
    display: none !important;
  }
}

/* --- Animation texte flottant au clic --- */
.floating-label {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-weight: 800;
  font-size: 0.9rem;
  text-shadow: 0px 0px 4px rgba(255,255,255,0.9), 0px 0px 8px rgba(255,255,255,0.9);
  transform: translate(-50%, -50%);
  animation: floatUpFade 1.8s ease-out forwards;
}
.floating-label.correct { color: var(--bs-success, #198754); }
.floating-label.incorrect { color: var(--bs-danger, #dc3545); }

@keyframes floatUpFade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1.15); }
}

/* --- Menu utilisateur (pseudo + miniature) --- */
.user-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--bs-secondary-bg, #e9ecef);
  border: 1px solid var(--bs-border-color, #dee2e6);
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 700;
  color: var(--bs-secondary-color, #6c757d);
  flex: 0 0 auto;
}

#user-menu-btn {
  max-width: 230px;
  border-color: var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
  box-shadow: var(--bs-box-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#user-menu-btn:hover,
#user-menu-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--bs-box-shadow);
  border-color: var(--bs-primary-border-subtle, #cfe2ff);
}

#top-btn-login,
#mobile-btn-login {
  color: var(--bs-secondary-color, #6c757d);
  border-color: var(--bs-border-color, #dee2e6);
  background: transparent;
}

#top-btn-login:hover,
#top-btn-login:focus-visible,
#mobile-btn-login:hover,
#mobile-btn-login:focus-visible {
  color: #fff;
  border-color: var(--bs-primary, #0d6efd);
  background: var(--bs-primary, #0d6efd);
}

#userPseudoDisplay {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

/* Accent visuel plus marqué: halo rouge + pulse + reflet rapide toutes les 20s. */
#top-btn-register,
#mobile-btn-register {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform, box-shadow;
  color: var(--mmc-logo-red);
  border-color: var(--mmc-logo-red);
  background: rgba(214, 69, 69, 0.14);
  animation: register-attention 20s ease-in-out infinite;
}

#top-btn-register:hover,
#top-btn-register:focus-visible,
#mobile-btn-register:hover,
#mobile-btn-register:focus-visible {
  color: #fff;
  border-color: var(--mmc-logo-red);
  background: var(--mmc-logo-red);
  box-shadow: inset 0 0 0 999px rgba(214, 69, 69, 0.28);
}

#top-btn-register::after,
#mobile-btn-register::after {
  content: '';
  position: absolute;
  top: -45%;
  left: -160%;
  width: 52%;
  height: 190%;
  transform: rotate(16deg);
  background: linear-gradient(
  90deg,
  rgba(255, 255, 255, 0) 0%,
  rgba(255, 120, 120, 0.2) 24%,
  rgba(255, 95, 95, 0.55) 42%,
  rgba(255, 255, 255, 0.92) 50%,
  rgba(255, 52, 52, 0.85) 58%,
  rgba(255, 95, 95, 0.55) 76%,
  rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  opacity: 0;
  animation: register-sheen 20s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes register-attention {
  0%, 94.8%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(220, 53, 69, 0);
  }
  95.4% {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.22), 0 0.55rem 1.2rem rgba(220, 53, 69, 0.34);
  }
  96.2% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0.34rem rgba(220, 53, 69, 0.12), 0 0.35rem 0.95rem rgba(220, 53, 69, 0.26);
  }
  96.9% {
    transform: translateY(-1px) scale(1.035);
    box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.2), 0 0.65rem 1.4rem rgba(220, 53, 69, 0.36);
  }
  98.1% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0), 0 0.18rem 0.5rem rgba(220, 53, 69, 0.12);
  }
}

@keyframes register-sheen {
  0%, 94.9% {
    left: -160%;
    opacity: 0;
  }
  95.3% {
    opacity: 1;
  }
  97.15% {
    left: 165%;
    opacity: 1;
  }
  98.2%, 100% {
    left: 165%;
    opacity: 0;
  }
}

/* --- Barre de progression des localites acquises --- */
.acq-progress-wrap {
  border-radius: 0.75rem;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  padding: 0.7rem 0.8rem;
  box-shadow: var(--bs-box-shadow-sm);
}

.acq-progress-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
}

.acq-help-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
  flex: 0 0 auto;
}

.acq-help-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  border-radius: 0.45rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 20;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}

.acq-help-dot:hover::after,
.acq-help-dot:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.acq-progress-value {
  font-weight: 700;
  color: var(--bs-primary, #0d6efd);
  min-width: 3.2rem;
  text-align: right;
  flex: 0 0 auto;
}

.acq-progress-track {
  width: 100%;
  flex: 1 1 auto;
  height: 0.55rem;
  background: var(--bs-secondary-bg, #e9ecef);
  border-radius: 999px;
  overflow: hidden;
}

.acq-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0dcaf0 0%, #0d6efd 100%);
  transition: width 0.35s ease;
}

/* --- Bloc Don --- */
.donate-card {
  border-radius: 0.9rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background:
  radial-gradient(140% 100% at 0% 0%, rgba(13, 110, 253, 0.08), transparent 50%),
  radial-gradient(140% 100% at 100% 0%, rgba(13, 202, 240, 0.08), transparent 50%),
  var(--bs-body-bg, #fff);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 0.8rem 0.8rem 0.7rem;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.donate-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.donate-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bs-emphasis-color, #212529);
}

.donate-title-logo {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: baseline;
  transform: translateY(0.02em);
}

/* Logo foncé : sur fond sombre, on l'affiche sur une pastille claire pour rester lisible */
[data-bs-theme="dark"] .donate-title-logo {
  background: #f8f9fa;
  padding: 0.1rem 0.25rem;
  border-radius: 0.35rem;
  box-sizing: content-box;
}

.donate-subtitle {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--bs-secondary-color, #6c757d);
}

.donate-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  border-radius: 999px;
  padding: 0.58rem 1.15rem;
  font-weight: 700;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #fa4869, #c7314d);
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.donate-cta-btn:hover,
.donate-cta-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(234, 88, 12, 0.42);
  color: #fff;
}

.donate-cta-btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28);
}

.donate-cta-btn-sm:hover,
.donate-cta-btn-sm:focus-visible {
  box-shadow: 0 6px 15px rgba(234, 88, 12, 0.36);
}

.donate-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.68);
  padding: 14px;
  z-index: 2000;
}

.donate-overlay.is-open {
  display: flex;
}

.donate-modal {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 1.2rem 1rem 1rem;
  position: relative;
}

.donate-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.donate-close:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--bs-body-color, #212529);
}

.donate-modal-title {
  margin: 0 1.8rem 0.45rem 0;
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  line-height: 1.35;
  font-weight: 800;
}

.donate-modal-text {
  margin: 0 0 0.7rem;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1.58;
  white-space: pre-line;
}

.donate-top-row {
  --donate-photo-size: 130px;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  height: auto;
}

.donate-progress-number {
  margin: 0;
  flex: 1 1 0;
  aspect-ratio: 1;
  min-width: 0;
  height: 100%;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-radius: 0.55rem;
}

.donate-progress-number-value {
  display: inline-block;
  font-size: clamp(2.2rem, 82cqh, 11rem);
  font-family: "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-weight: 200;
  line-height: 1;
  background: linear-gradient(135deg, #fa4869, #c7314d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fa4869;
  letter-spacing: -0.055em;
  font-stretch: condensed;
  transform: scaleX(0.68);
  transform-origin: center center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.donate-progress-text {
  margin: 0;
  flex: 1 1 0;
  aspect-ratio: 1;
  min-width: 0;
  height: 100%;
  container-type: size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: clamp(0.7rem, 9cqh, 1.25rem);
  color: var(--bs-secondary-color, #6b7280);
  text-align: center;
  line-height: 1.15;
  font-weight: 400;
  padding: clamp(0.25rem, 3.5cqh, 0.6rem);
  box-sizing: border-box;
  border-radius: 0.55rem;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.donate-progress-text .dpt-kicker,
.donate-progress-text .dpt-subject,
.donate-progress-text .dpt-bravo {
  display: block;
  width: 100%;
}

.donate-progress-text .dpt-kicker {
  font-size: clamp(0.55rem, 7.5cqh, 0.95rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bs-secondary-color, #64748b);
  margin: 0;
  line-height: 1.05;
}

.donate-progress-text .dpt-subject {
  margin-top: clamp(0.05rem, 1cqh, 0.15rem);
  font-size: clamp(0.65rem, 10cqh, 1.15rem);
  color: var(--bs-body-color, #0f172a);
  font-weight: 600;
  line-height: 1.1;
}

.donate-progress-text .dpt-bravo {
  margin-top: clamp(0.05rem, 1cqh, 0.15rem);
  font-size: clamp(0.55rem, 7.5cqh, 1rem);
  color: #be123c;
  font-weight: 700;
  line-height: 1.08;
}

@media (max-width: 576px) {
  .donate-top-row {
    --donate-photo-size: 104px;
  }
}

.donate-top-photo {
  display: block;
  flex: 1 1 0;
  aspect-ratio: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  border-radius: 0.75rem;
  object-fit: cover;
  min-width: 1px;
}

.donate-top-row--photo-only {
  justify-content: center;
}
.donate-top-row--photo-only .donate-progress-number,
.donate-top-row--photo-only .donate-progress-text {
  display: none;
}
.donate-top-row--photo-only .donate-top-photo {
  flex: 0 0 auto;
  width: var(--donate-photo-size, 130px);
  height: var(--donate-photo-size, 130px);
}

/* --- Staged donate row animation --- */
.donate-top-row.donate-anim-pending .donate-top-photo,
.donate-top-row.donate-anim-pending .donate-progress-number,
.donate-top-row.donate-anim-pending .donate-progress-text {
  opacity: 0;
}

.donate-top-row .donate-top-photo {
  transition: opacity 320ms ease, flex 420ms cubic-bezier(.22,1,.36,1);
}

.donate-top-row .donate-progress-number {
  transition: opacity 280ms ease;
}

.donate-top-row .donate-progress-text {
  transition: opacity 280ms ease;
}



.donate-inline-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  background: #ffedd5;
  color: #9a3412;
  font-weight: 700;
  margin: 0 0 0.85rem;
}

.donate-payments {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.4rem;
}

.donate-payment-note {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
  color: var(--bs-body-color, #2d2d2d);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.donate-link-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 0.8rem;
  font-weight: 700;
  line-height: 1.32;
  padding: 0.75rem 0.78rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.donate-link-btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.donate-link-stripe {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.donate-link-stripe:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.34);
  color: #fff;
}

.donate-link-paypal {
  color: var(--bs-body-color, #212529);
  background: var(--bs-light, #f8fafc);
  border: 1px solid var(--bs-border-color, #cbd5e1);
}

.donate-link-paypal:hover {
  transform: translateY(-1px);
  background: #eef2ff;
  color: var(--bs-body-color, #212529);
}

.donate-thanks {
  margin: 0.85rem 0 0;
  font-weight: 600;
  color: var(--bs-body-color, #212529);
  text-align: center;
}

.mmc-fireworks-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2100;
  overflow: hidden;
}

.mmc-fireworks-burst {
  position: absolute;
  width: 0;
  height: 0;
}

.mmc-fireworks-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--hue, 30) 100% 62%);
  box-shadow: 0 0 8px hsla(var(--hue, 30), 100%, 62%, 0.8);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  animation: mmc-firework-burst 850ms cubic-bezier(0.15, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes mmc-firework-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.35);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mmc-fireworks-layer {
    display: none !important;
  }
}

.info-card {
  height: auto;
  min-height: 0;
}

.info-card .card-body {
  overflow-y: visible;
}

/* --- Fenetre applicative (modal plein contenu) --- */
#app-shell-modal .modal-dialog {
  width: min(1400px, calc(100vw - 2in));
  max-width: min(1400px, calc(100vw - 2in));
  margin: 1.2rem auto;
  height: calc(100vh - 2.4rem);
}

#app-shell-modal.app-shell-compact .modal-dialog {
  width: min(560px, calc(100vw - 1rem));
  max-width: min(560px, calc(100vw - 1rem));
  margin: 1.2rem auto;
  height: auto;
}

#app-shell-modal .modal-content {
  position: relative;
  height: 100%;
  border-radius: 0.9rem;
  overflow: hidden;
}

#app-shell-modal .app-shell-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #212529;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

#app-shell-modal .app-shell-close:hover,
#app-shell-modal .app-shell-close:focus-visible {
  background: #000000;
  color: #ffffff;
}

#app-shell-modal.app-shell-compact .modal-content {
  height: auto;
  max-height: calc(100vh - 2.4rem);
}

#app-shell-frame {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
  display: block;
}

#app-shell-modal.app-shell-compact #app-shell-frame {
  min-height: 0;
  height: 360px;
}

#app-shell-modal .modal-body {
  padding: 0;
}

#map-section {
  margin-top: clamp(0.9rem, 2.2vh, 1.45rem);
}

/* Grisement modal reduit d'environ moitie */
.modal-backdrop.show {
  opacity: 0.25;
}

/* Evite que le bouton indice apparaisse au-dessus de la modal */
body.app-modal-open #hint-wrap {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 768px) {
  #app-shell-modal .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
  }
}

/* ============================================
HERO INTRO SECTION
============================================ */

.hero-container {
  --hero-blue: #0d6efd;
  --hero-cyan: #0dcaf0;
  --hero-amber: #f59e0b;
  --hero-orange: #f97316;
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(0.15rem, 1.4vh, 0.9rem) 1.5rem 1.25rem;
  gap: 0.95rem;
  background: transparent;
}

.hero-container .hero-h1 {
  font-size: clamp(2.15rem, 5.6vw, 3.55rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bs-emphasis-color, #0f172a);
  max-width: 780px;
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
}

.hero-container .hero-h1.hero-pending {
  opacity: 0;
}

.hero-container .hero-h1 .hero-line {
  display: block;
}

.hero-container .hero-h1 .hero-line:nth-child(2) {
  white-space: nowrap;
}

.hero-container .hero-h1 .hero-letter {
  display: inline-block;
  opacity: 0;
  will-change: opacity;
}

.hero-container .hero-h1 .hero-letter.is-visible {
  opacity: 1;
}

.hero-container .hero-h1 .hero-letter.space {
  width: 0.31em;
}

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

.hero-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.26rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.03) 0%, rgba(13, 110, 253, 0.05) 42%, rgba(214, 69, 69, 0.14) 78%, rgba(214, 69, 69, 0.2) 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09);
  margin-top: 0.16rem;
}

.hero-seq-1,
.hero-seq-2,
.hero-seq-3 {
  opacity: 0;
}

#hero-intro.hero-seq-start .hero-seq-1,
#hero-intro.hero-seq-start .hero-seq-2,
#hero-intro.hero-seq-start .hero-seq-3 {
  animation-name: hero-seq-in;
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: forwards;
}

#hero-intro.hero-seq-start .hero-seq-1 {
  animation-delay: 120ms;
}

#hero-intro.hero-seq-start .hero-seq-2 {
  animation-delay: 760ms;
}

#hero-intro.hero-seq-start .hero-seq-3 {
  animation-delay: 1320ms;
}

@keyframes hero-seq-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.43rem 0.92rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
  background: transparent;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-mode-btn:hover {
  color: #1e293b;
}

.hero-mode-btn.is-active {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}

.hero-mode-text {
  --panel-fast-a: rgba(125, 181, 255, 0.24);
  --panel-fast-b: rgba(174, 214, 255, 0.24);
  --panel-fast-c: rgba(250, 167, 187, 0.24);
  --panel-forever-a: rgba(149, 192, 255, 0.2);
  --panel-forever-b: rgba(255, 205, 214, 0.24);
  --panel-forever-c: rgba(246, 166, 181, 0.24);
  margin: 0;
  width: min(760px, 92vw);
  height: clamp(4.9rem, 11vw, 6.2rem);
  padding: 0.85rem 1rem;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: clamp(0.95rem, 1.62vw, 1.07rem);
  font-weight: 700;
  line-height: 1.42;
  white-space: pre-line;
  border-radius: 1rem;
  border: 1px dashed rgba(124, 155, 204, 0.36);
  color: #3c5f8e;
  background: linear-gradient(125deg, var(--panel-fast-a) 0%, var(--panel-fast-b) 52%, var(--panel-fast-c) 100%);
  background-size: 180% 180%;
  background-position: 8% 50%;
  box-shadow: 0 10px 24px rgba(88, 126, 176, 0.14);
  transition: color 520ms cubic-bezier(0.22, 1, 0.36, 1), border-color 520ms cubic-bezier(0.22, 1, 0.36, 1), background 520ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 520ms cubic-bezier(0.22, 1, 0.36, 1), background-position 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-mode-text.is-fast {
  color: #3c5f8e;
  border-color: rgba(111, 152, 214, 0.4);
  background: linear-gradient(125deg, var(--panel-fast-a) 0%, var(--panel-fast-b) 46%, var(--panel-fast-c) 100%);
  background-position: 8% 50%;
  box-shadow: 0 10px 24px rgba(88, 126, 176, 0.14);
}

.hero-mode-text.is-forever {
  color: #7c5063;
  border-color: rgba(210, 133, 151, 0.42);
  background: linear-gradient(125deg, var(--panel-forever-a) 0%, var(--panel-forever-b) 56%, var(--panel-forever-c) 100%);
  background-position: 92% 50%;
  box-shadow: 0 10px 24px rgba(197, 131, 149, 0.16);
}

.hero-supertitle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.1rem 0 0;
  padding: 0.62rem 1.18rem;
  border-radius: 0.72rem;
  border: 1px solid rgba(13, 202, 240, 0.3);
  background: linear-gradient(120deg, rgba(13, 110, 253, 0.1), rgba(13, 202, 240, 0.12), rgba(245, 158, 11, 0.14));
  color: #0b4ed8;
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-explanation {
  font-family: 'Caveat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.53rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--bs-emphasis-color, #0f172a);
  max-width: 620px;
  margin: 0;
}

.hero-explanation .inline-emphasis {
  display: inline;
  color: var(--bs-emphasis-color, #0f172a);
  font-weight: 800;
  background: linear-gradient(transparent 62%, rgba(245, 158, 11, 0.28) 62%);
  border-radius: 0.18em;
  padding: 0 0.08em;
}

.hero-secondary {
  display: inline-block;
  font-size: 0.9rem;
  color: #0b4ed8;
  max-width: 540px;
  margin: 0;
  padding: 0.28rem 0.74rem;
  border-radius: 0.55rem;
  border: 1px dashed rgba(13, 110, 253, 0.38);
  background: linear-gradient(120deg, rgba(13, 202, 240, 0.1), rgba(13, 110, 253, 0.06), rgba(245, 158, 11, 0.1));
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-cta {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 700;
  color: #c2410c;
  margin: 0;
}

/* Scroll arrow bounce */
.scroll-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 237, 213, 0.72));
  color: #ea580c;
  text-decoration: none;
  animation: hero-bounce 2s ease-in-out infinite;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.scroll-arrow:hover {
  border-color: rgba(249, 115, 22, 0.68);
  box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.18);
  color: #c2410c;
}

.scroll-arrow svg {
  width: 22px;
  height: 22px;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-seq-1,
  .hero-seq-2,
  .hero-seq-3 {
    opacity: 1;
    animation: none;
    transform: none;
    filter: none;
  }
}

@media (max-width: 991.98px) {
  #user-menu-btn {
    max-width: none;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }
  
  #userPseudoDisplay {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-container .hero-h1 {
    max-width: 100%;
    width: 100%;
    padding-inline: 0.15rem;
    font-size: clamp(1.72rem, 8.8vw, 2.35rem);
  }
  
  .hero-container .hero-h1 .hero-line:nth-child(2) {
    white-space: normal;
  }
  
  .hero-mode-text {
    width: min(760px, 94vw);
    height: auto;
    min-height: 6.5rem;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    margin-bottom: 0.62rem;
  }
}

/* =================================================
MODE SOMBRE : TEXTES ET PANNEAUX CODÉS EN DUR
================================================= */

[data-bs-theme="dark"] .material-symbols-outlined,
[data-bs-theme="dark"] #user-menu-container .dropdown-menu .material-symbols-outlined {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] #user-menu-container .dropdown-menu #menu-parametres-link .material-symbols-outlined,
[data-bs-theme="dark"] #user-menu-container .dropdown-menu #menu-statistiques-link .material-symbols-outlined,
[data-bs-theme="dark"] #user-menu-container .dropdown-menu #menu-statistiques-generales-link .material-symbols-outlined,
[data-bs-theme="dark"] #user-menu-container .dropdown-menu #btnLogout .material-symbols-outlined {
  color: var(--bs-body-color);
}

/* Bouton de fermeture : fond clair + croix sombre en mode sombre */
[data-bs-theme="dark"] #app-shell-modal .app-shell-close {
  background: #f8f9fa;
  color: #1f1f1f;
}

[data-bs-theme="dark"] #app-shell-modal .app-shell-close:hover,
[data-bs-theme="dark"] #app-shell-modal .app-shell-close:focus-visible {
  background: #ffffff;
  color: #000000;
}

[data-bs-theme="dark"] .nav-maps-link,
[data-bs-theme="dark"] .nav-maps-link:hover,
[data-bs-theme="dark"] .nav-mobile-panel .nav-mobile-link,
[data-bs-theme="dark"] .nav-mobile-panel .nav-mobile-link:hover {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .nav-maps-link::after,
[data-bs-theme="dark"] .nav-hamburger-icon span {
  background: var(--bs-body-color);
}

[data-bs-theme="dark"] .nav-maps-dropdown {
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .hero-mode-btn {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .hero-mode-btn:hover {
  color: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] .hero-mode-btn.is-active {
  color: var(--bs-body-bg);
  background: var(--bs-body-color);
}

[data-bs-theme="dark"] .hero-mode-text,
[data-bs-theme="dark"] .hero-mode-text.is-fast {
  color: #cfe0f7;
  background: linear-gradient(125deg, rgba(53, 90, 150, 0.35) 0%, rgba(74, 116, 180, 0.32) 52%, rgba(120, 88, 120, 0.3) 100%);
}

[data-bs-theme="dark"] .hero-mode-text.is-forever {
  color: #f3cfd9;
  background: linear-gradient(125deg, rgba(120, 78, 108, 0.34) 0%, rgba(150, 92, 120, 0.3) 56%, rgba(120, 78, 100, 0.3) 100%);
}

[data-bs-theme="dark"] .hero-supertitle {
  color: #8ec5ff;
}

[data-bs-theme="dark"] .hero-secondary {
  color: #8ec5ff;
}

[data-bs-theme="dark"] .hero-cta {
  color: #fdba74;
}

[data-bs-theme="dark"] .scroll-arrow {
  border-color: rgba(249, 115, 22, 0.55);
  background: linear-gradient(135deg, rgba(40, 30, 20, 0.96), rgba(60, 40, 20, 0.72));
  color: #fdba74;
}

[data-bs-theme="dark"] .scroll-arrow:hover {
  color: #fed7aa;
}

[data-bs-theme="dark"] .hint-bulb-btn {
  color: #f0c15a;
}

[data-bs-theme="dark"] .acq-help-dot {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
}

[data-bs-theme="dark"] .acq-help-dot::after {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}

[data-bs-theme="dark"] .info-card {
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}
