/* histoire.css - Styles spécifiques à la page Histoire */

/* Import des styles communs */

/* Page Header Styles */
.page-header.histoire-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/illu/chemin.jpg') center/cover no-repeat;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 70px; /* Espacement pour la navbar fixe */
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(239, 203, 62, 0.3);
    letter-spacing: 2px;
}

.separator {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 1.5rem auto;
    box-shadow: 0 0 10px rgba(239, 203, 62, 0.5);
}

.page-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Timeline Navigation - Menu Latéral Fixe */
.timeline-nav {
    position: fixed;
    left: 0;
    top: 120px;
    width: 280px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    background-color: rgba(10, 10, 24, 0.95);
    padding: 1.5rem 1rem;
    z-index: 90;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 0 10px 10px 0;
    transition: transform 0.3s ease;
}

/* Scrollbar personnalisée pour le menu */
.timeline-nav::-webkit-scrollbar {
    width: 6px;
}

.timeline-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.timeline-nav::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.timeline-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.timeline-nav .container {
    padding: 0;
}

.timeline-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.timeline-nav li {
    list-style: none;
}

.timeline-nav a {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    position: relative;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0 5px 5px 0;
    margin-bottom: 0.25rem;
}

.timeline-nav a::before {
    content: '▸';
    position: absolute;
    left: 0.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.timeline-nav a:hover,
.timeline-nav a.active {
    color: var(--primary-color);
    background-color: rgba(212, 175, 55, 0.1);
    border-left-color: var(--primary-color);
    padding-left: 1.5rem;
}

.timeline-nav a:hover::before,
.timeline-nav a.active::before {
    opacity: 1;
    left: 0.75rem;
}

.timeline-nav a.active {
    font-weight: 700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Histoire Content Blocks */
.histoire-section {
    padding-top: 3rem;
    padding-left: 300px; /* Espace pour le menu latéral */
    background-color: var(--bg-dark);
    position: relative;
}

.histoire-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/illu/champs.jpg') center/cover no-repeat fixed;
    opacity: 0.1;
    z-index: 0;
}

.histoire-block {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5rem;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.histoire-image {
    flex: 1;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.histoire-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100%;
    transition: transform 0.5s ease;
}

.histoire-block:hover .histoire-image img {
    transform: scale(1.05);
}

.histoire-content {
    flex: 1.5;
    padding: 2rem;
    min-width: 300px;
}

.histoire-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.histoire-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.histoire-block.reverse {
    flex-direction: row-reverse;
}

/* Animation des blocs */
.histoire-block.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.histoire-block.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Faction Block Styles */
.faction-block {
    display: block;
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: var(--border-radius);
}

.faction-title {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.faction-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* Faction Tabs Styles */
.faction-tabs {
    margin-top: 2rem;
}

.faction-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.faction-tab-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: rgba(10, 10, 24, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faction-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.faction-tab-btn:hover::before {
    left: 100%;
}

.faction-tab-btn:hover, 
.faction-tab-btn.active {
    background-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.faction-tab-btn.active {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.faction-tab-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 1px solid var(--primary-color);
    object-fit: cover;
}

.faction-tabs-content {
    position: relative;
    min-height: 400px;
}

.faction-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faction-tab-content.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.faction-detail {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faction-detail:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.faction-detail-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: rgba(10, 10, 24, 0.9);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.faction-detail-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1.5rem;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(239, 203, 62, 0.5);
}

.faction-detail-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.faction-detail-content {
    padding: 2rem;
}

.faction-detail-content h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
}

.faction-detail-content ul {
    margin-bottom: 1.5rem;
}

.faction-detail-content li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.faction-detail-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.faction-detail-content strong {
    color: var(--primary-light);
}

.faction-detail-content .cta-button {
    margin-top: 1rem;
    display: inline-block;
}

/* Spécificités des factions */
.alliance-detail {
    border-left: 4px solid #1a3c8a;
}

.horde-detail {
    border-left: 4px solid #8a1a1a;
}

.kirin-tor-detail {
    border-left: 4px solid #6a1a8a;
}

.bandits-detail {
    border-left: 4px solid #8a7a1a;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 1200px) {
    .timeline-nav {
        width: 250px;
    }
    
    .histoire-section {
        padding-left: 270px;
    }
}

@media screen and (max-width: 992px) {
    .timeline-nav {
        width: 220px;
        font-size: 0.85rem;
    }
    
    .histoire-section {
        padding-left: 240px;
    }
    
    .timeline-nav a {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

@media screen and (max-width: 768px) {
    .page-header.histoire-header {
        height: 40vh;
    }
    
    /* Menu latéral devient un menu déroulant sur mobile */
    .timeline-nav {
        position: fixed;
        left: -280px;
        top: 70px;
        width: 280px;
        max-height: calc(100vh - 70px);
        border-radius: 0 10px 10px 0;
        transition: left 0.3s ease;
    }
    
    .timeline-nav.show {
        left: 0;
    }
    
    .histoire-section {
        padding-left: 20px;
    }
    
    /* Bouton pour ouvrir le menu sur mobile */
    .timeline-nav::before {
        content: '☰';
        position: fixed;
        left: 0;
        top: 120px;
        width: 50px;
        height: 50px;
        background-color: rgba(10, 10, 24, 0.95);
        color: var(--primary-color);
        border-radius: 0 10px 10px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 91;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .histoire-block, 
    .histoire-block.reverse {
        flex-direction: column;
    }
    
    .histoire-image {
        max-height: 250px;
    }
    
    .faction-detail-header {
        flex-wrap: wrap;
    }
    
    .faction-detail-icon {
        margin-bottom: 1rem;
    }
}

@media screen and (max-width: 576px) {
    .page-title {
        font-size: 2rem;
    }
    
    .faction-detail-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .faction-detail-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .faction-detail-header h3 {
        font-size: 1.5rem;
    }
    
    .faction-detail-content {
        padding: 1.5rem;
    }
}

/* Animations supplémentaires */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.faction-title {
    animation: pulse 3s infinite;
}

/* NOUVELLES AMÉLIORATIONS POUR METTRE EN VALEUR LES TEXTES */

/* Citations et phrases clés */
.text-highlight {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-style: italic;
    margin: 1.5rem 0;
    padding: 1rem 2rem;
    border-left: 3px solid var(--primary-color);
    background-color: rgba(212, 175, 55, 0.1);
    position: relative;
}

.text-highlight::before {
    content: '"';
    font-size: 3rem;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    color: rgba(212, 175, 55, 0.3);
}

.text-highlight::after {
    content: '"';
    font-size: 3rem;
    position: absolute;
    bottom: -2rem;
    right: 0.5rem;
    color: rgba(212, 175, 55, 0.3);
}

/* Sous-titres thématiques */
.theme-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--primary-light);
    margin: 1.5rem 0 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.theme-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Mise en valeur des mots clés */
.keyword {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.keyword::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
    opacity: 0.7;
}

/* Animation pour attirer l'attention sur les éléments importants */
@keyframes textGlow {
    0% { text-shadow: 0 0 2px rgba(212, 175, 55, 0.3); }
    50% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.6); }
    100% { text-shadow: 0 0 2px rgba(212, 175, 55, 0.3); }
}

.text-glow {
    animation: textGlow 3s infinite;
}

/* Amélioration pour les appels à l'action textuels */
.text-cta {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin: 2rem 0;
    color: var(--primary-light);
}

/* Amélioration pour les listes importantes */
.key-list {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.key-list li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.key-list li::before {
    content: '✧';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Effet de surlignage animé pour les textes importants */
@keyframes highlightSweep {
    0% { width: 0; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0; left: 100%; }
}

.highlight-sweep {
    position: relative;
    z-index: 1;
}

.highlight-sweep::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 30%;
    background-color: rgba(212, 175, 55, 0.2);
    z-index: -1;
    animation: highlightSweep 4s infinite;
}

/* Section de dates historiques importantes */
.timeline-milestone {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(10, 10, 24, 0.5);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.timeline-milestone h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-family: 'Cinzel', serif;
}

/* Adaptations responsive pour les nouveaux éléments */
@media screen and (max-width: 768px) {
    .text-highlight {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .text-highlight::before,
    .text-highlight::after {
        font-size: 2rem;
    }
    
    .theme-subtitle {
        font-size: 1.2rem;
    }
    
    .text-cta {
        font-size: 1.1rem;
    }
}
