/* Repris tel quel du site en ligne (index.html) : module consentement cookies (RGPD/CNIL). Ne pas modifier sans raison. */
/* Variables — adapte les couleurs à ton site si besoin */
:root {
  --ycc-bg: #0d0d0d;
  --ycc-bg-2: #161616;
  --ycc-ink: #f4f1ea;
  --ycc-ink-soft: #a1a1a1;
  --ycc-line: rgba(255,255,255,.12);
  --ycc-red: #e63946;
  --ycc-green: #4ade80;
}

/* ─── Bandeau principal — style minimaliste pleine largeur ─ */
.ycc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 13, 13, .98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--ycc-red);
  padding: 16px 30px;
  z-index: 99998;
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ycc-ink);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .5s cubic-bezier(.22,.61,.36,1), opacity .5s ease;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.ycc-banner.ycc-show { transform: translateY(0); opacity: 1; }
.ycc-banner-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.ycc-banner-text {
  flex: 1 1 auto;
  min-width: 280px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ycc-ink-soft);
  margin: 0;
}
.ycc-banner-text strong {
  color: var(--ycc-ink);
  font-weight: 600;
}
.ycc-banner-text a {
  color: var(--ycc-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ycc-banner-text a:hover { color: #fff; }

/* ─── Boutons (même niveau visuel — exigence CNIL) ─ */
.ycc-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.ycc-btn {
  padding: 11px 20px;
  border: 1px solid var(--ycc-line);
  background: transparent;
  color: var(--ycc-ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all .25s ease;
  white-space: nowrap;
}
.ycc-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--ycc-ink);
}
.ycc-btn:focus-visible {
  outline: 2px solid var(--ycc-red);
  outline-offset: 2px;
}
.ycc-btn--accept {
  background: var(--ycc-red);
  border-color: var(--ycc-red);
  color: #fff;
}
.ycc-btn--accept:hover { background: #c92d3a; border-color: #c92d3a; }
.ycc-btn--refuse {
  background: transparent;
  border-color: var(--ycc-line);
}

/* Responsive : sur mobile, on empile */
@media (max-width: 768px) {
  .ycc-banner {
    padding: 16px 20px 18px;
    gap: 14px;
  }
  .ycc-banner-text {
    flex: 1 1 100%;
    font-size: 12px;
  }
  .ycc-actions {
    flex: 1 1 100%;
    justify-content: stretch;
  }
  .ycc-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 10px;
  }
}

/* ─── Modal de personnalisation ─────────────────── */
.ycc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ycc-modal-overlay.ycc-show { display: flex; }
.ycc-modal {
  background: var(--ycc-bg);
  border: 1px solid var(--ycc-line);
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ycc-ink);
}
.ycc-modal-header {
  padding: 28px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.ycc-modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}
.ycc-close {
  background: transparent;
  border: none;
  color: var(--ycc-ink-soft);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color .2s;
}
.ycc-close:hover { color: var(--ycc-ink); }
.ycc-modal-body { padding: 20px 28px; }
.ycc-modal-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ycc-ink-soft);
  margin: 0 0 24px;
}
.ycc-category {
  border: 1px solid var(--ycc-line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}
.ycc-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.ycc-category-head h3, .ycc-category-head h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .02em;
}
.ycc-category p {
  font-size: 12px;
  margin: 0;
  line-height: 1.55;
}

/* ─── Toggle switch accessible ──────────────────── */
.ycc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.ycc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ycc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,.15);
  border-radius: 24px;
  transition: background .25s;
}
.ycc-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: var(--ycc-ink);
  border-radius: 50%;
  transition: transform .25s;
}
input:checked + .ycc-slider { background: var(--ycc-red); }
input:checked + .ycc-slider:before { transform: translateX(20px); }
input:disabled + .ycc-slider { opacity: .5; cursor: not-allowed; }
input:focus-visible + .ycc-slider {
  box-shadow: 0 0 0 3px rgba(230,57,70,.35);
}
.ycc-required {
  font-size: 10px;
  color: var(--ycc-green);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ycc-modal-footer {
  padding: 0 28px 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ycc-modal-footer .ycc-btn { flex: 1 1 0; min-width: 140px; }

/* ─── Lien footer pour rouvrir les préférences ──── */
.ycc-footer-link {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.ycc-footer-link:hover { color: var(--ycc-red); }

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
  .ycc-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 22px;
  }
  .ycc-actions { flex-direction: column; }
  .ycc-btn { flex: none; width: 100%; }
  .ycc-modal-header { padding: 22px 22px 0; }
  .ycc-modal-body { padding: 16px 22px; }
  .ycc-modal-footer { padding: 0 22px 22px; flex-direction: column; }
}

/* ─── Respect du paramètre OS prefers-reduced-motion ─ */
@media (prefers-reduced-motion: reduce) {
  .ycc-banner { transition: opacity .2s; }
}
