/* ==============================================================================
   OmniVox - Voice Chat Dashboard (Fidèle à l'interface OpenAudioMC)
   ============================================================================== */

:root {
    --bg-base: #0a0e14;
    --bg-overlay: rgba(10, 14, 20, 0.82);
    --bg-dock: rgba(16, 20, 28, 0.94);
    --bg-sidebar: rgba(18, 22, 31, 0.92);
    --bg-card: rgba(26, 32, 44, 0.88);
    --bg-card-hover: rgba(33, 41, 56, 0.95);
    
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-card: rgba(255, 255, 255, 0.09);
    
    --text-primary: #f0f3f6;
    --text-secondary: #9aa5b5;
    --text-muted: #626d7e;
    
    --accent-purple: #7c4dff;
    --accent-blue: #3b82f6;
    --accent-cyan: #00e5ff;
    --accent-green: #10b981;
    --accent-gold: #c8aa82;
    --accent-red: #ef4444;
    
    --slider-sand: #cbb18a;
    --slider-sand-track: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse at 70% 30%, rgba(30, 80, 50, 0.22) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(20, 35, 60, 0.3) 0%, transparent 70%),
        linear-gradient(180deg, rgba(8, 11, 16, 0.88) 0%, rgba(12, 16, 24, 0.94) 100%);
    background-size: cover;
    background-attachment: fixed;
}

/* LAYOUT GLOBAL */
.layout-wrapper {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    align-items: stretch;
    backdrop-filter: blur(28px);
}

/* 1. LEFT DOCK NAVIGATION (PARFAITEMENT IMMOBILE ET CENTRÉ VERTICALEMENT) */
.dock-nav {
    width: 54px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--bg-dock);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    z-index: 50;
    flex-shrink: 0;
}

.dock-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    margin: auto 0;
}

.dock-bottom {
    margin-top: 0;
}

.dock-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.dock-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.dock-btn.menu-btn {
    border-radius: 10px;
    color: var(--text-secondary);
}

.dock-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 1px solid var(--border-subtle);
}

/* 2. LEFT SIDEBAR PANEL */
.sidebar-panel {
    width: 310px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* CARTE STATUT PERSONNEL & ACTIONS MICRO */
.self-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 6px;
}

.self-avatar-wrap {
    position: relative;
    width: 60px;
    height: 60px;
}

.self-avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    image-rendering: pixelated;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #1e2430;
}

.speaking-ring {
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    border: 2px solid var(--accent-cyan);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.speaking-ring.active {
    opacity: 1;
}

.self-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mic-button-row {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.square-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #1c222e;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.square-action-btn:hover {
    background: #252d3d;
    color: #fff;
}

.square-action-btn.active {
    background: #222b3b;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.square-action-btn.muted,
.square-action-btn.is-muted {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.8) !important;
    color: #ef4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.square-action-btn.signal-good {
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
}

.square-action-btn.signal-fair {
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

.square-action-btn.signal-bad {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Popover Diagnostic Réseau Rapide */
.quick-conn-popover {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    background: #141923;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    width: 230px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    display: none;
    font-size: 0.82rem;
}
.quick-conn-popover.show {
    display: block;
}

/* CARTE DU VOLUME VOCAL (GRADIENT EXACT AU SCREENSHOT) */
.voice-volume-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.volume-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vol-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.15);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vol-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vol-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vol-percent {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* SLIDER GRADIENT BLEU/VIOLET */
.gradient-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 65%, #c084fc 100%);
    outline: none;
}

.gradient-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease;
}

.gradient-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    padding: 0 2px;
}

.scale-mid {
    transform: translateX(6px);
}

/* ENCART AVERTISSEMENT MODÉRATION */
.moderation-notice-card {
    background: rgba(70, 18, 20, 0.45);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.notice-icon {
    font-size: 0.95rem;
    line-height: 1.2;
}

.notice-text {
    font-size: 0.78rem;
    color: #e2b3b3;
    line-height: 1.45;
}

/* SECTION VOICE SETTINGS */
.voice-settings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
}

