/* WP Cookies — bandeau et panneau de choix */
.wpc-bandeau, .wpc-panneau, .wpc-flottant {
  --wpc-encre: #1D1B1B;
  --wpc-gris: #5c5653;
  --wpc-ligne: #E6DCD3;
  --wpc-accent: #EC6525;
  font-family: inherit;
  color: var(--wpc-encre);
  box-sizing: border-box;
}
.wpc-bandeau *, .wpc-panneau * { box-sizing: border-box; }

.wpc-bandeau {
  position: fixed; z-index: 99990; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(980px, calc(100% - 24px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 28px;
  padding: 22px 26px 20px; background: #fff; border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .04);
  animation: wpc-monte .35s ease-out;
}
@keyframes wpc-monte { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wpc-bandeau { animation: none; } }

body .wpc-bandeau .wpc-texte p, body .wpc-panneau p[class], body .wpc-panneau p:not([class]) { text-align: left; text-align-last: auto; hyphens: none; }
.wpc-bandeau .wpc-texte p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--wpc-gris); }
.wpc-bandeau .wpc-texte p.wpc-titre, .wpc-panneau p.wpc-titre { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; color: var(--wpc-encre); }
.wpc-bandeau a, .wpc-panneau a { color: var(--wpc-encre); text-decoration: underline; text-underline-offset: 2px; }


.wpc-boutons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.wpc-btn {
  appearance: none; border: 1px solid var(--wpc-encre); background: var(--wpc-encre); color: #fff; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2; padding: 11px 20px; border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.wpc-btn:hover { background: var(--wpc-accent); border-color: var(--wpc-accent); }
.wpc-btn:focus-visible, .wpc-croix:focus-visible { outline: 3px solid var(--wpc-accent); outline-offset: 2px; }
.wpc-btn--lien { background: none; border-color: transparent; color: var(--wpc-encre); text-decoration: underline; text-underline-offset: 3px; padding-left: 8px; padding-right: 8px; }
.wpc-btn--lien:hover { background: none; border-color: transparent; color: var(--wpc-accent); }
.wpc-btn--contour { background: #fff; color: var(--wpc-encre); }
.wpc-btn--contour:hover { color: #fff; }

@media (max-width: 760px) {
  .wpc-bandeau {
    left: 0; bottom: 0; transform: none; width: 100%; grid-template-columns: 1fr;
    padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0;
    animation-name: wpc-monte-mobile;
  }
  @keyframes wpc-monte-mobile { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .wpc-bandeau .wpc-texte { padding-right: 0; padding-top: 0; }
  .wpc-bandeau .wpc-texte p { font-size: .84rem; }
  .wpc-bandeau .wpc-boutons { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
  .wpc-bandeau .wpc-btn { padding: 11px 10px; font-size: .86rem; white-space: nowrap; }
}

/* Panneau de choix */
.wpc-voile {
  position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(20, 18, 17, .5);
}
.wpc-panneau {
  position: relative; width: min(580px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 28px 28px 24px; background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.wpc-croix {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #f4efea; color: var(--wpc-encre); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.wpc-panneau .wpc-intro { margin: 4px 0 18px; font-size: .9rem; line-height: 1.5; color: var(--wpc-gris); padding-right: 30px; }
.wpc-cat { padding: 14px 0; border-top: 1px solid var(--wpc-ligne); }
.wpc-cat__haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wpc-panneau p.wpc-cat__titre { margin: 0; font-weight: 700; font-size: .95rem; }
.wpc-panneau p.wpc-cat__texte { margin: 4px 0 0; font-size: .85rem; line-height: 1.5; color: var(--wpc-gris); }
.wpc-panneau .wpc-boutons { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--wpc-ligne); }

.wpc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; cursor: pointer; }
.wpc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wpc-switch span[aria-hidden] { position: absolute; inset: 0; border-radius: 999px; background: #cfc7c0; transition: background .2s; pointer-events: none; }
.wpc-switch span[aria-hidden]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.wpc-switch input:checked + span { background: var(--wpc-accent); }
.wpc-switch input:checked + span::after { transform: translateX(20px); }
.wpc-switch input:disabled + span { background: #9b938d; cursor: not-allowed; }
.wpc-switch input:focus-visible + span { outline: 3px solid var(--wpc-accent); outline-offset: 2px; }
.wpc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .wpc-voile { align-items: flex-end; padding: 0; }
  .wpc-panneau { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .wpc-panneau .wpc-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wpc-panneau .wpc-boutons .wpc-btn--contour { grid-column: 1 / -1; order: 3; }
  .wpc-panneau .wpc-boutons { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 14px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: #fff; }
  .wpc-cat { padding: 11px 0; }
  .wpc-panneau .wpc-intro { margin-bottom: 12px; }
}

/* Bouton rond, si le thème n'a pas de pied de page où placer le lien */
.wpc-flottant {
  position: fixed; z-index: 99980; left: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--wpc-ligne); background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); cursor: pointer; font-size: 1.2rem;
}

/* Tableau des cookies [wpc_cookies] */
.wpc-tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.wpc-tableau th, .wpc-tableau td { padding: 8px 10px; border-bottom: 1px solid #e6dcd3; text-align: left; vertical-align: top; }

@media (max-width: 400px) {
  .wpc-bandeau .wpc-boutons { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .wpc-bandeau .wpc-btn--lien { grid-column: 1 / -1; order: 3; padding: 6px; }
  .wpc-panneau .wpc-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
}
