/* Consentement : bandeau et préférences (programme commun). Visuel repris du bandeau de Thaki (thème WMTbasiX,
   parts/_analytics.scss et bouton .btn-outline-dark de parts/_cta.scss) ; couleurs et police données par le site
   (variables --amc-*, valeurs de Thaki par défaut). */
.amc, .amc * { box-sizing: border-box; }
.amc {
    --amc-bg: #FAF6F2;
    --amc-text: #00183A;
    --amc-muted: rgba(0, 24, 58, .8);
    --amc-accent: #F04646;
    --amc-accent-text: #FFFFFF;
    --amc-line: rgba(0, 24, 58, .12);
    --amc-radius: 4px;
    --amc-btn-radius: 3px;
    --amc-shadow: 0 15px 50px rgba(0, 24, 58, .12);
    --amc-font: 'Poppins', system-ui, sans-serif;
    font-family: var(--amc-font);
    color: var(--amc-text);
}
.amc[hidden], .amc [hidden] { display: none !important; }
/* Styles du thème neutralisés dans le programme (interlignes, marges, contours) */
.amc p, .amc h2, .amc h3, .amc label { letter-spacing: normal; text-transform: none; }
.amc-panel:focus { outline: none; }

/* Bandeau : en bas à gauche, 420 px */
.amc-banner {
    position: fixed; z-index: 99; left: 28px; bottom: 28px; width: 420px;
    padding: 20px 24px; background: var(--amc-bg); color: var(--amc-text);
    border-radius: var(--amc-radius); box-shadow: var(--amc-shadow);
}
.amc-banner p {
    margin: 0; font-family: var(--amc-font); font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--amc-muted);
}
.amc a { color: var(--amc-text); text-decoration: underline; text-underline-offset: 3px; }
.amc-actions { display: flex; gap: 10px; margin-top: 16px; }

/* Boutons : contour, identiques pour « Accepter » et « Refuser » ; plein à la couleur d'accent au survol */
.amc-btn {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    appearance: none; margin: 0; padding: 10px 24px; cursor: pointer;
    background: transparent; color: var(--amc-text); border: 1px solid var(--amc-text); border-radius: var(--amc-btn-radius);
    font-family: var(--amc-font); font-size: 15px; font-weight: 400; letter-spacing: .04em; line-height: 1.4; text-decoration: none;
    transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}
.amc-btn:hover { background: var(--amc-accent); color: var(--amc-accent-text); border-color: var(--amc-accent); }
.amc-btn:focus-visible, .amc-switch input:focus-visible + span { outline: 2px solid var(--amc-text); outline-offset: 2px; }

/* Préférences (lien « Gérer les cookies ») : même carte, centrée */
.amc-overlay { position: fixed; inset: 0; z-index: 2147483001; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.amc-panel {
    background: var(--amc-bg); color: var(--amc-text); border-radius: var(--amc-radius); box-shadow: var(--amc-shadow);
    width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px;
}
.amc-title { margin: 0 0 8px; font-family: var(--amc-font); font-size: 17px; font-weight: 400; line-height: 1.3; color: var(--amc-text); }
.amc-panel > p { margin: 0 0 12px; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--amc-muted); }
.amc-cat { border-top: 1px solid var(--amc-line); padding: 12px 0; display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.amc-cat h3 { margin: 0 0 2px; font-family: var(--amc-font); font-size: 15px; font-weight: 400; line-height: 1.4; color: var(--amc-text); }
.amc-cat p { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--amc-muted); }
.amc-always { flex: 0 0 auto; font-size: 13px; font-weight: 400; color: var(--amc-muted); white-space: nowrap; padding-top: 2px; }
.amc-trackers { color: var(--amc-muted); }
.amc-switch { position: relative; flex: 0 0 auto; width: 44px; height: 24px; margin-top: 2px; }
.amc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.amc-switch span { position: absolute; inset: 0; border-radius: 24px; background: rgba(0, 0, 0, .25); transition: background .15s; pointer-events: none; }
.amc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.amc-switch input:checked + span { background: var(--amc-text); }
.amc-switch input:checked + span::after { transform: translateX(20px); }
.amc-panel .amc-actions { flex-wrap: wrap; }
.amc-panel .amc-btn { padding: 10px 14px; }

@media (max-width: 768px) {
    .amc-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 16px 18px; }
}
@media (max-width: 480px) {
    .amc-panel .amc-btn--save { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .amc-btn, .amc-switch span, .amc-switch span::after { transition: none; } }