.section-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(124, 77, 255, 0.2);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-subcard {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subcard-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subcard-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcard-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.subcard-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.subcard-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subcard-title {
    font-size: 0.82rem;
    font-weight: 600;
}

.subcard-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.device-select {
    width: 100%;
    background: #121722;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 0.78rem;
    outline: none;
    cursor: pointer;
}

/* TOGGLE SWITCH iOS STYLE */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.toggle-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #2b3344;
    transition: .25s;
    border-radius: 20px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
}

input:checked + .slider-round {
    background-color: var(--accent-blue);
}

input:checked + .slider-round:before {
    transform: translateX(16px);
}

/* CONTRÔLE SEUIL MANUEL */
.manual-threshold-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.threshold-label {
    font-size: 0.78rem;
    font-weight: 600;
}

.threshold-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.vu-meter-bar-track {
    position: relative;
    height: 8px;
    background: #141924;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.vu-meter-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 4px;
    transition: width 0.08s ease-out;
}

.vu-threshold-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 4px #fff;
}

.threshold-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
}

/* 3. MAIN CONTENT AREA (GRILLE DES JOUEURS) */
.main-content {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

/* BANNIÈRE D'APPEL NEXOPHONE */
.phone-call-banner {
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.85) 0%, rgba(20, 30, 50, 0.85) 100%);
    border: 1px solid rgba(124, 77, 255, 0.35);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.call-hidden {
    display: none !important;
}

.call-lead {
    display: flex;
    align-items: center;
    gap: 14px;
}

.call-avatar-outer {
    position: relative;
    width: 44px;
    height: 44px;
}

.call-lead-avatar {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    image-rendering: pixelated;
    border: 2px solid var(--accent-purple);
}

.call-pulse-glow {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid var(--accent-purple);
    animation: pulseCall 1.8s infinite;
}

@keyframes pulseCall {
    0% { transform: scale(0.96); opacity: 1; }
    100% { transform: scale(1.25); opacity: 0; }
}

.call-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.call-app-tag {
    font-size: 0.7rem;
    color: var(--accent-purple);
    font-weight: 600;
    text-transform: uppercase;
}

.call-lead-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.call-stopwatch {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.call-button-group {
    display: flex;
    gap: 10px;
}

.btn-phone-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-phone-ctrl:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-phone-ctrl.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #fff;
}

.nexus-storm-box {
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.storm-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 4px;
}

.storm-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
}

.storm-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    transition: width 0.3s ease;
}

/* GRILLE DES JOUEURS À PROXIMITÉ (EXACTE AU SCREENSHOT : 4 COLONNES) */
.players-proximity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* CARTE INDIVIDUELLE DE JOUEUR */
.player-slot-card {
    background: rgba(23, 28, 38, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 84px;
    gap: 10px;
    transition: all 0.2s ease;
}

.player-slot-card:hover {
    background: rgba(29, 36, 49, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
}

.player-slot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.slot-left-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.slot-mute-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: color 0.15s ease;
}

.slot-mute-btn:hover {
    color: var(--text-primary);
}

.slot-mute-btn.muted {
    color: var(--accent-red);
}

.slot-role-badge {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eab308;
}

.slot-player-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AVATAR AVEC ANNEAU D'ÉCOUTE CYAN / VERT / JAUNE (VU SUR LE SCREENSHOT) */
.slot-avatar-container {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.slot-player-avatar {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    image-rendering: pixelated;
    background: #1a202c;
}

.slot-speaking-glow {
    position: absolute;
    inset: -3px;
    border-radius: 11px;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

/* ANNEAUX DE COULEURS DE LA CAPTURE D'ÉCRAN */
.player-slot-card.speaking-cyan .slot-speaking-glow {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.player-slot-card.speaking-green .slot-speaking-glow {
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.player-slot-card.speaking-yellow .slot-speaking-glow {
    border-color: #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.player-slot-card.speaking-purple .slot-speaking-glow {
    border-color: #c084fc;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
}

/* SLIDER INDIVIDUEL CARAMEL/SABLE DE LA CAPTURE */
.slot-slider-row {
    width: 100%;
    display: flex;
    align-items: center;
}

.sand-volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--slider-sand);
    outline: none;
}

.sand-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease;
}

.sand-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* BARRE DE STATUT SOUS LA GRILLE (EXACTE AU SCREENSHOT) */
.proximity-summary-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 14px;
    padding: 6px 0;
}

.status-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* FOOTER */
.main-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .players-proximity-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .layout-wrapper {
        flex-direction: column;
    }
    .dock-nav {
        width: 100%;
        height: 48px;
        position: relative;
        top: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 0 16px;
    }
    .dock-group {
        flex-direction: row;
        margin-top: 0;
    }
    .dock-bottom {
        margin-top: 0;
    }
    .sidebar-panel {
        width: 100%;
    }
    .players-proximity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .players-proximity-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   STYLES COMPLÉMENTAIRES : ONGLETS, MÉDIAS, PARAMÈTRES & SÉCURITÉ / LOGIN
   ============================================================================== */

/* LOGO DU DOCK */
.dock-logo {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px rgba(124, 77, 255, 0.4));
}

