/* =============================================
   COOKIE CONSENT — ClairObscur Studio
   ============================================= */

/* ── Bannière ── */
#cos-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 14px 20px;
  background: rgba(10, 16, 28, 0.97);
  border-top: 1px solid rgba(230, 205, 149, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: cos-slide-up 0.3s ease;
}

@keyframes cos-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cos-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cos-banner-text {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: .88rem;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
}

.cos-banner-text strong { color: #fff; margin-right: 4px; }
.cos-banner-text a { color: #E6CD95; text-decoration: underline; }

.cos-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Bouton flottant ── */
#cos-floating-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9990;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(10, 16, 28, 0.90);
  border: 1px solid rgba(230, 205, 149, 0.35);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: transform 0.2s, border-color 0.2s;
}

#cos-floating-btn:hover {
  transform: scale(1.12);
  border-color: rgba(230, 205, 149, 0.7);
}

/* ── Panel (modal) ── */
#cos-cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.cos-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.cos-panel-box {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #0d1622;
  border-top: 1px solid rgba(230, 205, 149, 0.2);
  border-radius: 20px 20px 0 0;
  padding: 28px 28px 32px;
  max-width: 540px;
  margin: 0 auto;
  animation: cos-panel-up 0.3s ease;
}

@keyframes cos-panel-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cos-panel-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: rgba(255,255,255,.5);
  font-size: 1rem; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
}
.cos-panel-close:hover { color: #fff; }

.cos-panel-title {
  font-size: 1.1rem; font-weight: 900;
  color: #fff; margin: 0 0 8px;
}

.cos-panel-desc {
  font-size: .86rem;
  color: rgba(255,255,255,.6);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Toggles ── */
.cos-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.cos-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.cos-toggle-info strong {
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
}

.cos-toggle-info span {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}

.cos-toggle-switch--locked {
  font-size: .75rem;
  font-weight: 700;
  color: #10b981;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Switch ── */
.cos-switch {
  position: relative;
  display: inline-block;
  width: 48px; height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.cos-switch input {
  opacity: 0; width: 0; height: 0;
}

.cos-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  transition: background 0.25s;
}

.cos-slider::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.cos-switch input:checked + .cos-slider {
  background: #E6CD95;
}

.cos-switch input:checked + .cos-slider::before {
  transform: translateX(22px);
}

/* ── Panel actions ── */
.cos-panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cos-panel-legal {
  margin-top: 14px;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  text-align: center;
}

.cos-panel-legal a {
  color: rgba(230, 205, 149, 0.6);
  text-decoration: underline;
}

/* ── Boutons ── */
.cos-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: .86rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}

.cos-btn--sm { padding: 6px 12px; font-size: .82rem; }

.cos-btn--primary {
  background: #E6CD95;
  color: #0f1724;
  border-color: #E6CD95;
}

.cos-btn--primary:hover { opacity: .88; }

.cos-btn--ghost {
  background: transparent;
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.2);
}

.cos-btn--ghost:hover {
  border-color: rgba(255,255,255,.45);
  color: #fff;
}

@media (max-width: 540px) {
  .cos-panel-box { padding: 20px 16px 28px; }
  .cos-banner-inner { gap: 12px; }
  .cos-panel-actions { flex-direction: column; }
  .cos-btn { width: 100%; text-align: center; }
}
