/* ===================================
   FARM CARTO - PAGE DE LOGIN
   =================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===================================
   CONTAINER PRINCIPAL
   =================================== */

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #4CAF50);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

/* ===================================
   SECTION LOGO
   =================================== */

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 10px;
    display: block;
    animation: logo-bounce 2s ease-in-out infinite;
}

.logo-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.logo-subtitle {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
}

/* ===================================
   FORMULAIRE
   =================================== */

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

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

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

/* ===================================
   ALERTES
   =================================== */

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: none;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* ===================================
   BOUTON DE CONNEXION
   =================================== */

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

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

/* ===================================
   FOOTER
   =================================== */

.footer-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.8rem;
}

.footer-text a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* ===================================
   ANIMATIONS
   =================================== */

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

@keyframes logo-bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-5px); 
    }
}

@keyframes gradient-shift {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo-title {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 25px 15px;
    }
    
    .logo-title {
        font-size: 1.3rem;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .btn-login {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* ===================================
   MODE SOMBRE (OPTIONNEL)
   =================================== */

@media (prefers-color-scheme: dark) {
    .login-container {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
    
    .logo-title {
        color: #fff;
    }
    
    .logo-subtitle {
        color: #ccc;
    }
    
    .form-label {
        color: #ccc;
    }
    
    .form-input {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .form-input:focus {
        background: #333;
        border-color: #4CAF50;
    }
    
    .form-input::placeholder {
        color: #888;
    }
    
    .footer-text {
        color: #ccc;
    }
}

/* ===================================
   ÉTATS DE CHARGEMENT
   =================================== */

.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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