/* Style du bouton de soumission */
#searchButton {
    padding: 10px 20px;
    border: none;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 1; /* Pour s'assurer que le spinner ne le recouvre pas */
}

/* Style lorsque le bouton est désactivé */
#searchButton:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Style du loader */
.loader {
    display: none; /* Masqué par défaut */
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top: 3px solid #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: calc(100% + 10px); /* Positionnement à droite du bouton */
    transform: translateY(-50%);
	z-index : 2;
}

/* Animation de rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Affichage du loader */
#searchButton.loading + .loader {
    display: block;
}

/* */
/* Style du bouton de soumission */
#searchButton {
    padding: 10px 20px;
    border: none;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 1; /* Le bouton doit rester derrière le spinner */
}

/* Style lorsque le bouton est désactivé */
#searchButton:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Style du loader */
.loader {
    display: none; /* Masqué par défaut */
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top: 3px solid #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%; /* Centré au milieu du bouton */
    transform: translate(-50%, -50%); /* Pour ajuster le spinner au centre */
    z-index: 2; /* Le spinner doit être devant le bouton */
}

/* Animation de rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Affichage du loader */
#searchButton.loading + .loader {
    display: block;
}

