/* =============================================================
   index.css — Styles exclusifs à la page d'accueil (index.html)
   Contient : titre, boutons de sélection de mode, profil,
   avatar, liens sociaux, modale daily, modale news,
   thème Nouvel An Chinois, bouton PDF/updates, share card.
   ============================================================= */

/* Override bottomNav.css body padding-bottom — on index.html the footer
   fills the remaining space itself, so body padding is not needed. */
body {
  padding-bottom: 0 !important;
}

footer {
  padding-bottom: 82px; /* fills the 62px bottom-nav area + breathing room */
}

/* =====================================================
   1. TITRE ET WRAPPER
   ===================================================== */

/* ID utilisé dans certains contextes pour afficher un titre */
#title {
  display: inline-block;
  color: #51ff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 30px;
  padding: 10px 20px;
  border-radius: 10px;
}

/* Centrage du bloc titre */
.title-wrapper {
  text-align: center;
}

/* Titre du sélecteur de modes de jeu */
.gamemode-title {
  text-align: center;
  color: white;
  font-family: "Times New Roman", Times, serif;
  font-size: 27px;
  border: 4px solid rgb(202, 202, 202);
  padding: 11px 22px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(8, 8, 8, 0.7);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: block;
  width: fit-content;
  margin: 22px auto;
}

/* Grille 2×3 — desktop (>768px)
   Colonne gauche : Classique · Emoji · All-Out Attack
   Colonne droite : Silhouette · Personae · Music          */
#gameModeSelector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 36px;
  max-width: 1080px;
  width: 92%;
  margin: 0 auto;
  padding: 0;
}

/* =====================================================
   2. BOUTONS DE SÉLECTION DE MODE DE JEU
   Chaque bouton est une image cliquable menant au mode.
   ===================================================== */

.gamemode-button {
  width: 100%;
  max-width: 500px;
  height: auto;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  display: block;
  margin: 20px auto;
}

.gamemode-button img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* =====================================================
   BOUTON CLASSIQUE MODE (Persona 3 — Dark Hour)
   Comportement identique P4/P5 :
   → Défaut  : image visible normalement
   → Hover   : image disparaît (fill-mode:both),
               lune s'expand, particules flottent
   → Révèle  : image monte avec filtre bleuté progressif
   ===================================================== */

/* --- Conteneur principal ---
   Responsive comme .gamemode-button : 100% / max 500px.
   Fond bleu-nuit Persona 3, bordure bleue au survol.
*/
.p3-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 90px;
  background-color: #020813;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

/* Halo bleu au survol */
.p3-container:hover {
  will-change: transform;
  box-shadow: 0 6px 24px rgba(32, 131, 245, 0.85);
  border-color: rgb(32, 131, 245);
}

/* --- Lune de l'Heure Sombre ---
   Petite (scale 0.2) et invisible au repos.
   S'expand dramatiquement au survol (scale 1.6).
*/
.p3-moon {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #fcf186 0%, #d4db48 60%, transparent 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  z-index: 1;
  filter: blur(8px);
  transition:
    transform 1.2s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 1s ease;
}

.p3-container:hover .p3-moon {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 0.85;
}

/* --- Particules bleues remontantes ---
   Style Persona 3 Reload : lueur cyan/bleue.
*/
.p3-particle {
  position: absolute;
  bottom: -20px;
  width: 3px;
  height: 25px;
  background-color: #2083f5;
  box-shadow:
    0 0 10px #2083f5,
    0 0 20px #00e5ff;
  border-radius: 50px;
  opacity: 0;
  z-index: 2;
}

.p3-p1 {
  left: 15%;
}
.p3-p2 {
  left: 45%;
  height: 15px;
}
.p3-p3 {
  left: 75%;
  height: 35px;
}
.p3-p4 {
  left: 90%;
}

.p3-container:hover .p3-particle {
  animation: floatUp 1s ease-in-out infinite;
}

.p3-container:hover .p3-p1 {
  animation-delay: 0s;
  animation-duration: 1.2s;
}
.p3-container:hover .p3-p2 {
  animation-delay: 0.3s;
  animation-duration: 0.9s;
}
.p3-container:hover .p3-p3 {
  animation-delay: 0.1s;
  animation-duration: 1.5s;
}
.p3-container:hover .p3-p4 {
  animation-delay: 0.5s;
  animation-duration: 1.1s;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(-150px) scaleY(1.5);
    opacity: 0;
  }
}

/* --- Image principale ---
   Visible normalement par défaut (pas de filtre).
   Au survol : fill-mode:both => opacity:0 IMMÉDIAT,
   lune et particules jouent librement (image cachée ~45%),
   puis image révélée avec montée de luminosité bleue.
*/
.p3-main-img {
  position: relative;
  z-index: 3;
  width: 100%;
  height: auto;
  display: block;
}

.p3-container:hover .p3-main-img {
  animation: p3Reveal 2s ease-out both;
}

/* Révélation P3 : image sombre puis s'illumine progressivement.
   ┌─ 0%–45%  : image invisible — lune et particules visibles  ───┐
   │  45%–72% : amorce sombre avec légère lueur bleue              │
   │  72%–100%: remontée vers pleine luminosité                    │
   └──────────────────────────────────────────────────────────── ┘
*/
@keyframes p3Reveal {
  0% {
    opacity: 0;
    filter: brightness(0.1) grayscale(70%) blur(3px);
    transform: scale(0.95);
  }
  45% {
    opacity: 0;
    filter: brightness(0.15) grayscale(50%);
    transform: scale(0.95);
  }
  72% {
    opacity: 0.65;
    filter: brightness(0.7) grayscale(10%);
    transform: scale(1);
  }
  100% {
    opacity: 1;
    filter: brightness(1) grayscale(0%);
    transform: scale(1.02);
  }
}

/* --- Responsive P3 --- */

/* Tablette (<=768px) : lune légèrement réduite */
@media (max-width: 768px) {
  .p3-container {
    min-height: 70px;
  }
  .p3-moon {
    width: 110px;
    height: 110px;
  }
}

/* Mobile (<=480px) : lune et particules réduites */
@media (max-width: 480px) {
  .p3-container {
    min-height: 60px;
    border-radius: 6px;
  }
  .p3-moon {
    width: 80px;
    height: 80px;
  }
  .p3-particle {
    height: 18px;
  }
  .p3-p3 {
    height: 24px;
  }
}

/* =====================================================
   BOUTON EMOJI — Animation style Persona 4
   Fond jaune P4 avec arc-en-ciel + fleurs animés.
   Au survol : explosion d'arcs et de décorations,
   image qui s'éclaire progressivement.
   ===================================================== */