/* VUES PAR ONGLETS */
.view-tab-container {
    display: none;
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
}

.view-tab-container.active-view {
    display: flex;
}

#viewProximity.active-view {
    display: flex;
    flex-direction: row;
}

/* PAGES GÉNÉRALES (MÉDIAS ET PARAMÈTRES) */
.page-container {
    flex: 1;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1300px;
}

.page-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 18px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.page-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 1. MISE EN PAGE MÉDIAS */
.media-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.media-card-main {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 26px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.media-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.badge-live {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
}

.media-source-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.media-track-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

/* Ensemble Tourne-disque Vinyle */
.turntable-player {
    position: relative;
    width: 86px;
    height: 68px;
    min-width: 86px;
    display: flex;
    align-items: center;
}

/* Disque vinyle réaliste rotatif */
.vinyl-disc {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, #242730 0%, #131418 50%, #090a0d 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: rotateDisc 2.5s linear infinite;
    animation-play-state: paused;
    cursor: default;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.vinyl-disc.is-playing {
    animation-play-state: running;
    box-shadow: 0 0 25px rgba(124, 77, 255, 0.5), 0 4px 16px rgba(0, 0, 0, 0.7);
}

/* Reflet conique réaliste : donne un balayage lumineux très visible quand le vinyle tourne */
.vinyl-sheen {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.22) 0deg,
        transparent 35deg,
        rgba(255, 255, 255, 0.06) 90deg,
        transparent 145deg,
        rgba(255, 255, 255, 0.22) 180deg,
        transparent 215deg,
        rgba(255, 255, 255, 0.06) 270deg,
        transparent 325deg,
        rgba(255, 255, 255, 0.22) 360deg
    );
    pointer-events: none;
    z-index: 1;
}

/* Bande stroboscopique radiale traversante pour marquer la rotation */
.vinyl-strobe-strip {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.vinyl-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 2;
}
.vinyl-ring-1 { width: 52px; height: 52px; }
.vinyl-ring-2 { width: 42px; height: 42px; }
.vinyl-ring-3 { width: 32px; height: 32px; }

