/* Styles améliorés pour les formulaires d'authentification */

/* Mise en page split à deux colonnes */
.auth-split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Formes décoratives en arrière-plan */
.auth-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.1), rgba(0, 153, 204, 0.15));
    z-index: 0;
}

.auth-shape-1 {
    width: 70vw;
    height: 70vw;
    top: -35vw;
    right: -35vw;
    background: radial-gradient(circle, rgba(0, 166, 81, 0.07), rgba(0, 153, 204, 0.1));
}

.auth-shape-2 {
    width: 40vw;
    height: 40vw;
    bottom: -20vw;
    left: -20vw;
    background: radial-gradient(circle, rgba(0, 153, 204, 0.08), rgba(0, 166, 81, 0.12));
    z-index: 1;
}

/* Côté image */
.auth-image-side {
    width: 45%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.442), rgba(0, 153, 204, 0.59));
    z-index: 1;
}

.auth-overlay-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem;
    max-width: 100%;
    /* Désactivation de l'animation pour éviter les problèmes */
    /* animation: fadeIn 1s ease-in-out; */
    opacity: 1 !important;
}

.auth-overlay-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.49);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-overlay-logo img {
    max-width: 80%;
    max-height: 80%;
}

.auth-overlay-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-overlay-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.auth-overlay-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.auth-overlay-features li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    opacity: 0;
    animation: slideInRight 0.5s ease-in-out forwards;
}

.auth-overlay-features li:nth-child(1) {
    animation-delay: 0.2s;
}

.auth-overlay-features li:nth-child(2) {
    animation-delay: 0.4s;
}

.auth-overlay-features li:nth-child(3) {
    animation-delay: 0.6s;
}

.auth-overlay-features li i {
    position: absolute;
    left: 0;
    top: 3px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Côté formulaire */
.auth-form-side {
    width: 55%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 550px;
    padding: 3rem;
    opacity: 1 !important; /* Assurer que le formulaire reste visible */
    animation: none !important; /* Désactiver les animations qui pourraient causer la disparition */
}

.auth-form-header {
    margin-bottom: 2.5rem;
}

.auth-form-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #333;
    background: #25AAE2;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-form-subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* Message d'erreur */
.auth-error {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background-color: rgba(255, 0, 0, 0.08);
    border-radius: 10px;
    border-left: 4px solid #ff3b30;
}

.auth-error i {
    color: #ff3b30;
    margin-right: 12px;
    font-size: 20px;
    padding-top: 2px;
}

/* Groupe de champ flottant */
.auth-floating-input-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.auth-floating-input {
    width: 100%;
    /* Positionner le texte après l'icône avec un espacement strict */
    padding: 1.2rem 1rem 0.8rem 0;
    text-indent: 3.8rem; /* Force le texte à commencer après l'icône */
    font-size: 1rem;
    color: #333;
    background: rgba(0, 0, 0, 0.03);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    position: relative; /* Important pour le positionnement du pseudo-élément */
}

.auth-floating-input:focus {
    border-color: #0099cc;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 153, 204, 0.1);
}

.auth-floating-label {
    position: absolute;
    top: 1.1rem;
    left: 3.8rem; /* Aligner avec le début du texte (text-indent) */
    font-size: 1rem;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 3; /* Au-dessus de tout */
}

.auth-floating-input:focus ~ .auth-floating-label,
.auth-floating-input:not(:placeholder-shown) ~ .auth-floating-label {
    top: 0.5rem;
    left: 3.8rem; /* Garder l'alignement avec le texte */
    font-size: 0.75rem;
    color: #0099cc;
    font-weight: 600;
}

.auth-floating-icon {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none; /* Permet de cliquer à travers l'icône */
    z-index: 2; /* S'assure que l'icône reste au-dessus */
    width: 1.5rem; /* Largeur fixe pour l'icône */
    text-align: center; /* Centre l'icône dans son espace */
}

/* Ajouter une séparation visuelle entre l'icône et le texte */
.auth-floating-input-group::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3.6rem;
    height: 60%;
    width: 1px;
    background-color: #ddd;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.auth-floating-input:focus ~ .auth-floating-icon {
    color: #0099cc;
}

/* Checkbox personnalisée */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox-box {
    width: 22px;
    height: 22px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.custom-checkbox-input:checked ~ .custom-checkbox-box {
    background: linear-gradient(135deg, #25AAE2, #0099cc);
    border-color: transparent;
}

.custom-checkbox-box::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-checkbox-input:checked ~ .custom-checkbox-box::after {
    opacity: 1;
}

.custom-checkbox-label {
    font-size: 0.9rem;
    color: #666;
    margin-left: 5px;
}

/* Bouton d'action principal */
.auth-form-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #25AAE2, #0099cc);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 153, 204, 0.15);
}

.auth-form-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    transform: skewX(-15deg);
}

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

.auth-form-btn:hover {
    box-shadow: 0 15px 25px rgba(0, 153, 204, 0.25);
    transform: translateY(-3px);
}

/* Liens du pied de formulaire */
.auth-footer-link {
    color: #0099cc;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #25AAE2, #0099cc);
    transition: width 0.3s ease;
}

.auth-footer-link:hover::after {
    width: 100%;
}

/* Séparateur OU */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: #eee;
}

