/* Styles pour la bannière de cookies et le modal de préférences */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #7c5cff 0%, #4ea3ff 100%);
  color: white;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateY(100%);
  animation: slideUp 0.5s ease-out forwards;
  transition: transform 0.4s ease-in-out;
}

.cookie-banner.hiding {
  animation: slideDownSmooth 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

@keyframes slideDownSmooth {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner-text h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-banner-actions .btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.cookie-banner-actions .btn-primary {
  background: #fff;
  color: #7c5cff;
}

.cookie-banner-actions .btn-primary:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.cookie-banner-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-banner-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cookie-banner-actions .btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.cookie-banner-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modal de préférences */
.cookie-preferences-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.cookie-preferences-modal.hiding {
  animation: fadeOut 0.3s ease-in-out forwards;
}

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

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

.cookie-modal-content {
  background: #f0f0f3;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  animation: modalSlideIn 0.3s ease-out 0.1s forwards;
}

@keyframes modalSlideIn {
  to {
    transform: scale(1) translateY(0);
  }
}

.dark .cookie-modal-content {
  background: #0b0d10;
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 24px;
}

.dark .cookie-modal-header {
  border-bottom: 1px solid #43424e;
}

.cookie-modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.dark .cookie-modal-header h2 {
  color: #e8ecf1;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: #f8f9fa;
  color: #333;
}

.dark .btn-close {
  color: #9aa4b2;
}

.dark .btn-close:hover {
  background: #43424e;
  color: #e8ecf1;
}

.cookie-modal-body {
  padding: 0 24px;
}

.cookie-category {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
}

.dark .cookie-category {
  border: 1px solid #43424e;
  background: #312e3a5c;
}

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

.cookie-category-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.dark .cookie-category-header h3 {
  color: #e8ecf1;
}

.cookie-category p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.dark .cookie-category p {
  color: #9aa4b2;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

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

.cookie-toggle input:checked + .toggle-slider {
  background-color: #7c5cff;
}

.cookie-toggle input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.cookie-toggle input:disabled + .toggle-slider {
  background-color: #7c5cff;
  cursor: not-allowed;
}

.dark .toggle-slider {
  background-color: #43424e;
}

.dark .cookie-toggle input:checked + .toggle-slider {
  background-color: #7c5cff;
}

.dark .cookie-toggle input:disabled + .toggle-slider {
  background-color: #7c5cff;
}

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.dark .cookie-modal-footer {
  border-top: 1px solid #43424e;
  background: #312e3a5c;
}

.cookie-modal-footer .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.cookie-modal-footer .btn-primary {
  background: #7c5cff;
  color: white;
}

.cookie-modal-footer .btn-primary:hover {
  background: #6a4ce6;
  transform: translateY(-1px);
}

.cookie-modal-footer .btn-link {
  background: none;
  color: #7c5cff;
  text-decoration: underline;
}

.cookie-modal-footer .btn-link:hover {
  color: #6a4ce6;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .cookie-banner-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cookie-banner-actions .btn {
    flex: 1;
    min-width: 120px;
  }

  .cookie-modal-content {
    margin: 10px;
    max-height: 90vh;
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
