/* Réinitialisation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #FFFFFF;
    color: #333;
    overflow-x: hidden;
}

/* Section festival */
.festival-page {
    margin-top: 100px;
    padding: 60px 0;
    background-color: #F5F5F5;
    color: #333333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.festival-page h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1F286B;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.festival-page h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #1F286B;
    margin: 10px auto 0;
}

/* Chiffres */
.stats-section {
    margin-bottom: 40px;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #D6E6FF;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1F286B;
    margin-bottom: 20px;
    border-left: 4px solid #1F286B;
    padding-left: 10px;
}

.stats-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: center;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #D6E6FF;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card i {
    font-size: 24px;
    color: #1F286B;
    margin-bottom: 10px;
}

.stat-card .counter {
    display: block;
    font-size: 30px;
    color: #1F286B;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

/* Bénévoles */
.volunteer-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.volunteer-content {
    flex: 1;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #D6E6FF;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.volunteer-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1F286B;
    margin-bottom: 15px;
    border-left: 4px solid #1F286B;
    padding-left: 10px;
}

.volunteer-subtitle {
    font-family: 'Caveat', cursive;
    font-size: 30px;
    color: #1F286B;
    margin-bottom: 15px;
}

.volunteer-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, #1F286B 0%, #2A3A9C 100%);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2A3A9C 0%, #3B4ED9 100%);
    transform: scale(1.03);
}

.volunteer-image {
    flex: 1;
    align-self: center;
    margin: 0;
}

.volunteer-image img {
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin: 0;
}

/* Section de la frise */
.timeline-section {
    padding: 60px 15px 60px;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
    min-height: 600px; /* Assure une hauteur minimale */
}

.timeline-title {
    text-align: center;
    font-size: 40px;
    color: #1F286B;
    font-weight: 700;
    margin-bottom: 40px;
    animation: fadeIn 1s ease;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 80px; /* Espace pour le bouton */
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    background: #D3D3D3;
    transform: translateX(-50%);
    z-index: 5;
}

.timeline-progress {
    width: 100%;
    height: 100%;
    background: #1F286B;
    transform: scaleY(0);
    transition: transform 0.1s linear;
}

.timeline-events {
    position: relative;
    z-index: 10;
}

.timeline-event {
    width: 40%;
    margin: 10px 0;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    cursor: pointer;
}

.timeline-event.left {
    margin-right: 60%;
    transform: translateX(-30px);
}

.timeline-event.right {
    margin-left: 60%;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateX(0);
}

.event-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #D3D3D3;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.event-content:hover {
    transform: scale(1.05);
}

.text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-content h3 {
    font-size: 24px;
    color: #1F286B;
    font-weight: 700;
    margin-bottom: 4px;
}

