/* Cookie Consent Banner - Conforme TCF v2.2 */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 9999;
  display: none;
  animation: slideUp 0.3s ease-out;
}

.cookie-consent-banner.show {
  display: block;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cookie-consent-text {
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-consent-text a {
  color: #0066cc;
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-consent-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.cookie-consent-btn-accept {
  background: #28a745;
  color: white;
}

.cookie-consent-btn-accept:hover {
  background: #218838;
}

.cookie-consent-btn-reject {
  background: #dc3545;
  color: white;
}

.cookie-consent-btn-reject:hover {
  background: #c82333;
}

.cookie-consent-btn-settings {
  background: #6c757d;
  color: white;
}

.cookie-consent-btn-settings:hover {
  background: #5a6268;
}

/* Dark mode support */
[data-theme="dark"] .cookie-consent-banner {
  background: #2c2c2c;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .cookie-consent-text {
  color: #e0e0e0;
}

[data-theme="dark"] .cookie-consent-text a {
  color: #66b3ff;
}

/* Modal pour les paramètres */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-settings-modal.show {
  display: flex;
}

.cookie-settings-content {
  background: white;
  border-radius: 10px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

[data-theme="dark"] .cookie-settings-content {
  background: #2c2c2c;
  color: #e0e0e0;
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cookie-settings-header h3 {
  margin: 0;
  color: #333;
}

[data-theme="dark"] .cookie-settings-header h3 {
  color: #e0e0e0;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

[data-theme="dark"] .cookie-settings-close {
  color: #999;
}

.cookie-category {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
}

[data-theme="dark"] .cookie-category {
  background: #3a3a3a;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cookie-category-title {
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

[data-theme="dark"] .cookie-category-title {
  color: #e0e0e0;
}

.cookie-category-description {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

[data-theme="dark"] .cookie-category-description {
  color: #b0b0b0;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #28a745;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-consent-banner {
    padding: 15px;
  }

  .cookie-consent-buttons {
    flex-direction: column;
  }

  .cookie-consent-btn {
    width: 100%;
  }

  .cookie-settings-content {
    padding: 20px;
  }
}
