/* ==========================================================================
   1. IMPORTATIONS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Roboto+Mono:wght@300;400;700&display=swap');

:root {
  /* --- Couleurs Globales --- */
  --bg-dark: #08090c;       /* Noir profond */
  --accent-purple: #8e44ad; /* Violet Principal */
  --accent-cyan: #a9cce3;   /* Cyan Secondaire */
  --text-white: #ecf0f1;    /* Blanc cassé */
  --gold: #f1c40f; /* Ajoutez cette ligne si elle manque */
  --accent-green: #2ecc71; /* Vert Émeraude */
  --glass: rgba(255, 255, 255, 0.05);
  
  /* --- Couleurs de Factions --- */
  --axiom-color: #e67e22;   /* Orange Rouille */
  --bravos-color: #e74c3c;  /* Rouge Sang */
  --lyra-color: #fd79a8;    /* Rose Corail */
  --muna-color: #1abc9c;    /* Turquoise Abysses */
  --ordis-color: #3498db;   /* Bleu Acier */
  --yzmir-color: #9b59b6;   /* Violet Néant */
}

/* ==========================================================================
   2. CONFIGURATION DE BASE (RESET)
   ========================================================================== */
* { box-sizing: border-box; }

body, html {
  margin: 0; padding: 0; width: 100%; min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: 'Roboto Mono', monospace;
  color: var(--text-white);
  overflow-x: hidden;
}

/* Scrollbar Custom */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* Flexbox centré par défaut (Accueil) */
body { display: flex; justify-content: center; align-items: center; }

/* Classe pour les pages longues (Factions, Lore) */
.faction-page-body { display: block; height: auto; padding-bottom: 50px; }

/* ==========================================================================
   3. FOND & PARTICULES
   ========================================================================== */
.ocean-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, #1a1025 0%, var(--bg-dark) 85%);
  z-index: 0;
}

.particles-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  z-index: 1 !important;
}

.particle {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  animation: rise linear infinite; bottom: -10px;
}

@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* ==========================================================================
   4. PAGE D'ACCUEIL
   ========================================================================== */
.container {
  text-align: center; padding: 20px; width: 90%; max-width: 800px;
  position: relative; 
  z-index: 10 !important;
}

