/* CSS révolutionnaire pour la page de connexion */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.revolutionary-login {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animation de chargement */
body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Conteneur principal */
.revolutionary-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 40px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    position: relative;
}

/* Section visuelle gauche */
.visual-section {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.visual-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: rotateBackground 20s linear infinite;
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.visual-content {
    position: relative;
    z-index: 2;
}

.logo-revolutionary {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    to { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
}

.brand-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.9;
}

/* Section formulaire droite */
.form-section {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-text {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    line-height: 1.5;
}

/* Alertes révolutionnaires */
.revolutionary-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    animation: slideDown 0.5s ease-out;
}

.revolutionary-alert.error {
    background: linear-gradient(135deg, #ff5722, #f44336);
    color: white;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.revolutionary-alert.success {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulaire révolutionnaire */
.revolutionary-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
    transition: transform 0.3s ease;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 
        0 0 0 3px rgba(25, 118, 210, 0.1),
        0 5px 15px rgba(25, 118, 210, 0.1);
    transform: translateY(-2px);
}

.form-input.is-invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Section "Se souvenir de moi" */
.remember-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.revolutionary-checkbox {
    position: relative;
    display: inline-block;
}

.revolutionary-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #1976d2;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.revolutionary-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: #1976d2;
    transform: scale(1.1);
}

.revolutionary-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.remember-label {
    font-weight: 500;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* Bouton révolutionnaire */
.revolutionary-btn {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(25, 118, 210, 0.3);
}

.revolutionary-btn::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;
}

.revolutionary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(25, 118, 210, 0.4);
}

.revolutionary-btn:hover::before {
    left: 100%;
}

.revolutionary-btn:active {
    transform: translateY(-1px);
}

/* Animations d'entrée */
.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.fade-in {
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 20px;
    }
    
    .visual-section {
        padding: 30px;
        min-height: 300px;
    }
    
    .form-section {
        padding: 40px 30px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .logo-revolutionary {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .revolutionary-container {
        padding: 10px;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .welcome-title {
        font-size: 1.6rem;
    }
}

/* Effets spéciaux pour les navigateurs modernes */
@supports (backdrop-filter: blur(10px)) {
    .login-wrapper {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
    }
}

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.revolutionary-btn:focus {
    animation: pulse 0.6s ease-in-out;
}

/* Amélioration de l'accessibilité */
.revolutionary-btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

/* Thème sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .login-wrapper {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .welcome-title {
        color: #ffffff;
    }
    
    .welcome-subtitle,
    .form-label,
    .remember-label {
        color: #cccccc;
    }
    
    .form-input {
        background: rgba(60, 60, 60, 0.9);
        border-color: #555;
        color: #ffffff;
    }
    
    .form-input::placeholder {
        color: #aaa;
    }
}
