/* Preloader Slot Machine - Style Love Death & Robots */

/* Overlay plein écran */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--beige-clair);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Contenu de la page caché pendant le chargement */
body.loading {
    overflow: hidden;
}

/* Slot machine */
.slot-machine {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.slot-column {
    width: 120px;
    height: 240px; /* 60px haut + 120px icône + 60px bas */
    overflow: hidden;
    position: relative;
    background: transparent;
}

.slot-reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px; /* Espacement = hauteur icône / 2 */
    padding-top: 60px; /* Espace en haut pour centrer la première icône */
    will-change: transform;
}

.slot-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.slot-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Container pour les séquences */
.preloader-content {
    position: relative;
    overflow: hidden; /* Cache les éléments hors du container */
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Signe égal */
.equal-sign {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(240px); /* Caché en bas du container */
}

.equal-sign img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* Logo BIHOTZ */
.logo-bihotz {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transform: translateY(240px); /* Caché en bas du container */
}

.logo-letter {
    width: auto;
    height: 80px;
    object-fit: contain;
}

/* Responsive - Tablette */
@media (max-width: 768px) {
    .preloader-content {
        height: 160px;
    }

    .slot-column {
        width: 80px;
        height: 160px; /* 40px haut + 80px icône + 40px bas */
    }

    .slot-reel {
        gap: 40px;
        padding-top: 40px;
    }

    .slot-icon {
        width: 80px;
        height: 80px;
    }

    .equal-sign img {
        width: 80px;
        height: 80px;
    }

    .logo-letter {
        width: 50px;
    }

    .logo-bihotz {
        gap: 5px;
    }
}

/* Logo BIHOTZ Hero (page d'accueil) */
.logo-bihotz-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    height: 120px;
}

.logo-letter-hero {
    width: auto;
    height: 100px;
    object-fit: contain;
    transform: translateY(120px);
    opacity: 0;
}

.logo-letter-hero.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive - Tablette - Logo Hero */
@media (max-width: 768px) {
    .logo-bihotz-hero {
        gap: 5px;
        height: 80px;
    }

    .logo-letter-hero {
        height: 70px;
        transform: translateY(80px);
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .preloader-content {
        height: 120px;
    }

    .slot-column {
        width: 60px;
        height: 120px; /* 30px haut + 60px icône + 30px bas */
    }

    .slot-reel {
        gap: 30px;
        padding-top: 30px;
    }

    .slot-icon {
        width: 60px;
        height: 60px;
    }

    .equal-sign img {
        width: 60px;
        height: 60px;
    }

    .logo-letter {
        width: 35px;
    }

    .logo-bihotz {
        gap: 3px;
    }

    .logo-bihotz-hero {
        gap: 3px;
        height: 60px;
    }

    .logo-letter-hero {
        height: 50px;
        transform: translateY(60px);
    }
}