/* --- Conteneur principal ---
   Taille responsive comme .gamemode-button :
   100% de largeur, max 500px, hauteur automatique.
   overflow: hidden rogne les décorations hors-bords
   (effet "quart de cercle" pour l'arc-en-ciel).
*/
.p4-container {
  position: relative;
  background-color: #fce404; /* Jaune emblématique Persona 4 */
  border: none;
  cursor: pointer;
  /* Responsive : même comportement que .gamemode-button */
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 90px; /* Espace pour les décos */
  overflow: hidden;
  border-radius: 15px; /* Aligné avec les autres boutons */
  display: flex;
  justify-content: center;
  align-items: center;
  /* Transition combinée : lueur + légère mise à l'échelle */
  transition:
    box-shadow 0.3s ease,
    transform 0.2s ease;
  padding: 6px 0;
  margin: 20px auto; /* Centré comme .gamemode-button */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Lueur jaune + léger scale au survol */
.p4-container:hover {
  will-change: transform;
  box-shadow:
    0 8px 28px rgba(240, 198, 12, 0.9),
    0 0 18px rgba(255, 220, 0, 0.5);
  transform: scale(1.03);
}

/* --- Image principale ---
   Pleine largeur du conteneur, transition douce
   (gère aussi le retour à l'état normal après hover).
*/
.p4-main-img {
  position: relative;
  z-index: 10;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* Révélation douce — 2s avec ease-in-out pour une montée
   très progressive, sans brutalité à mi-chemin.
   animation-fill-mode: both → applique opacity:0 dès le hover,
   les décos restent visibles pendant toute la montée.
*/
.p4-container:hover .p4-main-img {
  animation: slowReveal 2s ease-in-out both;
}

/* --- Décorations (cachées par défaut) ---
   pointer-events: none pour ne pas gêner les clics.
*/
.p4-rainbow,
.p4-flower {
  position: absolute;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

/* --- Arc-en-ciel ---
   Cercle positionné hors-bords (top/left négatifs) :
   overflow:hidden le rogne en quart de cercle décoratif
   dans le coin haut-gauche du bouton.
   box-shadow multicouches = anneaux colorés (rouge, jaune, bleu).
*/
.p4-rainbow {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 16px solid #ff7700; /* Anneau orange */
  box-shadow:
    inset 0 0 0 16px #ffd900,
    /* Anneau jaune intérieur */ 0 0 0 16px #ff0055,
    /* Anneau rose-rouge extérieur */ 0 0 0 32px rgba(0, 170, 255, 0.55); /* Anneau bleu diffus */
  z-index: 1;
  top: -90px;
  left: -90px;
}

/* --- Fleurs / décorations ---
   Emoji colorés aux 3 coins du bouton.
*/
.p4-flower {
  font-size: 36px;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.flower-1 {
  top: 8px;
  right: 16px;
  color: #ff0055;
} /* Coin haut-droit */
.flower-2 {
  bottom: 8px;
  left: 16px;
  color: #4caf50;
} /* Coin bas-gauche */
.flower-3 {
  bottom: 14px;
  right: 44px;
  color: #ff7a00;
} /* Bas-droit intérieur */

/* --- Déclenchement des animations au survol --- */
.p4-container:hover .p4-rainbow {
  animation: popRainbow 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Fleurs : délais décalés pour effet cascade */
.p4-container:hover .flower-1 {
  animation: popFlower 0.45s ease-out 0.05s forwards;
}
.p4-container:hover .flower-2 {
  animation: popFlower 0.45s ease-out 0.18s forwards;
}
.p4-container:hover .flower-3 {
  animation: popFlower 0.45s ease-out 0.3s forwards;
}

/* =====================================================
   KEYFRAMES — Animations bouton Emoji
   ===================================================== */

/* Fleurs : apparition avec rebond et légère rotation */
@keyframes popFlower {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.25) rotate(40deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(18deg);
  }
}

/* Arc-en-ciel : expansion depuis le coin haut-gauche */
@keyframes popRainbow {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 0.75;
    transform: scale(1.6);
  }
}

/* Révélation douce de l'image en fondu très progressif.
   Durée : 2s pour laisser respirer chaque étape.
   L'opacité monte très lentement, jamais d'un coup.
   ┌─ 0% → 35%  : image invisible, décos apparaissent  ─────────┐
   │  35% → 55% : amorce très légère (opacity 0→0.15)            │
   │  55% → 75% : montée douce (opacity 0.15→0.5)                │
   │  75% → 100%: finalisation (opacity 0.5→1) avec petit éclat  │
   └─────────────────────────────────────────────────────────────┘
*/
@keyframes slowReveal {
  0% {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(2px);
  }
  35% {
    opacity: 0; /* Décos encore en train d'apparaître */
    transform: scale(0.96);
    filter: blur(2px);
  }
  50% {
    opacity: 0.12; /* Amorce à peine perceptible */
    transform: scale(0.97);
    filter: blur(1.5px);
  }
  65% {
    opacity: 0.35; /* Monte doucement */
    transform: scale(0.99);
    filter: blur(0.8px) brightness(1.08);
  }
  80% {
    opacity: 0.65; /* Toujours pas fini, laisse voir les décos */
    transform: scale(1.01);
    filter: blur(0.3px) brightness(1.1);
  }
  92% {
    opacity: 0.88; /* Presque là */
    transform: scale(1.005);
    filter: brightness(1.05);
  }
  100% {
    opacity: 1; /* Image pleinement révélée */
    transform: scale(1);
    filter: brightness(1);
  }
}

/* =====================================================
   RESPONSIVE — Bouton Emoji (p4-container)
   ===================================================== */

/* --- Tablette (≤ 768px) ---
   Décorations réduites, border-radius aligné.
   Le transform scale du hover est désactivé sur
   appareils tactiles via global.css (pointer: coarse).
*/
@media (max-width: 768px) {
  .p4-container {
    min-height: 70px;
    border-radius: 12px;
  }

  /* Fleurs plus petites sur tablette */
  .p4-flower {
    font-size: 26px;
  }

  /* Arc-en-ciel réduit proportionnellement */
  .p4-rainbow {
    width: 160px;
    height: 160px;
    border-width: 13px;
    top: -70px;
    left: -70px;
    box-shadow:
      inset 0 0 0 13px #ffd900,
      0 0 0 13px #ff0055,
      0 0 0 26px rgba(0, 170, 255, 0.5);
  }
}

/* --- Mobile (≤ 480px) ---
   Compact, fleurs discrètes, arc réduit.
*/
@media (max-width: 480px) {
  .p4-container {
    min-height: 60px;
    border-radius: 10px;
  }

  /* Fleurs encore plus petites */
  .p4-flower {
    font-size: 20px;
  }

  /* Repositionnement des fleurs pour le format étroit */
  .flower-1 {
    top: 5px;
    right: 10px;
  }
  .flower-2 {
    bottom: 5px;
    left: 10px;
  }
  .flower-3 {
    bottom: 10px;
    right: 30px;
  }

  /* Arc-en-ciel minimal */
  .p4-rainbow {
    width: 120px;
    height: 120px;
    border-width: 11px;
    top: -55px;
    left: -55px;
    box-shadow:
      inset 0 0 0 11px #ffd900,
      0 0 0 11px #ff0055,
      0 0 0 22px rgba(0, 170, 255, 0.45);
  }
}
/* =====================================================
   BOUTON ALL-OUT ATTACK — Animation cinématique Persona 5
   Séquence complète au survol :
   0.00s  Flash rouge couvre tout le bouton
   0.00s  Fond chevrons P5 explose (rouge/noir)
   0.02s  8 traînées rouge/blanc en rafale gauche→droite
   0.08s  8 étoiles P5 explosives (3 variantes)
   0.22s  Titre ALL-OUT / ATTACK s'écrase verticalement (impact)
   0.42s  Masque de Joker surgit au centre (zoom + rebond élastique)
   1.5s+  Masque s'efface, image principale remonte
   ===================================================== */

/* --- Conteneur principal ---
   Fond noir, bordure blanche + halo rouge intense au survol.
   Overflow:hidden clipse toutes les animations.
*/
.p5-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 90px;
  background: #0a0a0a;
  border: 3px solid white;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  padding: 0;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Halo rouge vif Phantom Thieves — transition ultra-rapide */
.p5-container:hover {
  will-change: transform;
  box-shadow:
    0 8px 40px rgba(255, 0, 0, 1),
    0 0 20px rgba(255, 0, 0, 0.5);
  border-color: #ff0000;
}

/* =====================================================
   COUCHES D'ARRIÈRE-PLAN (z-index 1)
   ===================================================== */

/* Conteneur global des couches d'animation */
.p5-background-layers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Flash radial centré — projecteur rouge qui explose depuis le centre.
   Plus cinématique qu'un simple full-cover.
*/
.p5-impact-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse 90% 100% at 50% 50%,
    rgba(220, 0, 0, 0.92) 0%,
    rgba(160, 0, 0, 0.55) 40%,
    transparent 75%
  );
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.p5-container:hover .p5-impact-flash {
  animation: p5ImpactFlash 0.3s ease-out 0s both;
}

/* Bandes diagonales sombres (style danger P5) + projecteur rouge central.
   Remplace le motif de chevrons trop uniforme.
*/
.p5-bg-jagged {
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(ellipse 72% 82% at 50% 50%, rgba(190, 0, 0, 0.55) 0%, transparent 65%),
    repeating-linear-gradient(-45deg, #1e0000 0px, #1e0000 18px, #060606 18px, #060606 36px);
  opacity: 0.12;
  transition: opacity 0.04s ease;
}

.p5-container:hover .p5-bg-jagged {
  opacity: 1;
  transition: opacity 0.04s ease;
}

/* --- Traînées de vitesse gauche→droite ---
   8 paralléllogrammes rouge/blanc en rafale, plus épais et intenses.
*/
.p5-speed-trails {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Forme de base : paralléllogramme pointant vers la droite */
.p5-trail {
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateX(-115%);
  clip-path: polygon(0 10%, 92% 10%, 100% 50%, 92% 90%, 0 90%);
}

/* 8 traînées — hauteurs, largeurs et couleurs variées */
.trail-1 {
  top: 0%;
  height: 16%;
  width: 75%;
  background: rgba(220, 0, 0, 1);
}
.trail-2 {
  top: 13%;
  height: 11%;
  width: 90%;
  background: rgba(255, 255, 255, 0.95);
}
.trail-3 {
  top: 23%;
  height: 17%;
  width: 72%;
  background: rgba(200, 0, 0, 0.9);
}
.trail-4 {
  top: 38%;
  height: 11%;
  width: 88%;
  background: rgba(255, 255, 255, 0.8);
}
.trail-5 {
  top: 48%;
  height: 18%;
  width: 70%;
  background: rgba(210, 0, 0, 0.92);
}
.trail-6 {
  top: 64%;
  height: 10%;
  width: 82%;
  background: rgba(255, 255, 255, 0.65);
}
.trail-7 {
  top: 73%;
  height: 16%;
  width: 68%;
  background: rgba(185, 0, 0, 0.85);
}
.trail-8 {
  top: 87%;
  height: 10%;
  width: 78%;
  background: rgba(255, 255, 255, 0.55);
}

/* Rafale ultra-serrée : toutes les traînées défilent en 0.40s */
.p5-container:hover .trail-1 {
  animation: speedTrail 0.35s ease-out 0s both;
}
.p5-container:hover .trail-2 {
  animation: speedTrail 0.35s ease-out 0.03s both;
}
.p5-container:hover .trail-3 {
  animation: speedTrail 0.35s ease-out 0.05s both;
}
.p5-container:hover .trail-4 {
  animation: speedTrail 0.35s ease-out 0.08s both;
}
.p5-container:hover .trail-5 {
  animation: speedTrail 0.35s ease-out 0.1s both;
}
.p5-container:hover .trail-6 {
  animation: speedTrail 0.35s ease-out 0.13s both;
}
.p5-container:hover .trail-7 {
  animation: speedTrail 0.35s ease-out 0.16s both;
}
.p5-container:hover .trail-8 {
  animation: speedTrail 0.35s ease-out 0.19s both;
}

/* --- Étoiles explosives P5 ---
   Zooment depuis 0, pulsent fort, puis s'évaporent en tournant.
   3 variantes (Burst / Spin / Flash) pour plus de dynamisme.
*/
.p5-stars-burst-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.p5-starburst {
  position: absolute;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  line-height: 1;
}

/* Plus grosses et plus lumineuses que l'ancienne version */
.sburst-1 {
  top: 5%;
  left: 5%;
  font-size: 42px;
  color: #cc0000;
  text-shadow:
    0 0 20px #ff4400,
    0 0 40px #ff2200;
}
.sburst-2 {
  top: 50%;
  left: 55%;
  font-size: 28px;
  color: white;
  text-shadow:
    0 0 16px #ffffff,
    0 0 32px #cc0000;
}
.sburst-3 {
  top: 3%;
  right: 8%;
  font-size: 50px;
  color: #cc0000;
  text-shadow:
    0 0 24px #ff2200,
    0 0 50px #ff0000;
}
.sburst-4 {
  bottom: 6%;
  left: 18%;
  font-size: 28px;
  color: white;
  text-shadow:
    0 0 14px #ffffff,
    0 0 28px #cc0000;
}
.sburst-5 {
  top: 35%;
  right: 4%;
  font-size: 36px;
  color: #ff2200;
  text-shadow:
    0 0 18px #ff4400,
    0 0 36px #ff0000;
}
.sburst-6 {
  top: 20%;
  left: 40%;
  font-size: 20px;
  color: white;
  text-shadow:
    0 0 12px #ffffff,
    0 0 24px #cc0000;
}
.sburst-7 {
  bottom: 12%;
  right: 12%;
  font-size: 34px;
  color: #ff3300;
  text-shadow:
    0 0 18px #ff5500,
    0 0 36px #ff0000;
}
.sburst-8 {
  top: 60%;
  left: 8%;
  font-size: 26px;
  color: white;
  text-shadow:
    0 0 14px #ffffff,
    0 0 26px #cc0000;
}

/* Jaillissent juste après les traînées — 3 variantes */
.p5-container:hover .sburst-1 {
  animation: starBurst 0.7s ease-in-out 0.06s forwards;
}
.p5-container:hover .sburst-2 {
  animation: starSpin 0.75s ease-in-out 0.2s forwards;
}
.p5-container:hover .sburst-3 {
  animation: starFlash 0.55s ease-in-out 0.03s forwards;
}
.p5-container:hover .sburst-4 {
  animation: starSpin 0.68s ease-in-out 0.28s forwards;
}
.p5-container:hover .sburst-5 {
  animation: starBurst 0.72s ease-in-out 0.12s forwards;
}
.p5-container:hover .sburst-6 {
  animation: starFlash 0.5s ease-in-out 0.24s forwards;
}
.p5-container:hover .sburst-7 {
  animation: starBurst 0.8s ease-in-out 0.08s forwards;
}
.p5-container:hover .sburst-8 {
  animation: starSpin 0.65s ease-in-out 0.35s forwards;
}

/* =====================================================
   MASQUE DE JOKER — z-index 15, au-dessus de tout
   Chute depuis le haut du bouton → impact au centre (squash) →
   rebond élastique → tient → s'efface doucement vers le bas.
   ===================================================== */

.p5-joker-mask {
  position: absolute;
  /* Centrage exact — ancre le centre du div au centre du conteneur */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Dimensions explicites pour que translate calcule juste */
  width: fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
}

/* Masque grand — halo rouge, ombre portée */
.p5-joker-img {
  /* Pas de max-width en % (le % serait relatif à la div parente sans largeur fixe) */
  height: 160px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 10px #ff0000) drop-shadow(0 0 24px #ff4400) drop-shadow(0 0 5px #000)
    drop-shadow(0 3px 10px rgba(0, 0, 0, 0.9));
}

.p5-container:hover .p5-joker-mask {
  animation: jokerReveal 2s ease-out 0.38s both;
}

/* =====================================================
   TITRE ALL-OUT / ATTACK — z-index 10
   Impact vertical : ALL-OUT crashe depuis le haut,
   ATTACK crashe depuis le bas. Scale overshoot au contact.
   ===================================================== */

.p5-main-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.p5-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Base commune */
.p5-line-1,
.p5-line-2 {
  display: block;
  font-family: "Helvetica Neue", "Arial Black", Arial, sans-serif;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  opacity: 0;
}

/* "ALL-OUT" — blanc, police Persona 5, crash depuis le haut */
.p5-line-1 {
  font-family: "Persona5", "Arial Black", Arial, sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  color: white;
  letter-spacing: 5px;
  text-shadow:
    0 0 14px rgba(255, 0, 0, 0.95),
    2px 2px 0 #000;
  transform: translateY(-40px) scale(1.4);
}

/* "ATTACK" — rouge vif, police Persona 5, très impactant */
.p5-line-2 {
  font-family: "Persona5", "Arial Black", Arial, sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 46px;
  color: #cc0000;
  letter-spacing: 3px;
  text-shadow:
    0 0 22px rgba(255, 0, 0, 1),
    3px 3px 0 #000,
    -2px -2px 0 #000;
  transform: translateY(40px) scale(1.4);
}

/* Crash vertical avec overshoot, tient, puis disparaît */
.p5-container:hover .p5-line-1 {
  animation: p5TitleCrashTop 1.4s ease-out 0.22s both;
}
.p5-container:hover .p5-line-2 {
  animation: p5TitleCrashBot 1.4s ease-out 0.28s both;
}

/* =====================================================
   IMAGE PRINCIPALE — z-index 2
   Cachée immédiatement (fill-mode:both), révélée après le masque.
   Invisible 0%→60%, puis remonte progressivement.
   ===================================================== */

.p5-main-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.p5-container:hover .p5-main-img {
  animation: p5Reveal 2.5s ease-out both;
}

/* =====================================================
   KEYFRAMES — Bouton All-Out Attack
   ===================================================== */

/* Choc visuel initial — rouge plein puis transparent */
@keyframes p5ImpactFlash {
  0% {
    opacity: 0.9;
  }
  55% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
  }
}

/* Traînée de vitesse : sweep gauche→droite en paralléllogramme */
@keyframes speedTrail {
  0% {
    opacity: 0;
    transform: translateX(-115%);
  }
  8% {
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(170%);
  }
}

/* Étoile variante 1 — zoom explosif puis expand et disparaît */
@keyframes starBurst {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.8) rotate(12deg);
  }
  55% {
    opacity: 0.9;
    transform: scale(1.3) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(2.5) rotate(30deg);
  }
}

/* Étoile variante 2 — apparaît en tournant puis s'évapore */
@keyframes starSpin {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-60deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.7) rotate(0deg);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.3) rotate(25deg);
  }
  100% {
    opacity: 0;
    transform: scale(2) rotate(90deg);
  }
}

