/* Container du Tiroir Latéral */
#cookie-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cookie-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

#cookie-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 460px;
  height: 100vh;
  background: #12141a;
  color: #e2e8f0;
  z-index: 99999;
  box-shadow: -5px 0 25px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, sans-serif;
}

#cookie-drawer.active {
  transform: translateX(0);
}

/* Header & Animations */
.cookie-header {
  padding: 20px;
  border-bottom: 1px solid #2d3748;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-icon-animated {
  font-size: 28px;
  animation: floatIcon 2.5s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(8deg); }
}

.cookie-title-animated {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 3s linear infinite;
}

@keyframes shineText {
  to { background-position: 200% center; }
}

/* Corps du Tiroir */
.cookie-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.cookie-intro {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Accordéons / Catégories */
.cookie-accordion {
  border: 1px solid #2d3748;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #1a1d24;
  overflow: hidden;
}

.cookie-accordion summary {
  padding: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.cookie-accordion-content {
  padding: 14px;
  border-top: 1px solid #2d3748;
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* Switch Toggle (Classes isolées pour éviter les conflits) */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #475569;
  transition: 0.3s;
  border-radius: 22px;
}

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

input:checked + .cookie-toggle-slider { background-color: #6366f1; }
input:checked + .cookie-toggle-slider:before { transform: translateX(20px); }

/* Filtre des Partenaires */
.cookie-vendor-search {
  width: 100%;
  padding: 10px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #fff;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.cookie-vendor-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cookie-vendor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #0f172a;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Boutons CNIL */
.cookie-footer {
  padding: 20px;
  border-top: 1px solid #2d3748;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-cnil-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cookie-btn {
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.cookie-btn-accept, .cookie-btn-refuse {
  background: #334155;
  color: #ffffff;
  border: 2px solid #6366f1;
}

.cookie-btn-accept:hover, .cookie-btn-refuse:hover {
  background: #6366f1;
  color: #ffffff;
}

.cookie-btn-save {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  width: 100%;
}

.cookie-btn-save:hover {
  color: #fff;
  border-color: #94a3b8;
}
