/* Conteneur principal */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;

}

/* Carte d'authentification */
.auth-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    padding: 1rem;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.95);

    margin: 2rem
}

/* En-tête */
.auth-header {
    text-align: center;
    margin-bottom: 1.3rem;
}


/* footer */
.a-nav {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-small);
    text-align: center;
    transition: background 1s !important;
}

.a-nav:hover {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);

    color: white;
}

/* Onglets */
.auth-tabs {
    display: flex;
    background: var(--background-color);
    border-radius: var(--border-radius-small);
    padding: 0.25rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab-btn.active {
    background: var(--card-background);
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.tab-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* 2FA */

.frame-2FA {
    width: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-2FA {
    width: 100%;
    text-align: left;
}

.header-2FA p {
    margin: 0
}

.form-2FA {
    display: inline-flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0
}

.input-2FA {
    max-width: 45px;
    height: 65px;
    border-radius: 10px;
    font-size: 20px;
    text-align: center;
}


/* Formulaires */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    stroke-width: 2;
    z-index: 1;
    pointer-events: none;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    background: var(--card-background);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-form input:focus+.input-icon {
    color: var(--primary-color);
}

.auth-form input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}




/* Section professionnelle */
.icone-toggle {
    width: 32px;
    height: 32px;
    cursor: pointer;
    position: relative;
}

.professional-section {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}


/* Pied de formulaire */
.form-footer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}


.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* États d'erreur */
.input-error {
    border-color: var(--error-color) !important;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}



/* Responsive Design */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
        max-width: none;
    }

    .auth-title {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tab-btn {

        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .tab-icon {
        width: 16px;
        height: 16px;
    }

    .professional-section {
        margin-top: 0.5rem;
        padding-top: 1rem;
    }
}


/* Animations supplémentaires */
.auth-card {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* États de focus améliorés */
.auth-form input:focus {
    transform: translateY(-1px);
}

/* Hover effects pour les inputs */
.input-wrapper:hover .auth-form input:not(:focus) {
    border-color: rgba(79, 70, 229, 0.3);
}

/* Loading state pour les boutons */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }

    .auth-card {
        padding: 0.7rem;
        margin:0
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-subtitle {
        font-size: 0.875rem;
    }
}