/* Étoile variante 3 — double flash percutant */
@keyframes starFlash {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  12% {
    opacity: 1;
    transform: scale(2);
  }
  28% {
    opacity: 0.2;
    transform: scale(1.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.8);
  }
  75% {
    opacity: 0.4;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

/* Titre ligne 1 "ALL-OUT" — crash depuis le haut, rebond, tient, s'efface */
@keyframes p5TitleCrashTop {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(1.4);
    animation-timing-function: cubic-bezier(0.3, 1.5, 0.5, 1);
  }
  18% {
    opacity: 1;
    transform: translateY(3px) scale(0.95);
  }
  28% {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation-timing-function: linear;
  }
  62% {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

/* Titre ligne 2 "ATTACK" — crash depuis le bas, rebond, tient, s'efface */
@keyframes p5TitleCrashBot {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(1.4);
    animation-timing-function: cubic-bezier(0.3, 1.5, 0.5, 1);
  }
  18% {
    opacity: 1;
    transform: translateY(-3px) scale(0.95);
  }
  28% {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation-timing-function: linear;
  }
  62% {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

/* Masque de Joker — matérialisation douce depuis le néant.
   Pas de choc, pas d'impact : le masque se révèle progressivement
   comme une invocation de fin d'animation, puis s'efface.
   Le blur initial donne l'impression qu'il surgit de la brume rouge.
*/
@keyframes jokerReveal {
  /* Invisible, légèrement flou, légèrement petit */
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    filter: blur(6px) brightness(2.5) drop-shadow(0 0 20px #ff0000) drop-shadow(0 0 40px #ff4400);
  }
  /* Commence à apparaître — toujours flou, brume rouge */
  18% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.93);
    filter: blur(2.5px) brightness(1.8) drop-shadow(0 0 18px #ff0000) drop-shadow(0 0 36px #ff4400);
  }
  /* Net, pleine opacité — s'installe au centre avec léger overshoot */
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
    filter: blur(0) brightness(1.3) drop-shadow(0 0 14px #ff0000) drop-shadow(0 0 28px #ff4400);
  }
  /* Position stable — halo rouge qui pulse doucement */
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0) brightness(1.1) drop-shadow(0 0 18px #ff2200) drop-shadow(0 0 38px #ff5500);
  }
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0) brightness(1) drop-shadow(0 0 12px #ff0000) drop-shadow(0 0 26px #ff3300);
  }
  /* Disparaît dans la brume — effet symétrique à l'entrée */
  88% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(0.94);
    filter: blur(2px) brightness(0.8) drop-shadow(0 0 8px #ff0000);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    filter: blur(5px) brightness(0.3) drop-shadow(0 0 4px #ff0000);
  }
}

/* Révélation image — cachée pendant que le masque domine.
   0%–60%  : image invisible (masque et animations visibles)
   60%–82% : fondu progressif
   82%–100%: image stable à pleine opacité
*/
@keyframes p5Reveal {
  0% {
    opacity: 0;
    transform: scale(0.97);
  }
  60% {
    opacity: 0;
    transform: scale(0.97);
  }
  82% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =====================================================
   RESPONSIVE — Bouton P5 All-Out Attack
   ===================================================== */

/* Tablette (<=768px) */
@media (max-width: 768px) {
  .p5-container {
    min-height: 70px;
    border-width: 2px;
  }
  .p5-line-1 {
    font-size: 16px;
    letter-spacing: 2px;
  }
  .p5-line-2 {
    font-size: 28px;
    letter-spacing: 1px;
  }
  .sburst-1,
  .sburst-2,
  .sburst-4 {
    font-size: 26px;
  }
  .sburst-3,
  .sburst-5 {
    font-size: 22px;
  }
  .p5-joker-img {
    height: 110px;
  }
}

/* Mobile (<=480px) */
@media (max-width: 480px) {
  .p5-container {
    min-height: 60px;
    border-width: 1px;
    border-radius: 4px;
  }
  .p5-line-1 {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .p5-line-2 {
    font-size: 22px;
    letter-spacing: 0.5px;
  }
  .sburst-1,
  .sburst-2,
  .sburst-4 {
    font-size: 20px;
  }
  .sburst-3,
  .sburst-5 {
    font-size: 16px;
  }
  .trail-1,
  .trail-3,
  .trail-5,
  .trail-7 {
    height: 14%;
  }
  .trail-2,
  .trail-4,
  .trail-6,
  .trail-8 {
    height: 10%;
  }
  .p5-joker-img {
    height: 76px;
  }
}

/* =====================================================
   BOUTON SHADOWS MODE (Velvet Room)
   Même mécanique P3/P4/P5 : image visible → hover
   cache l'image, chaînes tombent + runes + titre,
   puis image revient progressivement.
   ===================================================== */

/* --- Conteneur principal --- */
.dark-velvet-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 90px;
  background: #020813;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  padding: 0;
}

.dark-velvet-container:hover {
  will-change: transform;
  box-shadow: 0 8px 30px rgba(80, 40, 220, 0.85);
  border-color: rgba(100, 60, 255, 0.7);
}

/* --- Fond dégradé violet Velvet Room --- */
.shadow-bg-layers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.shadow-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, #1a0060 0%, #00051a 70%);
  opacity: 0;
}

.dark-velvet-container:hover .shadow-bg-gradient {
  animation: shadowBgReveal 2s ease-out both;
}

@keyframes shadowBgReveal {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.75;
  }
}

/* =====================================================
   CHAÎNES VELVET ROOM
   Deux chaînes métalliques bleues qui tombent depuis
   le haut au survol, balancent, puis s'évaporent.
   transform-origin: top = effet pendule réaliste.
   ===================================================== */

