.space-mono-regular {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-style: normal;
}
.gallery img, .gallery video {
    width: 100%;
    object-fit: cover;
    overflow: hidden;
}
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10em;
}
.itemgallery {
    width: 130px;
    height: 180px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--color-gallery-border);
}
.itemname {
    width: 100%;
    text-align: center;
    font-family: monospace;
    text-wrap: pretty;
    white-space: normal;
    word-break: break-all;
    font-size: 0.9rem;
    color: var(--color-itemname);
    margin-top: 1rem;
}
.contentgallery {
    width: 90%;
    min-height: 100vh;
}

/* —— Sélecteurs et labels —— */
.selector-container {
    font-family: monospace;
    width: calc(100% - 10rem);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 7rem;
    align-items: center;
    font-size: 2rem;
}
.firstselectorcontainer{
    display: flex;
    flex-direction: row;
}
.label {
    font-family: monospace;
    display: block;
    font-size: 2rem;
}
#filltxtfolder{
    font-family: monospace;
    font-size: 2rem;
}
/* —— Wrapper du select —— */
.select-wrapper {
    position: relative;
    display: inline-block;
    font-family: monospace;
    margin-left: 1rem;
    margin-bottom: 0.6rem;
}

/* === Masquer le contenu et la flèche par défaut === */
.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    font-size: 2rem;
    position: relative;
    z-index: 1;
    outline: none;
    color: var(--color-article-text);
    -webkit-text-fill-color: var(--color-article-text);
}

#folderSelect {
    width: 100%;
    min-width: 15rem;
}

/* === Styles “liste inline” quand size>1 === */
select[size] {
    background: var(--color-bg) !important;
    color: var(--color-article-text) !important;
}

/* chaque option */
select[size] option {
    background: var(--color-bg) !important;
    color: var(--color-article-text) !important;
    padding: 0.2rem 0.5rem;
}

/* au survol d’option */
select[size] option:hover {
    background: var(--color-bg) !important;
    color: var(--color-option-hover-text) !important;
}

/* l’option “active” / sélectionnée */
select[size] option:checked,
select[size] option:focus {
    background: var(--color-bg) !important;
    color: var(--color-option-hover-text) !important;
}

/* supprime tout outline blanc autour de la liste */
select[size]:focus {
    outline: none !important;
}.dropdown {
     /*background-color: var(--color-article-text);*/ /* #3D566E en clair */
 }

.dropdowntoggle:hover {
    cursor: none; /* Curieux, mais conservé tel quel */
}

.dropdowntoggle {
    /*background-color: var(--color-article-text);*/
    color: var(--color-text); /* Texte clair sur fond foncé */
    border: 1px solid var(--color-gallery-border);
    font-family: monospace;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    font-size: 2rem;
    width: 10rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

/* Surcharge inutile supprimée pour éviter les conflits */
/*
.dropdowntoggle {
    cursor: pointer;
    background: #e0e0e0;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
*/

.txtselector {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdownlist {
    position: absolute;
    display: none;
    flex-direction: column;
    background: var(--color-intro-bg); /* Blanc clair, gris foncé en dark */
    border: 1px solid var(--color-border);
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow: scroll;
    max-height: 20rem;
    overscroll-behavior: contain;
}

.dropdownitem {
    padding: 10px 15px;
    opacity: 0;
    transform: translateY(10px);
    animation: dropdownItemFade 0.3s ease forwards;
    transition: 0.2s ease;
    color: var(--color-text);
}

.dropdownitem:hover {
    background-color: var(--color-like-hover); /* clair ou foncé selon thème */
}

@keyframes dropdownItemFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.arrowselector svg{
    margin-top: 0.1rem;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--color-text);
    transition: transform 0.2s ease;
}
@media (max-width: 640px) {
    .selector-container{
        width: calc(100% - 5rem);
    }
}
@media (max-width: 520px) {
    .selector-container{
        width: 100%;
    }
    .label{
        font-size: 1.5rem;
    }
    #filltxtfolder{
        font-size: 1.5rem;
    }
}
@media (max-width: 375px) {
    .selector-container{
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        margin-left: 5rem;
    }
    .itemgallery{
        width: 120px;
        height: 166px;
    }
}