/* Footer redesign. */

/* Sticky footer: legacy `html, body { height: 100% }` + a white body background
 * mean that on any page shorter than the viewport the body paints white *below*
 * the footer. Make the page wrapper a full-height column and let the footer take
 * the slack, so it always sits at the bottom edge. Scoped to `body > main` (the
 * page wrapper) to avoid hitting any nested `<main>` inside components. */
/* Legacy theme.css sets `html, body { height: 100% }` (a FIXED height = viewport),
   which caps the body and defeats the sticky footer below: on a viewport taller
   than the content, white paints under the footer. Let them grow with content;
   the min-height:100vh on the page wrapper provides the full-height floor. */
html,
body {
    height: auto;
    min-height: 100%;
}

body > main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Scoped reset so this file works on legacy pages without loading base.css. */
.footer, .footer * {
    box-sizing: border-box;
}

.footer {
    font-family: var(--font-body);
}

.footer h4, .footer .nav-brand {
    font-family: var(--font-heading);
}

.footer {
    background: var(--navy);
    color: var(--white);
    padding: 32px 0 0;
    /* Own our margins explicitly: the legacy footer partial
     * (scss/_partials/footer/_footer.scss) sets a bare `footer { margin-bottom: 76px }`
     * (≤900px) that reserved space for a removed mobile bar — it leaked onto this
     * redesign footer as a white gap. */
    margin-bottom: 0;
    /* Take the vertical slack in the `body > main` flex column so the footer is
     * pinned to the bottom on short pages (no white body showing below it). */
    margin-top: auto;
    /* Sit above page content: the home page has absolutely-positioned sections
     * (.home-expert-text / .home-youtube-text) that otherwise overflow and, being
     * positioned, paint over the static footer and swallow its link clicks. */
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .nav-brand {
    margin-bottom: 4px;
}

.footer-brand .nav-brand img {
    height: 44px;
    width: auto;
    /* The shield SVG carries ~1px of transparent padding on its left edge, so
     * its visible artwork sat ~1px right of Mickaël's photo below (both element
     * boxes share the same left edge). Pull it flush so the two left edges line
     * up visually — without touching the shared SVG asset. */
    margin-left: -1px;
}

/* Expert (photo + name) under the logo. */
.footer-expert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.footer-expert-photo {
    /* Sized to the logo shield (~44px) so the photo+name row matches the
       logo+wordmark row — icons and text columns line up into one block. */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
    flex: 0 0 auto;
}

.footer-expert-name {
    font-weight: 700;
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.25;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--orange);
    /* !important to beat the legacy global `a:hover { color: #ec7330 !important }`
       (scss links partial) — without it the icon turned orange-on-orange (invisible). */
    color: var(--white) !important;
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--white);
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    /* `!important` to beat the legacy global `a:hover { color: #ec7330 !important }`
       (scss links partial) — otherwise footer links hover to the legacy orange
       instead of the redesign var(--orange). */
    color: var(--orange) !important;
}

/* Full-width band under the footer grid. */
.footer-shipping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.25);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--orange);
    font-weight: 600;
    font-size: 1rem;
    margin: 8px 0 24px;
}

.footer-compliance {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 0;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    /* Keep the text centered too, so it stays centered when it wraps to two
       lines on narrow screens (same as .footer-biocide-notice below). */
    text-align: center;
}

.footer-compliance span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Mandatory biocide caution mention (art. 72, Regulation (EU) 528/2012). */
.footer-biocide-notice {
    margin: 0;
    padding: 10px 0 2px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 16px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--orange);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 16px;
    }
    /* Brand on its own full-width row so the link columns sit evenly in a 2×2
       below it (otherwise the tall brand column leaves a big gap next to it). */
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

/* Tablet: the brand row is wide, so sit the logo and the expert (photo + name)
   side by side on one line, and drop the description + social to their own
   full-width rows below — description centered. */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-brand {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        column-gap: 40px;
        row-gap: 16px;
    }
    .footer-brand .nav-brand {
        margin-bottom: 0;
    }
    .footer-expert {
        margin: 0;
    }
    .footer-brand p,
    .footer-social {
        flex-basis: 100%;
    }
    .footer-brand p {
        text-align: center;
        max-width: none;
    }
}

@media (max-width: 768px) {
    /* Brand spans full width + centered; the 3 link columns sit in a compact
       2-up grid below it instead of one tall stack. */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 16px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
    }
    .footer-brand .nav-brand {
        justify-content: center;
    }
    /* Center the expert (photo + name) row like the logo above it. */
    .footer-expert {
        justify-content: center;
    }
    .footer-brand p {
        max-width: 360px;
        margin: 0 auto 12px;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 20px;
    }
}

/* Reassurance band (orange, 4 items) shown above the footer on every redesign page.
   Reuse of the v1 cart block; mirrors static/core/scss/_partials/footer/_footer.scss. */
.footer__reassurance {
    background: #ff8e4f;
    color: #fff;
}

.footer__reassurance .block-reassurance {
    padding: 32px 0 8px;
    margin: 0 auto;
    width: 90%;
    max-width: 962px;
    text-align: center;
    background: transparent;
    box-shadow: none;
}

.footer__reassurance ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__reassurance ul li {
    margin: 0 auto 24px;
    width: 24%;
}

.footer__reassurance .block-reassurance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.footer__reassurance .block-reassurance-item svg {
    margin-bottom: 16px;
}

.footer__reassurance .block-reassurance-item span.h6 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 17px;
}

@media (max-width: 900px) {
    .footer__reassurance ul li {
        width: 40%;
    }
}

@media (max-width: 460px) {
    .footer__reassurance ul li {
        width: 90%;
    }
}