.velvet-chains {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/*
  3 chaînes coin-à-coin, angles différents — elles s'entrecroisent.
  Méthode : éléments larges (200%) centrés, tournés pour relier les coins opposés.
  Animation : clip-path s'ouvre d'un côté → la chaîne "s'attache" d'un coin à l'autre.
  Z-index différents pour l'effet d'entrelacement.
*/
.chain-1,
.chain-2,
.chain-3 {
  position: absolute;
  left: -50%;
  top: 50%;
  width: 200%;
  background-image: url('data:image/svg+xml;utf8,<svg width="80" height="30" viewBox="0 0 80 30" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="4" width="34" height="22" rx="11" fill="%23112038" stroke="%235c88cc" stroke-width="3"/><rect x="4" y="6" width="30" height="8" rx="4" fill="%23304878" opacity="0.55"/><rect x="4" y="18" width="30" height="6" rx="3" fill="%230a1830" opacity="0.35"/><rect x="34" y="10" width="12" height="10" fill="%230d1c3a"/><rect x="44" y="4" width="34" height="22" rx="11" fill="%230f1c3a" stroke="%234a78bc" stroke-width="3"/><rect x="46" y="6" width="30" height="8" rx="4" fill="%23284070" opacity="0.45"/><rect x="46" y="18" width="30" height="6" rx="3" fill="%230a1628" opacity="0.3"/></svg>');
  background-repeat: repeat-x;
  background-size: auto 100%;
  opacity: 0;
  transform-origin: 50% 50%;
}

/* Chaîne 1 — TL→BR (14°), avant-plan, plus épaisse */
.chain-1 {
  height: 26px;
  z-index: 6;
  transform: translateY(-50%) rotate(14deg);
  filter: drop-shadow(0 0 16px rgba(60, 110, 245, 1)) drop-shadow(0 2px 8px rgba(10, 30, 120, 0.9));
}

/* Chaîne 2 — TR→BL (−14°), arrière-plan, moins épaisse */
.chain-2 {
  height: 20px;
  z-index: 4;
  transform: translateY(-50%) rotate(-14deg);
  filter: drop-shadow(0 0 12px rgba(50, 100, 225, 0.9))
    drop-shadow(0 2px 6px rgba(8, 25, 100, 0.85));
}

/* Chaîne 3 — diagonale plus raide (30°), plan milieu, croise les deux autres */
.chain-3 {
  height: 16px;
  z-index: 5;
  transform: translateY(-50%) rotate(30deg);
  filter: drop-shadow(0 0 9px rgba(45, 90, 210, 0.82)) drop-shadow(0 1px 5px rgba(6, 20, 90, 0.8));
}

/* Cascade : TL→BR, puis TR→BL, puis diagonale */
.dark-velvet-container:hover .chain-1 {
  animation: chainC1 2.2s ease-out 0s forwards;
}
.dark-velvet-container:hover .chain-2 {
  animation: chainC2 2.2s ease-out 0.14s forwards;
}
.dark-velvet-container:hover .chain-3 {
  animation: chainC3 2.2s ease-out 0.26s forwards;
}

/*
  Chaîne 1 — se déroule de TL vers BR via clip-path,
  micro-vibration verticale à l'accrochage (tension de chaîne), fondu final
*/
@keyframes chainC1 {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(-50%) rotate(14deg);
  }
  8% {
    opacity: 1;
    clip-path: inset(0 82% 0 0);
    transform: translateY(-50%) rotate(14deg);
  }
  38% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(14deg);
  }
  46% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-52.5%) rotate(14deg);
  }
  54% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-48.5%) rotate(14deg);
  }
  62% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(14deg);
    opacity: 1;
  }
  82% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(14deg);
    opacity: 0.85;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(14deg);
    opacity: 0;
  }
}

/*
  Chaîne 2 — se déroule de TR vers BL (clip depuis la droite)
*/
@keyframes chainC2 {
  0% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
    transform: translateY(-50%) rotate(-14deg);
  }
  8% {
    opacity: 1;
    clip-path: inset(0 0 0 82%);
    transform: translateY(-50%) rotate(-14deg);
  }
  38% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-50%) rotate(-14deg);
  }
  46% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-47.5%) rotate(-14deg);
  }
  54% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-51.5%) rotate(-14deg);
  }
  62% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-50%) rotate(-14deg);
    opacity: 1;
  }
  82% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-50%) rotate(-14deg);
    opacity: 0.72;
  }
  100% {
    clip-path: inset(0 0 0 0%);
    transform: translateY(-50%) rotate(-14deg);
    opacity: 0;
  }
}

/*
  Chaîne 3 — diagonale secondaire, depuis TL
*/
@keyframes chainC3 {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(-50%) rotate(30deg);
  }
  8% {
    opacity: 1;
    clip-path: inset(0 75% 0 0);
    transform: translateY(-50%) rotate(30deg);
  }
  38% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(30deg);
  }
  46% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-52%) rotate(30deg);
  }
  54% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-49%) rotate(30deg);
  }
  62% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(30deg);
    opacity: 1;
  }
  82% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(30deg);
    opacity: 0.6;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    transform: translateY(-50%) rotate(30deg);
    opacity: 0;
  }
}

/* --- Runes flottantes Velvet Room (z-index 2, sous les chaînes) --- */
.shadow-runes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.shadow-rune {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  line-height: 1;
}

.rune-1 {
  top: 7%;
  left: 8%;
  font-size: 34px;
  color: #8855ff;
  text-shadow:
    0 0 18px #8855ff,
    0 0 36px #5522cc;
}
.rune-2 {
  top: 50%;
  left: 60%;
  font-size: 22px;
  color: #aa77ff;
  text-shadow:
    0 0 14px #aa77ff,
    0 0 28px #6633cc;
}
.rune-3 {
  top: 4%;
  right: 10%;
  font-size: 42px;
  color: #6633ff;
  text-shadow:
    0 0 22px #6633ff,
    0 0 44px #4400cc;
}
.rune-4 {
  bottom: 8%;
  left: 22%;
  font-size: 20px;
  color: #aa77ff;
  text-shadow:
    0 0 12px #aa77ff,
    0 0 24px #6633cc;
}
.rune-5 {
  top: 38%;
  right: 5%;
  font-size: 30px;
  color: #8855ff;
  text-shadow:
    0 0 16px #8855ff,
    0 0 32px #5522cc;
}
.rune-6 {
  top: 22%;
  left: 40%;
  font-size: 16px;
  color: #cc99ff;
  text-shadow:
    0 0 10px #cc99ff,
    0 0 22px #8866dd;
}

.dark-velvet-container:hover .rune-1 {
  animation: runeFloat 0.8s ease-in-out 0.05s forwards;
}
.dark-velvet-container:hover .rune-2 {
  animation: runeSpin 0.75s ease-in-out 0.22s forwards;
}
.dark-velvet-container:hover .rune-3 {
  animation: runeFlash 0.55s ease-in-out 0.02s forwards;
}
.dark-velvet-container:hover .rune-4 {
  animation: runeSpin 0.7s ease-in-out 0.32s forwards;
}
.dark-velvet-container:hover .rune-5 {
  animation: runeFloat 0.72s ease-in-out 0.14s forwards;
}
.dark-velvet-container:hover .rune-6 {
  animation: runeFlash 0.5s ease-in-out 0.28s forwards;
}

@keyframes runeFloat {
  0% {
    opacity: 0;
    transform: scale(0) translateY(8px);
  }
  25% {
    opacity: 1;
    transform: scale(1.5) translateY(-4px);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.2) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(2) translateY(-12px);
  }
}

@keyframes runeSpin {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-60deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.4) rotate(0deg);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.2) rotate(25deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.8) rotate(90deg);
  }
}

@keyframes runeFlash {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  12% {
    opacity: 1;
    transform: scale(1.8);
  }
  28% {
    opacity: 0.2;
    transform: scale(1.2);
  }
  50% {
    opacity: 1;
    transform: scale(1.6);
  }
  75% {
    opacity: 0.4;
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    transform: scale(2);
  }
}

/* --- Titre SHADOWS / MODE --- */
.shadow-main-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.shadow-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.shadow-line-1 {
  display: block;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 48px;
  font-weight: bold;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 10px;
  text-indent: 10px;
  color: #b8d0f8;
  text-shadow:
    0 0 18px rgba(80, 130, 255, 1),
    0 0 45px rgba(50, 90, 230, 0.65),
    0 0 90px rgba(30, 60, 190, 0.35),
    0 3px 8px rgba(0, 0, 60, 1);
  opacity: 0;
  transform: scale(0.88);
}

.dark-velvet-container:hover .shadow-line-1 {
  animation: shadowWord 1.6s ease-out 0.22s forwards;
}

@keyframes shadowWord {
  0% {
    opacity: 0;
    transform: scale(0.88);
    letter-spacing: 2px;
    animation-timing-function: cubic-bezier(0.25, 1.3, 0.5, 1);
  }
  28% {
    opacity: 1;
    transform: scale(1.02);
    letter-spacing: 10px;
  }
  42% {
    opacity: 1;
    transform: scale(1);
    letter-spacing: 10px;
  }
  65% {
    opacity: 1;
    transform: scale(1);
    letter-spacing: 10px;
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
    transform: scale(1);
    letter-spacing: 10px;
  }
}

/* --- Image principale --- */
.shadow-main-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.dark-velvet-container:hover .shadow-main-img {
  animation: shadowReveal 2s ease-out both;
}

@keyframes shadowReveal {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  50% {
    opacity: 0;
    transform: scale(0.98);
  }
  78% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .dark-velvet-container {
    min-height: 70px;
    border-width: 2px;
  }
  .shadow-line-1 {
    font-size: 14px;
    letter-spacing: 2px;
  }
  .shadow-line-2 {
    font-size: 28px;
    letter-spacing: 2px;
  }
  .rune-1,
  .rune-2,
  .rune-4 {
    font-size: 22px;
  }
  .rune-3,
  .rune-5 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .dark-velvet-container {
    min-height: 60px;
    border-width: 1px;
    border-radius: 4px;
  }
  .shadow-line-1 {
    font-size: 11px;
    letter-spacing: 1px;
  }
  .shadow-line-2 {
    font-size: 22px;
    letter-spacing: 1px;
  }
  .rune-1,
  .rune-2,
  .rune-4 {
    font-size: 16px;
  }
  .rune-3,
  .rune-5 {
    font-size: 22px;
  }
}

