/* Bandeau de consentement Loi 25 — Agneau Maraîcher.
   Utilise les variables du thème avec repli. */
.am-loi25 {
    position: fixed;
    inset: 0;                       /* plein écran : capture tous les clics */
    z-index: 99999;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-end;          /* panneau en bas */
    background: rgba(0, 0, 0, .5);  /* voile : bloque l'accès au site */
    animation: am-loi25-fade .3s ease;
}
.am-loi25[hidden] { display: none; }
@keyframes am-loi25-fade { from { background: rgba(0, 0, 0, 0); } to { background: rgba(0, 0, 0, .5); } }

/* Verrouille le défilement de la page tant que le bandeau est ouvert. */
body.am-loi25-open { overflow: hidden; }

.am-loi25__panel {
    pointer-events: auto;
    width: 100%;
    max-width: 720px;
    background: #fff;
    color: var(--bs-body-color, #333);
    border-radius: 16px;
    box-shadow: 0 18px 60px -12px rgba(0, 0, 0, .4);
    padding: 22px 24px;
    font-family: var(--bs-body-font-family, 'Poppins', system-ui, sans-serif);
    animation: am-loi25-in .35s cubic-bezier(.4, 0, .2, 1);
}
@keyframes am-loi25-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.am-loi25__title {
    margin: 0 0 .5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bs-heading-color, #1b1b1b);
}
.am-loi25__intro {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--bs-secondary-color, #555);
}
.am-loi25__link {
    color: var(--bs-primary, #2d6a4f);
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

/* Catégories */
.am-loi25__cats {
    margin-top: 16px;
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--bs-border-color, #eee);
    padding-top: 16px;
}
.am-loi25__cat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.am-loi25__cat input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--bs-primary, #2d6a4f);
    flex-shrink: 0;
}
.am-loi25__cat span { display: flex; flex-direction: column; gap: 2px; }
.am-loi25__cat strong { font-size: .92rem; }
.am-loi25__cat em { font-style: normal; font-size: .82rem; color: var(--bs-secondary-color, #777); line-height: 1.4; }
.am-loi25__cat--locked { cursor: default; opacity: .85; }

/* Actions */
.am-loi25__actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.am-loi25__btn {
    appearance: none;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: .7rem 1.25rem;
    font: inherit;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
    line-height: 1;
}
/* Refuser et Accepter : même poids visuel (exigence Loi 25) */
.am-loi25__btn--accept {
    background: var(--bs-primary, #2d6a4f);
    color: #fff;
    margin-left: auto;
}
.am-loi25__btn--accept:hover { background: var(--bs-secondary, #8b5e3c); }
.am-loi25__btn--refuse {
    background: #40352b;
    color: #fff;
}
.am-loi25__btn--refuse:hover { background: #2a221b; }
.am-loi25__btn--save {
    background: var(--bs-primary, #2d6a4f);
    color: #fff;
}
.am-loi25__btn--save:hover { background: var(--bs-secondary, #8b5e3c); }
.am-loi25__btn--ghost {
    background: transparent;
    color: var(--bs-body-color, #333);
    border-color: var(--bs-border-color, #ccc);
}
.am-loi25__btn--ghost:hover { border-color: var(--bs-primary, #2d6a4f); color: var(--bs-primary, #2d6a4f); }

@media (max-width: 560px) {
    .am-loi25 { padding: 10px; }
    .am-loi25__panel { padding: 18px; border-radius: 14px; }
    .am-loi25__actions { flex-direction: column; align-items: stretch; }
    .am-loi25__btn { width: 100%; text-align: center; }
    .am-loi25__btn--accept { margin-left: 0; order: -1; }
}

/* Petit lien flottant pour rouvrir les préférences */
.am-loi25-reopen {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
