/* Cartaplac – bandeau de consentement cookies */
.cc-banner, .cc-overlay {
  --cc-blue: #007cbd;
  --cc-blue-dark: #00609a;
  --cc-text: #1f2a33;
  --cc-muted: #5b6770;
  --cc-bg: #ffffff;
  --cc-line: #e2e8ee;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-text);
  box-sizing: border-box;
}
.cc-banner *, .cc-overlay * { box-sizing: border-box; }

/* ---- Bandeau ---- */
.cc-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100000;
  width: calc(100% - 32px);
  max-width: 560px;
  padding: 20px 22px;
  background: var(--cc-bg);
  border-top: 4px solid var(--cc-blue);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  animation: cc-in .25s ease-out;
}
@keyframes cc-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.cc-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--cc-text); }
.cc-desc { margin: 0 0 16px; color: var(--cc-muted); }
.cc-banner a, .cc-overlay a { color: var(--cc-blue); text-decoration: underline; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 2px solid var(--cc-blue);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
/* « Tout accepter » et « Tout refuser » : strictement le même style */
.cc-btn-main { background: var(--cc-blue); color: #fff; }
.cc-btn-main:hover { background: var(--cc-blue-dark); border-color: var(--cc-blue-dark); }
.cc-btn-ghost { background: #fff; color: var(--cc-blue); }
.cc-btn-ghost:hover { background: #eef6fb; }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + span {
  outline: 3px solid #f0a500;
  outline-offset: 2px;
}

/* ---- Fenêtre de paramétrage ---- */
.cc-noscroll { overflow: hidden; }
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 25, 40, .55);
}
.cc-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  background: var(--cc-bg);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  outline: none;
}
.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cc-line);
}
.cc-modal-head .cc-title { margin: 0; }
.cc-close {
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: transparent;
  font-size: 26px; line-height: 1;
  color: var(--cc-muted);
  cursor: pointer;
}
.cc-close:hover { background: #f0f3f6; }
.cc-modal-body { padding: 16px 22px; overflow-y: auto; }
.cc-modal-body > p { margin: 0 0 12px; color: var(--cc-muted); }
.cc-modal .cc-actions { padding: 16px 22px; border-top: 1px solid var(--cc-line); }

.cc-cat { padding: 14px 0; border-top: 1px solid var(--cc-line); }
.cc-cat p { margin: 6px 0 0; color: var(--cc-muted); font-size: 13px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-title { font-weight: 700; cursor: pointer; }
.cc-always { font-size: 12px; font-weight: 600; color: #2e7d32; white-space: nowrap; }
.cc-cookies { display: block; margin-top: 4px; font-size: 12px; font-style: italic; }

/* Interrupteur */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch span {
  position: absolute; inset: 0;
  background: #b7c1c9; border-radius: 26px;
  transition: background .2s;
}
.cc-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.cc-switch input:checked + span { background: var(--cc-blue); }
.cc-switch input:checked + span::after { transform: translateX(20px); }

/* Contenu bloqué (ex. avis clients) */
.cc-placeholder {
  padding: 20px; text-align: center;
  background: #f4f7fa; border: 1px dashed #b7c1c9; border-radius: 6px;
  font-family: "Open Sans", Arial, sans-serif; color: #5b6770;
}
.cc-placeholder button {
  margin-top: 8px; padding: 8px 14px;
  border: 0; border-radius: 4px;
  background: #007cbd; color: #fff; font-weight: 600; cursor: pointer;
}

@media (max-width: 600px) {
  .cc-banner { left: 8px; bottom: 8px; width: calc(100% - 16px); padding: 16px; }
  .cc-desc { font-size: 13px; }
  .cc-btn { flex-basis: 100%; }
  .cc-actions [data-cc="customize"] { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner { animation: none; }
  .cc-switch span, .cc-switch span::after { transition: none; }
}