/* =====================================================
   BOUTON PERSONAE MODE — Velvet Room / Carte de Tarot

   Séquence au survol :
   0.00s  Image principale disparaît (fill-mode:both)
   0.08s  Fond Velvet Room se révèle (dégradé indigo/violet)
   0.08s  Carte de tarot flip depuis en dessous (rotateX 3D)
          + rebond élastique + phase de flottement
   0.38s  Halo doré atmosph. pulse derrière la carte
   0.45s  Anneaux d'arcane surgissent aux 4 coins
   1.35s  Shimmer de lumière balaye la surface de la carte
   0.90s  Titre « PERSONA » monte du bas
   2.5s+  Tout s'estompe, image principale revient (sépia→net)
   ===================================================== */

/* --- Conteneur principal ─────────────────────────── */
.personae-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 90px;
  background: #060d1f;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition:
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  padding: 0;
}

/* Halo or/bleu au survol */
.personae-container:hover {
  will-change: transform;
  box-shadow:
    0 8px 32px rgba(212, 175, 55, 0.75),
    0 0 60px rgba(80, 40, 180, 0.35);
  border-color: rgba(212, 175, 55, 0.6);
}

/* --- Fond Velvet Room ─────────────────────────────
   Multicouche : violet côté gauche, bleu nuit côté droit,
   gradient vertical sombre. Révélé progressivement.
*/
.personae-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(70, 10, 130, 0.6) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 50%, rgba(10, 30, 115, 0.55) 0%, transparent 52%),
    linear-gradient(180deg, #05080f 0%, #0b0520 100%);
  opacity: 0;
  transition: opacity 0.48s ease;
}
.personae-container:hover .personae-bg {
  opacity: 1;
}

/* --- Halo doré atmosphérique ─────────────────────
   Grande orbe floue derrière la carte, pulse et s'estompe.
*/
.personae-card-halo {
  position: absolute;
  z-index: 3;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.72) 0%,
    rgba(170, 118, 8, 0.32) 42%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
}
.personae-container:hover .personae-card-halo {
  animation: haloReveal 2.4s ease-out 0.38s forwards;
}

/* --- Conteneur de centrage de la carte ───────────
   Sépare le centrage (transform fixe) de l'animation.
   Le ::before fournit le halo net autour de la carte.
*/
.personae-tarot-center {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Anneau lumineux doré collé sur les bords de la carte */
.personae-tarot-center::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 11px;
  opacity: 0;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.9),
    0 0 16px 5px rgba(212, 175, 55, 0.65),
    0 0 40px 8px rgba(150, 100, 0, 0.38);
  pointer-events: none;
}
.personae-container:hover .personae-tarot-center::before {
  animation: cardGlow 2.5s ease-out 0.08s forwards;
}

/* --- Wrapper animé (flip 3D + shimmer clip) ──────
   overflow:hidden clipe le shimmer sur les bords de la carte.
   Porte l'animation tarotFlip.
*/
.personae-tarot-wrap {
  width: 82px;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  opacity: 0;
  transform: perspective(550px) rotateX(-88deg) scale(0.65) translateY(18px);
}
.personae-container:hover .personae-tarot-wrap {
  animation: tarotFlip 2.5s cubic-bezier(0.22, 1.05, 0.36, 1) 0.08s forwards;
}

/* La vraie carte de tarot */
.personae-tarot-card {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  border: 2px solid rgba(212, 175, 55, 0.88);
}

/* Shimmer : bande lumineuse qui balaye la carte une fois posée */
.personae-tarot-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
  transform: skewX(-16deg);
  pointer-events: none;
}
.personae-container:hover .personae-tarot-shine {
  animation: tarotShine 0.58s ease-in-out 1.35s forwards;
}

/* --- Symboles d'arcane aux 4 coins + flancs ─────
   Surgissent APRÈS le flip de la carte (délai 0.38–0.80s).
   2 variantes : montée flottante et rotation.
*/
.personae-arcana-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.personae-arcana {
  position: absolute;
  opacity: 0;
  font-family: "Times New Roman", Georgia, serif;
  font-weight: bold;
  pointer-events: none;
  line-height: 1;
}

.arc-1 {
  top: 6%;
  left: 5%;
  font-size: 28px;
  color: #d4af37;
  text-shadow:
    0 0 14px #d4af37,
    0 0 30px #a07c10;
}
.arc-2 {
  top: 48%;
  left: 70%;
  font-size: 18px;
  color: #e8c96a;
  text-shadow:
    0 0 10px #d4af37,
    0 0 22px #8a6a00;
}
.arc-3 {
  top: 5%;
  right: 5%;
  font-size: 34px;
  color: #c9a227;
  text-shadow:
    0 0 18px #d4af37,
    0 0 38px #b08a00;
}
.arc-4 {
  bottom: 8%;
  left: 5%;
  font-size: 16px;
  color: #f0d87a;
  text-shadow:
    0 0 9px #d4af37,
    0 0 20px #8a6a00;
}
.arc-5 {
  bottom: 6%;
  right: 5%;
  font-size: 22px;
  color: #d4af37;
  text-shadow:
    0 0 12px #d4af37,
    0 0 26px #a07c10;
}
.arc-6 {
  top: 48%;
  left: 11%;
  font-size: 14px;
  color: #f5e39a;
  text-shadow:
    0 0 8px #d4af37,
    0 0 16px #8a6a00;
}

.personae-container:hover .arc-1 {
  animation: arcaneRise 0.85s ease-out 0.45s forwards;
}
.personae-container:hover .arc-2 {
  animation: arcaneSpin 0.75s ease-out 0.65s forwards;
}
.personae-container:hover .arc-3 {
  animation: arcaneRise 0.8s ease-out 0.38s forwards;
}
.personae-container:hover .arc-4 {
  animation: arcaneSpin 0.8s ease-out 0.72s forwards;
}
.personae-container:hover .arc-5 {
  animation: arcaneRise 0.7s ease-out 0.55s forwards;
}
.personae-container:hover .arc-6 {
  animation: arcaneSpin 0.65s ease-out 0.8s forwards;
}

/* --- Titre « PERSONA » ───────────────────────────
   En bas du bouton, monte depuis le bas avec l'effet
   de tracking letter, puis s'estompe.
*/
.personae-title-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 8px;
  pointer-events: none;
}

.personae-title {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 8px;
  text-indent: 8px;
  color: #d4af37;
  text-shadow:
    0 0 12px rgba(212, 175, 55, 1),
    0 0 28px rgba(180, 120, 0, 0.65),
    0 2px 6px rgba(0, 0, 0, 1);
  opacity: 0;
  transform: translateY(8px);
}
.personae-container:hover .personae-title {
  animation: titleRise 1.2s cubic-bezier(0.25, 1.2, 0.4, 1) 0.9s forwards;
}

/* --- Image principale (z-index 2) ────────────────
   fill-mode:both → opacity:0 IMMÉDIAT au survol.
   Invisible 52%, puis révélée avec reflet doré.
*/
.personae-main-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}
.personae-container:hover .personae-main-img {
  animation: arcaneReveal 2.5s ease-out both;
}

/* =====================================================
   KEYFRAMES — Bouton Personae
   ===================================================== */

/*
  Flip 3D de la carte depuis en dessous :
  ┌ 0%–18%  : arrive de sous la scène, perspective rotateX
  │ 18%–46% : rebond élastique (overshoot + oscillation)
  │ 46%–76% : flottement doux (translateY ±4px + rotation ±0.8°)
  │ 76%–100%: plonge doucement vers l'avant et disparaît
  └──────────────────────────────────────────────────────
*/
@keyframes tarotFlip {
  0% {
    opacity: 0;
    transform: perspective(550px) rotateX(-88deg) scale(0.65) translateY(18px);
  }
  18% {
    opacity: 1;
    transform: perspective(550px) rotateX(-7deg) scale(1.14) translateY(-6px);
  }
  28% {
    opacity: 1;
    transform: perspective(550px) rotateX(5deg) scale(1.03) translateY(0px);
  }
  36% {
    opacity: 1;
    transform: perspective(550px) rotateX(-1deg) scale(1.06) translateY(-2px);
  }
  46% {
    opacity: 1;
    transform: perspective(550px) rotateX(0deg) scale(1) translateY(0px);
  }
  56% {
    opacity: 1;
    transform: perspective(550px) rotateX(0deg) scale(1) translateY(-4px) rotate(-0.8deg);
  }
  67% {
    opacity: 1;
    transform: perspective(550px) rotateX(0deg) scale(1) translateY(0px) rotate(0.4deg);
  }
  76% {
    opacity: 1;
    transform: perspective(550px) rotateX(0deg) scale(1) translateY(-2px) rotate(0deg);
  }
  87% {
    opacity: 0.7;
    transform: perspective(550px) rotateX(0deg) scale(0.98) translateY(0px);
  }
  100% {
    opacity: 0;
    transform: perspective(550px) rotateX(14deg) scale(0.88) translateY(10px);
  }
}

/* Bande lumineuse balayant la carte (shimmer) */
@keyframes tarotShine {
  0% {
    left: -120%;
    opacity: 1;
  }
  100% {
    left: 165%;
    opacity: 0.3;
  }
}

/* Anneau lumineux doré — apparaît avec la carte, s'estompe à la fin */
@keyframes cardGlow {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Orbe atmoph. derrière la carte — pulse large et disparaît */
@keyframes haloReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.6);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.38);
  }
  72% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.2);
  }
  90% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
}

/* Arcane variante 1 : monte et s'évapore */
@keyframes arcaneRise {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(10px);
  }
  28% {
    opacity: 1;
    transform: scale(1.4) translateY(-4px);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.2) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.8) translateY(-10px);
  }
}

/* Arcane variante 2 : tourne et s'évapore */
@keyframes arcaneSpin {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-45deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.4) rotate(0deg);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.2) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.8) rotate(80deg);
  }
}

/* Titre monte du bas, tient, puis s'efface */
@keyframes titleRise {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  28% {
    opacity: 1;
    transform: translateY(0);
  }
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-5px);
  }
}

