/* ==========================================================================
   Consent Banner — RGPD/CNIL
   ========================================================================== */

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  pointer-events: none;
}

.consent-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.consent-banner-inner {
  width: 100%;
  padding: 10px 24px;
  background-color: #fff;
  color: var(--primary);
  border-top: 1px solid #e0e0e0;
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
}

/* ---------- Inline layout (tout sur une ligne) ---------- */

.consent-banner-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.consent-banner-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.consent-banner-description {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--primary);
  margin: 0;
  opacity: 0.8;
}

/* ---------- Actions ---------- */

.consent-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */

.consent-btn {
  border: none;
  color: var(--primary);
  background-color: #f0f0f0;
  padding: 4px 14px;
  border-radius: 60px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.consent-btn:hover {
  background-color: #ddd;
}

/* Lien dans la description */
.consent-link {
  color: inherit;
  text-underline-offset: 2px;
}

/* ---------- Details / Toggles ---------- */

.consent-banner-details {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
  margin-top: 0;
}

.consent-banner-details.is-open {
  max-height: 300px;
  opacity: 1;
  margin-top: 12px;
}

.consent-category {
  margin-bottom: 10px;
}

.consent-category:last-of-type {
  margin-bottom: 12px;
}

/* Toggle switch */
.consent-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.consent-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-toggle-slider {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  background-color: #ccc;
  border-radius: 10px;
  transition: background-color 0.25s ease;
}

.consent-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.consent-toggle input:checked + .consent-toggle-slider {
  background-color: #203C21;
}

.consent-toggle input:checked + .consent-toggle-slider::after {
  transform: translateX(16px);
}

.consent-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consent-toggle-label strong {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.consent-toggle-label small {
  font-size: 10px;
  font-weight: 400;
  color: #666;
}

/* Confirm actions row */
.consent-banner-actions-confirm {
  margin-top: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .consent-banner-inner {
    padding: 20px 20px 16px;
    border-top: 1px solid #e0e0e0;
  }

  .consent-banner-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .consent-banner-title {
    font-size: 13px;
    font-weight: 700;
  }

  .consent-banner-description {
    display: block;
    font-size: 12px;
    color: var(--primary);
    line-height: 1.5;
    white-space: normal;
    opacity: 0.8;
  }

  .consent-banner-actions {
    display: flex;
    gap: 10px;
    width: 100%;
  }

  .consent-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    border-radius: 60px;
    background-color: #f0f0f0;
    color: var(--primary);
    border: none;
  }

  .consent-banner-details.is-open {
    max-height: 350px;
  }
}
