/* Masquer l'en-tête de navigation du SmartWizard */
.sw-main > .nav {
    display: none !important;
}

/* Toolbar vraiment fixe */
.sw > .toolbar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1020 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    background-color: #ffffff !important;
    padding: 15px !important;
    border-top: 1px solid #e9ecef !important;
    margin: 0 !important;
}

/* Style pour l'affichage du titre de l'étape */
.sw-btn-info {
    color: #257ce1;
    margin-bottom: 0;
}

/* Styles pour les boutons et la barre d'outils */
.sw-toolbar-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Style pour les boutons Suivant/Précédent */
.sw button.sw-btn {
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
}

.sw button.sw-btn-next, .btn-finish {
    background-color: #257ce1 !important;
    color: white !important;
    border: none !important;
}

.sw button.sw-btn-next:hover, .btn-finish:hover {
    background-color: #1e6bc1 !important;
}

.sw button.sw-btn-prev {
    background-color: #6c757d !important;
    color: white !important;
    border: none !important;
}

.sw button.sw-btn-prev:hover {
    background-color: #5a6268 !important;
}

/* Styles pour les messages d'erreur */
.invalid-feedback {
    display: none; /* Caché par défaut */
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Styles pour les champs invalides */
.is-invalid {
    border-color: #dc3545 !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);
}

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

/* Styles pour assurer la visibilité des boutons sur mobile */
@media (max-width: 767px) {
    .sw > .toolbar {
        padding: 10px !important;
    }
    
    .sw button.sw-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
        min-width: auto !important;
    }
    
    .sw-btn-info {
        display: none !important;
    }
    
    .sw > .toolbar .row {
        margin: 0 !important;
    }
    
    .sw > .toolbar .col-md-8 {
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Ajustement de l'espacement pour mobile */
    .container {
        padding-bottom: 90px !important;
    }
}

/* Animation lors du changement d'étape */
.sw-main .tab-content .tab-pane {
    transition: opacity 0.3s ease;
}

/* Animation générale */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Styles pour ajuster les champs requis */
.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Amélioration des validations */
.parsley-errors-list {
    list-style: none;
    padding: 0;
    margin-top: 5px;
    color: #dc3545;
    font-size: 0.875rem;
}

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

.form-label {
    font-weight: 500;
}

/* Style pour le badge d'erreur */
.parsley-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* Réduction de l'espacement entre les champs */
.form-group {
    margin-bottom: 0.75rem !important;
}

/* Réduire l'espacement de la grille */
.row.g-3 {
    --bs-gutter-y: 0.5rem !important;
}

/* Réduire la taille des labels et marges */
.form-label {
    margin-bottom: 0.25rem !important;
    font-size: 0.9rem !important;
}

/* Ajuster la hauteur des champs de formulaire */
.form-control, .form-select, .input-group {
    min-height: 38px !important;
}

/* Réduire les marges des cartes */
.card-body {
    padding: 1rem !important;
}

.card {
    margin-bottom: 1rem !important;
}


/* Cacher les messages d'erreur générés par Parsley */
.parsley-errors-list {
    display: none !important;
}

/* S'assurer que notre message d'erreur personnalisé est caché par défaut */
.invalid-feedback {
    display: none !important;
}

/* Afficher uniquement notre message personnalisé lorsque le champ est invalide */
.is-invalid + .invalid-feedback,
.is-invalid ~ .invalid-feedback {
    display: block !important;
}
