/*==============================================================
      PALANIDAS Sathursan - 10.12.2025 - Style de l'histoire
===============================================================*/

/* ======== BACKGROUND ======== */
body {
    background-image: url(../image/VagueHokusai.jpg);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* ======== CONTAINER PRINCIPAL ======== */
.contenu-histoire {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 2.5rem auto;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

/* ======== SECTIONS ======== */
.contenu-histoire section {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contenu-histoire section h2 {
    color: rgb(83, 22, 22);
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid rgb(170, 19, 19);
    padding-bottom: 0.5rem;
}

.contenu-histoire section p {
    color: #444;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ======== INTRODUCTION ======== */
.section-intro {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border-left: 5px solid rgb(170, 19, 19);
}

.fun-fact {
    background: rgba(170, 19, 19, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid rgb(170, 19, 19);
    margin-top: 1rem;
}

.fun-fact strong {
    color: rgb(170, 19, 19);
    font-size: 1.2rem;
}

/* ======== TIMELINE ======== */
.timeline-section h2 {
    text-align: center;
    font-size: 2.5rem;
    border-bottom: 4px solid rgb(170, 19, 19);
    padding-bottom: 1rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, rgb(170, 19, 19), rgb(139, 69, 19));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    position: relative;
    margin-bottom: 3rem;
    align-items: center;
    gap: 1.5rem;
}

/* Alternance gauche/droite */
.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(83, 22, 22);
    margin-bottom: 0.5rem;
}

/* Cartes */
.timeline-content {
    width: 40%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Bordures alternées */
.timeline-item:nth-child(odd) .timeline-content {
    border-left: 5px solid rgb(170, 19, 19);
}

.timeline-item:nth-child(even) .timeline-content {
    border-right: 5px solid rgb(170, 19, 19);
}

/* Image à droite (impairs) */
.timeline-item:nth-child(odd) .timeline-image {
    transform: translateX(180px);
}

/* Image à gauche (pairs) */
.timeline-item:nth-child(even) .timeline-image {
    transform: translateX(-180px);
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(170, 19, 19, 0.3);
}

/* Images */
.timeline-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-image:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 20px rgba(170, 19, 19, 0.4);
}

/* Point central */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgb(170, 19, 19);
    border: 4px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* ======== SECTION GENRES ======== */

.section-genre {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 0.2rem;
}

.genre-carte {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border-left: 5px solid rgb(170, 19, 19);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.genre-carte:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(170, 19, 19, 0.3);
}

.genre-carte h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: rgb(83, 22, 22);
    border-bottom: 2px solid rgb(170, 19, 19);
    padding-bottom: 0.3rem;
}

.genre-carte p {
    color: #444;
    line-height: 1.6;
    margin-top: 0.8rem;
}

/* ======== SECTION STATISTIQUES (avec Flexbox) ======== */

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-box {
    /* Flexbox pour centrer le contenu */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Taille et espacement */
    width: 220px;
    padding: 2rem;
    
    /* Style visuel */
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border: 4px solid #8b4513;
    border-radius: 15px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
    
    /* Animation au survol */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet quand on survole avec la souris */
.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: 5px 5px 20px rgba(139, 69, 19, 0.5);
}

.stat-nombre {
    font-size: 3.5rem;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-description {
    font-size: 1rem;
    color: rgb(83, 22, 22);
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
}

/* ======== SECTION IMPACT CULTUREL ======== */

.impact-section {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border-left: 5px solid rgb(170, 19, 19);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.impact-card {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8d0 100%);
    border-left: 5px solid rgb(170, 19, 19);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(170, 19, 19, 0.3);
}

.impact-card h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: rgb(83, 22, 22);
    border-bottom: 2px solid rgb(170, 19, 19);
    padding-bottom: 0.3rem;
}

.impact-card p {
    color: #444;
    line-height: 1.6;
    margin-top: 0.8rem;
}

/* ======== RESPONSIVE ======== */

/* ============================
   RESPONSIVE — TABLETTE (≤768px)
============================ */
@media (max-width: 768px) {

    /* Conteneur principal */
    .contenu-histoire {
        max-width: 95%;
        margin: 1.5rem auto;
        gap: 1.5rem;
    }

    /* Sections */
    .contenu-histoire section {
        padding: 1.5rem;
        border-radius: 25px;
    }

    /* Timeline */
    .timeline::before,
    .timeline-item::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        justify-content: flex-end !important;
    }

    .timeline-content {
        width: 100%;
        padding: 1.25rem;
    }

    .timeline-image {
        display: none;
    }

    /* Stats */
    .stat-box {
        width: 180px;
        padding: 1.5rem;
    }

    .stat-nombre {
        font-size: 2.5rem;
    }

    .stat-description {
        font-size: 0.9rem;
    }
}

/* ============================
   RESPONSIVE — MOBILE (≤480px)
============================ */
@media (max-width: 480px) {

    /* Conteneur principal */
    .contenu-histoire {
        max-width: 95%;
        margin: 1rem auto;
        gap: 1rem;
    }

    /* Sections */
    .contenu-histoire section {
        padding: 1rem;
        border-radius: 20px;
    }

    .contenu-histoire section h2 {
        font-size: 1.3rem;
    }

    /* Timeline */
    .timeline-content {
        width: 100%;
        padding: 1rem;
    }

    .timeline-image {
        width: 80px;
        height: 80px;
    }

    /* Stats */
    .stats-container {
        gap: 1rem;
    }

    .stat-box {
        width: 100%;
        max-width: 300px;
        padding: 1.25rem;
    }

    .stat-nombre {
        font-size: 2rem;
    }
}