/* =====================================================
   COOKIE POPUP - Styles dédiés
   ===================================================== */

/* Overlay sombre derrière la popup */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Popup principale */
.cookie-popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  max-width: 520px;
  width: calc(100% - 40px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-popup.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Header de la popup */
.cookie-popup-header {
  background: #0f3f0f;
  padding: 20px 24px;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-popup-header svg {
  color: #fff;
  flex-shrink: 0;
}

.cookie-popup-header h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Corps de la popup */
.cookie-popup-body {
  padding: 24px;
}

.cookie-popup-body p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Types de cookies */
.cookie-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cookie-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.cookie-type:hover {
  background: #f0f2f4;
}

.cookie-type-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-type-icon {
  width: 36px;
  height: 36px;
  background: #e8f5e9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f3f0f;
}

.cookie-type-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 2px 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.cookie-type-text span {
  font-size: 0.8rem;
  color: #777;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
}

.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.3s;
  border-radius: 26px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #0f3f0f;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background-color: #0f3f0f;
  opacity: 0.7;
  cursor: not-allowed;
}

/* Boutons d'action */
.cookie-popup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-btn-popup {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  text-decoration: none;
}

.cookie-btn-popup.accept {
  background: #0f3f0f;
  color: #fff;
}

.cookie-btn-popup.accept:hover {
  background: #0a2a0a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 63, 15, 0.3);
}

.cookie-btn-popup.refuse {
  background: #f1f3f4;
  color: #333;
  border: 1px solid #ddd;
}

.cookie-btn-popup.refuse:hover {
  background: #e8eaeb;
  border-color: #ccc;
}

.cookie-btn-popup.info {
  background: transparent;
  color: #0f3f0f;
  border: 2px solid #0f3f0f;
}

.cookie-btn-popup.info:hover {
  background: #0f3f0f;
  color: #fff;
}

/* Footer avec lien */
.cookie-popup-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  text-align: center;
}

.cookie-popup-footer a {
  color: #0f3f0f;
  font-size: 0.85rem;
  text-decoration: underline;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.cookie-popup-footer a:hover {
  color: #0a2a0a;
}

/* Responsive */
@media (max-width: 576px) {
  .cookie-popup {
    bottom: 20px;
    width: calc(100% - 30px);
    max-width: none;
  }

  .cookie-popup-header {
    padding: 16px 20px;
  }

  .cookie-popup-body {
    padding: 20px;
  }

  .cookie-popup-actions {
    flex-direction: column;
  }

  .cookie-btn-popup {
    min-width: 100%;
  }

  .cookie-type {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-toggle {
    align-self: flex-end;
  }
}
