/* =================================
   Modal de Sélection de Mode
   ================================= */

.mode-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mode-selector-modal.active {
    opacity: 1;
    pointer-events: all;
}

.mode-selector-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.mode-selector-modal.active .mode-selector-content {
    transform: scale(1);
}

.mode-selector-header {
    text-align: center;
    margin-bottom: 32px;
}

.mode-selector-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #00C6FF 0%, #FF5A5F 50%, #00ED64 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.mode-selector-subtitle {
    color: #94a3b8;
    font-size: 16px;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.mode-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--mode-card-color) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.mode-card:hover::before {
    opacity: 0.1;
}

.mode-card:hover {
    border-color: var(--mode-card-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.mode-card.active {
    border-color: var(--mode-card-color);
    background: linear-gradient(135deg, rgba(var(--mode-card-color-rgb), 0.15) 0%, rgba(var(--mode-card-color-rgb), 0.05) 100%);
}

.mode-card-content {
    position: relative;
    z-index: 1;
}

.mode-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--mode-card-color);
    transition: transform 0.3s ease;
}

.mode-card:hover .mode-card-icon {
    transform: scale(1.1);
}

.mode-card-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.mode-card-description {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

.mode-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--mode-card-color);
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-selector-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-selector-btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-selector-btn-primary {
    background: linear-gradient(135deg, #00C6FF 0%, #0099CC 100%);
    color: #ffffff;
}

.mode-selector-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 198, 255, 0.4);
}

.mode-selector-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mode-selector-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mode-selector-import {
    margin-top: 24px;
    text-align: center;
}

.mode-selector-import-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px dashed rgba(167, 139, 250, 0.5);
    border-radius: 12px;
    color: #a78bfa;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-selector-import-label:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: #a78bfa;
}

.mode-selector-import-input {
    display: none;
}

/* Badge Mode Actuel */
.current-mode-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 2px solid var(--mode-color, #00C6FF);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9998;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.current-mode-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.current-mode-icon {
    font-size: 20px;
    color: var(--mode-color, #00C6FF);
}

.current-mode-text {
    display: flex;
    flex-direction: column;
}

.current-mode-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.current-mode-name {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .mode-selector-content {
        padding: 24px;
        border-radius: 16px;
    }

    .mode-selector-title {
        font-size: 24px;
    }

    .mode-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mode-card {
        padding: 16px;
    }

    .mode-card-icon {
        font-size: 36px;
    }

    .mode-card-name {
        font-size: 16px;
    }

    .mode-selector-actions {
        flex-direction: column;
    }

    .mode-selector-btn {
        width: 100%;
        justify-content: center;
    }

    .current-mode-badge {
        bottom: 10px;
        left: 10px;
        padding: 8px 16px;
    }

    .current-mode-icon {
        font-size: 16px;
    }

    .current-mode-label {
        font-size: 10px;
    }

    .current-mode-name {
        font-size: 12px;
    }
}
