/* Bandeau cookies & préférences - LokiKit (RGPD / ePrivacy) */

#cookie-banner.cookie-banner {
  position: fixed;
  z-index: 10000;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--navy, #141a28);
  color: var(--cream, #f5f0e8);
  border-top: 1px solid color-mix(in srgb, var(--sage, #8fa88a) 35%, transparent);
  box-shadow: 0 -8px 32px rgba(20, 26, 40, 0.35);
  font-family: "DM Sans", system-ui, sans-serif;
}

#cookie-banner.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-inner {
  max-width: 1120px;
  margin-inline: auto;
}

.cookie-banner-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.cookie-banner-text {
  margin: 0;
  flex: 1 1 280px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--cream, #f5f0e8) 88%, transparent);
}

.cookie-banner-text a {
  color: var(--sage-light, #b5c4b0);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: #fff;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cookie-banner-actions button {
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

#cookie-accept-all {
  background: var(--sage, #8fa88a);
  color: var(--navy-dark, #0d1117);
  border: none;
}

#cookie-accept-all:hover {
  background: var(--sage-light, #b5c4b0);
}

#cookie-refuse-all,
#cookie-customize-toggle {
  background: transparent;
  color: var(--cream, #f5f0e8);
  border: 1px solid color-mix(in srgb, var(--cream, #f5f0e8) 35%, transparent);
}

#cookie-refuse-all:hover,
#cookie-customize-toggle:hover {
  background: color-mix(in srgb, #fff 8%, transparent);
}

#cookie-save-preferences {
  background: var(--sage, #8fa88a);
  color: var(--navy-dark, #0d1117);
  border: none;
}

.cookie-banner-prefs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--cream, #f5f0e8) 15%, transparent);
}

.cookie-banner-prefs[hidden] {
  display: none !important;
}

.cookie-pref-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--cream, #f5f0e8) 10%, transparent);
}

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

.cookie-pref-item label {
  flex: 1;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cookie-pref-item strong {
  display: block;
  margin-bottom: 4px;
}

.cookie-pref-item span {
  color: color-mix(in srgb, var(--cream, #f5f0e8) 75%, transparent);
  font-size: 0.82rem;
}

.cookie-pref-item input:disabled + label {
  opacity: 0.85;
  cursor: default;
}

.cookie-pref-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--sage, #8fa88a) 25%, transparent);
  color: var(--sage-light, #b5c4b0);
  flex-shrink: 0;
}

/* Zones bloquées sans consentement */
.consent-blocked {
  position: relative;
}

.consent-blocked-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  background: color-mix(in srgb, var(--navy, #141a28) 6%, #f5f0e8);
  border: 1px dashed color-mix(in srgb, var(--navy, #141a28) 25%, transparent);
  border-radius: 8px;
  min-height: 120px;
}

.consent-blocked-overlay button {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  background: var(--sage, #8fa88a);
  color: var(--navy-dark, #0d1117);
  border: none;
  font-family: inherit;
}

.consent-form-notice {
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  background: color-mix(in srgb, var(--navy, #141a28) 8%, #fff);
  border-left: 3px solid var(--sage, #8fa88a);
  border-radius: 4px;
}

.consent-form-notice[hidden] {
  display: none !important;
}

.consent-form-notice button {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  background: var(--sage, #8fa88a);
  color: var(--navy-dark, #0d1117);
  border: none;
  font-family: inherit;
}

.g-recaptcha.consent-hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions button {
    flex: 1 1 auto;
    min-width: 0;
  }
}