/*
  Révélation de l'image principale avec reflet doré :
  ┌ 0%–52%  : image cachée — show de la carte en cours    ─┐
  │ 52%–80% : fondu progressif avec teinte sépia (or chaud) │
  │ 80%–100%: image pleinement révélée, sépia disparu       │
  └──────────────────────────────────────────────────────── ┘
*/
@keyframes arcaneReveal {
  0% {
    opacity: 0;
    transform: scale(0.98);
    filter: sepia(0.55) brightness(0.5);
  }
  52% {
    opacity: 0;
    transform: scale(0.98);
    filter: sepia(0.55) brightness(0.5);
  }
  80% {
    opacity: 0.7;
    transform: scale(1);
    filter: sepia(0.1) brightness(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: sepia(0) brightness(1);
  }
}

/* --- Responsive Personae ─────────────────────────── */

/* Tablette (≤768px) */
@media (max-width: 768px) {
  .personae-container {
    min-height: 70px;
  }
  .personae-tarot-wrap {
    width: 60px;
  }
  .personae-card-halo {
    width: 105px;
    height: 105px;
  }
  .personae-title {
    font-size: 14px;
    letter-spacing: 5px;
    text-indent: 5px;
  }
  .arc-1,
  .arc-2,
  .arc-4,
  .arc-6 {
    font-size: 16px;
  }
  .arc-3,
  .arc-5 {
    font-size: 22px;
  }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
  .personae-container {
    min-height: 60px;
    border-radius: 4px;
  }
  .personae-tarot-wrap {
    width: 44px;
  }
  .personae-card-halo {
    width: 78px;
    height: 78px;
  }
  .personae-title {
    font-size: 11px;
    letter-spacing: 3px;
    text-indent: 3px;
    padding-bottom: 5px;
  }
  .arc-1,
  .arc-2,
  .arc-4,
  .arc-6 {
    font-size: 12px;
  }
  .arc-3,
  .arc-5 {
    font-size: 18px;
  }
}

/* =====================================================
   BOUTON MUSIC MODE
   Mécanique identique aux autres boutons :
   → Défaut  : image visible normalement
   → Hover   : image disparaît (fill-mode:both)
               panneaux roses sweepent, étoiles/notes
               explosent, titre tombe lettre par lettre,
               puis image revient progressivement à la fin.
   ===================================================== */

/* =====================================================
   BOUTON MUSIC MODE (Version Propre & Alignée)
   ===================================================== */

/* --- Conteneur principal --- */
.music-mode-btn {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  /* On retire les min-height bizarres pour s'adapter parfaitement à l'image */
  background-color: #a31145;
  border: 3px solid transparent; /* Aligné sur l'épaisseur des autres boutons */
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  margin: 20px auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Ombre de base identique aux autres */
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease;
}

.music-mode-btn:hover {
  will-change: transform;
  box-shadow: 0 8px 30px rgba(255, 102, 163, 0.8);
  border-color: rgba(255, 158, 187, 0.8);
  transform: scale(1.02);
}

/* --- Image principale ---
   Prend 100% de la largeur sans se déformer. Cachée au survol. */
.music-main-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.music-mode-btn:hover .music-main-img {
  animation: musicReveal 2.2s ease-out both;
}

/* --- Panneaux roses obliques --- */
.music-bg-panels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
}

.m-panel {
  height: 100%;
  flex: 1;
  transform: skewX(-20deg) scaleY(1.5) translateX(-200%);
  opacity: 0;
}

.m-panel-1 {
  background-color: #d82b68;
}
.m-panel-2 {
  background-color: #f7558d;
}
.m-panel-3 {
  background-color: #ff85af;
}
.m-panel-4 {
  background-color: #ffb3cd;
}
.m-panel-5 {
  background-color: #ffe6f0;
}

.music-mode-btn:hover .m-panel {
  animation: slidePinkPanel 0.4s ease-out forwards;
}
.music-mode-btn:hover .m-panel-1 {
  animation-delay: 0s;
}
.music-mode-btn:hover .m-panel-2 {
  animation-delay: 0.1s;
}
.music-mode-btn:hover .m-panel-3 {
  animation-delay: 0.2s;
}
.music-mode-btn:hover .m-panel-4 {
  animation-delay: 0.3s;
}
.music-mode-btn:hover .m-panel-5 {
  animation-delay: 0.4s;
}

/* --- Étoiles & notes musicales --- */
.music-stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.m-star {
  position: absolute;
  opacity: 0;
  transform: scale(0) rotate(0deg);
  line-height: 1;
}

.mstar-1 {
  top: 12%;
  left: 8%;
  font-size: 26px;
  color: #ff6eb0;
}
.mstar-2 {
  top: 18%;
  right: 12%;
  font-size: 18px;
  color: #ffffff;
  text-shadow: 0 0 8px #ffb3d1;
}
.mstar-3 {
  top: 55%;
  left: 15%;
  font-size: 22px;
  color: #ffb3d1;
}
.mstar-4 {
  top: 10%;
  left: 45%;
  font-size: 20px;
  color: #ffffff;
  text-shadow: 0 0 8px #ff6eb0;
}
.mstar-5 {
  bottom: 12%;
  right: 18%;
  font-size: 24px;
  color: #ff6eb0;
}
.mstar-6 {
  top: 38%;
  right: 8%;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 0 6px #ffb3d1;
}
.mstar-7 {
  bottom: 18%;
  left: 30%;
  font-size: 20px;
  color: #ffcce0;
}
.mstar-8 {
  top: 30%;
  left: 62%;
  font-size: 14px;
  color: #ffffff;
  text-shadow: 0 0 6px #ff6eb0;
}

.music-mode-btn:hover .mstar-1 {
  animation: musicBurst 1s ease-out 0.2s forwards;
}
.music-mode-btn:hover .mstar-2 {
  animation: musicSpin 1s ease-out 0.4s forwards;
}
.music-mode-btn:hover .mstar-3 {
  animation: musicFlash 1s ease-out 0.3s forwards;
}
.music-mode-btn:hover .mstar-4 {
  animation: musicBurst 1s ease-out 0.25s forwards;
}
.music-mode-btn:hover .mstar-5 {
  animation: musicSpin 1s ease-out 0.5s forwards;
}
.music-mode-btn:hover .mstar-6 {
  animation: musicFlash 1s ease-out 0.35s forwards;
}
.music-mode-btn:hover .mstar-7 {
  animation: musicBurst 1s ease-out 0.45s forwards;
}
.music-mode-btn:hover .mstar-8 {
  animation: musicSpin 1s ease-out 0.55s forwards;
}

/* --- Titre MUSIC --- 
   Positionné en absolute pour se centrer parfaitement SANS écraser l'image */
.music-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 60px; /* Taille ajustée pour ne pas déborder */
  font-weight: bold;
  font-style: italic;
  letter-spacing: 2px;
  color: rgb(255, 255, 255);
  text-shadow:
    0 0 18px rgba(255, 80, 150, 1),
    0 0 40px rgba(220, 30, 100, 0.7),
    0 0 80px rgba(180, 0, 80, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.music-title span {
  opacity: 0;
  transform: scale(1.5) translateY(-15px);
}

.music-mode-btn:hover .music-title span {
  animation: musicTextDrop 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.music-mode-btn:hover .music-title span:nth-child(1) {
  animation-delay: 0.6s;
}
.music-mode-btn:hover .music-title span:nth-child(2) {
  animation-delay: 0.65s;
}
.music-mode-btn:hover .music-title span:nth-child(3) {
  animation-delay: 0.7s;
}
.music-mode-btn:hover .music-title span:nth-child(4) {
  animation-delay: 0.75s;
}
.music-mode-btn:hover .music-title span:nth-child(5) {
  animation-delay: 0.8s;
}

/* =====================================================
   KEYFRAMES MUSIC MODE
   ===================================================== */
@keyframes slidePinkPanel {
  0% {
    transform: skewX(-20deg) scaleY(1.5) translateX(-200%);
    opacity: 0;
  }
  100% {
    transform: skewX(-20deg) scaleY(1.5) translateX(0);
    opacity: 1;
  }
}
@keyframes musicBurst {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.6) rotate(12deg);
  }
  55% {
    opacity: 0.9;
    transform: scale(1.2) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(2.2) rotate(30deg);
  }
}
@keyframes musicSpin {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-60deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.5) rotate(0deg);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.2) rotate(25deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.8) rotate(90deg);
  }
}
@keyframes musicFlash {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  12% {
    opacity: 1;
    transform: scale(1.8);
  }
  28% {
    opacity: 0.2;
    transform: scale(1.2);
  }
  50% {
    opacity: 1;
    transform: scale(1.6);
  }
  75% {
    opacity: 0.4;
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    transform: scale(2);
  }
}
@keyframes musicReveal {
  0% {
    opacity: 0;
    transform: scale(0.97);
  }
  60% {
    opacity: 0;
    transform: scale(0.97);
  }
  85% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes musicTextDrop {
  0% {
    opacity: 0;
    transform: scale(1.5) translateY(-15px);
    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  22% {
    opacity: 1;
    transform: scale(1) translateY(0);
    animation-timing-function: linear;
  }
  62% {
    opacity: 1;
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
  }
}

/* =====================================================
   RESPONSIVE — Bouton Music Mode
   ===================================================== */
@media (max-width: 768px) {
  .music-title {
    font-size: 40px;
  }
}
@media (max-width: 480px) {
  .music-title {
    font-size: 28px;
    letter-spacing: 2px;
  }
  .mstar-1,
  .mstar-5 {
    font-size: 18px;
  }
  .mstar-3,
  .mstar-4,
  .mstar-7 {
    font-size: 14px;
  }
}

/* =====================================================
   3. BOUTON STYLE "PERSONA" (rouge Phantom Thieves)
   ===================================================== */

.persona-btn {
  background: linear-gradient(135deg, #ff003c, hsl(0, 100%, 39%));
  border: none;
  color: white;
  font-size: 1.2rem;
  padding: 12px 28px;
  border-radius: 12px;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 6px #000;
  font-family: "Arial Black", sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease-in-out;
}

.persona-btn:hover {
  transform: scale(1.05) rotate(-1deg);
  background: linear-gradient(135deg, #ff0055, #d00000);
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 6px #000,
    0 0 10px #ff0000;
}

.persona-btn:active {
  transform: scale(0.98) rotate(0deg);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px #000;
}

/* =====================================================
   4. LIENS SOCIAUX (GitHub, Discord, Ko-fi)
   ===================================================== */

#socialLinks {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Chaque icône dans un carré arrondi */
#socialLinks a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: #f0f0f0;
  border-radius: 12px;
  border: 2px solid #ccc;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#socialLinks a img {
  width: 24px;
  height: 24px;
  filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(0deg);
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

/* Survol : légère élévation */
#socialLinks a:hover {
  background-color: #e0e0e0;
  border-color: #999;
  transform: translateY(-2px);
}

/* Survol de l'icône : zoom + rotation des couleurs */
#socialLinks a:hover img {
  transform: scale(1.2);
  filter: hue-rotate(180deg);
}

/* Dark mode — liens sociaux */
body.darkmode #socialLinks a {
  background-color: #222;
  border-color: #555;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
}

body.darkmode #socialLinks a img {
  /* Icônes blanches en dark mode */
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg);
}

