* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    height: auto;
}

.login-sidebar {
    width: 40%;
    background-color: #0A2D82;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px 0 0 25px;
    padding: 40px 20px;
    box-shadow: 4px 0 15px rgba(10, 45, 130, 0.3); /* Ajustez l'ombre pour qu'elle ne soit pas visible à droite */
    position: relative;
    z-index: 1;
}


.sidebar-content {
    text-align: center;
}

.sidebar-title {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 40px;
}

.login-form {
    width: 70%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 25px; /* Garder les coins arrondis */
    margin-left: -48px; /* Décalage vers la gauche */
    padding: 40px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    z-index: 2; /* Assurez-vous que le z-index est supérieur à celui de la sidebar */
}

.form-content {
    width: 100%;
    max-width: 400px;
}

.form-logo {
    width: 180px;
    margin-bottom: 2.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.logo-container {
    display: flex;
    justify-content: space-between; /* Espace entre les logos */
    align-items: center; /* Centrer verticalement */
    padding: 29px;
    margin-bottom: 7px; /* Ajoutez un peu de padding si nécessaire */
}

.logo-madavision {
    width: 104px;
    margin-left: -29px;
}

.logo-fim {
    width: 122px; /* Ajustez la taille selon vos besoins */
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: #0A2D82;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.forgot-password {
    display: block;
    margin-top: 10px;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
}

.forgot-password:hover {
    color: #0A2D82;
}

.login-btn {
    background-color: #D05B3F;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: block;
    width: auto;
    margin-top: 2rem;
}

.login-btn:hover {
    background-color: #b04e36;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(208, 91, 63, 0.3);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(208, 91, 63, 0.3);
}

.decorative-element {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 80px;
    height: 80px;
    opacity: 0.7;
}

/* oeil mot de passe  */
.password-field {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    z-index: 10;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #0A2D82;
}

/* Ajustez la valeur de padding pour éviter le chevauchement avec l'icône */
.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 40px;
}

.back-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #333; /* Couleur du texte */
}

.back-btn i {
    color: #0A2D82; /* Bleu pour la flèche */
    margin-right: 8px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.back-btn:hover i {
    color: #08306d; /* Bleu foncé au survol */
}

/* Media queries for responsiveness */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        width: 95%;
        max-width: 500px;
    }

    .login-sidebar {
        width: 100%;
        margin-bottom: 20px;
        padding: 30px 20px;
        border-radius: 25px;
        box-shadow: 0 4px 15px rgba(10, 45, 130, 0.25);
        margin-left: 0;
        z-index: 0;
    }

    .login-form {
        width: 100%;
        margin-left: 0;
        border-radius: 25px;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 576px) {
    .page-container {
        padding: 10px;
    }
    
    .login-container {
        width: 100%;
    }
    
    .sidebar-title {
        font-size: 2rem;
    }

    .login-form {
        padding: 30px 20px;
    }

    .form-logo {
        width: 150px;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .login-btn {
        width: 100%;
    }
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none;
}

/* Custom Bootstrap Form Styles */
.form-control-lg {
    font-size: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
}

.form-control-lg:focus {
    border-color: #0A2D82;
    box-shadow: 0 0 0 0.2rem rgba(10, 45, 130, 0.25);
}

.form-floating label {
    padding: 1rem 1.2rem;
}

.btn-primary {
    background-color: #0A2D82;
    border-color: #0A2D82;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #081f5c;
    border-color: #081f5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 45, 130, 0.3);
}

.btn-primary:disabled {
    background-color: #0A2D82;
    border-color: #0A2D82;
    opacity: 0.65;
}

.invalid-feedback {
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Styles pour les alertes iOS-like */
.ios-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    width: 500px;
    max-width: 95%;
    min-height: 200px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 10000;
}

/* Overlay sombre derrière l'alerte */
.ios-alert::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: -1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Ajout d'un bouton de fermeture */
.alert-close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 12px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    transition: all 0.2s ease;
}

.alert-close:hover {
    color: #666;
}

.error-alert {
    border-left: 4px solid #ff3b30;
}

.success-alert {
    border-left: 4px solid #34c759;
}

.alert-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.error-alert .alert-icon {
    color: #ff3b30;
}

.success-alert .alert-icon {
    color: #34c759;
}

.alert-content {
    flex-grow: 1;
}

.alert-content h4 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
}

.alert-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #444;
}

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

/* Styles personnalisés pour SweetAlert2 */
.swal-large {
    width: 500px !important;
    padding: 2rem !important;
}

.swal2-popup {
    font-family: Arial, sans-serif !important;
}

.swal2-title {
    font-size: 24px !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.swal2-icon {
    width: 5em !important;
    height: 5em !important;
}

.swal2-confirm {
    padding: 12px 30px !important;
    font-size: 16px !important;
}