/* 
 * Maket Lakay Auth - Frontend Styles
 * Version: 1.2.0
 */

.mla-form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.mla-form-container h2 {
    color: #2c5282;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.mla-form-group {
    margin-bottom: 25px;
}

.mla-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.mla-form-group input[type="text"],
.mla-form-group input[type="email"],
.mla-form-group input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.mla-form-group input[type="text"]:focus,
.mla-form-group input[type="email"]:focus,
.mla-form-group input[type="password"]:focus {
    outline: none;
    border-color: #4299e1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.mla-form-group input.error {
    border-color: #e53e3e;
    background: #fff5f5;
}

.mla-help-text {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 13px;
    line-height: 1.4;
}

.error-text {
    color: #e53e3e !important;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.mla-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.mla-checkbox-label input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.mla-checkbox-label span {
    font-weight: normal;
    color: #4a5568;
}

.mla-submit-btn {
    background: #2c5282;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mla-submit-btn:hover {
    background: #2b6cb0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(43, 108, 176, 0.3);
}

.mla-submit-btn:active {
    transform: translateY(0);
}

.mla-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.mla-form-links {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.mla-form-links a {
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.mla-form-links a:hover {
    color: #2c5282;
    text-decoration: underline;
}

.mla-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mla-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.mla-message.error {
    background: #fff5f5;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.mla-user-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #4299e1;
}

.mla-user-info p {
    margin: 8px 0;
    color: #4a5568;
}

.mla-user-info strong {
    color: #2d3748;
    min-width: 140px;
    display: inline-block;
}

.mla-tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 2px solid #e1e5e9;
    gap: 5px;
}

.mla-tab {
    padding: 12px 24px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    color: #718096;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.mla-tab:hover {
    background: #edf2f7;
    color: #4a5568;
}

.mla-tab.active {
    background: #2c5282;
    color: white;
    position: relative;
}

.mla-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2c5282;
}

.mla-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mla-tab-content.active {
    display: block;
}

.mla-user-actions {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.mla-btn.secondary {
    display: inline-block;
    padding: 12px 30px;
    background: #718096;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mla-btn.secondary:hover {
    background: #4a5568;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(113, 128, 150, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mla-form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .mla-form-container h2 {
        font-size: 24px;
    }
    
    .mla-tabs {
        flex-direction: column;
    }
    
    .mla-tab {
        border-radius: 6px;
        margin-bottom: 5px;
    }
    
    .mla-tab.active::after {
        display: none;
    }
}

/* Animation pour les boutons */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mla-submit-btn:not(:disabled):hover {
    animation: pulse 0.3s ease;
}

/* Style pour hCaptcha */
.h-captcha {
    margin: 10px 0;
}

/* Loading spinner */
.mla-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}