body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
    font-family: 'Inter', sans-serif;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
}

#ui-wrapper {
    position: relative;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* Pour pouvoir cliquer sur la 3D */
    transition: opacity 0.5s ease-in-out;
}

#ui-wrapper.hidden-ui {
    opacity: 0;
    pointer-events: none;
}

.glass-btn,
.glass-card {
    pointer-events: auto;
    /* Réactive le clic sur les boutons */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Barre du bas */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    pointer-events: none;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    pointer-events: none;
}

.bottom-bar>* {
    pointer-events: auto;
}

.top-bar>* {
    pointer-events: auto;
}

/* Bouton cacher UI en haut à gauche */
.hide-btn {
    position: relative;
    padding: 10px 20px;
    height: 68px;
    width: 88px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sound-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Lecteur Musique */
.music-player {
    display: inline-flex;
    height: 48px;
    padding: 10px 20px;
    align-items: center;
    gap: 20px;
    border-radius: 3.125rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.control-btn .player-icon {
    aspect-ratio: 1/1;
    background: none;
    border: none;
    cursor: pointer;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.control-btn:hover {
    color: white;
}

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
}

.play-icon .player-icon {
    display: flex;
    padding: 3px 4px;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.player-body {
    display: flex;
    width: 10.125rem;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.3125rem;
    overflow: hidden;
    /* Clips the scrolling title */
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.4375rem;
}

.track-title {
    align-self: stretch;
    color: var(--Gris-95, #F2F2F2);
    font-family: 'Outfit',
        sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;

    /* Marquee Setup */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    /* Ensure it respects width */
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.track-title.scrolling {
    text-overflow: clip;
    animation: marquee 10s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.progress-container {
    display: flex;
    width: 10.125rem;
    height: 0.1875rem;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.625rem;
    border-radius: 3.125rem;
    background: #313131;
}

.progress-bar {
    width: 5.5rem;
    height: 0.1875rem;
    flex-shrink: 0;
    border-radius: 3.125rem;
    background: var(--Gris-95, #F2F2F2);
}

/*Bouton Son d'ambiance*/
.fab {
    position: relative;
    padding: 10px 20px;
    width: 48px;
    height: 48px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
}

.fab.active {
    width: 480px;
    transition: 0.5s ease-in-out;
}

.fab.active .fa-plus {
    transform: rotate(45deg);
    transition: 0.5s ease-in-out;
}

.fab-content {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    cursor: pointer;
    flex-shrink: 0;
}

.fab-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 80px;
    /* 20px padding + 48px button + ~12px gap */
    right: 20px;
    /* Match right padding */
    height: 48px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    /* Equal spacing */
    align-items: center;
    opacity: 0;
    visibility: hidden;
    /* Hide completely when closed */
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

.fab.active .fab-item {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.5s ease-in-out 0.2s, visibility 0s 0.2s;
}

.fab-item .item {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s ease-in-out;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    background: none;
}

.fab.active .fab-item .item {
    opacity: 1;
    transform: translateY(0);
}

.fab.active .item:nth-child(1) {
    transition-delay: 0.2s;
}

.fab.active .item:nth-child(2) {
    transition-delay: 0.25s;
}

.fab.active .item:nth-child(3) {
    transition-delay: 0.3s;
}

.fab.active .item:nth-child(4) {
    transition-delay: 0.35s;
}

.fab.active .item:nth-child(5) {
    transition-delay: 0.4s;
}

.fab.active .item:nth-child(6) {
    transition-delay: 0.45s;
}


.fab-item .item.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/*Bouton Scène*/
.change {
    position: relative;
    padding: 10px 20px;
    width: 48px;
    height: 48px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: height 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.change.active {
    height: 480px;
    transition: 0.5s ease-in-out;
}

.change.active .change-plus {
    transform: rotate(45deg);
    transition: 0.5s ease-in-out;
}

.change-content {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    cursor: pointer;
    flex-shrink: 0;
}

.change-item {
    position: absolute;
    bottom: 80px;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

.change.active .change-item {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.5s ease-in-out 0.2s, visibility 0s 0.2s;
}

.change-item .scene {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.1s ease-in-out;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    background: none;
}

.change.active .change-item .scene {
    opacity: 1;
    transform: translateY(0);
}

.change.active .scene:nth-child(1) {
    transition-delay: 0.2s;
}

.change.active .scene:nth-child(2) {
    transition-delay: 0.25s;
}

.change.active .scene:nth-child(3) {
    transition-delay: 0.3s;
}

.change.active .scene:nth-child(4) {
    transition-delay: 0.35s;
}

.change.active .scene:nth-child(5) {
    transition-delay: 0.4s;
}

.change.active .scene:nth-child(6) {
    transition-delay: 0.45s;
}


.change-item .scene.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}