/* Bandeau cookies RGPD - Mamie CBD */
.mcbdck { --mcbdck-color: #85a201; --mcbdck-text: #666666; font-size: 15px; line-height: 1.5; }
.mcbdck [hidden], .mcbdck[hidden] { display: none !important; }
.mcbdck *, .mcbdck *::before, .mcbdck *::after { box-sizing: border-box; }

/* Bandeau */
.mcbdck-banner {
  position: fixed; z-index: 99998; left: 0; right: 0; bottom: 0;
  background: #ffffff; color: var(--mcbdck-text);
  border-top: 4px solid var(--mcbdck-color);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
  padding: 18px 20px 16px;
}
.mcbdck--bottom .mcbdck-banner > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.mcbdck--box .mcbdck-banner {
  left: 16px; right: auto; bottom: 16px; width: 420px; max-width: calc(100% - 32px);
  border: 1px solid #D6E5B8; border-top: 4px solid var(--mcbdck-color); border-radius: 6px;
}
.mcbdck-title { margin: 0 0 6px; font-size: 18px; font-weight: bold; color: #333333; padding-right: 150px; }
.mcbdck--box .mcbdck-title { padding-right: 0; margin-top: 18px; }
.mcbdck-text p { margin: 0 0 6px; color: var(--mcbdck-text); }
.mcbdck-more { margin: 0 0 10px; font-size: 14px; }
.mcbdck-more a { color: var(--mcbdck-color); text-decoration: underline; }
.mcbdck-skip {
  position: absolute; top: 10px; right: 16px; background: none; border: 0; padding: 4px;
  color: var(--mcbdck-text); font-size: 13px; text-decoration: underline; cursor: pointer;
}
.mcbdck--bottom .mcbdck-skip { right: max(16px, calc((100% - 1100px) / 2)); }

/* Boutons : « Tout accepter » et « Tout refuser » ont exactement le même style (CNIL) */
.mcbdck-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.mcbdck-btn {
  flex: 0 1 auto; min-width: 150px; padding: 10px 18px; cursor: pointer;
  border: 2px solid var(--mcbdck-color); border-radius: 4px;
  background: var(--mcbdck-color); color: #ffffff;
  font-size: 15px; font-weight: bold; line-height: 1.2; text-align: center;
}
.mcbdck-btn:hover, .mcbdck-btn:focus { filter: brightness(.92); }
.mcbdck-btn--ghost { background: #ffffff; color: var(--mcbdck-color); }
.mcbdck-btn:focus-visible, .mcbdck-skip:focus-visible, .mcbdck-close:focus-visible, .mcbdck-float:focus-visible,
.mcbdck-switch input:focus-visible + .mcbdck-slider { outline: 3px solid #333333; outline-offset: 2px; }
.mcbdck--box .mcbdck-actions { justify-content: stretch; }
.mcbdck--box .mcbdck-btn { flex: 1 1 100%; }

/* Panneau de personnalisation */
.mcbdck-panel {
  position: fixed; z-index: 99999; inset: 0; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mcbdck-panel-box {
  position: relative; width: 560px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #ffffff; color: var(--mcbdck-text); border-top: 4px solid var(--mcbdck-color);
  border-radius: 6px; padding: 22px 22px 16px; box-shadow: 0 8px 40px rgba(0, 0, 0, .25); outline: none;
}
.mcbdck-panel .mcbdck-title { padding-right: 30px; }
.mcbdck-intro { margin: 0 0 12px; }
.mcbdck-panel .mcbdck-actions { margin-bottom: 10px; }
.mcbdck-panel .mcbdck-btn { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; }
.mcbdck-close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none;
  font-size: 28px; line-height: 1; color: #333333; cursor: pointer;
}
.mcbdck-cat { border: 1px solid #D6E5B8; background: #f9f9f9; border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; }
.mcbdck-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mcbdck-cat-name { margin: 0; font-weight: bold; color: #333333; cursor: pointer; }
.mcbdck-always { font-size: 13px; font-weight: bold; color: var(--mcbdck-color); }
.mcbdck-cat-desc { margin: 6px 0 0; font-size: 14px; }

/* Interrupteurs */
.mcbdck-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; }
.mcbdck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.mcbdck-slider { position: absolute; inset: 0; background: #bbbbbb; border-radius: 26px; transition: background .2s; }
.mcbdck-slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #ffffff; border-radius: 50%; transition: transform .2s;
}
.mcbdck-switch input:checked + .mcbdck-slider { background: var(--mcbdck-color); }
.mcbdck-switch input:checked + .mcbdck-slider::before { transform: translateX(20px); }

/* Petit bouton flottant */
.mcbdck-float {
  position: fixed; z-index: 99990; left: 14px; bottom: 14px; width: 42px; height: 42px;
  border-radius: 50%; border: 2px solid #ffffff; background: var(--mcbdck-color); color: #ffffff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); padding: 0;
}

@media (max-width: 767px) {
  .mcbdck-banner { padding: 14px 14px 12px; max-height: 80vh; overflow-y: auto; }
  .mcbdck-title { padding-right: 0; margin-top: 22px; font-size: 17px; }
  .mcbdck-skip { top: 6px; right: 10px; }
  .mcbdck-actions { justify-content: stretch; }
  .mcbdck-btn, .mcbdck-panel .mcbdck-btn { flex: 1 1 100%; min-width: 0; }
  .mcbdck-panel-box { padding: 18px 14px 12px; }
  .mcbdck--box .mcbdck-banner { left: 8px; bottom: 8px; max-width: calc(100% - 16px); }
}
