.archive-photo-page h1 {
    font-size: clamp(2.5rem, 10vw, 9.4rem);
    padding-bottom: 25px;
}



/* --- Styles pour la grille de photos --- */

.all-photos-grid h2{
    color: white;
    text-align: center;
    margin: 15px 0 25px 0;
}

.photo-grid {
    position: relative;
    width: 100%;
}

.photo-grid article.photo-item {
    /* LA CORRECTION : S'assure que la bordure et le padding
       sont INCLUS dans la largeur de 31% */
    box-sizing: border-box;

    /* Ta largeur pour 3 colonnes */
    width: 31%; 
    margin: 1%; /* Ton "gap" */

    /* Ton style existant */
    border: 5px solid white;
    overflow: hidden;
}

.photo-grid article h2 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.photo-grid article img {
    width: 100%;
    height: auto; 
    object-fit: cover;
    display: block;
    transition: all 300ms ease-in-out;
    cursor: zoom-in;
}

.photo-grid article:hover img {
    transform: scale(1.1);
}

/* --- Pour rendre les colonnes responsives --- */

@media (max-width: 1000px) {
    .photo-grid article.photo-item {
        /* On passe à 2 colonnes en changeant la largeur */
        width: 48%; /* 48% + 48% + (marges) */
    }
} 

@media (max-width: 600px) {
    .photo-grid article.photo-item {
        /* On passe à 1 colonne */
        width: 98%; /* 98% + (marges) */
    }
}


/* --- Styles pour la popup d'image --- */
.popup_img {
    display: none; /* Cachée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    justify-content: center;
    align-items: center;
}
.popup_img_content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    margin-top: 5%;
    cursor: zoom-out;
}


.close_popup_img {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}



#load-more-photos{
    display: block;
    margin: 30px auto;
    padding: 10px 0;
    font-size: 1.2rem;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    position: relative;
}

#load-more-photos::before{
    content:"";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: white;
    transition: all 300ms ease-in-out;
}

#load-more-photos:hover::before{
    width: 100%;
}