/*
Theme Name: Historique
Description: Feuille de style pour la page Historique.
Author: MACOM DIGITALE
Version: 2.5.0
*/

/* === HERO === */
.hero {
    width: 100%;
    max-width: 1440px;
    height: 622px;
    margin: 0 auto;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    color: #fff;
    font-family: 'Roboto', sans-serif;
}

.hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero .hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px;
    max-width: 600px;
}

.hero .hero-content h1 {
    font-size: 50px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    white-space: nowrap;
}

.hero .hero-content p {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 25px;
    line-height: 1.5;
}

.hero .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid #05D9C4;
    color: #fff;
    background: transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hero .btn-primary:hover {
    background-color: #05D9C4;
    color: #000;
}

/* === BANDEAU VERT === */
.historique-banner {
    width: 100%;
    max-width: 1440px;
    height: 115px;
    margin: 0 auto;
    background-color: #05D9C4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.historique-banner h2 {
    font-family: 'Watchtower', sans-serif;
    font-size: 75px;
    color: #0B0A0A;
    margin: 0;
    text-align: center;
    line-height: 1.1;
}

/* === SECTION PALMARÈS === */
.historique-palmares {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 80px 20px 200px 20px;
    font-family: 'Roboto', sans-serif;
    overflow: visible;
}

.historique-palmares::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

/* Contenu principal */
.palmares-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

/* Partie gauche */
.palmares-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    left: 50px
}

.palmares-photo-card {
    width: 337px;
    border-radius: 10px;
    overflow: visible; /* permet au badge et texte d’apparaître */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.palmares-photo-card img {
    width: 100%;
    height: 397px;
    object-fit: cover;
    display: block;
}

/* Badge sous la photo */
.palmares-badge {
    width: 74px;
    height: 32px;
    background: #0B0A0A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    z-index: 2;
}

/* Texte en dessous de l’image */
.palmares-text-below {
    width: 337px;
    height: 42px;
    background-color: #0B0A0A;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    z-index: 2;
}

/* Partie droite */
.palmares-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    max-width: 776px;
    left: 16.5%
}

/* Petits rectangles verts */
.palmares-small-rects {
    display: flex;
    justify-content: space-between;
    width: 776px;
    max-width: 100%;
    margin-bottom: 20px;
}

.small-rect {
    width: 142px;
    height: 32px;
    background: #05D9C4;
    color: #0B0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 14px;
}

/* Container lignes */
.palmares-big-rects {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 776px;
    max-width: 100%;
}

.palmares-black-rects {
    display: flex;
    width: 776px;
    height: 41px;
    max-width: 100%;
}

.black-rect {
    width: 194px;
    height: 41px;
    background: #0B0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    box-sizing: border-box;
    padding-left: 4px;
}

.palmares-black-rects .black-rect:first-child {
    justify-content: flex-start;
    padding-left: 40px;
    text-align: left;
    font-size: 20px;
}

.palmares-black-rects .black-rect:last-child {
    justify-content: flex-end;
    padding-right: 30px;
    text-align: right;
}

/* Bouton CSV */
.palmares-csv-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 239px;
    height: 56px;
    position: absolute;
    bottom: 40px;
    right: 80px;
    border: 2px solid #05D9C4;
    background-color: transparent;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 5;
}

.palmares-csv-btn:hover {
    background-color: #05D9C4;
    color: #000;
}

/* Bouton PDF mobile */
.palmares-pdf-btn {
    display: none;
}

/* === RESPONSIVE === */
@media(max-width: 1024px){
    .palmares-container {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }
    .palmares-left, .palmares-right {
        margin-left: 0;
        width: 100%;
        align-items: center;
    }
    .palmares-small-rects, .palmares-black-rects {
        flex-direction: column;
        width: 100%;
    }
    .small-rect, .black-rect {
        width: 100%;
    }
    .palmares-csv-btn {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 20px auto;
    }
}

@media(max-width: 768px){
    .palmares-container { display: none !important; }
    .palmares-csv-btn { display: none !important; }

    .palmares-pdf-btn {
        display: block !important;
        position: relative;
        z-index: 9999;
        width: 200px;
        margin: 20px auto;
        padding: 12px 20px;
        background-color: #05D9C4;
        color: #000;
        font-weight: 700;
        font-size: 16px;
        text-align: center;
        text-decoration: none;
        border-radius: 5px;
    }
    .palmares-pdf-btn:hover { background-color: #03b4a7; color: #fff; }
}

@media(max-width: 480px){
    .palmares-badge { width: 50px; height: 26px; font-size: 12px; }
    .palmares-text-below { font-size: 14px; }
}
/* Réduction du titre bandeau vert sur mobile */
@media(max-width: 480px){
    .historique-banner h2 {
        font-size: 40px; /* ajuste la taille selon ton besoin */
        line-height: 1.1;
    }
}

@media(max-width: 480px){
    /* Réduction bandeau vert */
    .historique-banner h2 {
        font-size: 40px; /* titre plus petit */
        line-height: 1.1;
    }

    /* Réduction section palmarès */
    .historique-palmares {
        padding: 40px 10px 100px 10px; /* moins d’espace autour */
    }

    /* Conteneur flex disparu en mobile pour remplacer par bouton PDF */
    .palmares-container {
        display: none !important;
    }

    /* Bouton CSV caché */
    .palmares-csv-btn {
        display: none !important;
    }

    /* Bouton PDF visible */
    .palmares-pdf-btn {
        display: block !important;
        position: relative;
        z-index: 9999;
        width: 200px;
        margin: 20px auto;
        padding: 12px 20px;
        background-color: #05D9C4;
        color: #000;
        font-weight: 700;
        font-size: 16px;
        text-align: center;
        text-decoration: none;
        border-radius: 5px;
    }

    .palmares-pdf-btn:hover {
        background-color: #03b4a7;
        color: #fff;
    }

    /* Ajustements visuels du palmarès gauche (si jamais affiché) */
    .palmares-left .palmares-photo-card {
        width: 250px;
        height: auto; /* image responsive */
    }
    .palmares-left .palmares-badge {
        width: 50px;
        height: 26px;
        font-size: 12px;
        margin-top: 5px;
    }
    .palmares-left .palmares-text-below {
        width: 250px;
        height: auto;
        font-size: 14px;
        padding: 5px;
        margin-top: 5px;
    }
}
