/*
 * Footer — Figma "Footer" (4166:405).
 *
 * The dark band closing every page: the logo in white, the legal links, the back-to-top button in
 * the bottom right corner, and — when Google Analytics has something to ask consent for —
 * "Gestion des cookies", styled as one more legal link even though it is a `<button>` that reopens
 * the cookie consent banner rather than a page.
 */

.mo-footer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--mo-spacing-md);
    padding: var(--mo-spacing-sm) var(--mo-margin-body-lr);
    background-color: var(--mo-surface-primary);
}

.mo-footer__brand .mo-logo {
    height: 150px;
    width: auto;
}

.mo-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--mo-spacing-sm);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--mo-text-default-light);
}

.mo-footer__link {
    color: inherit;
    font-size: var(--mo-font-size-body-sm);
    line-height: var(--mo-line-height-body-sm);
    text-decoration: none;
}

.mo-footer__link:hover,
.mo-footer__link:focus-visible {
    text-decoration: underline;
}

/* The one legal-looking link that is a `<button>`: strips the user-agent chrome the anchors never had. */
.mo-footer__link--button {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.mo-footer__separator {
    font-size: var(--mo-font-size-body-md);
    line-height: var(--mo-line-height-body-md);
}

.mo-footer__top {
    position: fixed;
    right: var(--mo-margin-body-lr);
    bottom: var(--mo-spacing-sm);
    z-index: 40;
    display: flex;
    /* `button-icone`, whose 2px stroke falls outside its 40px frame — see components/button.css. */
    width: calc(var(--mo-scale-500) + 2 * var(--mo-border-width-xs));
    height: calc(var(--mo-scale-500) + 2 * var(--mo-border-width-xs));
    align-items: center;
    justify-content: center;
    padding: 0;
    border: var(--mo-border-width-xs) solid var(--mo-border-action);
    border-radius: var(--mo-radius-sm);
    background-color: var(--mo-surface-action-dark);
    color: var(--mo-icon-default-light);
    cursor: pointer;
}

/*
 * `--mo-surface-action-hover`/`--mo-border-action-hover` resolve to `Neutral/500`, the exact colour
 * of the footer background — fine on the white buttons of components/button.css, invisible here.
 * The button floats over any page section now that it is fixed, so its hover state uses the page
 * background colour (`--mo-surface-default`) instead, with the pink border the maquette gives every
 * other hover.
 */
.mo-footer__top:hover,
.mo-footer__top:focus-visible {
    background-color: var(--mo-surface-default);
    border-color: var(--mo-border-action);
    color: var(--mo-icon-action);
}

.mo-footer__top svg {
    width: var(--mo-scale-250);
    height: var(--mo-scale-250);
}
