/* Bannière Cookies RGPD - Version COMPACTE et DISCRÈTE */

#cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(31, 41, 55, 0.98);
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  max-width: 380px;
  display: none;
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid rgba(255, 107, 53, 0.3);
}

#cookie-consent-banner[aria-hidden="false"] {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-text {
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

.cookie-text strong {
  color: #ffffff;
  font-weight: 600;
}

.cookie-text a {
  color: #60a5fa;
  text-decoration: underline;
}

.cookie-text a:hover {
  color: #93c5fd;
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  flex: 1;
  min-width: 90px;
}

.cookie-btn-accept {
  background: #10b981;
  color: white;
}

.cookie-btn-accept:hover {
  background: #059669;
}

.cookie-btn-refuse {
  background: #ef4444;
  color: white;
}

.cookie-btn-refuse:hover {
  background: #dc2626;
}

.cookie-btn-customize {
  background: #6b7280;
  color: white;
}

.cookie-btn-customize:hover {
  background: #4b5563;
}

/* Panneau personnalisation - Version compacte */
#cookie-customize-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#cookie-customize-panel[aria-hidden="false"] {
  display: flex;
}

#cookie-customize-panel > div {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-customize-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.cookie-customize-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.cookie-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.cookie-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.cookie-option {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-option:last-of-type {
  border-bottom: none;
}

.cookie-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-option-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}

.cookie-option-required {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 500;
  background: #d1fae5;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.cookie-option-description {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
}

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

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

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #10b981;
}

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

.cookie-customize-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  #cookie-consent-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 0.875rem 1rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    min-width: 0;
  }
  
  #cookie-customize-panel > div {
    padding: 1.25rem;
  }
  
  .cookie-customize-title {
    font-size: 1.125rem;
  }
}
