/* Ludi Briques – Consentement aux cookies v1.0.0 */
.lbc, .lbc *, .lbc *::before, .lbc *::after { box-sizing: border-box; }
.lbc {
  --lbc-navy: #0f172a; --lbc-accent: #b23a25; --lbc-cream: #f9f7f0; --lbc-border: #d3c5b6; --lbc-text: #1a1a1a; --lbc-muted: #4b5563;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--lbc-text); text-align: left;
}
.lbc p { margin: 0; }

/* Bannière */
.lbc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147483000;
  max-width: 960px; margin: 0 auto; padding: 20px 24px;
  background: #fff; border: 1px solid var(--lbc-border); border-top: 4px solid var(--lbc-accent); border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, .22);
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.lbc-bannerbody { flex: 1 1 380px; min-width: 0; }
.lbc-title { font-weight: 700; font-size: 17px; color: var(--lbc-navy); margin-bottom: 4px !important; }
.lbc-text { font-size: 15px; color: var(--lbc-text); }
.lbc-link { color: var(--lbc-navy); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.lbc-link:hover { color: var(--lbc-accent); }

.lbc-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 1 auto; }
.lbc-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  min-height: 46px; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--lbc-navy); text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.lbc-btn--main { background: var(--lbc-navy); color: #fff; }
.lbc-btn--main:hover { background: #1e293b; border-color: #1e293b; }
.lbc-btn--ghost { background: #fff; color: var(--lbc-navy); }
.lbc-btn--ghost:hover { background: var(--lbc-cream); }
.lbc-btn:focus-visible, .lbc-x:focus-visible, .lbc-link:focus-visible, .lbc-det summary:focus-visible, .lbc-switch input:focus-visible + .lbc-slider {
  outline: 3px solid var(--lbc-accent); outline-offset: 2px;
}

/* Fenêtre de préférences */
.lbc-dialog {
  width: calc(100% - 32px); max-width: 720px; max-height: calc(100vh - 32px); padding: 0; margin: auto;
  background: #fff; color: var(--lbc-text); border: 1px solid var(--lbc-border); border-top: 4px solid var(--lbc-accent); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .35); overflow: hidden;
}
.lbc-dialog[open] { display: flex; flex-direction: column; }
.lbc-dialog::backdrop { background: rgba(15, 23, 42, .6); }
.lbc-dialog--fallback { position: fixed; inset: 0; z-index: 2147483001; height: fit-content; }
.lbc-dhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 8px; }
.lbc-dtitle { margin: 0 !important; font-size: 21px !important; line-height: 1.25 !important; font-weight: 700 !important; color: var(--lbc-navy) !important; }
.lbc-x { appearance: none; background: transparent; border: 0; cursor: pointer; font-size: 30px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; color: var(--lbc-navy); }
.lbc-x:hover { background: var(--lbc-cream); }
.lbc-dbody { padding: 4px 24px 16px; overflow-y: auto; flex: 1 1 auto; }
.lbc-dbody > .lbc-text { margin-bottom: 16px; }
.lbc-cat { border: 1px solid var(--lbc-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--lbc-cream); }
.lbc-cathead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lbc-cattitle { margin: 0 !important; font-size: 16px !important; line-height: 1.3 !important; font-weight: 700 !important; color: var(--lbc-navy) !important; }
.lbc-cattext { font-size: 14px; color: var(--lbc-muted); margin-top: 6px !important; }
.lbc-always { font-size: 13px; font-weight: 600; color: var(--lbc-navy); white-space: nowrap; }
.lbc-actions--dialog { padding: 14px 24px 20px; border-top: 1px solid var(--lbc-border); background: #fff; }
.lbc-actions--dialog .lbc-btn { flex: 1 1 150px; }

/* Interrupteur */
.lbc-switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.lbc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.lbc-slider { position: absolute; inset: 0; background: #9ca3af; border-radius: 999px; transition: background-color .2s ease; }
.lbc-slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.lbc-switch input:checked + .lbc-slider { background: var(--lbc-navy); }
.lbc-switch input:checked + .lbc-slider::before { transform: translateX(22px); }
.lbc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tableaux de cookies */
.lbc-det { margin-top: 10px; }
.lbc-det summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--lbc-navy); padding: 4px 0; }
.lbc-tablewrap { margin-top: 8px; }
.lbc-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 8px; overflow: hidden; }
.lbc-table th, .lbc-table td { padding: 8px 10px; border-bottom: 1px solid var(--lbc-border); text-align: left; vertical-align: top; }
.lbc-table th { background: #fff; color: var(--lbc-navy); font-weight: 700; }
.lbc-table code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--lbc-cream); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* Mobile */
@media (max-width: 640px) {
  .lbc-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px; border-radius: 14px; }
  .lbc-actions { width: 100%; }
  .lbc-actions .lbc-btn { flex: 1 1 100%; }
  .lbc-actions .lbc-btn--main { flex: 1 1 calc(50% - 5px); }
  .lbc-dhead { padding: 14px 16px 6px; }
  .lbc-dbody { padding: 4px 16px 12px; }
  .lbc-actions--dialog { padding: 12px 16px 16px; }
  .lbc-actions--dialog .lbc-btn { flex: 1 1 100%; }
  .lbc-actions--dialog .lbc-btn--main { flex: 1 1 calc(50% - 5px); }
  .lbc-table thead { display: none; }
  .lbc-table, .lbc-table tbody, .lbc-table tr, .lbc-table td { display: block; width: 100%; }
  .lbc-table tr { border-bottom: 1px solid var(--lbc-border); padding: 6px 0; }
  .lbc-table td { border: 0; padding: 3px 10px; }
  .lbc-table td::before { content: attr(data-l) " : "; font-weight: 700; color: var(--lbc-navy); }
}
@media (prefers-reduced-motion: reduce) { .lbc-btn, .lbc-slider, .lbc-slider::before { transition: none; } }
@media print { .lbc-banner, .lbc-dialog { display: none !important; } }