.auth-divider-text {
    padding: 0 15px;
    color: #999;
    font-size: 0.9rem;
}

/* Boutons de connexion sociale */
.social-auth-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-auth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.social-auth-btn i {
    margin-right: 10px;
    font-size: 1rem;
}

.social-auth-btn.facebook {
    background: #3b5998;
}

.social-auth-btn.google {
    background: #db4437;
}

.social-auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Lien alternatif */
.auth-alternate-link {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-alternate-link a {
    color: #0099cc;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.auth-alternate-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #25AAE2, #0099cc);
    transition: width 0.3s ease;
}

.auth-alternate-link a:hover::after {
    width: 100%;
}

/* Boutons de connexion sociale */
.social-auth-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-auth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.social-auth-btn i {
    margin-right: 10px;
    font-size: 18px;
}

.social-auth-btn.facebook {
    background: #3b5998;
}

.social-auth-btn.google {
    background: #db4437;
}

.social-auth-btn.linkedin {
    background: #0077b5;
}

.social-auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0.9; } /* Commencer avec une opacité presque complète */
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0.9; /* Commencer avec une opacité presque complète */
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    /* Désactivation de l'animation qui peut causer la disparition */
    /* animation: slideInUp 0.6s ease-in-out; */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Media Queries */
@media (max-width: 992px) {
    .auth-split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .auth-image-side,
    .auth-form-side {
        width: 100%;
    }

    .auth-image-side {
        height: 300px;
    }
    .auth-overlay-features{
        display: none;
    }

    .auth-form-side {
        padding: 2rem 0;
    }

    .auth-form-container {
        padding: 2rem;
    }

    .auth-form-title {
        font-size: 1.8rem;
    }

    .auth-overlay-content {
        padding: 1rem;
    }

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

/* Formulaire d'inscription multi-étapes */
.register-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.register-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #eee;
    z-index: 0;
}

.register-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.register-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #999;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.register-step-label {
    font-size: 0.9rem;
    color: #999;
    transition: all 0.3s ease;
}

.register-step.active .register-step-number {
    background: linear-gradient(135deg, #25AAE2, #0099cc);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 153, 204, 0.3);
}

.register-step.active .register-step-label {
    color: #333;
    font-weight: 600;
}

.register-step.completed .register-step-number {
    background: white;
    border-color: #25AAE2;
    color: #25AAE2;
}

.register-step.completed .register-step-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Étapes du formulaire */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* Navigation entre étapes */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 15px;
}

.form-navigation button {
    flex: 1;
}

.form-navigation .prev-step {
    background: #f8f9fa;
    color: #666;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-navigation .prev-step:hover {
    background: #f1f3f5;
    color: #333;
}

.submit-btn {
    background: linear-gradient(135deg, #25AAE2, #0099cc);
}

/* Validation des champs */
.auth-floating-input.invalid {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.05);
}

/* Style spécifique pour les champs de type select */
.select-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8.825L1.175 4 2.4 2.775 6 6.4 9.6 2.775 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Style spécifique pour les champs de type file */
.file-input {
    padding-top: 1.2rem;
    color: #666;
}

.auth-step.active {
    background: linear-gradient(135deg, #25AAE2, #0099cc);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(0, 166, 81, 0.3);
}

.auth-step.completed {
    background: #25AAE2;
    color: white;
    border-color: transparent;
}

.auth-step::after {
    content: attr(data-title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    font-size: 12px;
    white-space: nowrap;
    color: #666;
}

/* Animation d'entrée du formulaire */
.auth-card {
    animation: authCardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Style pour les messages d'erreur */
.auth-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.auth-error i {
    margin-right: 10px;
    font-size: 18px;
}

/* Style pour les messages de succès */
.auth-success {
    background: rgba(0, 166, 81, 0.1);
    color: #25AAE2;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.auth-success i {
    margin-right: 10px;
    font-size: 18px;
}

/* Formulaire d'inscription étudiant/entreprise */
.auth-choice-container {
    display: flex;
    gap: 30px;
}

.auth-choice-card {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #25AAE2, #0099cc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-choice-card:hover::before,
.auth-choice-card.selected::before {
    transform: scaleX(1);
}

.auth-choice-card:hover,
.auth-choice-card.selected {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.auth-choice-card.selected {
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #25AAE2, #0099cc);
}

.auth-choice-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(0, 166, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-choice-card:hover .auth-choice-icon,
.auth-choice-card.selected .auth-choice-icon {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.2), rgba(0, 153, 204, 0.2));
}

.auth-choice-icon i {
    font-size: 32px;
    color: #25AAE2;
    transition: all 0.3s ease;
}

.auth-choice-card:hover .auth-choice-icon i,
.auth-choice-card.selected .auth-choice-icon i {
    color: #0099cc;
}

.auth-choice-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.auth-choice-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Indicateur de force de mot de passe */
.password-strength {
    margin-top: 10px;
    height: 5px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

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

.password-strength-meter.weak {
    width: 25%;
    background: #e74c3c;
}

.password-strength-meter.medium {
    width: 50%;
    background: #f39c12;
}

.password-strength-meter.strong {
    width: 75%;
    background: #3498db;
}

.password-strength-meter.very-strong {
    width: 100%;
    background: #25AAE2;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    color: #999;
}