.logo-img {
  width: min(280px, 50vw); height: auto;
  filter: drop-shadow(0 0 20px rgba(142, 68, 173, 0.5));
  animation: float 6s ease-in-out infinite; margin-bottom: 1rem;
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

h1 {
  font-family: 'Cinzel', serif; font-size: clamp(2rem, 8vw, 3.5rem); margin: 0; line-height: 1.1;
  text-transform: uppercase; letter-spacing: 2px;
  background: -webkit-linear-gradient(var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0px 0px 30px rgba(142, 68, 173, 0.4);
}

.subtitle {
  font-size: clamp(0.75rem, 3vw, 1rem); margin-top: 0.5rem; margin-bottom: 2rem;
  opacity: 0.8; letter-spacing: 1px; color: var(--accent-cyan); text-transform: uppercase;
}

.lore-hook {
  background: var(--glass); border-left: 4px solid var(--accent-purple);
  padding: 1.5rem; margin-bottom: 2.5rem; text-align: left;
  border-radius: 0 12px 12px 0; backdrop-filter: blur(5px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.lore-hook p { font-size: clamp(0.9rem, 4vw, 1rem); line-height: 1.6; margin-bottom: 1rem; color: #dcdcdc; }

.final-hook {
  font-weight: 700; color: var(--accent-cyan); margin-bottom: 0 !important;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Boutons Accueil */
.buttons-group { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.cta-button {
  display: inline-block; min-width: 200px; padding: 15px 25px;
  font-size: 1rem; text-decoration: none; font-family: 'Cinzel', serif;
  text-transform: uppercase; letter-spacing: 2px; transition: all 0.4s ease;
  cursor: pointer; border: 1px solid;
}
.primary-btn {
  color: var(--text-white); border-color: var(--accent-purple);
  background: linear-gradient(45deg, transparent 50%, var(--accent-purple) 50%);
  background-size: 250%; background-position: 0%;
}
.primary-btn:hover { background-position: 100%; box-shadow: 0 0 25px var(--accent-purple); border-color: var(--accent-cyan); transform: scale(1.05); }

.secondary-btn {
  color: var(--text-white); border-color: var(--accent-cyan);
  background: linear-gradient(45deg, transparent 50%, rgba(169, 204, 227, 0.3) 50%);
  background-size: 250%; background-position: 0%;
}
.secondary-btn:hover { background-position: 100%; box-shadow: 0 0 25px var(--accent-cyan); border-color: #fff; color: #fff; transform: scale(1.05); }

/* ==========================================================================
   5. PAGE FACTIONS (GRID)
   ========================================================================== */
.faction-page-container { max-width: 1000px; margin: 0 auto; padding-top: 40px; }

.back-link {
    color: var(--text-white); text-decoration: none; font-size: 0.9rem;
    opacity: 0.6; display: inline-block; margin-bottom: 20px;
    transition: opacity 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.back-link:hover { opacity: 1; color: var(--accent-cyan); }

.faction-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; margin-top: 30px; padding-bottom: 50px;
}

.faction-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; padding: 25px; text-align: left; transition: all 0.3s ease;
    display: flex; flex-direction: column; justify-content: space-between; min-height: 220px;
    position: relative; /* Indispensable */
    overflow: hidden;   /* Coupe l'image si elle dépasse du cadre */
}
.faction-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.07); }

.faction-card h2 { font-family: 'Cinzel', serif; font-size: 1.8rem; margin: 0 0 10px 0; text-transform: uppercase; }
.faction-lore { font-size: 0.9rem; color: #bbb; line-height: 1.4; margin-bottom: 20px; }

.faction-btn {
    display: inline-block; padding: 10px 20px; font-size: 0.8rem;
    text-decoration: none; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-white); border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto; text-align: center; transition: 0.3s;
}
.faction-btn:hover { background: var(--text-white); color: var(--bg-dark); font-weight: bold; }

/* ==========================================================================
   6. PAGE DÉTAIL (SPLIT LAYOUT)
   ========================================================================== */
.detail-container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

.split-layout {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 50px; margin-top: 20px; text-align: left;
}

/* Colonne Gauche : Carte */
.card-showcase {
    position: relative; /* IMPORTANT : Le bouton flottant se base sur ça */
    display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: 400px; /* Contraint la largeur pour que la carte soit belle */
}

/* Colonne Droite : Lore */
.lore-content { flex: 1.5; min-width: 300px; }
.lore-text-block p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 20px; color: #dcdcdc; }

.ability-box {
    background: rgba(0, 0, 0, 0.4); border-left: 4px solid #fff;
    padding: 20px; border-radius: 0 10px 10px 0; margin-top: 30px;
}
.ability-box h3 { margin-top: 0; font-family: 'Cinzel', serif; font-size: 1.2rem; text-transform: uppercase; }

/* ==========================================================================
   7. SYSTÈME DE FLIP CARD 3D (CORRIGÉ)
   ========================================================================== */
.scene {
    width: 100%;
    height: 560px; /* Hauteur FIXE indispensable pour éviter la disparition */
    perspective: 1000px;
    display: flex; justify-content: center;
    margin-bottom: 20px;
    z-index: 1;
}

.card-object {
    width: 100%; height: 100%; position: relative;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}
.card-object.is-flipped { transform: rotateY(180deg); }

.card-face {
    position: absolute; width: 100%; height: 100%;
    top: 0; left: 0;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 15px;
    
    /* Centre l'image et le glow */
    display: flex; justify-content: center; align-items: center;
}

/* Les Faces */
.face-front { z-index: 2; transform: rotateY(0deg); }
.face-back { transform: rotateY(180deg); z-index: 1; }

/* L'image */
.tcg-card {
    width: 100%; height: 100%;
    object-fit: cover; /* Remplit sans déformer */
    border-radius: 15px;
    display: block;
    z-index: 2; /* Important: Devant le halo */
}

/* Le Halo Lumineux */
.card-glow {
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    position: relative; z-index: 1;
}
.card-glow::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 95%; height: 95%;
    border-radius: 50%; filter: blur(45px); opacity: 0.6;
    z-index: -1; /* Important: Derrière l'image */
}

/* Animation du texte */
.lore-hidden { display: none; opacity: 0; transition: opacity 0.5s ease; }
.lore-active { display: block; opacity: 1; animation: fadeInLore 0.8s ease; }
@keyframes fadeInLore { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   8. BOUTON RPG FLOTTANT (STYLE FINAL)
   ========================================================================== */
.token-btn {
    /* Positionnement Flottant */
    position: absolute;
    bottom: 20px;  /* Décalage du bas */
    right: 10%;    /* Décalage de la droite */
    z-index: 10;   /* Au dessus de la carte */

    /* Style Rond */
    width: 60px; height: 60px;
    border-radius: 50%;
    
    /* Couleurs */
    background: rgba(8, 9, 12, 0.9);
    border: 2px solid var(--ordis-color); /* Par défaut (changera selon faction si besoin) */
    color: var(--ordis-color);
    font-size: 28px;
    cursor: pointer;
    
    /* Centrage Flèche */
    display: flex; align-items: center; justify-content: center;
    
    /* Animation */
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.token-btn:hover {
    background: var(--ordis-color);
    color: var(--bg-dark);
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 0 25px var(--ordis-color);
}

/* ==========================================================================
   9. STYLES SPÉCIFIQUES AUX FACTIONS
   ========================================================================== */

/* AXIOM */
.axiom-title { font-size: 3rem; color: var(--axiom-color); text-shadow: 0 0 20px rgba(230, 126, 34, 0.3); margin-bottom: 0.5rem; }
.axiom-glow::before { background: #d35400; }
.axiom-border { border-left-color: var(--axiom-color); }
.axiom-particle { background: rgba(230, 126, 34, 0.4); }
.faction-card.axiom:hover { border-color: #d35400; box-shadow: 0 0 15px rgba(211, 84, 0, 0.2); }
.faction-card.axiom h2 { color: var(--axiom-color); }

/* BRAVOS */
.bravos-title { font-size: 3rem; color: var(--bravos-color); text-shadow: 0 0 20px rgba(231, 76, 60, 0.4); margin-bottom: 0.5rem; }
.bravos-glow::before { background: #c0392b; }
.bravos-border { border-left-color: var(--bravos-color); }
.bravos-particle { background: rgba(231, 76, 60, 0.5); }
.faction-card.bravos:hover { border-color: #c0392b; box-shadow: 0 0 15px rgba(192, 57, 43, 0.2); }
.faction-card.bravos h2 { color: var(--bravos-color); }

/* LYRA */
.lyra-title { font-size: 3rem; color: var(--lyra-color); text-shadow: 0 0 20px rgba(232, 67, 147, 0.5); margin-bottom: 0.5rem; }
.lyra-glow::before { background: #e84393; }
.lyra-border { border-left-color: var(--lyra-color); }
.lyra-particle { background: rgba(253, 121, 168, 0.6); box-shadow: 0 0 5px rgba(232, 67, 147, 0.4); }
.faction-card.lyra:hover { border-color: #e84393; box-shadow: 0 0 15px rgba(232, 67, 147, 0.2); }
.faction-card.lyra h2 { color: var(--lyra-color); }

/* MUNA */
.muna-title { font-size: 3rem; color: var(--muna-color); text-shadow: 0 0 20px rgba(26, 188, 156, 0.4); margin-bottom: 0.5rem; }
.muna-glow::before { background: #16a085; }
.muna-border { border-left-color: var(--muna-color); }
.muna-particle { background: rgba(26, 188, 156, 0.6); box-shadow: 0 0 8px rgba(26, 188, 156, 0.4); }
.faction-card.muna:hover { border-color: #16a085; box-shadow: 0 0 15px rgba(22, 160, 133, 0.2); }
.faction-card.muna h2 { color: var(--muna-color); }

/* ORDIS */
.ordis-title { font-size: 3rem; color: var(--ordis-color); text-shadow: 0 0 20px rgba(52, 152, 219, 0.4); margin-bottom: 0.5rem; }
.ordis-glow::before { background: #2980b9; }
.ordis-border { border-left-color: var(--ordis-color); }
.ordis-particle { background: rgba(52, 152, 219, 0.6); border-radius: 2px; }
.faction-card.ordis:hover { border-color: #2980b9; box-shadow: 0 0 15px rgba(41, 128, 185, 0.2); }
.faction-card.ordis h2 { color: var(--ordis-color); }

/* YZMIR */
.yzmir-title { font-size: 3rem; color: var(--yzmir-color); text-shadow: 0 0 20px rgba(142, 68, 173, 0.5); margin-bottom: 0.5rem; }
.yzmir-glow::before { background: #8e44ad; }
.yzmir-border { border-left-color: var(--yzmir-color); }
.yzmir-particle { background: rgba(155, 89, 182, 0.6); box-shadow: 0 0 10px rgba(142, 68, 173, 0.4); }
.faction-card.yzmir:hover { border-color: #8e44ad; box-shadow: 0 0 15px rgba(142, 68, 173, 0.2); }
.faction-card.yzmir h2 { color: var(--yzmir-color); }

/* ==========================================================================
   10. COMPTE À REBOURS
   ========================================================================== */
.countdown-wrapper {
    margin: 30px auto; padding: 20px; background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(169, 204, 227, 0.2); border-radius: 10px;
    max-width: 600px; backdrop-filter: blur(5px);
}
.countdown-title {
    font-family: 'Cinzel', serif; color: var(--accent-cyan); text-transform: uppercase;
    letter-spacing: 2px; margin: 0 0 15px 0; font-size: 1rem;
}
.countdown-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.time-box {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(255, 255, 255, 0.05); padding: 10px; border-radius: 5px;
    min-width: 70px; border: 1px solid transparent; transition: 0.3s;
}
.time-box:hover { border-color: var(--accent-purple); box-shadow: 0 0 10px rgba(142, 68, 173, 0.3); }
.time-number {
    font-family: 'Cinzel', serif; font-size: 2rem; font-weight: bold;
    color: #fff; text-shadow: 0 0 10px var(--accent-cyan);
}
.time-label { font-family: 'Roboto Mono', monospace; font-size: 0.7rem; text-transform: uppercase; color: #aaa; margin-top: 5px; }
.hidden-message { display: none; color: var(--accent-purple); font-weight: bold; font-size: 1.2rem; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; text-shadow: 0 0 15px var(--accent-purple); } 100% { opacity: 0.6; } }

/* ==========================================================================
   11. MEDIA QUERIES (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Accueil */
    .buttons-group { flex-direction: column; align-items: center; }
    .cta-button { width: 100%; max-width: 300px; }

    /* Layout Détail */
    .split-layout { flex-direction: column; gap: 30px; }
    .lore-content { text-align: center; }
    .ability-box { text-align: left; }
    
    /* Contrainte carte mobile pour éviter qu'elle soit trop grande */
    .scene { height: 450px; } /* Un peu moins haut sur mobile */
    .card-showcase { width: 100%; }

    /* Polices */
    .axiom-title, .bravos-title, .lyra-title, .muna-title, .ordis-title, .yzmir-title { font-size: 2.2rem; }

    /* Bouton RPG (Adaptation mobile) */
    .token-btn {
        right: 0px; /* Collé au bord droit */
        bottom: 10px;
        width: 50px; height: 50px; font-size: 22px;
    }
}

/* =========================================
   1. PAGE LORE GLOBAL (LA BIBLIOTHÈQUE)
   ========================================= */
.lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.chapter-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent-purple);
    padding: 30px;
    border-radius: 4px; /* Coins un peu plus carrés pour faire "Livre" */
    text-align: center;
    transition: 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.chapter-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(142, 68, 173, 0.2);
}

.chapter-number {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: -10px;
    right: 20px;
    font-weight: bold;
}

.chapter-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-top: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.chapter-desc {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =========================================
   2. PAGE CHAPITRE (LA FRISE CHRONOLOGIQUE)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 0;
}

/* La ligne verticale */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px; /* Position de la ligne à gauche */
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-purple), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px; /* Espace pour la ligne et le point */
}

/* Le point sur la ligne */
.timeline-dot {
    position: absolute;
    left: 11px; /* Centré sur la ligne de 2px (20px - 9px) */
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
    z-index: 2;
}

.timeline-date {
    font-family: 'Cinzel', serif;
    color: var(--accent-purple);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
    transition: 0.3s;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-cyan);
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--text-white);
    font-family: 'Cinzel', serif;
}

/* =========================================
   3. PAGE RÉCIT (LECTURE)
   ========================================= */
.story-container {
    max-width: 700px; /* Plus étroit pour une meilleure lecture */
    margin: 0 auto;
    padding: 40px 20px;
    text-align: left; /* Texte aligné à gauche pour la lecture */
}

.story-header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.story-meta {
    color: var(--accent-purple);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.story-body {
    font-family: 'Georgia', serif; /* Police avec empattement pour la lecture */
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
}

.story-body p {
    margin-bottom: 25px;
}

/* Lettrine (Première lettre stylée) */
.story-body p:first-of-type::first-letter {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: var(--accent-cyan);
    float: left;
    margin-right: 10px;
    line-height: 0.8;
}

/* =========================================
   PAGE HAUTS FAITS (HALL OF FAME)
   ========================================= */

:root {
    --gold: #f1c40f;       /* Or Jaune */
    --gold-dark: #b7950b;  /* Or Sombre */
    --gold-glow: rgba(241, 196, 15, 0.4);
}

/* Titre Doré */
.gold-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: -webkit-linear-gradient(#fff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--gold-glow);
}

/* Particules Dorées */
.gold-particle {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

/* --- LE CHAMPION (SPOTLIGHT) --- */
.champion-spotlight {
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(183, 149, 11, 0.2));
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    max-width: 700px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 0 50px var(--gold-glow);
    animation: pulseGold 3s infinite;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 30px var(--gold-glow); border-color: var(--gold); }
    50% { box-shadow: 0 0 60px var(--gold-glow); border-color: #fff; }
    100% { box-shadow: 0 0 30px var(--gold-glow); border-color: var(--gold); }
}

/* Effet de brillance qui traverse la carte */
.champion-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0%, 80% { left: -100%; }
    100% { left: 200%; }
}

.trophy-icon { font-size: 5rem; text-shadow: 0 0 20px var(--gold); }

.champion-info { text-align: left; z-index: 2; }

.tournament-name { font-size: 1.2rem; color: var(--gold); text-transform: uppercase; margin: 0; letter-spacing: 2px; }
.winner-name { font-size: 2.5rem; font-family: 'Cinzel', serif; color: #fff; font-weight: bold; margin: 10px 0; }
.winner-details { color: #ccc; font-size: 1rem; }
.date-badge { display: inline-block; background: var(--gold); color: #000; padding: 3px 10px; font-weight: bold; font-size: 0.8rem; border-radius: 4px; margin-top: 10px; }

/* --- GRILLE DES ANCIENS VAINQUEURS --- */
.section-divider {
    font-family: 'Cinzel', serif;
    color: var(--text-white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-top: 60px;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.winner-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
    position: relative;
    transition: 0.3s;
}

.winner-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
    border-color: var(--gold);
}

.rank-badge {
    position: absolute; top: 10px; right: 10px;
    font-size: 1.5rem; font-weight: bold; color: rgba(255,255,255,0.1);
    font-family: 'Cinzel', serif;
}

.winner-card h3 { font-size: 1rem; color: var(--accent-cyan); margin-top: 0; margin-bottom: 10px; }
.winner-card .player { font-size: 1.3rem; font-weight: bold; color: #fff; margin-bottom: 10px; }

/* Tags de Faction pour les cartes */
.faction-tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.ordis-tag { color: var(--ordis-color); }
.bravos-tag { color: var(--bravos-color); }
.yzmir-tag { color: var(--yzmir-color); }
.axiom-tag { color: var(--axiom-color); }
.muna-tag { color: var(--muna-color); }
.lyra-tag { color: var(--lyra-color); }

/* --- RECORDS --- */
.records-container {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
}

.record-item {
    background: rgba(0,0,0,0.4);
    border: 1px dashed var(--gold-dark);
    padding: 15px 25px;
    border-radius: 50px; /* Forme de pillule */
    display: flex; align-items: center; gap: 15px;
    min-width: 280px;
}

.record-icon { font-size: 2rem; }
.record-text strong { color: var(--text-white); font-family: 'Cinzel', serif; }
.gold-text { color: var(--gold); font-weight: bold; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .champion-spotlight { flex-direction: column; text-align: center; gap: 10px; }
    .champion-info { text-align: center; }
    .gold-title { font-size: 2.5rem; }
}

/* Style Tertiaire (Or - Panthéon) */
.gold-btn {
  color: var(--text-white);
  border-color: var(--gold); /* Utilise la variable Or */
  /* Dégradé doré transparent */
  background: linear-gradient(45deg, transparent 50%, rgba(241, 196, 15, 0.3) 50%);
  background-size: 250%;
  background-position: 0%;
}

.gold-btn:hover {
  background-position: 100%;
  box-shadow: 0 0 25px var(--gold);
  border-color: #fff;
  color: #fff;
  transform: scale(1.05);
}

/* STYLE DIALOGUE */
.dialogue {
    color: #fff; /* Plus blanc que le texte narratif grisâtre */
    font-style: italic;
    padding-left: 15px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* IMAGE FLOTTANTE DANS LE TEXTE */
.story-img-right {
    float: right;
    width: 250px; /* Taille modérée */
    margin-left: 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* Sur mobile, on annule l'effet flottant pour que l'image prenne toute la largeur */
@media (max-width: 768px) {
    .story-img-right {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
}

/* SÉPARATEUR STYLISÉ */
.story-divider {
    text-align: center;
    margin: 50px 0;
    color: var(--accent-purple);
    font-size: 1.5rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.story-divider::before, .story-divider::after {
    content: '';
    height: 1px;
    width: 100px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

/* CITATION DANS LE RÉCIT */
.lore-quote {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--accent-cyan);
    background: rgba(169, 204, 227, 0.05); /* Fond très léger */
    border-left: 4px solid var(--accent-cyan);
    margin: 40px 0;
    padding: 20px 30px;
    font-style: italic;
    position: relative;
}

/* Petite déco guillemet */
.lore-quote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -20px;
    left: 10px;
    opacity: 0.2;
    font-family: serif;
}

/* =========================================
   STYLE DES LOGOS FACTIONS DANS LES CARTES
   ========================================= */



/* 2. On s'assure que le texte passe PAR DESSUS l'image */
.card-content {
    position: relative;
    z-index: 2; /* Texte au premier plan */
}

/* 3. Le style de l'image (Logo) */
.faction-bg-icon {
    position: absolute;
    right: -30px; /* On décale vers la droite pour couper un peu l'image */
    bottom: -20px; /* On la place en bas */
    height: 180px; /* Une taille imposante */
    width: auto;
    
    opacity: 0.15; /* Très transparent (effet filigrane) */
    z-index: 0;    /* Au fond */
    
    /* Animation fluide au survol */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Optionnel : Filtre noir et blanc pour uniformiser, retire si tu veux la couleur */
    filter: grayscale(100%);
}

/* 4. Effet au survol de la carte */
.faction-card:hover .faction-bg-icon {
    opacity: 0.4; /* Devient plus visible */
    transform: scale(1.1) rotate(-10deg); /* Grossit et penche un peu */
    right: -10px; /* Rentre un peu vers l'intérieur */
    filter: grayscale(0%); /* Retrouve ses couleurs (si activé au dessus) */
}

/* Style Quaternaire (Vert - Cartes) */
.green-btn {
  color: var(--text-white);
  border-color: var(--accent-green);
  background: linear-gradient(45deg, transparent 50%, rgba(46, 204, 113, 0.3) 50%);
  background-size: 250%;
  background-position: 0%;
}

.green-btn:hover {
  background-position: 100%;
  box-shadow: 0 0 25px var(--accent-green);
  border-color: #fff;
  color: #fff;
  transform: scale(1.05);
}

/* --- STYLE DE LA GALERIE (PAGE CARTES) --- */

/* Barre de recherche et Filtres */
.gallery-controls {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.search-input {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--accent-cyan);
    padding: 15px;
    width: 100%;
    max-width: 400px;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    border-radius: 30px;
    text-align: center;
    outline: none;
    transition: 0.3s;
}
.search-input:focus {
    box-shadow: 0 0 15px var(--accent-cyan);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 20px;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--text-white);
    color: var(--text-white);
    background: rgba(255,255,255,0.1);
}

/* Grille des Cartes */
.cards-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-card {
    position: relative;
    transition: 0.3s;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 2px solid transparent; /* Prêt pour le hover */
    transition: 0.3s;
}

.gallery-card:hover {
    transform: translateY(-10px) scale(1.05);
    z-index: 10;
}

.gallery-card:hover img {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px var(--accent-cyan);
}

/* Petit label sous la carte */
.card-name {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ccc;
    font-family: 'Cinzel', serif;
}

/* =========================================
   LIGHTBOX (ZOOM CARTE)
   ========================================= */

/* Le fond noir qui recouvre tout l'écran */
.lightbox-modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 9999; /* Tout au-dessus */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fond très sombre */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Petit effet de flou classe */
}

/* L'image agrandie */
.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 15px;
    box-shadow: 0 0 50px var(--accent-cyan);
    animation: zoomCard 0.3s ease-out;
    cursor: zoom-out; /* Indique qu'on peut cliquer pour fermer */
}

/* Le texte sous l'image */
.lightbox-caption {
    margin-top: 20px;
    color: var(--text-white);
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-cyan);
    animation: fadeIn 0.5s;
}

/* Animation d'ouverture */
@keyframes zoomCard {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Espacement entre les lignes de filtres */
.filter-row {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================
   ANIMATION D'APPARITION DES FILTRES
   ========================================= */

/* État par défaut : Caché */
.filters-wrapper {
    display: none; /* L'élément n'existe pas visuellement */
    opacity: 0;
}

/* État affiché : Animation */
.filters-visible {
    display: block; /* On l'affiche */
    animation: slideDown 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* L'animation de descente */
@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); /* Part d'un peu plus haut */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =========================================
   MENU DE NAVIGATION (NAVBAR)
   ========================================= */
.main-navbar {
    position: fixed; /* Reste collé en haut */
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(8, 9, 12, 0.8); /* Fond sombre semi-transparent */
    backdrop-filter: blur(10px); /* Effet de flou */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000; /* Au-dessus de TOUT (particules, cartes, etc.) */
    font-family: 'Cinzel', serif;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Logo */
.nav-logo {
    color: var(--accent-purple);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-purple);
}

/* Liens Desktop */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
    position: relative;
}

.nav-links a:hover, .nav-links a.active-link {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Hamburger (Mobile) */
.hamburger {
    display: none; /* Caché sur PC */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    transition: 0.3s;
}

/* Menu Mobile Déroulant */
.mobile-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(8, 9, 12, 0.95);
    border-bottom: 1px solid var(--accent-purple);
    display: none; /* Caché par défaut */
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    color: #fff;
    text-decoration: none;
    padding: 15px;
    text-transform: uppercase;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* On cache les liens PC */
    .hamburger { display: flex; } /* On affiche le burger */
}

/* AJUSTEMENT DU CORPS DE PAGE */
/* Comme le menu est 'fixed', il cache le haut de la page. 
   Il faut pousser le contenu vers le bas. */
body {
    padding-top: 80px; /* 70px de menu + 10px de marge */
}

/* =========================================
   FIL D'ARIANE (BREADCRUMB)
   ========================================= */
.breadcrumb {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb a {
    color: var(--text-white);
    text-decoration: none;
    transition: 0.3s;
}

.breadcrumb a:hover {
    color: var(--accent-cyan);
}

.breadcrumb span {
    color: var(--accent-purple); /* La page actuelle */
    font-weight: bold;
}

.separator {
    color: #555;
    font-size: 0.8rem;
}


.token-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap; /* Permet de passer à la ligne sur petit écran */
}

/* Style des boutons "Pilule" */
.switch-btn {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--axiom-color);
    color: #fff;
    
    padding: 10px 20px;
    border-radius: 30px; /* Forme arrondie */
    
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.switch-btn:hover {
    background: var(--axiom-color);
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--axiom-color);
}

/* Bouton Héros Spécifique */
.hero-btn {
    border-color: #fff;
    margin-right: 10px;
}
.hero-btn:hover {
    background: #fff;
    color: #000;
}

/* État Actif */
.switch-btn.active-btn {
    background: var(--axiom-color);
    color: #fff;
    box-shadow: 0 0 20px var(--axiom-color) inset;
    border-color: #fff;
    font-weight: bold;
}

/* État Actif Héros */
.hero-btn.active-btn {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255,255,255,0.5) inset;
}

/* =========================================
   MODALE PROFIL & TIMELINE
   ========================================= */

/* Le fond noir semi-transparent */
.hero-modal-overlay {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000; /* Tout au-dessus */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center; align-items: center;
    animation: fadeIn 0.3s ease;
}

/* La boîte de contenu */
.hero-modal-content {
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 50px rgba(169, 204, 227, 0.15);
    border-radius: 15px;
    width: 90%; max-width: 900px;
    height: 80vh; /* Hauteur max */
    overflow-y: auto; /* Scroll si ça dépasse */
    position: relative;
    padding: 30px;
}

/* Bouton Fermer (Croix) */
.close-hero-modal {
    position: absolute; top: 15px; right: 25px;
    color: #fff; font-size: 40px; font-weight: bold;
    cursor: pointer; transition: 0.3s; z-index: 10;
}
.close-hero-modal:hover { color: var(--accent-cyan); transform: scale(1.1); }

/* Mise en page : Gauche (Image) / Droite (Frise) */
.hero-modal-grid {
    display: flex; gap: 40px; height: 100%;
}

/* --- VISUEL (GAUCHE) --- */
.hero-visual {
    flex: 2;
    display: flex; flex-direction: column; align-items: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 20px;
}

.modal-card-wrapper img {
    width: 100%; max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid var(--accent-purple);
}

.modal-title {
    font-family: 'Cinzel', serif; color: var(--text-white);
    margin: 20px 0; text-align: center; text-transform: uppercase;
    font-size: 1.5rem;
}

.modal-btn { width: 100%; margin-top: auto; text-align: center; }

/* --- HISTOIRE (DROITE) --- */
.hero-history {
    flex: 1;
    padding-left: 10px;
}

.history-title {
    color: var(--accent-cyan); font-family: 'Cinzel', serif;
    border-bottom: 1px solid var(--accent-purple);
    padding-bottom: 10px; margin-top: 0;
}

/* LA MINI FRISE */
.mini-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--accent-purple);
    margin-top: 20px;
}

.mini-event {
    margin-bottom: 30px; position: relative;
}

/* Le point lumineux sur la frise */
.mini-event::before {
    content: ''; position: absolute; left: -27px; top: 5px;
    width: 12px; height: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-cyan); border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.event-date {
    font-size: 0.85rem; color: var(--accent-purple); 
    font-weight: bold; text-transform: uppercase; margin-bottom: 5px;
}
.event-desc {
    font-size: 0.95rem; color: #ccc; line-height: 1.5; margin-bottom: 8px;
}
.event-link {
    font-size: 0.8rem; color: var(--accent-cyan); 
    text-decoration: none; border-bottom: 1px dashed var(--accent-cyan);
    transition: 0.3s;
}
.event-link:hover { color: #fff; border-bottom-style: solid; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .hero-modal-grid { flex-direction: column; height: auto; }
    .hero-visual { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 20px;}
    .hero-modal-content { height: auto; max-height: 90vh; }
}