/* consent.css — thème via variables CSS (à surcharger dans :root) :
   --cc-bg, --cc-fg, --cc-muted, --cc-line, --cc-off, --cc-accent, --cc-accent-fg, --cc-radius */

.cc, .cc * { box-sizing: border-box; }
.cc { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--cc-fg, #1c1f23); }
.cc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cc-title { margin: 0 0 4px; font-weight: 650; font-size: 1rem; }
.cc-text { margin: 0; color: var(--cc-muted, #4f5864); }

/* Bandeau */
.cc-banner {
  position: fixed; z-index: 2147483000;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 880px; margin-inline: auto;
  display: grid; gap: 14px; padding: 16px;
  background: var(--cc-bg, #fff);
  border: 1px solid var(--cc-line, #d9dde3);
  border-radius: var(--cc-radius, 10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
@media (min-width: 720px) { .cc-banner { grid-template-columns: 1fr auto; align-items: center; } }

/* Boutons : refuser et accepter ont exactement le même poids visuel */
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-btn {
  flex: 1 1 auto; font: inherit; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border: 1px solid transparent;
  border-radius: calc(var(--cc-radius, 10px) - 2px);
}
.cc-btn-main { background: var(--cc-accent, #1f4e79); color: var(--cc-accent-fg, #fff); }
.cc-btn-save { background: transparent; color: inherit; border-color: var(--cc-off, #8a93a0); }
.cc-btn-link { background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cc-btn:focus-visible, .cc-switch:focus-visible { outline: 3px solid var(--cc-accent, #1f4e79); outline-offset: 2px; }

/* Fenêtre de préférences */
.cc-overlay {
  position: fixed; inset: 0; z-index: 2147483001;
  display: grid; place-items: center; padding: 16px;
  background: rgba(15, 18, 22, .55);
}
.cc-modal {
  width: 100%; max-width: 560px; max-height: 100%; overflow: auto;
  display: grid; gap: 14px; padding: 20px;
  background: var(--cc-bg, #fff);
  border-radius: var(--cc-radius, 10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.cc-modal:focus { outline: none; }
.cc-rows { border-top: 1px solid var(--cc-line, #d9dde3); }
.cc-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--cc-line, #d9dde3); cursor: pointer;
}
.cc-row-text { display: grid; gap: 2px; }
.cc-row-text span { color: var(--cc-muted, #4f5864); font-size: .9em; }

/* Interrupteur */
.cc-switch {
  appearance: none; flex: none; position: relative; margin: 2px 0 0;
  width: 42px; height: 24px; border-radius: 12px; cursor: pointer;
  background: var(--cc-off, #8a93a0); transition: background .15s;
}
.cc-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .15s;
}
.cc-switch:checked { background: var(--cc-accent, #1f4e79); }
.cc-switch:checked::after { transform: translateX(18px); }
.cc-switch:disabled { opacity: .6; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .cc-switch, .cc-switch::after { transition: none; } }