body.darkmode #socialLinks a:hover {
  background-color: #333;
  border-color: #888;
}

/* =====================================================
   5. SYSTÈME PROFIL (bouton, avatar, pseudo)
   ===================================================== */

/* Bouton "Mon Profil" */
.profile-btn {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 12px;
  background-color: #f7322b;
  color: black;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-btn:hover {
  background-color: #e46262;
}

/* Conteneur centré de l'affichage profil */
#profileDisplay {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

/* Aperçu de l'avatar sélectionné */
.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #51ff00;
  margin-bottom: 10px;
}

/* Grille de sélection d'avatar */
#avatarGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
}

#avatarGrid img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

#avatarGrid img:hover {
  transform: scale(1.1);
  border: 2px solid #ff3366;
}

/* Avatar sélectionné */
#avatarGrid img.selected {
  border: 3px solid #51ff00;
}

/* Canvas de recadrage d'avatar */
#avatarCanvas {
  background-color: #eee;
  border: 2px solid #51ff00;
  display: block;
  margin: 10px auto;
  max-width: 100%;
}

body.darkmode #avatarCanvas {
  background-color: #222;
}

/* Contrôles de recadrage */
.crop-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.crop-controls button {
  padding: 8px 16px;
  font-size: 14px;
  background-color: #ddd;
  color: black;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.crop-controls button:hover {
  background-color: #bbb;
}

body.darkmode .crop-controls button {
  background-color: #444;
  color: white;
}

body.darkmode .crop-controls button:hover {
  background-color: #666;
}

/* Champ de saisie du pseudo */
#pseudoInput {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  background: #f0f0f0;
  color: #000;
}

body.darkmode #pseudoInput {
  background: #333;
  color: white;
}

/* Option "Sans avatar" dans la grille */
.avatar-none {
  width: 80px;
  text-align: center;
  background: #eee;
  border: 2px solid #aaa;
  border-radius: 8px;
  font-size: 14px;
  line-height: 80px;
  cursor: pointer;
  transition: background 0.2s;
  color: #000;
}

.avatar-none:hover {
  background: #ccc;
}

body.darkmode .avatar-none {
  background: #444;
  border: 2px solid #888;
  color: white;
}

body.darkmode .avatar-none:hover {
  background: #666;
}

/* Avatar dans le header de la page */
.profile-avatar {
  width: 172px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid black;
}

body.darkmode .profile-avatar {
  border-color: white;
}

/* Libellé "couleur de bordure" dans les options profil */
.border-color-label {
  font-weight: bold;
  color: black;
}

body.darkmode .border-color-label {
  color: white;
}

/* =====================================================
   6. CARTE DE PARTAGE DE PROFIL
   Générée dynamiquement pour partager les stats.
   ===================================================== */

.share-card {
  width: 400px;
  background: linear-gradient(180deg, #0f0f2b, #1a1a40);
  border-radius: 20px;
  color: white;
  text-align: center;
  padding: 25px 15px;
  font-family: "Poppins", sans-serif;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

/* Avatar sur la carte */
.share-card .share-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #4b6cff;
  object-fit: cover;
  margin-bottom: 12px;
}

.share-card h3 {
  margin: 0;
  font-size: 22px;
  color: #fff;
}

/* Ligne de stats (victoires, parties, etc.) */
.share-card .share-stats {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 15px 0;
}

.share-card .stat {
  text-align: center;
}

.share-card .stat span {
  display: block;
  font-size: 14px;
  opacity: 0.8;
}

/* Valeur numérique dorée */
.share-card .stat strong {
  font-size: 20px;
  color: #ffd84f;
}

/* Grille de badges sur la carte */
.share-card .share-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.share-card .share-badges img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s;
}

.share-card .share-badges img:hover {
  transform: scale(1.15);
}

/* Footer discret de la carte */
.share-card .footer {
  position: absolute;
  bottom: 6px;
  width: 100%;
  font-size: 11px;
  color: #bbb;
}

/* =====================================================
   7. MODALE DAILY (compte à rebours jusqu'au prochain jour)
   ===================================================== */

/* Bouton fixe en bas à droite — au-dessus de la bottom nav (62px + 16px marge = 78px) */
.daily-btn {
  position: fixed;
  bottom: 78px;
  right: 10px;
  background: #eee;
  color: #111;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 1000;
  font-size: 15px;
  font-weight: bold;
  transition:
    background 0.2s,
    transform 0.2s;
}

.daily-btn:hover {
  background: #ddd;
  transform: scale(1.05);
}

body.darkmode .daily-btn {
  background: #2a2a2a;
  color: #eee;
}

body.darkmode .daily-btn:hover {
  background: #333;
}

/* Overlay de la modale daily */
.daily-modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

/* Boîte de contenu */
.daily-modal-content {
  position: relative;
  margin: 6% auto;
  padding: 0;
  width: 90%;
  max-width: 560px;
  border-radius: 18px;
  text-align: center;
  border: 3px solid;
  overflow: visible; /* allow Z letters to overflow above the modal */
  transition: all 0.3s;
  animation: dailyPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dailyPop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mode sombre */
body.darkmode .daily-modal-content {
  background-color: #1a1a1a;
  color: #f0f0f0;
  border-color: #ff0040;
}

/* Mode clair */
body:not(.darkmode) .daily-modal-content {
  background-color: #fff;
  color: #111;
  border-color: #cc0033;
}

/* Titre centré en haut du modal */
.daily-title {
  text-align: center;
  margin: 0;
  padding: 18px 48px 0 48px; /* symétrique — bouton × absolu ne pousse plus le texte */
  font-size: 1.35em;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* Bouton de fermeture */
.daily-modal .close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  z-index: 20;
  transition:
    opacity 0.2s,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.daily-modal .close:hover {
  opacity: 1;
  transform: rotate(90deg) scale(1.25);
}

/* ── Top bar: chibi centré + subtitle en dessous ────── */
.daily-top-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 16px 20px;
  border-bottom: 2px solid rgba(204, 0, 51, 0.25);
  overflow: visible;
}

body.darkmode .daily-top-bar {
  border-bottom-color: rgba(255, 0, 64, 0.25);
}

/* Chibi Damien wrapper — overflow visible so Z letters float above */
.daily-chibi-wrap {
  position: relative;
  width: 240px;
  overflow: visible;
}

.daily-chibi {
  width: 240px;
  height: auto;
  display: block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}

.daily-chibi-wrap:hover .daily-chibi {
  transform: rotate(-4deg) scale(1.05);
}

/* Z letters — face est à ~35 % du haut de l'image (1195×896 → rendu ~180px de haut)
   top ≈ 55px pour centrer sur la zone du visage */
.daily-zzzs {
  position: absolute;
  top: 50px;
  left: 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  pointer-events: none;
}

.daily-zzzs span {
  display: block;
  opacity: 0;
  font-weight: 900;
  font-style: italic;
  color: #00cc66;
  line-height: 1;
}

/* z small → Z medium → Z large */
.daily-zzzs span:nth-child(1) {
  font-size: 0.9em;
  margin-left: 0;
}
.daily-zzzs span:nth-child(2) {
  font-size: 1.2em;
  margin-left: 10px;
}
.daily-zzzs span:nth-child(3) {
  font-size: 1.6em;
  margin-left: 22px;
}

.daily-chibi-wrap:hover .daily-zzzs span:nth-child(1) {
  animation: sleepZ 2s ease-out 0s infinite;
}
.daily-chibi-wrap:hover .daily-zzzs span:nth-child(2) {
  animation: sleepZ 2s ease-out 0.5s infinite;
}
.daily-chibi-wrap:hover .daily-zzzs span:nth-child(3) {
  animation: sleepZ 2s ease-out 1s infinite;
}

/* Voyage de ~170px : reste visible dans le modal jusqu'aux 85 %,
   puis sort au-dessus de la bordure sur les 15 % finaux */
@keyframes sleepZ {
  0% {
    opacity: 0;
    transform: translate(0, 5px) scale(0.5);
  }
  12% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  84% {
    opacity: 0.8;
    transform: translate(12px, -120px) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(20px, -175px) scale(1.3);
  }
}

/* Subtitle centré sous le chibi */
.daily-subtitle {
  margin: 0;
  text-align: center;
  font-size: 0.88em;
  font-style: italic;
  opacity: 0.65;
  line-height: 1.5;
  max-width: 380px;
}

/* ── Description ────────────────────────────────────── */
.daily-desc {
  margin: 0;
  padding: 14px 20px;
  font-size: 0.85em;
  opacity: 0.7;
  line-height: 1.5;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

/* ── Countdown ──────────────────────────────────────── */
.daily-countdown-wrap {
  padding: 18px 20px 22px;
}

.countdown-label {
  margin: 0 0 12px;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.45;
}

.countdown-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 78px;
  padding: 14px 16px 10px;
  border-radius: 14px;
  background: rgba(0, 204, 102, 0.1);
  border: 1px solid rgba(0, 204, 102, 0.3);
}

.countdown-unit span {
  font-family: "Courier New", Courier, monospace;
  font-size: 2.6em;
  font-weight: 900;
  color: #00cc66;
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}

.countdown-unit small {
  font-size: 0.62em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.5;
  margin-top: 6px;
}

.countdown-sep {
  font-size: 2em;
  font-weight: 900;
  color: #00cc66;
  opacity: 0.5;
  margin-bottom: 18px;
  user-select: none;
}

/* =====================================================
   8. BOUTON / LIEN VERS LES NOTES DE MISE À JOUR (PDF)
   ===================================================== */

.pdf-container {
  margin-top: 15px;
  text-align: right;
}

/* Bouton "Voir plus" style comics rouge */
.see-more-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #d92323;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-family: sans-serif;
  border-radius: 4px;
  transition:
    background 0.3s,
    transform 0.2s;
  /* Petite ombre noire style bande dessinée */
  box-shadow: 2px 2px 0px #000;
}

.see-more-btn:hover {
  background-color: #b01010;
  transform: translateY(-2px);
}

