/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-dark: #060b11;
    --bg-card: #0a111a;
    --accent-cyan: #00f0ff;
    --accent-orange: #ff9d00;
    --text-main: #c4d1ec;
    --text-muted: #62778c;
    --border-color: rgba(0, 240, 255, 0.15);
    --font-title: 'Orbitron', sans-serif;
    --font-nav: 'Rajdhani', sans-serif;
    --font-body: 'Roboto Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    background-color: rgba(6, 11, 17, 0.9);
    border-bottom: 2px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4%;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo .glitch-effect {
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--accent-cyan);
}

.logo .sub-logo {
    color: var(--accent-orange);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-main);
    font-family: var(--font-nav);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 8rem 4% 6rem 4%;
    background: radial-gradient(circle at center, #102238 0%, var(--bg-dark) 70%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.security-tag {
    font-size: 0.75rem;
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    padding: 0.3rem 1rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 157, 0, 0.05);
}

.hero-section h1 {
    font-family: var(--font-title);
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.hero-section p {
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* Boutons */
.btn {
    font-family: var(--font-nav);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.8rem 2rem;
    letter-spacing: 1px;
    display: inline-block;
    margin: 0 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 157, 0, 0.3);
}

/* ==========================================================================
   4. STRUCTURE DE PAGE GENERALE
   ========================================================================== */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 4%;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2rem;
    text-align: center;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 3.5rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   5. GRILLE DES LIVRES (CHRONIQUES)
   ========================================================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.book-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.08);
}

.book-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    background-color: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    z-index: 5;
    font-weight: bold;
}

.book-cover {
    height: 180px;
    background-size: cover;
    background-position: top;
    border-bottom: 1px solid var(--border-color);
}

.book-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-meta {
    font-size: 0.75rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.book-info h3 {
    font-family: var(--font-title);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.book-info p {
    color: var(--text-main);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-read {
    font-family: var(--font-nav);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-cyan);
    align-self: flex-start;
}

.btn-read:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--accent-cyan);
}
/* Style global pour les livres désactivés */
.book-card.status-inactive .book-status {
    background: rgba(255, 51, 51, 0.15) !important;
    color: #ff3333 !important;
    border: 1px solid #ff3333 !important;
}
.book-card.status-inactive .btn-read:hover {
    background: transparent !important;
    color: #666 !important;
}

/* ==========================================================================
   6. CODEX / SECTIONS SECONDAIRES
   ========================================================================== */
