/* ================= COOKIE CONSENT (okkio) ================= */
.cc-root {
  --cc-yellow: #e8f56a;
  --cc-bg: rgba(18,21,27,.97);
  --cc-text: #cfd3da;
  --cc-muted: #aab0ba;
  --cc-line: rgba(255,255,255,.08);
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2000;
  padding: 16px;
  pointer-events: none;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.cc-banner {
  max-width: 980px;
  margin: 0 auto;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  border-top: 2px solid var(--cc-yellow);
  border-radius: 1.25rem;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  padding: 22px 24px;
  color: var(--cc-text);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .35s ease, transform .35s ease;
}

.cc-root.cc-show { pointer-events: auto; }
.cc-root.cc-show .cc-banner { opacity: 1; transform: translateY(0); }
.cc-root:not(.cc-show) .cc-banner { visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }

.cc-title {
  color: var(--cc-yellow);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.cc-desc {
  font-size: .9rem;
  line-height: 1.55;
  margin: 0;
  color: var(--cc-text);
}
.cc-desc a { color: var(--cc-yellow); text-decoration: underline; }

/* Préférences */
.cc-prefs {
  margin-top: 16px;
  border-top: 1px solid var(--cc-line);
}
.cc-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cc-line);
  cursor: default;
  margin: 0;
}
label.cc-cat { cursor: pointer; }
.cc-cat strong { display: block; color: #fff; font-size: .92rem; font-weight: 600; }
.cc-cat span:not(.cc-switch):not(.cc-slider):not(.cc-always) { display: block; color: var(--cc-muted); font-size: .82rem; margin-top: 2px; }
.cc-always { color: var(--cc-yellow); font-size: .8rem; font-weight: 600; white-space: nowrap; }

/* Switch */
.cc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  transition: background .2s ease;
  pointer-events: none;
}
.cc-slider::before {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
}
.cc-switch input:checked + .cc-slider { background: var(--cc-yellow); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); background: #0b0d10; }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid var(--cc-yellow); outline-offset: 2px; }

/* Boutons – "Refuser" aussi visible que "Accepter" (exigence APD) */
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.cc-btn {
  border-radius: 999px;
  padding: 10px 22px;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cc-btn:focus-visible { outline: 2px solid var(--cc-yellow); outline-offset: 2px; }
.cc-btn-primary { background: var(--cc-yellow); color: #0b0d10; border: 1px solid var(--cc-yellow); }
.cc-btn-primary:hover { background: #f1fa98; }
.cc-btn-outline { background: transparent; color: var(--cc-yellow); border: 1px solid var(--cc-yellow); }
.cc-btn-outline:hover { background: rgba(232,245,106,.12); }
.cc-btn-ghost { background: transparent; color: var(--cc-text); border: 1px solid transparent; text-decoration: underline; text-underline-offset: 3px; margin-right: auto; }
.cc-btn-ghost:hover { color: #fff; }
.cc-btn[hidden] { display: none; }

@media (max-width: 575.98px) {
  .cc-root { padding: 10px; }
  .cc-banner { padding: 18px 16px; border-radius: 1rem; max-height: calc(100vh - 20px); overflow-y: auto; }
  .cc-actions { flex-direction: column-reverse; align-items: stretch; }
  .cc-btn { width: 100%; text-align: center; }
  .cc-btn-ghost { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-slider, .cc-slider::before { transition: none; }
}
