/* ══════════════════════════════════════════════════════════════
   cookie-banner.css — Bannière de consentement cookies
   Palette : or/djc-cta · slide-up depuis le bas
   ══════════════════════════════════════════════════════════════ */

#cookie-banner {
  position: fixed;
  bottom: clamp(12px, 2vw, 20px);
  left: clamp(1rem, 4vw, 3rem);
  right: clamp(1rem, 4vw, 3rem);
  z-index: 9999;
  pointer-events: none;
  /* Slide-up à l'affichage */
  transform: translateY(calc(100% + 40px));
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

#cookie-banner.is-visible {
  transform: translateY(0);
  pointer-events: all;
}

/* ── Carte intérieure ─────────────────────────────────────────── */
.ck-inner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px 24px 16px;
  display: flex;
  align-items: center;
  gap: 20px;

  background: linear-gradient(
    135deg,
    #6b4e0e 0%,
    #9a7020 20%,
    #c4a052 42%,
    #d4a843 58%,
    #e8bc52 72%,
    #c4a052 88%,
    #9a7020 100%
  );
  box-shadow:
    0 -8px 40px rgba(184, 136, 42, 0.38),
    0 -2px 12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(196, 160, 82, 0.35);
}

/* Texture noise (même que djc-cta) */
.ck-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.ck-inner > * { position: relative; z-index: 1; }

/* Shimmer d'entrée */
.ck-shimmer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.ck-shimmer::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: translateX(-120%) skewX(-18deg);
}
#cookie-banner.is-visible .ck-shimmer::after {
  animation: ckShimmer 1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ckShimmer {
  to { transform: translateX(340%) skewX(-18deg); }
}

/* ── Icône cookie ─────────────────────────────────────────────── */
.ck-icon {
  font-size: 2.8rem;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
  line-height: 1;
}

/* ── Texte ────────────────────────────────────────────────────── */
.ck-body {
  flex: 1;
  min-width: 0;
}

.ck-eyebrow {
  font-family: var(--f-title, 'Cinzel', serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(20, 14, 2, 0.65);
  margin-bottom: 3px;
}

.ck-title {
  font-family: var(--f-display, 'Bebas Neue', sans-serif);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #1a0e02;
  margin: 0 0 3px;
  line-height: 1.1;
}

.ck-desc {
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(20, 10, 0, 0.72);
  line-height: 1.5;
  margin: 0;
}

.ck-desc a {
  color: rgba(20, 10, 0, 0.85);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.ck-desc a:hover { color: #1a0e02; }

/* ── Choix granulaires RGPD ──────────────────────────────────── */
.ck-choices {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(20,10,0,0.15);
}

.ck-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}
.ck-choice--disabled { cursor: default; opacity: 0.7; }

.ck-choice input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

/* Checkbox custom */
.ck-choice__box {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 5px;
  border: 2px solid rgba(20,10,0,0.45);
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  margin-top: 1px;
}
.ck-choice input:checked + .ck-choice__box {
  background: rgba(20,10,0,0.82);
  border-color: rgba(20,10,0,0.82);
}
.ck-choice input:checked + .ck-choice__box::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #c4a052;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.ck-choice input:focus-visible + .ck-choice__box {
  outline: 3px solid rgba(20,10,0,0.7);
  outline-offset: 2px;
}

.ck-choice__label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.68rem;
  color: rgba(20,10,0,0.85);
  line-height: 1.3;
}
.ck-choice__label strong { font-weight: 700; font-size: 0.7rem; }
.ck-choice__label span   { font-weight: 300; color: rgba(20,10,0,0.62); }

/* ── Actions ──────────────────────────────────────────────────── */
.ck-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: var(--f-title, 'Cinzel', serif);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  white-space: nowrap;
}

.ck-btn:hover  { transform: translateY(-1px); }
.ck-btn:active { transform: translateY(0); }

/* Bouton "Accepter" — sombre sur fond doré */
.ck-btn--accept {
  background: rgba(20, 10, 2, 0.82);
  color: #c4a052;
  box-shadow: 0 3px 12px rgba(0,0,0,.35);
}
.ck-btn--accept:hover {
  background: rgba(10, 5, 0, 0.92);
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

/* Bouton "Enregistrer mes choix" — intermédiaire */
.ck-btn--save {
  background: rgba(20, 10, 2, 0.45);
  color: rgba(20, 10, 0, 0.9);
  border: 1px solid rgba(20, 10, 2, 0.45);
}
.ck-btn--save:hover {
  background: rgba(20, 10, 2, 0.6);
}

/* Bouton "Refuser" — transparent (CNIL : aussi visible qu'Accepter) */
.ck-btn--refuse {
  background: rgba(20, 10, 2, 0.18);
  color: rgba(20, 10, 2, 0.75);
  border: 1px solid rgba(20, 10, 2, 0.28);
  box-shadow: none;
}
.ck-btn--refuse:hover {
  background: rgba(20, 10, 2, 0.28);
  color: rgba(20, 10, 2, 0.9);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 700px) {
  .ck-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px 14px;
    border-radius: 14px;
  }
  .ck-icon { font-size: 2rem; }
  .ck-actions {
    flex-direction: row;
    width: 100%;
  }
  .ck-btn { flex: 1; min-width: 0; font-size: 0.68rem; white-space: normal; text-align: center; }
  .ck-choices { flex-direction: row; gap: 12px; }
  .ck-choice { flex: 1; }
}