.codex-section {
    background-color: #04080d;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.codex-grid {
    display: grid;
    /* Adapte automatiquement la grille sur 3 colonnes de manière fluide */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.codex-item {
    background: linear-gradient(135deg, #0a111a 0%, #050a10 100%);
    border-left: 3px solid var(--accent-cyan);
    padding: 2rem;
}

/* Bordure orange intermédiaire pour le bloc Arsenal */
.codex-item.arsenal-tech {
    border-left-color: #ffb703; 
}

.codex-item.logs-archive {
    border-left-color: var(--accent-orange);
}

.codex-item h4 {
    font-family: var(--font-title);
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.codex-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.btn-link {
    font-family: var(--font-nav);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer {
    background-color: #020508;
    padding: 3rem 4%;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.footer-tech {
    color: rgba(0, 240, 255, 0.3) !important;
    font-size: 0.7rem !important;
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn {
        margin: 0.5rem 0;
        display: block;
        width: 100%;
    }
}

/* ==========================================================================
   9. EXTENSION : INTERFACE DE LECTURE (livre2.php)
   ========================================================================== */
.book-hero {
    background: linear-gradient(to bottom, #0d1a29 0%, var(--bg-dark) 100%);
    padding: 4rem 4% 2rem 4%;
    border-bottom: 1px solid var(--border-color);
}

.book-hero h1 {
    font-family: var(--font-title);
    color: #fff;
    font-size: 2.2rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    margin-bottom: 1rem;
}

.book-description {
    color: var(--text-main);
    max-width: 900px;
    font-size: 0.95rem;
}

/* Layout de lecture scindé */
.reading-interface {
    display: flex;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 6rem;
}

/* Barre latérale des chapitres */
.chapters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-family: var(--font-title);
    color: var(--accent-orange);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.chapters-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-btn {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 0.7rem 1rem;
    text-align: left;
    font-family: var(--font-nav);
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(0, 240, 255, 0.05);
    color: var(--accent-cyan);
    padding-left: 1.5rem;
}

.tab-btn.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
    font-weight: bold;
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.back-link {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.back-link:hover {
    color: var(--accent-orange);
}

/* Zone de lecture du texte */
.reading-zone {
    flex-grow: 1;
    background-color: rgba(10, 17, 26, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.05);
    padding: 2.5rem;
    min-height: 500px;
}

/* Gestion de l'affichage des blocs de contenu */
.chapter-content {
    display: none; /* Cacher par défaut */
}

.chapter-content.active {
    display: block; /* Afficher si actif */
    animation: fadeIn 0.4s ease;
}

.meta-data {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.reading-zone h2 {
    font-family: var(--font-title);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.text-block p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #e2ebf8;
    text-align: justify;
}

.text-block blockquote {
    border-left: 3px solid var(--accent-orange);
    background: rgba(255, 157, 0, 0.03);
    padding: 1rem;
    margin: 2rem 0;
    color: var(--accent-orange);
    font-style: italic;
}

/* Style pour les blocs de mise en évidence (Citations / Ordres) */
blockquote {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--neon-color, #00ffcc);
    margin: 15px 0;
    padding: 15px 20px;
    font-style: italic;
    font-family: 'Roboto Mono', monospace;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 0 4px 4px 0;
}

/* Animation de transition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Adaptation Mobile */
@media (max-width: 768px) {
    .reading-interface {
        flex-direction: column;
        gap: 2rem;
    }
    .chapters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    .reading-zone {
        padding: 1.5rem;
    }
}

/* Effet visuel au survol d'une ligne de personnage */
.char-details[open] {
    border-color: #ff0055 !important; /* Devient rouge/rose quand il est déplié */
}
.char-details summary:hover {
    background: rgba(0, 255, 204, 0.05) !important; /* Légère lueur turquoise au survol */
}

/* ==========================================================================
   10. MODULE DE NAVIGATION PAR ÉPISODES
   ========================================================================== */
.episodes-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(6, 11, 17, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 0.8rem 1rem;
    margin-bottom: 2rem;
}

.episodes-label {
    font-family: var(--font-title);
    color: var(--accent-orange);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.episodes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Boutons numériques d'épisodes */
.ep-btn {
    background: rgba(10, 17, 26, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ep-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.ep-btn.active {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    border-color: var(--accent-cyan);
    font-weight: bold;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Conteneur de texte pour les épisodes */
.episodes-wrapper {
    margin-top: 1.5rem;
}

.episode-content {
    display: none; /* Masqué par défaut */
    line-height: 1.8;
}

.episode-content.active {
    display: block; /* Affiché quand sélectionné */
    animation: fadeIn 0.3s ease;
}

/* Ajustements pour petits écrans */
@media (max-width: 500px) {
    .episodes-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   MODULE INFO-BULLES (TOOLTIPS)
   ========================================================================== */
.tooltip-trigger {
    color: var(--accent-cyan); /* Met en valeur l'expression (cyan néon) */
    border-bottom: 1px dashed var(--accent-cyan); /* Petit souligné discret */
    cursor: help; /* Le curseur devient un point d'interrogation */
    position: relative;
    display: inline-block;
}

/* L'info-bulle cachée par défaut */
.tooltip-trigger::after {
    content: attr(data-tooltip); /* Récupère le texte du HTML automatiquement */
    position: absolute;
    bottom: 125%; /* S'affiche juste au-dessus du texte */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: #0a111a; /* Fond de carte sombre */
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--accent-cyan); /* Bordure cyan SF */
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-style: normal; /* Annule l'italique si c'est dans un blockquote */
    white-space: normal;
    width: 220px; /* Largeur max de la bulle */
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

/* Petit triangle sous la bulle */
.tooltip-trigger::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--accent-cyan) transparent transparent transparent;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

/* Affichage au survol (Hover) */
.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* --- Styles de l'Organigramme (Annexes) --- */
.org-tabs {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.org-tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-nav);
    font-size: 1rem;
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

.org-tab-btn:hover, .org-tab-btn.active {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.org-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-top: 1rem;
}

.org-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.org-title {
    color: var(--accent-orange);
    font-family: var(--font-title);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.org-list {
    list-style: none;
    padding: 0;
}

.org-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(196, 209, 236, 0.05);
    font-family: var(--font-body);
}

.org-list li:last-child {
    border-bottom: none;
}

/* Badges de l'organigramme */
.org-badge {
    display: inline-block;
    min-width: 45px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 157, 0, 0.15);
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
}

.org-badge.cs {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.org-badge.sp {
    background: rgba(235, 64, 52, 0.15);
    border: 1px solid #eb4034;
    color: #eb4034;
}

.toggle-org-link {
    color: var(--accent-cyan);
    font-family: var(--font-nav);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.toggle-org-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--accent-cyan);
}

.toggle-org-link.expanded {
    color: var(--accent-orange);
}

.toggle-org-link.expanded:hover {
    text-shadow: 0 0 8px var(--accent-orange);
}

/* --- Style des Tableaux d'Évolution (Annexes) --- */

.table-title {
    font-family: var(--font-title);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

/* Permet le défilement horizontal si l'écran est trop petit (mobile) */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    background: rgba(6, 11, 17, 0.6);
    margin-bottom: 1.5rem;
}

.evolution-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-align: center;
    min-width: 700px; /* Force une largeur minimale pour garder les colonnes lisibles */
}

.evolution-table th, .evolution-table td {
    padding: 0.75rem;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

/* En-tête du tableau */
.evolution-table th {
    background: rgba(0, 240, 255, 0.05);
    color: #ffffff;
    font-family: var(--font-nav);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.evolution-table th small {
    color: var(--accent-orange);
    text-transform: none;
}

/* Alignement à gauche pour la première colonne (les noms de groupes) */
.evolution-table td:first-child {
    text-align: left;
	vertical-align: top; /* <--- FORCE AUSSI LE CALAGE EN HAUT */
    color: var(--text-main);
    background: rgba(196, 209, 236, 0.02);
    font-family: var(--font-nav);
    font-size: 0.95rem;
    padding-left: 1rem;
    width: 200px;
}

/* Alternance de couleur de fond pour les lignes */
.evolution-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Effet de survol sur les cellules numériques */
.evolution-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.03);
}

/* Alignement à gauche pour les cellules contenant des listes verticales d'effectifs */
.evolution-table td.cell-list {
    text-align: left;
	vertical-align: top; /* <--- FORCE LE CALAGE EN HAUT */
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.6rem 0.8rem;
    white-space: nowrap; /* Évite qu'un nom de famille passe à la ligne sur petit écran */
}

/* Style des grades à l'intérieur du tableau */
.evolution-table td.cell-list .rank {
    color: var(--accent-cyan);
    font-weight: bold;
    display: inline-block;
    min-width: 30px; /* Aligne le début des noms proprement */
}

/* =========================================================================
   FEUILLE DE STYLE DES TROUPES DE LA LÉGION (NÉON TERMINAL DESIGN)
   ========================================================================= */

.hantarien-org-container {
    width: 100%;
    margin-top: 25px;
    color: #e2e8f0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Boutons de contrôle (Haut) */
.hantarien-org-controls {
    margin-bottom: 20px;
}

.hantarien-org-controls button {
    background: transparent;
    color: #00b4d8;
    border: 1px solid #00b4d8;
    padding: 6px 14px;
    margin-right: 10px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.hantarien-org-controls button:hover {
    background: rgba(0, 180, 216, 0.15);
    box-shadow: 0 0 8px rgba(0, 180, 216, 0.4);
}

/* Grille principale des colonnes tactiques */
.hantarien-org-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
}

.hantarien-column {
    background: rgba(10, 25, 41, 0.7);
    border: 1px solid #1e293b;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

/* En-têtes des colonnes */
.hantarien-header {
    padding: 12px;
    font-weight: bold;
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
    border-bottom: 2px solid;
}

.hr-title {
    color: #ffb703;
    border-color: #ffb703;
    background: rgba(255, 183, 3, 0.05);
}

.rang-title {
    color: #00f5d4;
    border-color: #00f5d4;
    background: rgba(0, 245, 212, 0.05);
}

.hantarien-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Boîtes des structures de commandement */
.unit-box {
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid;
    user-select: none;
}

.main-hq {
    background: rgba(255, 183, 3, 0.1);
    border-color: #ffb703;
    color: #ffb703;
}

.compagnie-hq {
    background: rgba(0, 180, 216, 0.1);
    border-color: #00b4d8;
    color: #00b4d8;
    cursor: pointer;
}

.section-hq {
    background: rgba(148, 163, 184, 0.1);
    border-color: #94a3b8;
    color: #cbd5e1;
    cursor: pointer;
    margin-top: 5px;
}

/* Indicateurs interactifs d'état (+/-) */
.compagnie-hq::after, .section-hq::after {
    content: ' ➕';
    float: right;
    font-size: 9px;
}

.compagnie-hq.active::after, .section-hq.active::after {
    content: ' ➖';
}

/* Zone de listes imbriquées (repliées par défaut via JS) */
.compagnie-content, .section-content {
    display: none;
    padding-left: 8px;
    border-left: 1px dashed #334155;
    margin-top: 5px;
}

/* Boîtes textuelles de listes d'unités/soldats */
.group-box {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #334155;
    padding: 6px 8px;
    font-size: 11px;
    margin: 4px 0;
    border-radius: 2px;
    color: #94a3b8;
    line-height: 1.4;
}

.group-box strong {
    color: #f1f5f9;
}

/* =========================================================================
   TITRES INTERACTIFS MUTUALISÉS (GRADES & LÉGION)
   ========================================================================= */

/* 1. Conteneurs principaux */
.legion-main-wrapper, 
.grades-main-wrapper {
    margin: 30px 0;
    width: 100%;
}

/* 2. En-têtes cliquables (Style commun) */
.legion-toggle-header, 
.grades-toggle-header {
    background-color: #0a1929; /* Fond sombre de type terminal */
    padding: 14px 20px;       
    cursor: pointer;
    font-family: var(--font-nav); /* Alignement sur votre police de navigation */
    font-size: 1.1rem;         
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

/* État Replié commun (Cyan) */
.legion-toggle-header, 
.grades-toggle-header {
    color: #00f5d4;
    border: 1px solid rgba(0, 245, 212, 0.2);
}

.legion-toggle-header:hover, 
.grades-toggle-header:hover {
    background-color: rgba(0, 245, 212, 0.05);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.1);
}

/* État Déplié commun (Orange via la classe .is-open du parent) */
.legion-main-wrapper.is-open .legion-toggle-header,
.grades-main-wrapper.is-open .grades-toggle-header {
    color: #ffb703;
    border: 1px solid rgba(255, 183, 3, 0.3);
}

.legion-main-wrapper.is-open .legion-toggle-header:hover,
.grades-main-wrapper.is-open .grades-toggle-header:hover {
    background-color: rgba(255, 183, 3, 0.05);
}

/* 3. Normalisation de l'icône [+] / [-] pour un alignement vertical parfait */
.toggle-icon {
    display: inline-block;
    width: 35px;                           /* Largeur fixe pour bloquer le décalage */
    text-align: left;                      /* Aligne le crochet gauche parfaitement */
    font-family: 'Courier New', monospace; /* Police à chasse fixe obligatoire */
    font-size: 1.2rem;                     
    letter-spacing: 0;                     /* Annule l'écartement des lettres pour le [+] */
}

/* 4. Zones de contenu masquées par défaut */
.legion-content-wrapper, 
.grades-content-wrapper {
    display: none; 
    background: rgba(10, 25, 41, 0.4);
    padding: 20px;
    border: 1px solid #1e293b;
    border-top: none;
}

/* Barre de navigation des onglets */
.legion-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.15);
}

/* Boutons de navigation */
.legion-tab-btn {
    background: rgba(10, 25, 41, 0.6);
    color: #00f5d4; /* Style cyan par défaut */
    border: 1px solid rgba(0, 245, 212, 0.3);
    padding: 8px 16px;
    font-family: var(--font-nav);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.legion-tab-btn:hover {
    background: rgba(0, 245, 212, 0.1);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

/* Onglet actuellement sélectionné (Orange) */
.legion-tab-btn.active {
    color: #ffb703;
    background: rgba(255, 183, 3, 0.1);
    border-color: #ffb703;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.25);
}

/* Ajustement pour la grille : puisqu'on affiche une seule colonne à la fois, 
   on s'assure qu'elle prenne une largeur propre */
#hantarienOrgGrid {
    display: block !important; /* Désactive le multi-colonne en ligne pour le mode onglet */
}

#hantarienOrgGrid .hantarien-column {
    width: 100% !important;
    max-width: 100% !important;
}

/* ==========================================================================
   NOUVEL ORGANIGRAMME : COLONNE HANTARO-AMAZONE (Style Légion / Interactif)
   ========================================================================== */

/* Conteneur principal */
.org-cha-container {
    background-color: #0b111e;
    border: 1px solid #1c2d42;
    padding: 30px;
    font-family: 'Rajdhani', sans-serif;
    color: #ffffff;
    margin-top: 30px;
}

/* Titre principal style Légion */
.org-cha-main-title {
    color: #ff9f00; /* Orange doré */
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 1px solid #1c2d42;
    padding: 15px;
    margin-bottom: 25px;
}

/* Titre du bloc actif */
.org-cha-active-header {
    text-align: center;
    color: #00b4d8;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.1rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #00b4d8;
    margin-bottom: 20px;
}

/* Structure des gros blocs fixes (ex: Compagnie de Combat) */
.org-cha-block {
    border: 1px solid #005f73;
    background: #051321;
    margin-bottom: 15px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #00b4d8;
    font-weight: bold;
}

/* ==========================================================================
   LOGIQUE DE DÉPLOYEMENT DES SOUS-SECTIONS (ACCORDÉONS)
   ========================================================================== */

/* Masquage des checkboxes de déploiement */
input[type="checkbox"].org-cha-toggle {
    display: none;
}

/* Style des bandeaux de sous-sections cliquables */
label.org-cha-sub-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #414f63;
    background: #0d1b2a;
    margin: 5px 0 5px 15px;
    padding: 10px 15px;
    color: #e0e1dd;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

label.org-cha-sub-block:hover {
    background: #14273a;
    border-color: #00b4d8;
}

/* Gestion des icônes indicatrices (+ / −) */
.org-cha-sub-block .icon-minus { display: none; color: #9d4edd; }
.org-cha-sub-block .icon-plus { display: inline; color: #00b4d8; }

/* Conteneur des listes internes (Masqué par défaut) */
.org-cha-group-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-left: 15px;
    border-left: 1px dotted #414f63;
    padding-left: 15px;
    transition: all 0.3s ease-in-out;
}

/* --- ACTIONS QUAND UNE SECTION EST COCHÉE (OUVERTE) --- */

/* 1. Rendre le contenu visible avec animation */
input[type="checkbox"].org-cha-toggle:checked + label.org-cha-sub-block + .org-cha-group-list {
    max-height: 1000px; 
    opacity: 1;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* 2. Permutation des icônes : cacher le +, afficher le - */
input[type="checkbox"].org-cha-toggle:checked + label.org-cha-sub-block .icon-plus {
    display: none;
}
input[type="checkbox"].org-cha-toggle:checked + label.org-cha-sub-block .icon-minus {
    display: inline;
}

/* Alignement des lignes d'inventaire détaillées */
.org-cha-group-item {
    background: #09111c;
    border: 1px solid #1c2d42;
    padding: 10px 15px;
    margin-bottom: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: #a4b3c6;
}

.org-cha-group-item strong {
    color: #ffffff;
}

/* ==========================================================================
   CORRECTIONS ALIGNEMENT ET AFFICHAGE REPLIÉ (COLONNE HANTARO-AMAZONE)
   ========================================================================== */

/* 1. Suppression de l'ancien titre orange et de son cadre encadré */
.org-cha-main-title {
    display: none !important;
}

/* 2. Masquage de l'ensemble de l'organigramme par défaut */
.org-cha-master-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

/* 3. Déploiement complet lors du clic sur le titre principal [+] */
#toggle-org-hantaro:checked ~ .org-cha-master-container {
    max-height: 2000px; /* Permet d'ouvrir le bloc */
    opacity: 1;
    margin-top: 15px;
}

/* 4. Permutation des libellés [+] et [-] du titre principal */
#toggle-org-hantaro:checked + label[for="toggle-org-hantaro"] .main-icon-plus {
    display: none !important;
}
#toggle-org-hantaro:checked + label[for="toggle-org-hantaro"] .main-icon-minus {
    display: inline-block !important;
    color: #ff9f00; /* Passe en orange quand il est ouvert pour un look sympa, ou restez en cyan */
}

/* Ajustement cosmétique du grand conteneur interne désormais épuré */
.org-cha-container {
    background-color: #0b111e;
    border: 1px solid #1c2d42;
    padding: 20px;
    font-family: 'Rajdhani', sans-serif;
    color: #ffffff;
}

/* ==========================================================================
   MODULE DE POP-UP / ZOOM DES DÉCORATIONS MILITAIRES (MÉDAILLES & RUBANS)
   ========================================================================== */

/* 1. On libère le tableau, l'interface et les blocs de texte de toute coupure */
.reading-zone,
.chapter-content,
.text-block,
.table-wrapper,
.evolution-table,
.evolution-table th,
.evolution-table td {
    overflow: visible !important;
}

.evolution-table td {
    vertical-align: middle;
    text-align: center;
}

/* 2. Conteneur des images miniatures (médailles et rubans) */
.preview-container {
    position: relative;
    display: block;      /* Changé de inline-block à block pour permettre le centrage complet */
    margin: 0 auto;      /* Centre le conteneur horizontalement dans la cellule */
    width: max-content;  /* S'adapte pile à la largeur de l'image pour que le pop-up reste bien collé */
    cursor: pointer;
}

/* 3. Style de la miniature de la médaille/insigne dans le tableau */
.medal-img {
    max-height: 65px;       
    max-width: 90px;        
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;      /* Force l'image à se centrer elle-même */
    filter: drop-shadow(0 0 5px rgba(0, 230, 255, 0.2));
    transition: filter 0.2s ease;
}

/* 4. Style de la miniature du ruban dans le tableau */
.ribbon-img {
    max-height: 20px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 3px rgba(0, 230, 255, 0.2));
    transition: filter 0.2s ease;
}

.preview-container:hover .medal-img,
.preview-container:hover .ribbon-img {
    filter: drop-shadow(0 0 8px rgba(0, 230, 255, 0.6));
}

/* 5. Bulle Pop-up (commune aux médailles et aux rubans) */
.medal-popup {
    position: absolute;
    z-index: 999999; 
    top: 0;          
    left: 115%;      
    transform: scale(0.8);
    transform-origin: top left; 
    background: rgba(5, 12, 22, 0.98); 
    border: 1px solid #00e6ff; 
    box-shadow: 0 0 25px rgba(0, 230, 255, 0.6);
    padding: 10px;
    border-radius: 4px;
    pointer-events: none; 
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

/* 6. Image de la médaille/insigne en grand format dans son pop-up */
.preview-container .medal-popup img.medal-large {
    max-height: 280px; 
    max-width: 350px; /* Permet aux insignes larges de se déployer magnifiquement au survol */
    width: auto;
    height: auto;
    display: block;
}

/* 7. Image du ruban en grand format dans son pop-up */
.preview-container .medal-popup img.ribbon-large {
    max-height: 70px; 
    width: auto;
    height: auto;
    display: block;
}

/* 8. Déclenchement de l'apparition au survol */
.preview-container:hover .medal-popup {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   ARCHIVES DE L'ORGANIGRAMME MILITAIRE (AVANT GGP)
   ========================================================================== */

.archives-header {
    text-align: center;
    margin: 40px 0;
}

/* Bouton principal accordéon */
.orga-main-summary {
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00d2ff;
    background: rgba(0, 47, 108, 0.3);
    padding: 20px;
    border: 1px solid #004B49;
    border-left: 5px solid #00d2ff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orga-main-summary:hover {
    background: rgba(0, 47, 108, 0.6);
}

.orga-main-summary::after {
    content: "▼ Ouvrir le fichier";
    font-size: 0.9rem;
    font-family: 'Rajdhani', sans-serif;
}

details[open] > .orga-main-summary::after {
    content: "▲ Fermer le fichier";
}

/* Arbre de la structure militaire */
.orga-tree {
    background: rgba(10, 17, 26, 0.8);
    padding: 30px;
    border: 1px solid #333;
    margin-top: -20px;
    margin-bottom: 40px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
}

.orga-intro {
    margin-bottom: 0;
}

.orga-separator {
    border-top: 1px solid #333;
    margin: 20px 0;
}

.orga-tree details {
    margin-left: 20px;
    margin-top: 10px;
}

.orga-tree summary {
    cursor: pointer;
    color: #e0e0e0;
    padding: 8px 0;
    font-weight: bold;
    transition: color 0.2s;
}

.orga-tree summary:hover {
    color: #fff;
}

.orga-tree ul {
    margin-left: 25px;
    border-left: 1px dashed #555;
    padding-left: 20px;
    list-style-type: none;
    margin-top: 5px;
    margin-bottom: 10px;
}

.orga-tree li {
    margin: 8px 0;
    color: #aaa;
}

.orga-back-container {
    text-align: center;
    margin-top: 40px;
}

/* Identifiants Couleur des Factions */
.c-red { color: #ff4d4d; }
.c-yellow { color: #ffd700; }
.c-blue { color: #4da6ff; }
.c-green { color: #4dff4d; }
.c-gold { 
    color: #d4af37; 
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5); 
}

/* ==========================================================================
   MISE EN PAGE BI-COLONNE (SIDEBAR + CONTENU) — APPLI RECTIFIÉE #00f0ff
   ========================================================================== */

.page-layout-columns {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

/* Menu latéral gauche */
.sidebar-menu {
    flex: 0 0 280px;
    background: rgba(10, 17, 26, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.2); /* Remplacement par #00f0ff */
    padding: 25px 20px;
}

.sidebar-menu h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ff8c00;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 140, 0, 0.3);
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 12px;
}

.sidebar-menu .menu-item {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #a0aab5;
    text-decoration: none;
    text-transform: uppercase;
    padding: 12px 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-menu .menu-item:hover {
    color: #00f0ff; /* Hover en cyan #00f0ff */
    background: rgba(0, 240, 255, 0.05); /* RGBA mis à jour */
    padding-left: 20px;
}

/* État actif de l'onglet courant */
.sidebar-menu .menu-item.active {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.15); /* RGBA mis à jour */
    border-left: 3px solid #00f0ff;
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px dashed rgba(51, 51, 51, 0.6);
}

.sidebar-footer .back-link {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-footer .back-link:hover {
    color: #00f0ff;
}

/* Zone de contenu principale à droite */
.main-content-zone {
    flex: 1;
    background: rgba(5, 10, 15, 0.9);
    border: 1px solid rgba(0, 240, 255, 0.15); /* Remplacement par #00f0ff */
    padding: 40px;
    min-height: 450px;
}

/* Bouton principal accordéon (Lien de l'organigramme) */
.orga-main-summary {
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00f0ff; /* Application du cyan exact */
    background: rgba(0, 240, 255, 0.05); /* RGBA mis à jour */
    padding: 20px;
    border: 1px solid rgba(0, 240, 255, 0.2); /* RGBA mis à jour */
    border-left: 5px solid #00f0ff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orga-main-summary:hover {
    background: rgba(0, 240, 255, 0.12); /* RGBA mis à jour */
}

.orga-main-summary::after {
    content: "▼ Ouvrir le fichier";
    font-size: 0.9rem;
    font-family: 'Rajdhani', sans-serif;
}

details[open] > .orga-main-summary::after {
    content: "▲ Fermer le fichier";
}

/* Arbre de la structure militaire */
.orga-tree {
    background: rgba(10, 17, 26, 0.8);
    padding: 30px;
    border: 1px solid #222;
    margin-top: -20px;
    margin-bottom: 40px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
}

.orga-intro {
    margin-bottom: 0;
}

.orga-separator {
    border-top: 1px solid #333;
    margin: 20px 0;
}

.orga-tree details {
    margin-left: 20px;
    margin-top: 10px;
}

.orga-tree summary {
    cursor: pointer;
    color: #e0e0e0;
    padding: 8px 0;
    font-weight: bold;
    transition: color 0.2s;
}

.orga-tree summary:hover {
    color: #fff;
}

.orga-tree ul {
    margin-left: 25px;
    border-left: 1px dashed #444;
    padding-left: 20px;
    list-style-type: none;
    margin-top: 5px;
    margin-bottom: 10px;
}

.orga-tree li {
    margin: 8px 0;
    color: #aaa;
}

.orga-back-container {
    text-align: center;
    margin-top: 40px;
}

/* Encadré temporaire pour les Archives Civiles */
.archive-placeholder-box {
    border: 1px dashed rgba(0, 240, 255, 0.2); /* RGBA mis à jour */
    background: rgba(0, 240, 255, 0.02); /* RGBA mis à jour */
    padding: 30px;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    color: #667680;
    margin-top: 30px;
}

/* Identifiants Couleur des Armées */
.c-red { color: #ff4d4d; }
.c-yellow { color: #ffd700; }
.c-cyan { color: #00f0ff; } /* Application du cyan exact #00f0ff */
.c-green { color: #4dff4d; }
.c-gold { 
    color: #d4af37; 
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5); 
}

/* Ajustement responsive */
@media (max-width: 900px) {
    .page-layout-columns {
        flex-direction: column;
        align-items: stretch;
    }
    .sidebar-menu {
        flex: none;
    }
}

.orga-tree summary[onclick] {
    cursor: default !important;
}

/* 1. Force la couleur grise et désactive le gras sur les légions classiques (puces li) */
.orga-tree ul li {
    font-weight: normal !important;
    color: #aaa !important;
}

/* 2. Force le même traitement (gris + normal) sur les légions de commandement (summary fictifs) */
.orga-tree summary[onclick] {
    font-weight: normal !important;
    color: #aaa !important;
}

/* 3. Conservation stricte du gras et de la couleur blanche pour les échelons supérieurs */
.orga-tree details > summary:not([onclick]) {
    font-weight: bold;
    color: #fff; /* Ou la couleur par défaut de vos titres de brigades/divisions */
}

/* ==========================================================================
   MODULE ARSENAL : CARTES DE VAISSEAUX ET D'ARMES
   ========================================================================== */
.weapons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.weapon-card {
    background-color: var(--bg-card, #0f1722);
    border: 1px solid var(--border-color, rgba(0, 240, 255, 0.2));
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.weapon-card:hover {
    border-color: var(--border-color, rgba(0, 240, 255, 0.2));
    box-shadow: none;
    transform: none;
}

.weapon-title {
    font-family: var(--font-title, 'Orbitron', sans-serif);
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.weapon-type {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weapon-image-wrapper {
    width: 100%;
    height: 180px;
    background: rgba(6, 11, 17, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.weapon-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.2));
    transition: transform 0.3s ease;
}

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

.weapon-specs-box {
    background: rgba(6, 11, 17, 0.6);
    border-left: 2px solid var(--accent-cyan, #00f0ff);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.weapon-specs-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.weapon-specs-box strong {
    color: var(--accent-cyan, #00f0ff);
}

.weapon-description-box {
    font-size: 0.85rem;
    color: var(--text-main, #c5d1e0);
    line-height: 1.5;
    flex-grow: 1;
}

.weapon-description-box p {
    margin-bottom: 0.8rem;
    text-align: left;
}

/* ==========================================================================
   MODULE ARSENAL : ZOOM IMAGE SEULE
   ========================================================================== */

/* 1. Curseur de zoom sur le cadre de l'image */
.weapon-card {
    cursor: default;
}

.weapon-image-wrapper {
    cursor: zoom-in;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.weapon-image-wrapper:hover {
    border-color: var(--accent-cyan, #00f0ff);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* 2. Fond sombre en plein écran (Overlay) */
.zoom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 8, 14, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.zoom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 3. Conteneur et Image Zoomée */
.zoom-modal-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoomed-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid var(--accent-cyan, #00f0ff);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.zoom-modal-overlay.active .zoomed-image {
    transform: scale(1);
}

/* 4. Bouton de fermeture (Croix) */
.zoom-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--accent-cyan, #00f0ff);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.zoom-modal-close:hover {
    color: #fff;
    transform: scale(1.15);
}
/* ==========================================================================
   Navigation des Épisodes (Bouton Suivant)
   ========================================================================== */
.next-episode-nav {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    text-align: right;
}

/* Bouton aligné sur le style .ep-btn */
.btn-next-ep {
    display: inline-block;
    background: rgba(10, 25, 47, 0.6);
    color: #8892b0;
    border: 1px solid rgba(100, 255, 218, 0.2);
    padding: 8px 18px;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.25s ease-in-out;
}

/* Effet au survol / au focus */
.btn-next-ep:hover {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.2);
    transform: translateX(4px);
}

/* ==========================================================================
   Lien de retour vers le site principal - Nation Hantarienne
   ========================================================================== */

.main-nav a.main-site-link {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ff9d00; /* Orange ambré identique au badge "CLASSIFICATION" */
    border: 1px solid rgba(255, 157, 0, 0.4);
    background-color: rgba(255, 157, 0, 0.05);
    padding: 5px 12px;
    margin-right: 20px;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    display: inline-block;
}

/* Effet au survol */
.main-nav a.main-site-link:hover {
    color: #00e5ff; /* Bascule sur le cyan du bouton principal */
    border-color: #00e5ff;
    background-color: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Cache le bouton burger sur grand écran */
.burger-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.burger-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #00f0ff; /* Couleur assortie à ton thème */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Adaptations spécifiques pour Mobile */
@media (max-width: 768px) {
    .main-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        position: relative;
    }

    .burger-toggle {
        display: flex;
    }

    .main-nav {
        display: none; /* Caché sur mobile par défaut */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #050b14; /* Couleur de fond de ton header */
        border-bottom: 1px solid #00f0ff;
        padding: 20px 0;
        z-index: 1000;
    }

    .main-nav.active {
        display: block; /* Visible quand cliqué */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }
}

/* 1. Structure du bouton d'accordéon */
.accordion-toggle-header {
    background-color: #0a1929;
    padding: 14px 20px;
    cursor: pointer;
    font-family: var(--font-nav, 'Rajdhani', sans-serif);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

summary.is-leaf {
    cursor: default;
    list-style: none; /* Masque la flèche de déroulement native */
}
summary.is-leaf::-webkit-details-marker {
    display: none;
}

.text-left { text-align: left !important; }
.mb-4 { margin-bottom: 25px !important; }
.org-block { margin-bottom: 25px; text-align: left !important; width: 100%; display: block; clear: both; }
.org-sublist { margin: 10px 0 0 20px; font-size: 0.95em; line-height: 1.6; text-align: left !important; list-style-type: none; padding-left: 0; }
.org-sublist ul { list-style-type: none; padding-left: 20px; }

.hero-info-tag { color: #00e6ff; font-family: 'Roboto Mono', monospace; font-size: 0.8rem; }
.col-insigne { width: 15%; }
.col-nom { width: 25%; }
.col-ruban { width: 15%; }

.org-content-clean {
    background: none;
    border: none;
    padding: 0;
}

.org-list-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.org-list-link .org-badge {
    cursor: pointer;
}

/* 2. État Replié (Cyan) — Force la couleur sur les spans */
.accordion-toggle-header,
.accordion-toggle-header span {
    color: var(--accent-cyan, #00f0ff) !important;
}

.accordion-toggle-header {
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.accordion-toggle-header:hover {
    background-color: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* 3. État Déplié (Orange) — Force la couleur sur les spans */
.accordion-wrapper.is-open .accordion-toggle-header,
.accordion-wrapper.is-open .accordion-toggle-header span {
    color: var(--accent-orange, #ff9d00) !important;
}

.accordion-wrapper.is-open .accordion-toggle-header {
    border: 1px solid rgba(255, 157, 0, 0.4);
}

.accordion-wrapper.is-open .accordion-toggle-header:hover {
    background-color: rgba(255, 157, 0, 0.1);
}

/* Styles pour le statut des effectifs */
.status-killed {
    color: #d9534f; /* Rouge */
    font-weight: bold;
}

.status-severely-wounded {
    color: #f0ad4e; /* Jaune / Orange pour une meilleure lisibilité sur fond clair */
    font-weight: bold;
}

.status-wounded {
    color: #0275d8; /* Bleu */
    font-weight: bold;
}

.status-reassigned {
    color: #5cb85c; /* Vert */
    font-weight: bold;
}

/* Style du bloc légende adapté au thème sombre */
.org-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    background-color: rgba(15, 23, 42, 0.6); /* Fond sombre semi-transparent */
    border: 1px solid #104052; /* Bordure sombre assortie au thème */
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.legend-title {
    font-weight: bold;
    margin-right: 10px;
    color: #e2e8f0; /* Texte clair pour lisibilité */
}

.legend-item {
    display: inline-block;
}

/* Ajustement facultatif des nuances de texte pour lisibilité sur fond sombre */
.status-killed {
    color: #ff5555;
    font-weight: bold;
}

.status-severely-wounded {
    color: #ffb86c;
    font-weight: bold;
}

.status-wounded {
    color: #00d2ff;
    font-weight: bold;
}

.status-reassigned {
    color: #50fa7b;
    font-weight: bold;
}