/* Styles pour les formulaires d'authentification */
:root {
    --primary-color: #e50914;
    --dark-color: #141414;
    --light-color: #f4f4f4;
    --gray-color: #999;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --border-radius: 6px;
    --transition: all 0.3s ease;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,0.95) 100%);
}

.auth-card {
    background: var(--dark-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.auth-card h1 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
    height: auto;
    line-height: 1.5;
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
    outline: none;
}

.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #fff;
}

/* Liens et texte d'aide */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-links a:hover {
    color: #f40612;
    text-decoration: underline;
}

.auth-links span {
    margin: 0 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Messages d'alerte */
.alert {
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-danger {
    color: #ff6b6b;
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}

.alert-success {
    color: #51cf66;
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
}

.alert ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

/* Champs de formulaire avec icônes */
.input-group {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    margin-bottom: 0;
}

.input-group-append {
    margin-left: -1px;
    display: flex;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Style pour les champs avec icônes */
.has-icon-left .form-control {
    padding-left: 2.8rem;
}

.has-icon-left .form-control-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
}

/* Style pour les champs de mot de passe */
.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 2.8rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 2;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toggle-password:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.toggle-password:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3);
}

/* Texte d'aide sous les champs */
.form-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Style pour les onglets de connexion */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.auth-tab {
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    margin-bottom: -1px;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.9);
}

/* Styles responsifs */
@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-container {
        min-height: calc(100vh - 60px);
    }
    
    .auth-tabs {
        justify-content: center;
    }
    
    .auth-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation pour les messages d'erreur */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Style pour les champs invalides */
.is-invalid {
    border-color: var(--error-color) !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--error-color);
}

/* Style pour les champs valides */
.is-valid {
    border-color: var(--success-color) !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Style pour les indicateurs de force du mot de passe */
.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* Couleurs pour les différents niveaux de force */
.password-weak {
    background-color: #ff6b6b;
    width: 25%;
}

.password-medium {
    background-color: #ffd43b;
    width: 50%;
}

.password-strong {
    background-color: #51cf66;
    width: 75%;
}

.password-very-strong {
    background-color: #20c997;
    width: 100%;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
}

/* Style pour les conditions de mot de passe */
.password-requirements {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.password-requirements li {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
}

.password-requirements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--error-color);
}

.password-requirements li.valid {
    color: rgba(255, 255, 255, 0.8);
}

.password-requirements li.valid::before {
    content: '✓';
    color: var(--success-color);
}

/* Style pour les séparateurs */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.separator:not(:empty)::before {
    margin-right: 1.5rem;
}

.separator:not(:empty)::after {
    margin-left: 1.5rem;
}

/* Style pour les boutons de connexion sociale */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-social i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.btn-google {
    color: #fff;
}

.btn-facebook {
    background: #3b5998;
    border-color: #3b5998;
}

.btn-twitter {
    background: #1da1f2;
    border-color: #1da1f2;
}

/* Style pour le pied de page d'authentification */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Styles pour les boutons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
}

.btn-primary:hover {
    background-color: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Styles pour les boutons du menu de navigation */
.nav-link.login-btn,
.nav-link.register-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    margin-left: 0.5rem !important;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link.register-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link.register-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-link.login-btn:hover,
.nav-link.register-btn:hover {
    background: #e50914;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-link.register-btn {
    background: transparent;
    border: 1px solid #fff;
    margin-left: 5px !important;
}

.nav-link.register-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Style pour l'état connecté */
.nav-link.login-btn i.fa-sign-out-alt {
    margin-right: 5px;
}

.auth-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.auth-links span {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
}

/* Styles pour les alertes */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #d4edda;
}

/* Styles responsifs */
@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-card h1 {
        font-size: 22px;
    }
}
