/* css/home.css - Version optimisée utilisant les variables communes */

/* Corps de la page avec couleurs originales */
body.home {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, 
        #000000 0%, 
        #1a1a2e 25%, 
        #16213e 50%, 
        #0f3460 75%, 
        #533483 100%);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Effet de particules en arrière-plan */
body.home::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Conteneur principal */
.container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Titre principal */
h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: var(--glow-primary);
    letter-spacing: 2px;
}

/* Formulaire principal */
.level {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 1000px;
    width: 100%;
    position: relative;
}

/* Container pour les sections côte à côte */
.selections-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Sections de sélection */
.selection-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
}

.selection-section:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

/* Titres de section */
.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Labels des options */
label {
    display: block;
    padding: 1rem 1.5rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

label:last-child {
    margin-bottom: 0;
}

/* Inputs radio cachés */
input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Texte des options */
label span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

label:hover span {
    color: var(--text-primary);
}

/* État sélectionné */
input[type="radio"]:checked + span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Label sélectionné */
label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.2) 0%, 
        rgba(124, 58, 237, 0.15) 100%) !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 
        0 0 25px rgba(0, 212, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.02) !important;
}

/* Texte du label sélectionné */
label:has(input[type="radio"]:checked) span {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8) !important;
}

/* Bouton de soumission */
button[type="submit"] {
    width: 100%;
    padding: 1.2rem 2rem;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 10px 30px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(0, 212, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Bouton désactivé */
button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666666, #444444);
}

/* Effet de lueur animée */
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button[type="submit"]:hover:not(:disabled)::before {
    left: 100%;
}

/* Classes utilitaires pour les animations */
.selected {
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.3) 0%, 
        rgba(124, 58, 237, 0.2) 100%) !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05) !important;
}

.selected span {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 15px rgba(0, 212, 255, 1) !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    .level {
        padding: 2rem;
    }
    
    .selections-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .selection-section {
        padding: 1rem;
    }
    
    label {
        padding: 0.8rem 1.2rem;
    }
    
    button[type="submit"] {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .level {
        padding: 1.5rem;
    }
    
    .selection-section {
        padding: 0.8rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    label {
        padding: 0.7rem 1rem;
    }
    
    label span {
        font-size: 0.9rem;
    }
}