:root{
  --cc-bg:#1a1a1a;
  --cc-text:#f2f2f2;
  --cc-muted:#b3b3b3;
  --cc-accent:#2563eb;
  --cc-accent-hover:#1d4ed8;
  --cc-border:#333;
  --cc-radius:10px;
}

/* ============ BANDEAU PRINCIPAL ============ */
#cc-banner{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:99999;
  background:var(--cc-bg);
  color:var(--cc-text);
  padding:20px 24px;
  box-shadow:0 -2px 20px rgba(0,0,0,.35);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:16px;
  transform:translateY(100%);
  transition:transform .35s ease;
}
#cc-banner.cc-visible{ transform:translateY(0); }

#cc-banner p{
  margin:0;
  flex:1 1 320px;
  font-size:14px;
  line-height:1.5;
  color:var(--cc-text);
}
#cc-banner p a{ color:#8ab4ff; text-decoration:underline; }

#cc-banner .cc-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.cc-btn{
  border:1px solid transparent;
  border-radius:8px;
  padding:10px 18px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease, border-color .15s ease;
}
/* Accepter et Refuser doivent avoir la même importance visuelle */
.cc-btn-primary{ background:var(--cc-accent); color:#fff; }
.cc-btn-primary:hover{ background:var(--cc-accent-hover); }

.cc-btn-secondary{ background:transparent; color:var(--cc-text); border-color:#555; }
.cc-btn-secondary:hover{ background:#2a2a2a; }

.cc-btn-link{ background:transparent; color:var(--cc-text); text-decoration:underline; padding:10px 4px; }
.cc-btn-link:hover{ color:#fff; }

/* ============ MODALE DE PRÉFÉRENCES ============ */
#cc-modal-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.6);
  z-index:100000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}
#cc-modal-overlay.cc-visible{ display:flex; }

#cc-modal{
  background:#fff;
  color:#1a1a1a;
  border-radius:var(--cc-radius);
  max-width:560px;
  width:100%;
  max-height:85vh;
  overflow-y:auto;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#cc-modal-header{
  padding:20px 24px;
  border-bottom:1px solid #e5e5e5;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
#cc-modal-header h2{ margin:0; font-size:18px; }
#cc-modal-close{
  background:none; border:none; font-size:22px; cursor:pointer; color:#666; line-height:1;
}
#cc-modal-body{ padding:20px 24px; }
#cc-modal-body > p{ font-size:14px; color:#444; line-height:1.6; margin-top:0; }

.cc-category{
  border:1px solid #e5e5e5;
  border-radius:8px;
  padding:14px 16px;
  margin-bottom:12px;
}
.cc-category-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.cc-category-header strong{ font-size:14px; }
.cc-category p{ font-size:13px; color:#666; margin:8px 0 0; line-height:1.5; }

/* Toggle switch */
.cc-switch{ position:relative; display:inline-block; width:42px; height:24px; flex-shrink:0; }
.cc-switch input{ opacity:0; width:0; height:0; }
.cc-slider{
  position:absolute; cursor:pointer; inset:0;
  background:#ccc; border-radius:24px; transition:.2s;
}
.cc-slider:before{
  content:""; position:absolute; height:18px; width:18px; left:3px; bottom:3px;
  background:#fff; border-radius:50%; transition:.2s;
}
.cc-switch input:checked + .cc-slider{ background:var(--cc-accent); }
.cc-switch input:checked + .cc-slider:before{ transform:translateX(18px); }
.cc-switch input:disabled + .cc-slider{ background:#a8c4f5; cursor:not-allowed; }

#cc-modal-footer{
  padding:16px 24px 22px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top:1px solid #e5e5e5;
}
#cc-modal-footer .cc-btn-secondary{ color:#1a1a1a; border-color:#ccc; }
#cc-modal-footer .cc-btn-secondary:hover{ background:#f2f2f2; }

/* Lien "Gérer mes préférences", réutilisable dans le footer du site */
#cc-manage-link{
  font-size:13px;
  color:#555;
  text-decoration:underline;
  background:none;
  border:none;
  cursor:pointer;
  padding:0;
}

@media (max-width:600px){
  #cc-banner{ flex-direction:column; align-items:stretch; }
  #cc-banner .cc-actions{ justify-content:stretch; }
  #cc-banner .cc-actions .cc-btn{ flex:1; text-align:center; }
}
