/* Cookie consent — isolé (pas de conflit avec .overlay/.modal existants) */
:root{
  --cc-bg: #0f172a;
  --cc-card: #ffffff;
  --cc-text: #0f172a;
  --cc-muted: #64748b;
  --cc-shadow: 0 10px 30px rgba(0,0,0,.22);
  --cc-round: 16px;
  --cc-primary: var(--primary, #2563eb);
}

.cc-banner{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 9000;
  display: none;
}

.cc-banner.cc-show{ display:block; }

.cc-card{
  background: var(--cc-card);
  color: var(--cc-text);
  border-radius: var(--cc-round);
  box-shadow: var(--cc-shadow);
  padding: 14px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.cc-title{ font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.cc-desc{ color: #111; font-size: 14px; line-height: 1.35; }
.cc-more{ color: var(--cc-muted); font-size: 12.5px; margin-top: 6px; }
.cc-link{ color: var(--cc-primary); text-decoration: none; font-weight: 700; margin-left: 6px; }
.cc-link:hover{ text-decoration: underline; }

.cc-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cc-btn{
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
}

.cc-btn-ghost{
  background: #eef2ff;
  color: #1e293b;
}
.cc-btn-ghost:hover{ filter: brightness(0.98); }

.cc-btn-primary{
  background: var(--cc-primary);
  color: #fff;
}
.cc-btn-primary:hover{ filter: brightness(0.98); }

/* Modal */
.cc-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9100;
  display: none;
}
.cc-backdrop.cc-show{ display:block; }

.cc-modal{
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.cc-modal.cc-show{ display:flex; }

.cc-modal-card{
  width: 420px;
  max-width: 95vw;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cc-shadow);
}

/* Header cookie = même rendu que .modal .modal-head */
.cc-modal-head{
  flex-shrink: 0;
  height: 40px;
  padding: 16px 18px;
  box-sizing: border-box; /* 👈 important si tu veux une hauteur "visuelle" identique */
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(90deg, #60a5fa, #2563eb 55%, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Titre = même taille que tes popups */
.cc-modal-title{
  font-size: 20px;
  text-align: center;
  flex: 1; /* 👈 pour centrer même avec la croix à droite */
}

/* Croix = style similaire à .modal .modal-head .btn-icon */
.cc-x{
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  color: #fff;
  width: auto;
  height: auto;
  padding: 0 6px;
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.cc-x:hover{ opacity: 0.7; }

.cc-modal-body{
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.cc-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.cc-row-title{ font-weight: 900; font-size: 14px; }
.cc-row-desc{ color: var(--cc-muted); font-size: 12.5px; margin-top: 2px; }

.cc-note{
  color: var(--cc-muted);
  font-size: 12.5px;
  padding: 4px 2px 0;
}

.cc-modal-actions{
  padding: 12px 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cc-x{
  background: none;
  box-shadow: none;
  border: none;
  color: #fff;
  padding: 0 6px;
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.cc-x:hover{ opacity: .7; }

/* Switch */
.cc-switch{ position: relative; display: inline-flex; }
.cc-switch input{ display:none; }
.cc-slider{
  width: 44px; height: 26px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: .2s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.cc-slider::after{
  content:'';
  position:absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 999px;
  transition: .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.cc-switch input:checked + .cc-slider{ background: #10b981; }
.cc-switch input:checked + .cc-slider::after{ transform: translateX(18px); }
.cc-switch input:disabled + .cc-slider{ opacity:.6; }

/* Bouton 🍪 flottant */
.cc-fab{
  position: fixed;
  left: 14px;
  bottom: 30px;
  z-index: 9050;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: #fff;
  box-shadow: var(--cc-shadow);
  display: none; /* affiché après choix */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 30px;
}

@media (max-width: 520px){
  .cc-card{ grid-template-columns: 1fr; }
  .cc-actions{ justify-content: stretch; }
  .cc-actions .cc-btn{ flex: 1 1 auto; }
}
