html {
    scroll-behavior: smooth;
    font-feature-settings: "liga" 1;
}

html,
body {
    margin: 0;
}

body {
    max-width: 1440px;
    margin: auto;
    padding: 0 2em;
    text-align: center;
    font-family: 'Baskervvol Regular';
}

h1 {
    border-bottom: 1px dashed black;
    padding: 1rem 0;
    margin: 0;
}

.title {
    position: fixed;
    background-color: white;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.gallery {
    /*
    column-width: 280px;*
    column-gap: 1.5rem;
    margin: 2em 0;
    padding: 0;
    */
    max-width: 768px;
    margin: 1rem auto 0 auto;
}

.gallery-item {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /*border-radius: 8px;*/
    /*border: 1px solid rgba(0, 0, 0, 0.322);*/
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);*/
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* garde le ratio naturel */
    display: block;
}

.gallery-item .caption {
    margin: 0;
    font-family: 'Baskervvol', serif;
    font-style: italic;
    text-align: right;
    opacity: 0.8;
    font-size: 0.8rem;
    /* border-top: 1px solid rgba(0, 0, 0, 0.322); */
}

/* Pour la featured, on peut toujours ajouter un style spécifique */
.random .random-item,
.random .random-item img {
    max-width: 768px;
    max-height: 50vh;
    padding: 0.5em;
    margin-bottom: 2rem;
}

/* PAGINATION */
.pagination {
    margin: 2em 0;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination .current {
    background: #333;
    color: white;
    font-weight: bold;
}


/* LIGHTBOX */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    color: white;
    font-family: 'Baskervvol', serif;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.lightbox-content p {
    margin-top: 0.5em;
    font-style: italic;
    opacity: 0.8;
}

#lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

/*FOOTER*/

footer p, footer p a {
    color: #333;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 480px) {
    #gallery {
        column-width: 100%;
    }
}