/* ============================================
   Bandeau cookies IILMIQ Labs — Sci-fi / AI
   Design futuriste : néon, glow, bordure animée
   2 boutons équivalents (CNIL compliant)
   ============================================ */

#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9998;
  width: min(960px, calc(100% - 32px));
  background: linear-gradient(
    135deg,
    rgba(6, 12, 28, 0.97) 0%,
    rgba(12, 22, 44, 0.97) 100%
  );
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-radius: 18px;
  padding: 22px 26px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: #f0f6ff;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(96, 165, 250, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.55s cubic-bezier(.16, .85, .25, 1.02), opacity 0.4s ease;
  opacity: 0;
  overflow: hidden;
}
#cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Bordure animée (gradient qui tourne) ── */
#cookie-banner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(96, 165, 250, 0.7) 60deg,
    rgba(99, 102, 241, 0.8) 110deg,
    transparent 180deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: iris-rotate-border 6s linear infinite;
  pointer-events: none;
  opacity: 0.55;
}

@keyframes iris-rotate-border {
  to { transform: rotate(360deg); }
}

/* ── Scan line subtile (effet écran rétro) ── */
#cookie-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(96, 165, 250, 0.025) 2px,
      rgba(96, 165, 250, 0.025) 3px
    );
  pointer-events: none;
  border-radius: 18px;
  mix-blend-mode: overlay;
}

.cookie-banner-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

/* ── Icône AI pulsante (à gauche) ── */
.cookie-banner-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #93c5fd;
  position: relative;
  animation: iris-icon-pulse 2.6s ease-in-out infinite;
}
.cookie-banner-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.6));
}
@keyframes iris-icon-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(96, 165, 250, 0.4),
      inset 0 0 8px rgba(96, 165, 250, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(96, 165, 250, 0),
      inset 0 0 16px rgba(96, 165, 250, 0.3);
  }
}

/* ── Texte ── */
.cookie-banner-text {
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(240, 246, 255, 0.78);
}
.cookie-banner-text-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 6px;
}
.cookie-banner-text-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
  animation: iris-dot-blink 1.5s ease-in-out infinite;
}
@keyframes iris-dot-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.cookie-banner-text strong {
  color: #fff;
  font-weight: 600;
}
.cookie-banner-text a {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 197, 253, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.cookie-banner-text a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* ── Actions ── */
.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  position: relative;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s, border-color 0.2s;
  min-width: 120px;
  overflow: hidden;
}

/* Bouton Accepter — gradient cyan/violet avec glow */
.cookie-btn-accept {
  background: linear-gradient(135deg, #60a5fa 0%, #6366f1 100%);
  border-color: transparent;
  color: #fff;
  box-shadow:
    0 0 0 0 rgba(96, 165, 250, 0),
    0 8px 22px rgba(96, 165, 250, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cookie-btn-accept::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #818cf8 0%, #60a5fa 100%);
  opacity: 0;
  transition: opacity 0.25s;
}
.cookie-btn-accept span {
  position: relative;
  z-index: 1;
}
.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(96, 165, 250, 0.15),
    0 14px 32px rgba(96, 165, 250, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.cookie-btn-accept:hover::before {
  opacity: 1;
}

/* Bouton Refuser — ghost avec glow subtil au hover */
.cookie-btn-reject {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(240, 246, 255, 0.85);
}
.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(96, 165, 250, 0.5);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

/* Lien "modifier les préférences" du footer */
.cookie-edit-link {
  background: none;
  border: none;
  color: rgba(200, 220, 255, 0.55);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  border-bottom: 1px dashed rgba(200, 220, 255, 0.3);
  transition: color 0.2s, border-color 0.2s;
}
.cookie-edit-link:hover {
  color: #93c5fd;
  border-bottom-color: #93c5fd;
}

/* ── Responsive mobile ── */
@media (max-width: 720px) {
  #cookie-banner {
    bottom: 12px;
    width: calc(100% - 16px);
    padding: 18px 20px;
    border-radius: 14px;
  }
  .cookie-banner-inner {
    grid-template-columns: auto 1fr;
    gap: 14px 16px;
  }
  .cookie-banner-icon {
    width: 40px;
    height: 40px;
  }
  .cookie-banner-icon svg {
    width: 20px;
    height: 20px;
  }
  .cookie-banner-text {
    font-size: 12.5px;
  }
  .cookie-banner-text-label {
    font-size: 9.5px;
  }
  .cookie-banner-actions {
    grid-column: 1 / -1;
    margin-top: 6px;
  }
  .cookie-btn {
    flex: 1;
    padding: 12px 18px;
    min-width: 0;
    font-size: 13px;
  }
}

/* ── Tablette intermédiaire ── */
@media (min-width: 721px) and (max-width: 980px) {
  .cookie-banner-inner {
    grid-template-columns: auto 1fr;
  }
  .cookie-banner-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 4px;
  }
}
