/* Site Créativ’ — gestion du consentement */
:root {
  --sc-cookie-navy: #031119;
  --sc-cookie-blue: #0b5f87;
  --sc-cookie-orange: #0876a6;
  --sc-cookie-ink: #122632;
  --sc-cookie-muted: #5b6d77;
  --sc-cookie-surface: #ffffff;
  --sc-cookie-line: #dbe5ea;
}

.sc-cookie-banner,
.sc-cookie-modal,
.sc-cookie-manage {
  font-family: "Poppins", Arial, sans-serif;
}

.sc-cookie-banner[hidden],
.sc-cookie-modal[hidden],
.sc-cookie-manage[hidden] {
  display: none !important;
}

.sc-cookie-banner {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  z-index: 2147483000;
  max-width: 980px;
  margin-inline: auto;
  color: var(--sc-cookie-ink);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(11, 95, 135, 0.18);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(3, 17, 25, 0.28);
  overflow: hidden;
  animation: sc-cookie-rise 280ms ease-out both;
}

.sc-cookie-banner::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--sc-cookie-blue), var(--sc-cookie-orange));
}

.sc-cookie-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 24px 24px;
}

.sc-cookie-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--sc-cookie-blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sc-cookie-banner__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sc-cookie-orange);
  box-shadow: 0 0 0 5px rgba(8, 118, 166, 0.16);
}

.sc-cookie-banner h2,
.sc-cookie-modal h2 {
  margin: 0 0 7px;
  color: var(--sc-cookie-navy);
  font-family: "Sora", "Poppins", Arial, sans-serif;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.sc-cookie-banner p,
.sc-cookie-modal p {
  margin: 0;
  color: var(--sc-cookie-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.sc-cookie-banner a,
.sc-cookie-modal a {
  color: var(--sc-cookie-blue);
  font-weight: 700;
  text-underline-offset: 3px;
}

.sc-cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 9px;
  min-width: 300px;
}

.sc-cookie-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sc-cookie-button:hover {
  transform: translateY(-1px);
}

.sc-cookie-button:focus-visible,
.sc-cookie-manage:focus-visible,
.sc-cookie-switch input:focus-visible + span,
.sc-cookie-modal__close:focus-visible {
  outline: 3px solid rgba(11, 95, 135, 0.35);
  outline-offset: 3px;
}

.sc-cookie-button--accept,
.sc-cookie-button--reject {
  box-shadow: 0 8px 20px rgba(3, 17, 25, 0.12);
}

.sc-cookie-button--accept {
  color: var(--sc-cookie-navy);
  background: var(--sc-cookie-orange);
  border-color: var(--sc-cookie-orange);
}

.sc-cookie-button--reject {
  color: #ffffff;
  background: var(--sc-cookie-navy);
  border-color: var(--sc-cookie-navy);
}

.sc-cookie-button--settings {
  grid-column: 1 / -1;
  color: var(--sc-cookie-blue);
  background: #f5fafc;
  border-color: rgba(11, 95, 135, 0.26);
}

.sc-cookie-manage {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147482990;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  color: #ffffff;
  background: var(--sc-cookie-navy);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(3, 17, 25, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.sc-cookie-manage__icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: var(--sc-cookie-navy);
  background: var(--sc-cookie-orange);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
}

.sc-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483010;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 17, 25, 0.72);
  backdrop-filter: blur(5px);
}

.sc-cookie-modal__panel {
  width: min(100%, 680px);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  color: var(--sc-cookie-ink);
  background: var(--sc-cookie-surface);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(3, 17, 25, 0.38);
}

.sc-cookie-modal__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--sc-cookie-line);
}

.sc-cookie-modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--sc-cookie-navy);
  background: #edf4f7;
  border: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.sc-cookie-modal__body {
  padding: 22px 26px 26px;
}

.sc-cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--sc-cookie-line);
}

.sc-cookie-category:first-child {
  padding-top: 0;
}

.sc-cookie-category h3 {
  margin: 0 0 5px;
  color: var(--sc-cookie-navy);
  font-size: 0.96rem;
  font-weight: 800;
}

.sc-cookie-category__status {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--sc-cookie-blue);
  background: #eaf5f9;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.sc-cookie-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
}

.sc-cookie-switch input {
  position: absolute;
  opacity: 0;
}

.sc-cookie-switch span {
  position: absolute;
  inset: 0;
  background: #c9d5db;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
}

.sc-cookie-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(3, 17, 25, 0.24);
  transition: transform 160ms ease;
}

.sc-cookie-switch input:checked + span {
  background: var(--sc-cookie-blue);
}

.sc-cookie-switch input:checked + span::after {
  transform: translateX(22px);
}

.sc-cookie-switch input:disabled + span {
  background: var(--sc-cookie-orange);
  cursor: not-allowed;
}

.sc-cookie-modal__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.sc-cookie-modal__note {
  margin-top: 16px !important;
  font-size: 0.76rem !important;
}

@keyframes sc-cookie-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .sc-cookie-banner {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    border-radius: 18px;
  }

  .sc-cookie-banner__inner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .sc-cookie-actions {
    min-width: 0;
    width: 100%;
  }

  .sc-cookie-button {
    padding-inline: 10px;
  }

  .sc-cookie-manage {
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
  }

  .sc-cookie-modal {
    align-items: end;
    padding: 0;
  }

  .sc-cookie-modal__panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .sc-cookie-modal__header,
  .sc-cookie-modal__body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .sc-cookie-modal__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .sc-cookie-actions {
    grid-template-columns: 1fr;
  }

  .sc-cookie-button--settings {
    grid-column: auto;
  }

  .sc-cookie-manage__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sc-cookie-manage {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-cookie-banner,
  .sc-cookie-button,
  .sc-cookie-switch span,
  .sc-cookie-switch span::after {
    animation: none;
    transition: none;
  }
}