/* =====================================================
   9. THÈME NOUVEL AN CHINOIS (CNY)
   Appliqué aux blocs de notes de mise à jour spéciaux.
   ===================================================== */

/* Encadré avec bordure rouge foncé */
.cny-theme {
  border: 2px solid #c0392b !important;
  background-color: #fff5f5;
}

/* En-tête dégradé rouge doré */
.cny-theme .version-header {
  background: linear-gradient(135deg, #b71c1c 0%, #8e0000 100%);
  color: #f1c40f;
  border-bottom: 1px solid #d35400;
}

/* Titre doré */
.cny-theme .version-title {
  color: #f1c40f !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Date en or pâle */
.cny-theme .version-date {
  color: #ffecb3 !important;
}

.cny-theme .version-arrow {
  color: #f1c40f !important;
}

/* Mots-clés en rouge dans le contenu */
.cny-theme .version-content ul li strong {
  color: #c0392b;
}

/* Bouton PDF spécial CNY */
.cny-btn {
  background-color: #c0392b !important;
  color: #fff !important;
  border: 1px solid #a93226 !important;
}

.cny-btn:hover {
  background-color: #a93226 !important;
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.4);
}

/* Hover sur l'en-tête CNY en mode clair */
.cny-theme .version-header:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
  box-shadow: inset 0 0 15px rgba(241, 196, 15, 0.3) !important;
  transform: scale(1.01);
  transition: all 0.2s ease-in-out;
}

/* Animation de la flèche au survol */
.cny-theme .version-header:hover .version-arrow {
  transform: translateX(3px);
}

/* Dark mode — CNY */
body.darkmode .cny-theme {
  background-color: #2c0b0b;
  border-color: #e74c3c !important;
}

body.darkmode .cny-theme .version-header {
  background: linear-gradient(135deg, #800000 0%, #4a0000 100%);
}

body.darkmode .cny-theme .version-content ul li strong {
  color: #ff6b6b;
}

/* Hover en dark mode CNY */
body.darkmode .cny-theme .version-header:hover {
  background: linear-gradient(135deg, #9e1a1a 0%, #680505 100%) !important;
  box-shadow: inset 0 0 10px rgba(241, 196, 15, 0.15) !important;
}

/* =====================================================
   10. THÈME v2.0 — Major Update (Sophia / Backend)
   ===================================================== */

.v2-theme {
  border: 2px solid #ff6b35 !important;
  background-color: #fff8f5;
}

.v2-theme .version-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 60%, #1a1a40 100%);
  border-bottom: 2px solid #ff6b35;
  position: relative;
  overflow: hidden;
  padding: 15px; /* même padding que les autres headers */
  z-index: 0; /* crée un stacking context isolé pour les enfants */
}

/* Conteneur orbs — absolu, z-index 0 = derrière le texte (z-index 1+) */
.v2-orbs-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.v2-orb {
  position: absolute;
  border-radius: 50%;
  animation: v2OrbPop 3.5s ease-in-out infinite;
}

@keyframes v2OrbPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  18% {
    transform: scale(1.35);
    opacity: 0.88;
  }
  50% {
    transform: scale(1);
    opacity: 0.65;
  }
  82% {
    transform: scale(0.75);
    opacity: 0.28;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.v2-orb:nth-child(1) {
  width: 16px;
  height: 16px;
  top: 20%;
  left: 5%;
  background: #ff6b35;
  animation-delay: 0s;
  animation-duration: 3.6s;
}
.v2-orb:nth-child(2) {
  width: 9px;
  height: 9px;
  top: 68%;
  left: 14%;
  background: #ffffff;
  animation-delay: 0.8s;
  animation-duration: 2.9s;
}
.v2-orb:nth-child(3) {
  width: 20px;
  height: 20px;
  top: 28%;
  left: 73%;
  background: #ff8c42;
  animation-delay: 1.4s;
  animation-duration: 4.1s;
}
.v2-orb:nth-child(4) {
  width: 7px;
  height: 7px;
  top: 12%;
  left: 50%;
  background: #ffffff;
  animation-delay: 2.1s;
  animation-duration: 3s;
}
.v2-orb:nth-child(5) {
  width: 13px;
  height: 13px;
  top: 76%;
  left: 83%;
  background: #ff6b35;
  animation-delay: 0.4s;
  animation-duration: 3.8s;
}
.v2-orb:nth-child(6) {
  width: 11px;
  height: 11px;
  top: 52%;
  left: 38%;
  background: #ffbb99;
  animation-delay: 1.7s;
  animation-duration: 2.6s;
}
.v2-orb:nth-child(7) {
  width: 18px;
  height: 18px;
  top: 18%;
  left: 88%;
  background: #ff6b35;
  animation-delay: 2.8s;
  animation-duration: 4.3s;
}
.v2-orb:nth-child(8) {
  width: 6px;
  height: 6px;
  top: 84%;
  left: 58%;
  background: #ffffff;
  animation-delay: 1.1s;
  animation-duration: 3.3s;
}
.v2-orb:nth-child(9) {
  width: 10px;
  height: 10px;
  top: 60%;
  left: 93%;
  background: #ffa566;
  animation-delay: 0.6s;
  animation-duration: 3.1s;
}
.v2-orb:nth-child(10) {
  width: 8px;
  height: 8px;
  top: 40%;
  left: 22%;
  background: #ffffff;
  animation-delay: 3.2s;
  animation-duration: 2.7s;
}

/* Contenu gauche de l'en-tête : Sophia + titre */
.v2-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1; /* au-dessus des orbs (z-index: 0) */
}

.v2-sophia {
  width: 38px; /* taille alignée sur la hauteur de texte standard */
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ff6b35;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
  flex-shrink: 0;
  object-fit: cover;
}

.v2-theme .version-title {
  color: #ffffff !important;
  text-shadow: 0 0 14px rgba(255, 107, 53, 0.5);
}

.v2-theme .version-date {
  color: #ffba99 !important;
}

.v2-theme .version-arrow {
  color: #ff6b35 !important;
  position: relative;
  z-index: 1; /* au-dessus des orbs */
}

/* Mots-clés en orange dans le contenu */
.v2-theme .version-content ul li strong {
  color: #d95a1a;
}

/* Bouton PDF v2 */
.v2-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #e84e0f 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow:
    2px 2px 0px #7a2000,
    0 4px 14px rgba(255, 107, 53, 0.35) !important;
}
.v2-btn:hover {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%) !important;
  box-shadow:
    2px 2px 0px #7a2000,
    0 6px 20px rgba(255, 107, 53, 0.55) !important;
  transform: translateY(-2px);
}

/* Hover header */
.v2-theme .version-header:hover {
  background: linear-gradient(135deg, #1e1e38 0%, #1a4080 60%, #1e1e48 100%) !important;
  box-shadow: inset 0 0 22px rgba(255, 107, 53, 0.18) !important;
  transition: all 0.22s ease-in-out;
}
.v2-theme .version-header:hover .version-arrow {
  transform: translateX(3px);
}

/* max-height plus grande pour le contenu v2 */
.v2-theme.active .version-content {
  max-height: 2200px;
}

/* Dark mode */
body.darkmode .v2-theme {
  background-color: #1c0d05;
  border-color: #ff6b35 !important;
}
body.darkmode .v2-theme .version-header {
  background: linear-gradient(135deg, #0d0d1c 0%, #071830 60%, #0d0d20 100%);
}
body.darkmode .v2-theme .version-content ul li strong {
  color: #ff8c5a;
}
body.darkmode .v2-theme .version-header:hover {
  background: linear-gradient(135deg, #111128 0%, #0e2540 60%, #111128 100%) !important;
  box-shadow: inset 0 0 14px rgba(255, 107, 53, 0.12) !important;
}

/* =====================================================
   11. RESPONSIVE — SPÉCIFIQUE INDEX
   ===================================================== */

/* -----------------------------------------------
   TABLETTE (481px – 768px)
   Grille 2 colonnes pour les boutons de mode.
   padding-bottom : espace pour les boutons fixes
   News (bas-gauche) et Daily (bas-droite) afin
   que le footer ne soit pas masqué sous eux.
----------------------------------------------- */
@media (min-width: 481px) and (max-width: 768px) {
  /* Espace en bas pour les boutons fixes News + Daily */
  body {
    padding-bottom: 65px;
  }

  /* Sélecteur de modes en grille 2 colonnes */
  #gameModeSelector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 580px;
    margin: 0 auto;
    padding: 0 15px;
  }

  .gamemode-button {
    margin: 0;
    max-width: 100%;
  }

  .gamemode-title {
    font-size: 17px;
    padding: 8px 16px;
    margin: 16px auto;
    max-width: 95%;
  }

  .gamemode-button:hover img {
    transform: scale(1.01);
  }

  /* Daily : compacté, aligné visuellement avec News */
  .daily-btn {
    bottom: 78px;
    right: 8px;
    font-size: 13px;
    padding: 7px 12px;
  }

  #headerAvatar,
  .profile-avatar {
    width: 130px !important;
  }

  #socialLinks {
    gap: 14px;
    margin-top: 20px;
  }
}

/* -----------------------------------------------
   MOBILE (≤ 480px)
   Tous les boutons fixes deviennent très compacts :
   - Dark mode : déjà sans texte (global.css)
   - News + Daily : texte réduit, padding minimal
   padding-bottom suffisant pour le footer.
----------------------------------------------- */
@media (max-width: 480px) {
  /* Espace en bas pour les boutons fixes */
  body {
    padding-bottom: 55px;
  }

  #title {
    font-size: 20px;
  }

  .gamemode-title {
    font-size: 15px;
    padding: 7px 12px;
    margin: 12px auto;
  }

  #gameModeSelector {
    grid-template-columns: 1fr;
    max-width: 380px;
    padding: 0 10px;
    gap: 12px;
  }

  .gamemode-button {
    max-width: 340px;
    margin: 10px auto;
  }

  #headerAvatar,
  .profile-avatar {
    width: 100px !important;
    height: 100px !important;
  }

  #socialLinks {
    gap: 10px;
    margin-top: 15px;
  }

  #socialLinks a {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  #socialLinks a img {
    width: 20px;
    height: 20px;
  }

  .share-card {
    width: min(360px, 95vw);
    padding: 20px 12px;
  }

  /* Daily : très compact sur mobile, symétrique avec News */
  .daily-btn {
    bottom: 78px;
    right: 8px;
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 8px;
  }
}
