/**
 * Footer global Promastro (v2.45.5)
 *
 * Architecture :
 *  - 4 colonnes en CSS Grid avec auto-fit (≥ 280px)
 *  - Tape belge en haut (4px gradient noir/jaune/rouge)
 *  - Fond navy via design tokens BrandManager (--apb-brand)
 *  - Texte clair, contraste WCAG AA
 *  - Responsive : 4 → 2 → 1 colonnes
 *  - Imprime correctement (footer caché en print)
 */

.apb-footer {
    --apb-foot-bg: var(--apb-brand, #0B2A4A);
    --apb-foot-fg: #E8EDF3;
    --apb-foot-fg-soft: rgba(232, 237, 243, 0.72);
    --apb-foot-accent: var(--apb-accent, #E57317);
    --apb-foot-border: rgba(255, 255, 255, 0.10);
    --apb-foot-link-hover: var(--apb-foot-accent);

    background: var(--apb-foot-bg);
    color: var(--apb-foot-fg);
    margin-top: 80px;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}

.apb-footer__tape {
    height: 4px;
    width: 100%;
    background: linear-gradient(
        90deg,
        #000 0%,
        #000 33.3%,
        #FAE042 33.3%,
        #FAE042 66.6%,
        #EF3340 66.6%,
        #EF3340 100%
    );
}

.apb-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 24px;
}

/* ─── GRID ────────────────────────────────────────────────────────── */
.apb-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px 32px;
    padding-bottom: 40px;
}

/* La colonne brand peut prendre plus de place sur grand écran */
@media (min-width: 1100px) {
    .apb-footer__grid {
        grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    }
}

.apb-footer__col {
    min-width: 0;
}

/* ─── BRAND COLUMN ────────────────────────────────────────────────── */
.apb-footer__logo-link {
    display: inline-block;
    margin-bottom: 14px;
}

.apb-footer__logo-link img {
    display: block;
    max-width: 160px;
    height: auto;
    filter: brightness(0) invert(1); /* logo blanc sur fond navy même si source colorée */
}

.apb-footer__logo-text {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--apb-foot-fg);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.apb-footer__tagline {
    margin: 0 0 18px;
    color: var(--apb-foot-fg-soft);
    font-size: 14px;
    max-width: 280px;
}

.apb-footer__badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apb-footer__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--apb-foot-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--apb-foot-fg);
    width: fit-content;
    line-height: 1.2;
}

.apb-footer__badge span {
    color: #6EE7B7;
    font-weight: 700;
}

.apb-footer__badge--commission span {
    color: var(--apb-foot-accent);
}

/* ─── NAV COLUMNS ─────────────────────────────────────────────────── */
.apb-footer__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--apb-foot-fg);
    margin: 0 0 18px;
    padding: 0;
    border-bottom: 1px solid var(--apb-foot-border);
    padding-bottom: 10px;
}

.apb-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.apb-footer__list--two-cols {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 14px;
}

@media (max-width: 480px) {
    .apb-footer__list--two-cols {
        grid-template-columns: 1fr;
    }
}

.apb-footer__list a {
    color: var(--apb-foot-fg-soft);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
    font-size: 14px;
    line-height: 1.5;
    display: inline-block;
}

.apb-footer__list a:hover,
.apb-footer__list a:focus-visible {
    color: var(--apb-foot-link-hover);
    transform: translateX(2px);
}

.apb-footer__list a:focus-visible {
    outline: 2px solid var(--apb-foot-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ─── BOTTOM BAR ──────────────────────────────────────────────────── */
.apb-footer__bottom {
    border-top: 1px solid var(--apb-foot-border);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    justify-content: space-between;
    align-items: center;
}

.apb-footer__bottom-left,
.apb-footer__bottom-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.apb-footer__copyright {
    margin: 0;
    font-size: 13px;
    color: var(--apb-foot-fg-soft);
    line-height: 1.6;
}

.apb-footer__copyright strong {
    color: var(--apb-foot-fg);
    font-weight: 600;
}

.apb-footer__copyright a {
    color: var(--apb-foot-fg-soft);
    text-decoration: none;
    border-bottom: 1px dotted var(--apb-foot-border);
}

.apb-footer__copyright a:hover,
.apb-footer__copyright a:focus-visible {
    color: var(--apb-foot-link-hover);
    border-bottom-color: var(--apb-foot-link-hover);
}

/* Cookies button */
.apb-footer__cookies {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: var(--apb-foot-fg);
    border: 1px solid var(--apb-foot-border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.15s ease;
    font-family: inherit;
}

.apb-footer__cookies:hover,
.apb-footer__cookies:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--apb-foot-accent);
    color: var(--apb-foot-accent);
}

.apb-footer__cookies:focus-visible {
    outline: 2px solid var(--apb-foot-accent);
    outline-offset: 2px;
}

/* ─── WPML lang switcher dans le footer ───────────────────────────── */
.apb-footer .wpml-ls-statics-footer,
.apb-footer .wpml-ls {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.apb-footer .wpml-ls a {
    color: var(--apb-foot-fg-soft) !important;
    background: transparent !important;
    border: 1px solid var(--apb-foot-border);
    border-radius: 999px;
    padding: 6px 12px !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 0.15s ease;
}

.apb-footer .wpml-ls a:hover {
    color: var(--apb-foot-fg) !important;
    border-color: var(--apb-foot-accent);
    background: rgba(255, 255, 255, 0.06) !important;
}

.apb-footer .wpml-ls-current-language a {
    color: var(--apb-foot-fg) !important;
    border-color: var(--apb-foot-accent) !important;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .apb-footer__inner {
        padding: 40px 20px 20px;
    }
    .apb-footer__grid {
        gap: 32px 24px;
        padding-bottom: 32px;
    }
    .apb-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .apb-footer__bottom-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .apb-footer {
        margin-top: 48px;
        font-size: 14px;
    }
    .apb-footer__copyright {
        font-size: 12px;
    }
}

/* ─── PRINT ───────────────────────────────────────────────────────── */
@media print {
    .apb-footer {
        display: none;
    }
}

/* ─── Si présent dans le body avec admin-bar WP, pas d'overlap ────── */
body.admin-bar .apb-footer {
    /* le footer arrive en fin de body, pas concerné par l'admin-bar */
}
