/* Bannière principale */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid #005CA9; /* Bordure bleue MIG_ELEC */
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #333;
  display: none;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cookie-banner-content {
  padding: 25px 0;
}

/* En-tête de la bannière */
.cookie-banner-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.cookie-banner-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #005CA9; /* Bleu MIG_ELEC */
}

.cookie-icon {
  font-size: 24px;
  color: #005CA9; /* Bleu MIG_ELEC au lieu du doré */
  margin-right: 12px;
}

/* Texte descriptif */
.cookie-banner-text {
  margin-bottom: 20px;
}

.cookie-banner-text p {
  margin: 0;
  line-height: 1.5;
  font-size: 16px;
}

/* Actions principales */
.cookie-banner-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cookie-details-trigger {
  cursor: pointer;
  color: #666;
  font-size: 15px;
  padding: 8px 0;
  display: flex;
  align-items: center;
}

.cookie-details-trigger i {
  margin-right: 8px;
  transition: transform 0.3s;
}

.cookie-details-trigger:hover {
  color: #005CA9; /* Bleu MIG_ELEC au survol */
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

/* Boutons */
.cookie-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  border: none;
  font-size: 15px;
}

.cookie-btn i {
  margin-right: 8px;
}

.cookie-accept-all {
  background-color: #005CA9; /* Bleu MIG_ELEC */
  color: white;
}

.cookie-accept-all:hover {
  background-color: #004c8c; /* Version plus foncée au survol */
}

.cookie-accept-necessary {
  background-color: #f1f1f1;
  color: #333;
  border: 1px solid #005CA9; /* Bordure bleue MIG_ELEC */
}

.cookie-accept-necessary:hover {
  background-color: #e3e3e3;
}

.cookie-save {
  background-color: #005CA9; /* Bleu MIG_ELEC */
  color: white;
  padding: 8px 15px;
}

.cookie-save:hover {
  background-color: #004c8c; /* Version plus foncée au survol */
}

/* Section détaillée */
.cookie-details {
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
  display: none;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.cookie-category {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.3s;
}

.cookie-category:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category-title {
  display: flex;
  align-items: center;
}

.cookie-category-title h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  margin-right: 10px;
  color: #005CA9; /* Texte en bleu MIG_ELEC */
}

.cookie-badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  font-weight: 600;
}

.cookie-badge.necessary {
  background-color: #005CA9; /* Bleu MIG_ELEC */
  color: white;
}

.cookie-category-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #666;
  margin-bottom: 10px;
}

/* Toggle switches */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: #005CA9; /* Bleu MIG_ELEC */
}

input:focus + .slider {
  box-shadow: 0 0 1px #005CA9; /* Bleu MIG_ELEC */
}

input:checked + .slider:before {
  transform: translateX(24px);
}

input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Liste des cookies */
.cookie-list-toggle {
  cursor: pointer;
  color: #005CA9; /* Bleu MIG_ELEC */
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background-color: #eef4f9; /* Bleu très clair */
  border-radius: 4px;
  margin-top: 5px;
  transition: background-color 0.2s;
}

.cookie-list-toggle:hover {
  background-color: #dce8f3; /* Version plus foncée au survol */
}

.cookie-list-toggle i {
  transition: transform 0.3s;
}

.cookie-list {
  display: none;
  margin-top: 10px;
  overflow-x: auto;
}

.cookie-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cookie-list table th,
.cookie-list table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.cookie-list table th {
  background-color: #eef4f9; /* Bleu très clair */
  font-weight: 600;
  color: #005CA9; /* Bleu MIG_ELEC */
}

.cookie-list table tr:last-child td {
  border-bottom: none;
}

/* Pied de page */
.cookie-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #e5e5e5;
}

.cookie-policy-link {
  color: #005CA9; /* Bleu MIG_ELEC */
  text-decoration: none;
  font-size: 14px;
}

.cookie-policy-link:hover {
  color: #004c8c; /* Version plus foncée au survol */
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .cookie-details-trigger {
    text-align: center;
    order: 2;
  }
  
  .cookie-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .cookie-footer {
    flex-direction: column;
    gap: 15px;
  }
  
  .cookie-action-buttons {
    width: 100%;
  }
  
  .cookie-save {
    width: 100%;
    justify-content: center;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner.show {
  animation: slideIn 0.5s forwards;
}

/* État actif */
.open .cookie-details {
  display: block;
}

.open .cookie-details-trigger i {
  transform: rotate(180deg);
}

.open-list i {
  transform: rotate(180deg);
}