.event-content h4 {
    font-size: 16px;
    color: #333;
    font-weight: 400;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.special-event {
    background: #1F286B;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-left: 8px;
    animation: slideIn 0.5s ease-out forwards;
}

.anniversary-tag {
    background: #D6E6FF;
    color: #1F286B;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-left: 8px;
    animation: slideIn 0.5s ease-out forwards;
}

.exclusive-tag {
    background: #FFC107;
    color: #333;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-left: 8px;
    animation: slideIn 0.5s ease-out forwards;
}

.event-poster {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
}

.event-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.event-poster img:hover {
    transform: scale(1.05);
}

.timeline-event.anniversary_edition .event-content {
    border-color: #D6E6FF;
}

.timeline-event.anniversary_edition::before {
    background: #D6E6FF;
}

.timeline-event.edition .event-content {
    border-color: #1F286B;
}

.timeline-event.edition::before {
    background: #1F286B;
}

.timeline-event.special_creation .event-content {
    border-color: #FFC107;
}

.timeline-event.special_creation::before {
    background: #FFC107;
}

.timeline-event.special_creation .event-content:hover {
    border-color: #FFCA28;
}

.timeline-event.president .event-content {
    border-color: #A3BFFA;
}

.timeline-event.president::before {
    background: #A3BFFA;
}

.timeline-event.name_change .event-content {
    border-color: #D3D3D3;
}

.timeline-event.name_change::before {
    background: #D3D3D3;
}

.timeline-event::before {
    content: '';
    position: absolute;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 10;
}

.timeline-event.left::before {
    right: -36px;
}

.timeline-event.right::before {
    left: -36px;
}

/* Bouton En découvrir plus */
.btn-discover-more {
    display: block;
    margin: 30px auto;
    padding: 10px 25px;
    background: #1F286B;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 20;
}

.btn-discover-more:hover,
.btn-discover-more:active {
    background: #CCCCCC;
    color: #1F286B;
    transform: scale(1.03);
}

/* Modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #D3D3D3;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    scrollbar-width: thin;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #1F286B;
    border-radius: 3px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #FFFFFF;
    background: rgba(31, 40, 107, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(31, 40, 107, 0.5);
}

.modal-content h3 {
    font-size: 24px;
    color: #1F286B;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-content h4 {
    font-size: 18px;
    color: #333;
    font-weight: 400;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 20px;
}

.modal-poster {
    margin: 20px 0;
    text-align: center;
}

.modal-poster img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.modal-companies {
    margin-top: 20px;
}

.modal-companies h5 {
    font-size: 20px;
    color: #1F286B;
    font-weight: 700;
    margin-bottom: 15px;
}

.companies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.companies-list span {
    background: #F5F5F5;
    padding: 8px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    transition: background 0.3s ease;
}

.companies-list span:hover {
    background: #D6E6FF;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 991px) {
    .stats-grid {
        flex-wrap: wrap;
        gap: 15px;
    }

    .stat-card {
        min-width: 120px;
    }

    .volunteer-section {
        flex-direction: column;
        gap: 20px;
    }

    .volunteer-content,
    .volunteer-image {
        width: 100%;
    }

    .festival-page h1 {
        font-size: 32px;
    }

    .stats-section h2,
    .volunteer-content h2 {
        font-size: 22px;
    }

    .volunteer-subtitle {
        font-size: 26px;
    }

    .volunteer-content p,
    .btn-primary {
        font-size: 14px;
    }

    .stat-card .counter {
        font-size: 26px;
    }

    .stat-card p {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .festival-page {
        padding: 40px 0;
    }

    .festival-page h1 {
        font-size: 32px;
    }

    .stats-section,
    .volunteer-content {
        padding: 15px;
    }

    .stats-section h2,
    .volunteer-content h2 {
        font-size: 20px;
    }

    .volunteer-subtitle {
        font-size: 24px;
    }

    .volunteer-content p,
    .btn-primary {
        font-size: 14px;
    }

    .stat-card .counter {
        font-size: 24px;
    }

    .stat-card p {
        font-size: 13px;
    }

    .timeline-event {
        width: 85%;
        margin: 12px auto;
    }

    .timeline-event.left,
    .timeline-event.right {
        margin-left: auto;
        margin-right: auto;
        transform: translateX(0);
    }

    .timeline-event::before {
        display: none;
    }

    .timeline-title {
        font-size: 32px;
    }

    .event-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
        border-radius: 12px;
    }

    .text-content {
        justify-content: flex-start;
        width: 100%;
    }

    .event-poster {
        width: 100%;
        height: 133px;
        margin-top: 8px;
    }

    .event-content h3 {
        font-size: 18px;
    }

    .event-content h4 {
        font-size: 14px;
    }

    .special-event,
    .anniversary-tag,
    .exclusive-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
        margin-left: 5px;
    }

    .btn-discover-more {
        padding: 10px 25px;
        font-size: 14px;
    }

    .modal-content {
        width: 98%;
        padding: 15px;
    }

    .modal-close {
        font-size: 1.8rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .festival-page {
        padding: 40px 0;
    }

    .festival-page h1 {
        font-size: 28px;
    }

    .stats-section,
    .volunteer-content {
        padding: 15px;
    }

    .stats-section h2,
    .volunteer-content h2 {
        font-size: 20px;
    }

    .volunteer-subtitle {
        font-size: 22px;
    }

    .stats-grid {
        flex-direction: column;
        gap: 10px;
    }

    .stat-card {
        min-width: 100%;
    }
}