.vinyl-center-label {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c4dff 0%, #00e5ff 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

/* Marqueur asymétrique bien visible sur le macaron pour voir immédiatement la rotation */
.vinyl-label-accent {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px #ffffff;
}

.vinyl-center-hole {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #090a0d;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.9);
    z-index: 4;
}

/* Bras de lecture (Tonearm) */
.turntable-tonearm {
    position: absolute;
    top: 4px;
    right: 2px;
    width: 26px;
    height: 58px;
    pointer-events: none;
    z-index: 10;
    transform-origin: 18px 6px;
    transform: rotate(-26deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.turntable-tonearm.is-playing {
    transform: rotate(8deg);
}

.tonearm-base {
    position: absolute;
    top: 0px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #4b5563 0%, #1f2937 100%);
    border: 2px solid #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.tonearm-rod {
    position: absolute;
    top: 8px;
    right: 7px;
    width: 3px;
    height: 44px;
    background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 50%, #4b5563 100%);
    border-radius: 2px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    transform-origin: top center;
    transform: rotate(10deg);
}

.tonearm-head {
    position: absolute;
    bottom: -2px;
    left: -4px;
    width: 10px;
    height: 14px;
    background: linear-gradient(135deg, #7c4dff 0%, #00e5ff 100%);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tonearm-needle-glow {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 6px #00e5ff;
    margin-bottom: 2px;
}

.media-icon-disc {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c4dff 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.4);
    animation: rotateDisc 10s linear infinite;
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.media-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.media-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
}

.media-seeker-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.media-seek-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.media-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 22px;
}

.media-ctrl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.media-vol-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gradient-slider-media {
    -webkit-appearance: none;
    appearance: none;
    width: 100% !important;
    max-width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #7c4dff 0%, #00e5ff 50%, #00ff88 100%);
    border-radius: 4px;
    outline: none;
}

.gradient-slider-media::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 10px #00e5ff, 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.1s ease;
}

.gradient-slider-media::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.btn-danger-action {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-action:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

.media-card-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 24px;
}

.card-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.card-subdesc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.regions-list-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.regions-list-active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.region-badge-active {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 12px 18px;
    border-radius: 12px;
}

.region-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.region-source-url {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.recent-sounds-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sound-item-log {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
}

/* 2. PARAMÈTRES & DIAGNOSTIC */
.settings-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-fullcard {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.device-select.full-width {
    width: 100%;
}

.btn-secondary-action {
    background: rgba(124, 77, 255, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(124, 77, 255, 0.3);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.btn-secondary-action:hover {
    background: rgba(124, 77, 255, 0.28);
    color: #fff;
    box-shadow: 0 0 14px rgba(124, 77, 255, 0.4);
}

.test-feedback-text {
    font-size: 0.82rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

.toggle-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.toggle-setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.item-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 420px;
}

.diag-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
}

.diag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
}

.badge-status-ok {
    color: var(--accent-green);
    font-weight: 600;
}

.badge-status-err {
    color: var(--accent-red);
    font-weight: 600;
}

.mono-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent-cyan);
}

/* 3. MODAL DE SÉCURITÉ / LOGIN (TOKEN ABSENT OU INCORRECT) */
.security-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 14, 0.88);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.security-modal-overlay.modal-hidden {
    display: none;
}

.security-card {
    width: 90%;
    max-width: 520px;
    background: #141a24;
    border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 22px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(124, 77, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124, 77, 255, 0.15);
    color: #c4b5fd;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(124, 77, 255, 0.3);
    align-self: flex-start;
}

.security-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

.security-intro {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.security-error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.4;
}

.security-steps-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-purple);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.step-text code {
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.token-input-group {
    display: flex;
    gap: 10px;
}

.security-token-input {
    flex: 1;
    background: #0d121a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
}

.security-token-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.3);
}

.security-submit-btn {
    background: linear-gradient(135deg, #7c4dff 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.security-submit-btn:hover {
    box-shadow: 0 0 16px rgba(124, 77, 255, 0.5);
    transform: translateY(-1px);
}

.security-qr-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}

.security-qr-tip code {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
}

/* BOUTON D'ACTIVATION / DEMANDE DU MICROPHONE */
.btn-activate-mic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #7c4dff 0%, #00e5ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.35);
    transition: all 0.2s ease;
}

.btn-activate-mic:hover {
    box-shadow: 0 6px 18px rgba(124, 77, 255, 0.6);
    transform: translateY(-1px);
}

.btn-activate-mic.active-granted {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
    box-shadow: none;
    cursor: default;
}

/* ALERTE CONTEXTE NON SÉCURISÉ (HTTP DANS OPERA/CHROME) */
.insecure-context-alert {
    background: rgba(234, 88, 12, 0.12);
    border: 1px solid rgba(234, 88, 12, 0.4);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #fdba74;
    font-size: 0.85rem;
    line-height: 1.5;
}

.insecure-context-alert h4 {
    margin: 0 0 6px 0;
    color: #fb923c;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.insecure-context-alert code {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.insecure-context-alert ol {
    margin: 8px 0 0 16px;
    padding: 0;
}

.insecure-context-alert li {
    margin-bottom: 6px;
}

/* NOUVELLE MISE EN PAGE DE LA VUE MÉDIA SIMPLE */
.single-column {
    display: flex;
    flex-direction: column;
    max-width: 650px;
}

.media-header-simple {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.media-ctrl-row-standalone {
    margin: 16px 0 24px 0;
}

.media-vol-box-large {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vol-title-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.media-info-note {
    background: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}
