@font-face {
    font-family: 'Even-stroke-medium';
    src: url('fonts/Even-stroke/Even-stroke-Medium.otf') format('opentype');
}

@font-face {
    font-family: 'Rekhist';
    src: url('fonts/Rekhist-SVGHistorical.otf') format('opentype');
}

body {
    font-family: 'Even-stroke-medium', serif;
    font-size: 20px;
    margin: 20px;
    line-height: 1.6;
    background-color: rgba(0, 0, 0, 0.95);
}

h1 {
    font-family: 'Even-stroke-medium', serif;
    letter-spacing: 1.5px;
    font-size: 30px;
    text-transform: uppercase;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    color:white;
    /*text-decoration: 5px underline dotted white;*/
}

.filter-section {
    margin: auto;
    margin-bottom: 20px;
    width: 95%;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid white;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}

.filter-category{
    margin: auto;

}

label {
    font-family: 'Even-stroke-medium', serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: white;

}

select {
    padding: 7px 5px 4px 5px;
    font-family: 'Even-stroke-medium', serif;
    text-align: center;
    font-size: 15px;
    color: black;
    background-color: white;
    border-radius: 20px;
    width: 8vw;

}

.gallery {
    display: grid;
    width: 95%;
    margin: auto;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    grid-auto-flow: dense;
    grid-auto-rows: 10px; /* Petites rangées pour plus de flexibilité */
}


.gallery img {
    width: 100%;
    height: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    filter: contrast(1.2);
}

.gallery img:hover {
    transform: scale(1.03);
    transition-duration: 0.3s;

}

.image-container {
    position: relative;
    grid-row: span var(--row-span); /* Défini dynamiquement */
}


/*--------- bouton + sur chaque image -------------*/
.compare-button {
    font-family: 'Even-stroke-medium', serif;
    font-size: 30px;
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    border: none; 
    border-radius: 30px;
    width: 55px;
    height: 55px;
    padding: 5px; /* espacement interne */
    cursor: pointer;
    top: 10px;
    right: 10px;
    position: absolute;
    opacity: 0;
}

.compare-button:hover {
    background-color: white;
    color: black;
}

.image-container:hover .compare-button {
    opacity: 1;
}


/* IMAGES EN PLEIN ÉCRAN */

#fullscreenContainer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition-duration: 2s;
}



@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



/* COMPARAISON D'IMAGES */

/* Poignée pour redimensionner
.resize-handle {
    height: 12px;
    background-color: white;
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    z-index: 5;
}
*/

/* Conteneur principal de la barre */
.comparison-bar {
    position: fixed;
    bottom: 0;
    left: 50px;
    height: 100px; /* Hauteur initiale */
    opacity: 1;
    margin: auto;
    overflow-x: auto;
    display: flex;
    gap: 0px;
    align-items: center;
    padding: 10px;
    transition: height 0.05s ease-in-out;
}


/* Plein écran pour la barre */
.comparison-bar.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: blue;
    height: 100vh; /* Définit la hauteur à 100% pour plein écran */
    padding: 3%;
    background-color: rgba(0, 0, 0, 0.95);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    align-items: center;
    gap: 20px;
    overflow-y: auto;
    z-index: 1100;
}


/* Bouton de fermeture (croix) */
.close-fullscreen-btn {
    position: relative;
    top: 10px;
    left: 10px;
    font-size: 30px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1200;
    transition: color 0.3s;
}

.close-fullscreen-btn:hover {
    color: rgb(0, 0, 191);
}


/* Images dans la barre */
.comparison-bar img {
    max-height: 100px;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 10px solid black;
}



/* --- seulement les images d'archives en Plein écran pas le bouton ----*/
.comparison-bar.fullscreen img {
    max-height: 80vh;
    max-width: 100%;
    transition: transform 0.3s ease;
    border: none;
}


/* BOUTON PLEIN ECRAN */
#fullscreenToggle {
    width: 40px;
    height: 40px;
    position: fixed;
    bottom: 35px;
    left: 15px;
    z-index: 2000;

}


#fullscreenToggle:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}


#pleinecran {
    width: 100%;
    height: 100vh;
    top: 10px;
}

#fullscreenImage {
    max-width: 90%;
    max-height: 98vh;
}

#fullscreenToggle:hover{
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}

.comparison-bar.fullscreen img:hover {
    transform: scale(1.01);
}



/* nombre de documents affichés */
.result-counter {
    position: fixed;
    right: 45px;
    top: 45px;
    color: white;
    font-family: 'Even-stroke-medium', serif;
    font-size: 16px;
    padding: 10px 15px;
    letter-spacing: 1.5px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    border-radius: 20px;
    z-index: 100;
}


