.refresh {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1980;
    opacity: .5;
}

#modalRefresh {
    z-index: 1990;
}

.modal-backdrop {
    z-index: 1985;
}

.display-flex {
    display: flex !important;
}

.carousel-control-prev,
.carousel-control-next {
    max-width: 50px;
}

.reglages,
.memoriser,
.restituer,
.resultat {
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: #ECEFF1;
    top: 0;
    left: 0;
    z-index: 1100;
    overflow: auto;
}

/** REGLAGES **/

.reglages {
    background-color: #37474F;
}

.line-title-white::after {
    background-color: #FFF;
}

.line-title-close::after {
    bottom: -.5rem;
}

.line-title.line-title-close {
    margin-bottom: 1.5rem !important;
}

/** MEMORISER **/

#memoryCards {
    transition: height .15s ease;
}

.carousel-item {
    display: flex!important;
    justify-content: center;
    align-items: center;
    /*height: 80vh;*/
    /* hauteur fixe relative pour centrer verticalement */

}

.carousel-img {
    pointer-events: none;
    cursor: default;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.carousel-img.portrait {
    max-height: 500px;
    max-width: 100%;
    width: auto;
    height: 100%;
}

.carousel-img.paysage {
    max-width: 500px;
    width: 100%;
    height: auto;
    max-height: 100%;
}

/* masquer flèches sur mobile */
.carousel-control-prev,
.carousel-control-next {
    display: none;
}

@media (hover: hover) and (pointer: fine) {

    .carousel-control-prev,
    .carousel-control-next {
        display: flex;
    }
}

.carousel-item:not(.active) {
    opacity: 0;
    z-index: -100;
}

.carousel-item.active {
    opacity: 100;
    z-index: inherit;
    display: flex !important;
}

/* Série */
#serie {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    transition: all 0.12s ease;
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
    padding-bottom: 5px;
    /* pour laisser place aux boutons */
}

#serie .wrappin {
    overflow-x: auto;
    height: 100%;
}

#serie a.thb {
    cursor: pointer;
    display: inline-block;
}

#serie img {
    height: 60px;
    margin-right: -30px;
    margin-bottom: 5px;
    margin-top: 5px;
    /* chevauchement par défaut */
    transition: all 0.12s ease;
    pointer-events: none;
}

#serie .thb:last-child img {
    margin-right: 10px;
}

#serie.expanded img {
    margin-right: 10px;
    /* plus de chevauchement */
    height: 100px;
}

#serie.minimized {
    transform: translateY(100%);
}

#serie.maximized {
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
    padding: 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1050;
}

/* Wrapper pour scroll horizontal */
#serie.maximized .wrappin {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    overflow-x: auto;
    padding: 0 10px;
}

/* Vignettes */
#serie.maximized a.thb {
    display: inline-block;
}

/* Images */
#serie.maximized img {
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    display: block;
    margin: 5px auto;
    max-width: 80vw;
}

/* Boutons */
.serie-controls,
.skip-control {
    position: absolute;
    top: -30px;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1100;
}

.serie-controls button,
.skip-control button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.skip-control {
    left: calc(100% - 55px);
    top: -55px;
    width: 50px;
}

.skip-control button {
    background: rgba(85, 139, 47, 0.7);
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    border-radius: 50px;
}

.serie-controls button:hover {
    background: rgba(0, 0, 0, 0.5);
}

.skip-control button:hover {
    background: rgba(85, 139, 47, 1);
}

#serie a.thb.active img {
    margin-left: 10px !important;
    margin-right: 10px !important;
    outline: 3px solid #ffc107;
    /* jaune doré */
    outline-offset: 2px;
    border-radius: 4px;
}

/** ESPACE DE RESTITUTION **/

.restituer {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Partie slots */
#slots {
    margin: 6px;
    flex: 1;
    display: grid;
    gap: 6px;
    justify-content: center;
    /* centre horizontalement */
    align-content: center;
    /* centre verticalement */
}

.slot {
    background-color: rgba(176, 190, 197, .5);
    border-radius: .25rem;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.slot.active {
    background-color: #90A4AE;
    border-radius: .25rem;
    width: 100%;
    height: 100%;
    outline: 3px solid #FF5722;
    outline-offset: 1px;
}

/* Partie thumbs */
.thumbs-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
}

.thumbs-buttons {
    display: none;
    position: absolute;
    top: -30px;
    left: 0;
}

/* Grille obligatoire : 3 lignes */
.thumbs {
    display: grid;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    /* remplissage par colonnes */
    gap: 5px;
    padding: 8px 5px;
    overflow: auto;
}

.thumb {
    width: 75px;
    height: 75px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    outline: 3px solid #CFD8DC;
    outline-offset: 0;
    cursor: pointer;
    position: relative;
}

.thumb.flash {
    animation: flashGlow .5s ease-out forwards;
}

@keyframes flashGlow {
    0% {
        box-shadow: 0 0 0px 0px #90A4AE;
    }

    20% {
        box-shadow: 0 0 0px 6px #90A4AE;
        /* montée rapide */
    }

    100% {
        box-shadow: 0 0 0px 0px #90A4AE;
        /* décroissance lente */
    }
}

.thumb.used {
    outline: 1px solid #455A64;
    outline-offset: 0;
    background-color: #010101;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.thumb.used img {
    opacity: .15;
}

.thumb button.zoom-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25px;
    /* 1/3 de 75px = 25px */
    height: 25px;
    padding: 0;
    border: none;
    border-radius: 25px 4px 0 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/*.thumb button.zoom-btn:hover {
  background: rgba(0,0,0,0.8);
}*/

/* Visionneuse */
#visionneuse {
    display: none;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 50vw;
    height: calc(100% - 251px);
    /* prendra la hauteur de .restituer */
    background: #111;
    /*padding: 5px;*/
    box-sizing: border-box;
}

#visionneuse.fullHeight {
    height: 100%;
}

#visionneuse img {
    width: calc(100% - 10px);
    max-height: calc(100% - 10px);
    object-fit: contain;
    margin: 5px;
    display: block;
}

/* Bouton fermeture */
#visionneuse .close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(244, 67, 54, .7);
    border: 1px solid #fff;
    color: #fff;
    font-size: 18px;
    border-radius: 0;
    cursor: pointer;
}

#visionneuse .close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.res {
    display: flex;
    flex-direction: column;
    /* empile verticalement */
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px;
}

.res img {
    width: 100%;
    height: auto;
    pointer-events: none;
}

.res .noImage {
    aspect-ratio: 1 / 1;
    /* largeur = hauteur */
    width: 100%;
    /* tu fixes la largeur */
    max-width: 100%;
    /* et ça reste responsive */
}

.comparatif {
    justify-content: center;
    align-content: center;
}

.comparatif.no-res-padding .res {
    padding: 0;
}

.gold-line {
  height: 1px;
    background: linear-gradient(90deg,
    #b8860b, #ffd700, #fff8dc, #ffd700, #b8860b
  );
    opacity: .42;
}

.points {
    font-weight: bold;
}
