/* Stylisation de la bannière de cookies */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 0; /* Positionne à gauche */
  right: 0; /* Positionne à droite */
  margin: 0 20px; /* Ajoute 20px de marge à gauche et à droite */
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px; /* Garde l'espacement interne */
  box-sizing: border-box;
  z-index: 9999;
  display: flex;
  justify-content: center; /* Centre le contenu à l'intérieur de la bannière */
  align-items: center;
  border-radius: 8px;
  opacity: 0;
  animation: slideIn 0.5s forwards;
  max-width: calc(100% - 40px); /* Pour assurer qu'il reste à l'intérieur du viewport */
}



/* Encapsulation des boutons dans une div avec la classe "cookiebutton" */
.cookiebutton {
    display: flex;
    justify-content: flex-end;
    gap: 10px; /* Espacement entre les boutons */
    flex-wrap: wrap; /* Pour gérer l'affichage sur mobile */
}

/* Animations pour la bannière */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Lien "En savoir plus" et autres liens */
.cookie-banner a {
  color: #29778f;
  text-decoration: none;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.cookie-banner a:before {
    display: block;
    content: '';
    width: 0;
    height: 2px;
    left: 50%;
    position: absolute;
    bottom: 0;
    background: #29778f;
    transition: width 0.3s ease-in-out;
    transform: translateX(-50%);
}

.cookie-banner a:hover:before {
    width: 100%;
}

.cookie-banner p {
  margin: 0 !important;
  text-align: left;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Style des boutons */
.cookie-banner button {
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-banner button.accept-cookies {
    background-color: #4caf50;
    border: 2px solid #4caf50;
}

.cookie-banner button.decline-cookies {
    background-color: #f44336;
    border: 2px solid #f44336;
}

.cookie-banner button:hover {
    background-color: transparent;
}

.cookie-banner button.accept-cookies:hover {
    color: #4caf50;
}

.cookie-banner button.decline-cookies:hover {
    color: #f44336;
}

/* Responsive design: ajustements pour les petits écrans */
@media (max-width: 1399px) {
.cookie-banner {
flex-direction: column;
}
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column; /* Empile le contenu en colonne sur les petits écrans */
        padding: 15px;
    }

    .cookie-banner p {
        text-align: center;
        margin-bottom: 15px;
    }

    .cookiebutton {
        justify-content: center; /* Centre les boutons sur mobile */
    }
}

/* Style du message de remerciement */
.thank-you-message {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10000;
    opacity: 0;
    text-align: center;
    animation: fadeIn 0.5s forwards;
}

/* Style du message de refus */
.decline-message {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10000;
    opacity: 0;
    text-align: center;
    animation: fadeIn 0.5s forwards;
}

/* Animation d'apparition et de disparition du message */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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