/* ZeLift CMP — style site (Capriola / violet #652e71 / boutons type ZeLift) */
#zl-cmp {
  --zl-cmp-brand: rgb(101, 46, 113);
  --zl-cmp-brand-dark: #4a2154;
  --zl-cmp-ink: #202020;
  --zl-cmp-muted: #666;
  --zl-cmp-line: rgba(101, 46, 113, 0.18);
  --zl-cmp-bg: #fff;
  --zl-cmp-soft: rgba(101, 46, 113, 0.06);
  font-family: 'Roboto', sans-serif;
  /* couche viewport au-dessus de TOUT le site (header sticky, smart city, etc.) */
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483646 !important;
  pointer-events: none;
  display: block;
}

#zl-cmp[hidden] {
  display: none !important;
}

#zl-cmp-prefs[hidden],
#zl-cmp-overlay[hidden],
#zl-cmp-reopen[hidden] {
  display: none !important;
}

#zl-cmp-banner {
  position: fixed !important;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 880px;
  margin: 0 auto;
  background: var(--zl-cmp-bg);
  color: var(--zl-cmp-ink);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(32, 12, 40, 0.28);
  border-top: 4px solid var(--zl-cmp-brand);
  padding: 22px 24px 18px;
  display: grid;
  gap: 16px;
  z-index: 2147483647 !important;
  pointer-events: auto;
}

#zl-cmp-banner .zl-cmp-kicker {
  display: inline-block;
  font-family: 'Capriola', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--zl-cmp-brand);
  margin-bottom: 6px;
}

#zl-cmp-banner h2,
#zl-cmp-prefs h2 {
  margin: 0 0 8px;
  font-family: 'Capriola', sans-serif;
  font-size: 22px;
  line-height: 1.3;
  color: rgb(101, 46, 113);
  text-align: left;
}

#zl-cmp-banner p,
#zl-cmp-prefs p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--zl-cmp-muted);
  text-align: left;
}

#zl-cmp-banner a,
#zl-cmp-prefs a {
  color: rgb(101, 46, 113);
  text-decoration: underline;
}

#zl-cmp-banner .zl-cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

#zl-cmp-banner .zl-cmp-btn,
#zl-cmp-prefs .zl-cmp-btn,
#zl-cmp-reopen {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Capriola', sans-serif;
  font-size: 13px;
  font-weight: normal;
  padding: 12px 18px;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#zl-cmp-banner .zl-cmp-btn--ghost,
#zl-cmp-prefs .zl-cmp-btn--ghost {
  background: #fff;
  color: rgb(101, 46, 113);
  border: 1px solid rgba(101, 46, 113, 0.35);
}

#zl-cmp-banner .zl-cmp-btn--ghost:hover,
#zl-cmp-prefs .zl-cmp-btn--ghost:hover {
  background: var(--zl-cmp-soft);
}

#zl-cmp-banner .zl-cmp-btn--soft,
#zl-cmp-prefs .zl-cmp-btn--soft {
  background: var(--zl-cmp-soft);
  color: var(--zl-cmp-brand-dark);
  border: 1px solid transparent;
}

#zl-cmp-banner .zl-cmp-btn--soft:hover,
#zl-cmp-prefs .zl-cmp-btn--soft:hover {
  background: rgba(101, 46, 113, 0.12);
}

#zl-cmp-banner .zl-cmp-btn--primary,
#zl-cmp-prefs .zl-cmp-btn--primary {
  background: rgb(101, 46, 113);
  color: #fff;
}

#zl-cmp-banner .zl-cmp-btn--primary:hover,
#zl-cmp-prefs .zl-cmp-btn--primary:hover {
  background: #4a2154;
}

#zl-cmp-overlay {
  position: fixed !important;
  inset: 0;
  background: rgba(32, 12, 40, 0.5);
  z-index: 2147483646 !important;
  pointer-events: auto;
}

#zl-cmp-prefs {
  position: fixed !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 24px));
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--zl-cmp-bg);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(24, 10, 30, 0.35);
  z-index: 2147483647 !important;
  border-top: 4px solid var(--zl-cmp-brand);
  pointer-events: auto;
}

#zl-cmp-prefs .zl-cmp-prefs-head {
  position: sticky;
  top: 0;
  background: var(--zl-cmp-bg);
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--zl-cmp-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  z-index: 2;
}

#zl-cmp-prefs .zl-cmp-close {
  width: 36px;
  height: 36px;
  border-radius: 2px;
  border: 1px solid var(--zl-cmp-line);
  background: var(--zl-cmp-soft);
  color: var(--zl-cmp-brand);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: inherit;
}

#zl-cmp-prefs .zl-cmp-body {
  padding: 8px 20px 18px;
}

.zl-cmp-cat {
  border: 1px solid var(--zl-cmp-line);
  border-radius: 4px;
  margin: 10px 0;
  overflow: hidden;
  background: #fff;
}

.zl-cmp-cat summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  user-select: none;
}

.zl-cmp-cat summary::-webkit-details-marker { display: none; }

.zl-cmp-cat summary .zl-cmp-cat-text { flex: 1; min-width: 0; }

.zl-cmp-cat summary strong {
  display: block;
  font-family: 'Capriola', sans-serif;
  font-size: 14px;
  color: rgb(101, 46, 113);
  margin-bottom: 3px;
}

.zl-cmp-cat summary span {
  display: block;
  font-size: 12px;
  color: var(--zl-cmp-muted);
  line-height: 1.45;
}

.zl-cmp-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

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

.zl-cmp-switch i {
  position: absolute;
  inset: 0;
  background: #d7cfe0;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.zl-cmp-switch i:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.zl-cmp-switch input:checked + i {
  background: rgb(101, 46, 113);
}

.zl-cmp-switch input:checked + i:before {
  transform: translateX(20px);
}

.zl-cmp-switch input:disabled + i {
  opacity: 0.85;
  background: rgb(101, 46, 113);
}

.zl-cmp-partners {
  padding: 0 14px 14px;
  border-top: 1px solid var(--zl-cmp-line);
  background: var(--zl-cmp-soft);
}

.zl-cmp-partners h4 {
  margin: 12px 0 8px;
  font-family: 'Capriola', sans-serif;
  font-size: 12px;
  color: rgb(101, 46, 113);
}

.zl-cmp-partner {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid rgba(101, 46, 113, 0.1);
}

.zl-cmp-partner:first-of-type { border-top: 0; }

.zl-cmp-partner strong {
  font-size: 13px;
  color: #202020;
}

.zl-cmp-partner span,
.zl-cmp-partner a {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.zl-cmp-prefs-foot {
  position: sticky;
  bottom: 0;
  background: var(--zl-cmp-bg);
  border-top: 1px solid var(--zl-cmp-line);
  padding: 12px 20px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#zl-cmp-reopen {
  position: fixed !important;
  left: 12px;
  bottom: 12px;
  z-index: 2147483645 !important;
  background: rgb(101, 46, 113);
  color: #fff;
  box-shadow: 0 6px 18px rgba(42, 18, 48, 0.25);
  pointer-events: auto;
}

#zl-cmp-reopen:hover {
  background: #4a2154;
}

@media (max-width: 640px) {
  #zl-cmp-banner {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    border-radius: 8px 8px 0 0;
    padding: 18px 16px 16px;
  }
  #zl-cmp-banner h2 { font-size: 18px; }
  #zl-cmp-banner .zl-cmp-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  #zl-cmp-banner .zl-cmp-btn { width: 100%; text-align: center; }
  #zl-cmp-prefs {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 92vh;
    transform: none;
    border-radius: 8px 8px 0 0;
  }
}
