#tourner-telephone {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #111e30 0%, #060a12 100%);
    color: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

.phone-icon-wrapper {
    position: relative;
    width: 80px;
    height: 140px;
    margin-bottom: 25px;
}

.phone-icon {
    width: 60px;
    height: 110px;
    border: 3px solid #00ffcc;
    border-radius: 12px;
    position: absolute;
    top: 15px;
    left: 10px;
    animation: rotatePhone 2.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.phone-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 4px;
    background: #00ffcc;
    border-radius: 2px;
}

.phone-icon::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border: 1.5px solid #00ffcc;
    border-radius: 50%;
}

@keyframes rotatePhone {
    0%, 15% {
        transform: rotate(0deg);
    }
    45%, 65% {
        transform: rotate(-90deg);
    }
    90%, 100% {
        transform: rotate(0deg);
    }
}

.tourner-texte {
    font-size: 1.8em;
    font-weight: 700;
    margin: 10px 0;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
    letter-spacing: 1px;
}

.tourner-sous-texte {
    font-size: 1em;
    color: #a0aec0;
    max-width: 320px;
    line-height: 1.5;
}

#mobile-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

#joystick-container {
    position: absolute;
    bottom: 40px;
    left: 45px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(10, 15, 28, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    touch-action: none;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joystick-knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95) 0%, rgba(210, 210, 210, 0.8) 50%, rgba(140, 140, 140, 0.75) 100%);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transform: translate(0px, 0px);
}

#mobile-buttons {
    position: absolute;
    bottom: 40px;
    right: 45px;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    pointer-events: auto;
}

.vertical-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctrl-btn {
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    outline: none;
}

.action-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(10, 15, 28, 0.55);
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.1s, transform 0.1s, border-color 0.1s;
}

.action-btn:active, .action-btn.active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.92);
    border-color: rgba(255, 255, 255, 0.6);
}

.speed-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 50, 50, 0.18);
    border-color: rgba(255, 50, 50, 0.4);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 50, 50, 0.15);
    transition: all 0.12s ease-out;
}

.speed-btn:active, .speed-btn.active {
    background: rgba(255, 50, 50, 0.55);
    border-color: rgba(255, 50, 50, 0.95);
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.5);
    transform: scale(0.92);
}

@media screen and (max-width: 1024px) {
    #selection {
        z-index: 2000 !important;
    }

    #menu-courses {
        width: 260px;
        max-width: 75vw;
    }

    ul.menu-principal {
        max-height: calc(100vh - 60px);
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    ul.sous-menu, ul.sous-menu-lateral {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        background-color: rgba(0, 0, 0, 0.45) !important;
        padding-left: 12px !important;
        box-sizing: border-box;
    }

    ul.sous-menu-lateral {
        left: 0 !important;
        top: 0 !important;
    }

    .titre-menu, .btn-course {
        font-size: 15px;
        padding: 10px 12px;
        box-sizing: border-box;
        width: 100%;
    }

    li.open > .titre-menu {
        color: #00ffcc;
        background-color: rgba(40, 40, 40, 0.6);
    }
}