/* ===== AUTH PAGES STYLES (LOGIN/REGISTER) ===== */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: #f8f9ff;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

/* Container principal */
.auth-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    position: relative;
}

/* Logo de l'application */
.auth-logo {
    width: 90px;
    height: 90px;
    background: #4f8ff0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2em;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(79, 143, 240, 0.3);
}

/* Titre principal */
.auth-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 36px;
    color: #2c3e50;
    text-align: center;
}

/* Onglets de navigation */
.auth-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tab.active {
    background: #4f8ff0;
    color: #fff;
    box-shadow: 0 2px 4px rgba(79, 143, 240, 0.3);
}

.tab:hover:not(.active) {
    background: #e0e0e0;
    color: #333;
}

/* Messages d'erreur */
.error-messages {
    width: 100%;
    margin-bottom: 20px;
}

.error-message {
    background: #ffe6e6;
    color: #dc3545;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    border-left: 4px solid #dc3545;
    animation: slideIn 0.3s ease-out;
}

/* Messages de succès */
.success-message {
    background: #e6ffe6;
    color: #28a745;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #28a745;
    animation: slideIn 0.3s ease-out;
}

/* Formulaire */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 16px;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e6ff;
    border-radius: 8px;
    font-size: 1em;
    background: #f9f9f9;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    border-color: #4f8ff0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 143, 240, 0.1);
    transform: translateY(-1px);
}

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

/* Boutons */
.btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    background: linear-gradient(135deg, #4f8ff0 0%, #3b6bb3 100%);
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 143, 240, 0.3);
    font-family: inherit;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b6bb3 0%, #4f8ff0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 143, 240, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(79, 143, 240, 0.3);
}

/* Liens d'aide */
.auth-help {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-help a {
    color: #4f8ff0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-help a:hover {
    color: #3b6bb3;
    text-decoration: underline;
}

/* Styles spécifiques pour l'inscription */
.register-container {
    background: radial-gradient(circle at 50% 30%, #eaf1ff 0%, #f7f8fd 60%, #cfd8ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.register-input {
    width: 100%;
    padding: 14px;
    background: #f5f6fa;
    border: 1px solid #e0e6ff;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.register-input:focus {
    border-color: #4f8ff0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 143, 240, 0.1);
}

.register-btn {
    background: linear-gradient(90deg, #5398f7 0%, #396ccf 100%);
    color: #fff;
    border: none;
    padding: 15px 0;
    border-radius: 8px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(56, 99, 187, 0.2);
    font-family: inherit;
}

.register-btn:hover {
    background: linear-gradient(90deg, #396ccf 0%, #5398f7 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 99, 187, 0.3);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-container {
    animation: fadeIn 0.4s ease-out;
}

/* Loading state */
.btn-primary:disabled,
.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover,
.register-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(79, 143, 240, 0.2);
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .auth-container {
        padding: 24px 16px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        min-height: 100vh;
        justify-content: center;
        max-width: 100vw;
    }

    .auth-logo {
        width: 70px;
        height: 70px;
        font-size: 1.8em;
        margin-bottom: 24px;
    }

    .auth-title {
        font-size: 1.5em;
        margin-bottom: 24px;
    }

    .form-input,
    .register-input {
        padding: 12px 14px;
        font-size: 16px;
        /* Évite le zoom sur iOS */
    }

    .btn-primary,
    .register-btn {
        padding: 14px;
        font-size: 1rem;
    }

    .tab {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 20px 12px;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.6em;
    }

    .auth-title {
        font-size: 1.3em;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-container {
        border: 2px solid #000;
    }

    .form-input,
    .register-input {
        border: 2px solid #000;
    }

    .btn-primary,
    .register-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    .auth-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .btn-primary,
    .register-btn {
        background: #4f8ff0 !important;
        color: white !important;
    }
}