/* Studio Nord Frame — CookieYes-like consent UX (Loi 25)
   Intentionally light theme to match francisdenis.com / CookieYes Lite — not the dark studio theme. */

:root {
  --snf-cky-blue: #1e6adb;
  --snf-cky-blue-hover: #1557c0;
  --snf-cky-text: #212121;
  --snf-cky-muted: #4c4c4c;
  --snf-cky-border: #d9d9d9;
  --snf-cky-bg: #ffffff;
  --snf-cky-shadow: 0 -2px 16px rgba(0, 0, 0, 0.12);
  --snf-cky-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html.snf-cky-lock,
html.snf-cky-lock body {
  overflow: hidden;
}

#snf-cky-root {
  font-family: var(--snf-cky-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--snf-cky-text);
  z-index: 999999;
}

#snf-cky-root *,
#snf-cky-root *::before,
#snf-cky-root *::after {
  box-sizing: border-box;
}

/* —— Banner bar (bottom) —— */
.snf-cky-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000;
  background: var(--snf-cky-bg);
  color: var(--snf-cky-text);
  box-shadow: var(--snf-cky-shadow);
  border-top: 1px solid var(--snf-cky-border);
  padding: 18px 20px;
}

.snf-cky-banner[hidden] {
  display: none !important;
}

.snf-cky-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.snf-cky-banner-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.snf-cky-banner-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--snf-cky-text);
}

.snf-cky-banner-desc {
  margin: 0;
  font-size: 14px;
  color: var(--snf-cky-muted);
  max-width: 62rem;
}

.snf-cky-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 1 auto;
}

/* —— Buttons —— */
.snf-cky-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 9px 16px;
  min-height: 40px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.snf-cky-btn:focus-visible {
  outline: 2px solid var(--snf-cky-blue);
  outline-offset: 2px;
}

.snf-cky-btn-outline {
  background: #fff;
  color: var(--snf-cky-blue);
  border: 2px solid var(--snf-cky-blue);
}

.snf-cky-btn-outline:hover {
  background: rgba(30, 106, 219, 0.06);
}

.snf-cky-btn-primary {
  background: var(--snf-cky-blue);
  color: #fff;
  border: 2px solid var(--snf-cky-blue);
}

.snf-cky-btn-primary:hover {
  background: var(--snf-cky-blue-hover);
  border-color: var(--snf-cky-blue-hover);
}

.snf-cky-chevron {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.snf-cky-btn-customize .snf-cky-chevron {
  transform: rotate(0deg);
}

/* —— Preference center —— */
.snf-cky-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.snf-cky-overlay[hidden] {
  display: none !important;
}

.snf-cky-modal {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  background: #fff;
  color: var(--snf-cky-text);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.snf-cky-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #eee;
}

.snf-cky-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  padding-right: 8px;
}

.snf-cky-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  color: #666;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin: -4px -4px 0 0;
}

.snf-cky-modal-close:hover {
  color: #111;
}

.snf-cky-modal-body {
  padding: 14px 20px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.snf-cky-modal-intro {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--snf-cky-muted);
}

.snf-cky-modal-privacy {
  margin: 0 0 14px;
  font-size: 13.5px;
}

.snf-cky-modal-privacy a {
  color: var(--snf-cky-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.snf-cky-cat {
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  margin-bottom: 10px;
  background: #fafafa;
}

.snf-cky-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.snf-cky-cat-toggle {
  appearance: none;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--snf-cky-text);
  cursor: pointer;
  text-align: left;
  flex: 1 1 auto;
}

.snf-cky-cat-chevron {
  display: inline-flex;
  color: #666;
  transition: transform 0.15s ease;
}

.snf-cky-cat-toggle[aria-expanded="true"] .snf-cky-cat-chevron {
  transform: rotate(180deg);
}

.snf-cky-cat-desc {
  margin: 0;
  padding: 0 12px 12px 34px;
  font-size: 13px;
  color: var(--snf-cky-muted);
}

.snf-cky-cat-desc[hidden] {
  display: none !important;
}

/* Toggle switch */
.snf-cky-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.snf-cky-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.snf-cky-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 22px;
  background: #c5c5c5;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.snf-cky-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.snf-cky-toggle-input:checked + .snf-cky-toggle {
  background: var(--snf-cky-blue);
}

.snf-cky-toggle-input:checked + .snf-cky-toggle::after {
  transform: translateX(18px);
}

.snf-cky-toggle-input:focus-visible + .snf-cky-toggle {
  outline: 2px solid var(--snf-cky-blue);
  outline-offset: 2px;
}

.snf-cky-toggle-wrap.is-locked .snf-cky-toggle {
  background: var(--snf-cky-blue);
  opacity: 0.85;
  cursor: not-allowed;
}

.snf-cky-always-on {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
}

.snf-cky-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
  border-top: 1px solid #eee;
  background: #fff;
}

/* —— Floating reopen button —— */
.snf-cky-reopen {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 999998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--snf-cky-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 106, 219, 0.45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.snf-cky-reopen:hover {
  background: var(--snf-cky-blue-hover);
  transform: scale(1.05);
}

.snf-cky-reopen:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.snf-cky-reopen[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .snf-cky-banner {
    padding: 14px 14px 16px;
  }

  .snf-cky-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .snf-cky-banner-actions .snf-cky-btn {
    flex: 1 1 calc(50% - 10px);
  }

  .snf-cky-banner-actions .snf-cky-btn-accept {
    flex: 1 1 100%;
  }

  .snf-cky-modal-footer {
    flex-direction: column-reverse;
  }

  .snf-cky-modal-footer .snf-cky-btn {
    width: 100%;
  }

  .snf-cky-always-on {
    display: none;
  }
}
