/* Consentement cookies : bannière et préférences (DA V4 Ambre). Chargé sur toutes les pages de dist/. */
.ck-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: #14110f; color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 -16px 50px -24px rgba(12, 12, 13, .6);
  animation: ck-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
.ck-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 14px calc(14px + env(safe-area-inset-bottom)); }
.ck-banner__text { color: rgba(255, 255, 255, .72); max-width: 720px; }
.ck-banner__text a, .ck-dialog a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.ck-banner__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.ck-banner__actions .ck-link { margin-right: 10px; }

.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid #fff; background: #fff; color: #0c0c0d; cursor: pointer; font: inherit;
  transition: background-color .2s ease, border-color .2s ease;
}
.ck-btn:hover { background: rgba(255, 255, 255, .88); }
.ck-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.ck-btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }
.ck-link { background: none; border: 0; padding: 10px 0; color: rgba(255, 255, 255, .65); cursor: pointer; font: inherit; }
.ck-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.ck-btn:focus-visible, .ck-link:focus-visible, .ck-switch:focus-visible, .ck-dialog__close:focus-visible {
  outline: 2px solid #e8a33d; outline-offset: 2px;
}
.ck-muted { color: rgba(255, 255, 255, .55); }

/* Préférences */
.ck-dialog { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ck-dialog__overlay { position: absolute; inset: 0; border: 0; background: rgba(12, 12, 13, .7); cursor: pointer; animation: ck-fade .3s ease both; }
.ck-dialog__panel {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: calc(100svh - 48px);
  overflow: auto; overscroll-behavior: contain; border-radius: 20px; background: #14110f; color: #fff;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 32px 90px -28px rgba(0, 0, 0, .85);
  animation: ck-in .4s cubic-bezier(.2, .8, .2, 1) both;
}
.ck-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 28px 22px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ck-dialog__head .ck-muted { margin-top: 8px; max-width: 46ch; }
.ck-dialog__close { flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .6); font-size: 26px; line-height: 1; cursor: pointer; }
.ck-dialog__close:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ck-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 28px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.ck-row:last-child { border-bottom: 0; }
.ck-row__text { display: flex; flex-direction: column; gap: 6px; }
.ck-row__always { flex: none; margin-top: 2px; }
.ck-switch {
  position: relative; flex: none; width: 44px; height: 26px; margin-top: 2px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); transition: background-color .25s ease, border-color .25s ease;
}
.ck-switch__knob { position: absolute; top: 50%; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .65); transform: translateY(-50%); transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .25s ease; }
.ck-switch[aria-checked="true"] { background: #e8a33d; border-color: #e8a33d; }
.ck-switch[aria-checked="true"] .ck-switch__knob { transform: translate(18px, -50%); background: #14110f; }
.ck-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .02); }
.ck-dialog__links { display: flex; gap: 20px; }

/* Lien « Gérer les cookies » du pied de page : même apparence que les liens voisins (.footer__legal a) */
.footer [data-cookie-settings] { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; color: rgba(255, 255, 255, .62); transition: color .2s ease; }
.footer [data-cookie-settings]:hover { color: #fff; }
.footer [data-cookie-settings]:focus-visible { outline: 2px solid #e8a33d; outline-offset: 3px; }
@media (max-width: 640px) { .footer [data-cookie-settings] { padding-block: 6px; } }

html.ck-open { overflow: hidden; }

@media (max-width: 760px) {
  .ck-banner__inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .ck-banner__actions { flex-wrap: wrap; }
  .ck-banner__actions .ck-link { margin-right: auto; }
  .ck-banner__actions .ck-btn { flex: 1; }
  .ck-dialog { padding: 0; align-items: flex-end; }
  .ck-dialog__panel { max-width: none; max-height: 92svh; border-radius: 20px 20px 0 0; }
  .ck-dialog__head, .ck-row, .ck-dialog__foot { padding-inline: 20px; }
  .ck-dialog__foot { flex-direction: column; align-items: stretch; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .ck-dialog__links { justify-content: space-between; }
}
/* Mobile : le bouton de contact fixe reste au-dessus de la bannière */
@media (max-width: 640px) {
  .has-ck-banner .m-sticky { bottom: calc(12px + env(safe-area-inset-bottom) + var(--ck-h, 0px)); }
}

@keyframes ck-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes ck-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ck-banner, .ck-dialog__panel, .ck-dialog__overlay { animation: none; }
  .ck-switch, .ck-switch__knob { transition: none; }
}
