/*
 * Pied de page (templates/app/shared/footer.html.twig).
 * Complète les styles de base compilés dans common.css.
 * Disposition compacte : une seule ligne « logo + signature | navigation | contact »,
 * puis une fine ligne « © | liens légaux ».
 * Fichier écrit à la main (il ne passe pas par la compilation Sass du dossier assets/).
 */

.footer {
    --footer-blue: #0000b7;
    --footer-blue-light: #247bff;
    --footer-ink: #222222;
    --footer-muted: #5c5e61;
}

/* ------------------------------------------------------------- partie haute */

.footer .footer__top {
    padding: 22px 0 18px;
}

.footer .footer__top__container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    justify-items: center;
    align-items: center;
    text-align: center;
}

.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .footer__top__logo {
    display: block;
    width: 104px;
    margin-bottom: 0;
    line-height: 0;
}

/* La signature est dans la ligne du bas, à côté du © */
.footer__tagline {
    margin: 0;
    color: var(--footer-muted);
    font-size: 12px;
    line-height: 1.4;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
}

.footer__nav__link {
    color: var(--footer-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
    transition: color .3s;
}

.footer__nav__link:hover {
    color: var(--footer-blue-light);
}

.footer .footer__social {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer .footer__social__links {
    padding: 0;
}

.footer .footer__social__links__item {
    width: 34px;
    height: 34px;
}

.footer .footer__social__form-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 20px;
    font-size: 13px;
    white-space: nowrap;
    background-color: var(--footer-blue);
}

.footer .footer__social__form-btn:hover {
    background-color: var(--footer-blue-light);
}

.footer__nav__link:focus-visible,
.footer__top__logo:focus-visible,
.footer__social__form-btn:focus-visible,
.footer__social__links__item:focus-visible,
.footer__lastrow__link:focus-visible {
    outline: 2px solid var(--footer-blue-light);
    outline-offset: 3px;
    border-radius: 4px;
}

.footer .footer__social__form-btn:focus-visible,
.footer .footer__social__links__item:focus-visible {
    border-radius: 999px;
}

/* -------------------------------------------------------------- ligne du bas */

.footer .footer__lastrow {
    padding: 9px 0;
}

.footer__lastrow__left {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 4px 14px;
}

.footer .footer__lastrow__container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
}

.footer__lastrow__copy {
    color: var(--footer-muted);
    font-weight: 500;
}

.footer__lastrow__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 16px;
}

.footer .footer__lastrow__link {
    margin: 0;
}

.footer .footer__lastrow__link:hover {
    color: var(--footer-blue-light);
}

@media (min-width: 600px) {
    .footer .footer__lastrow__container {
        justify-content: space-between;
    }

    .footer__lastrow__links {
        gap: 0;
    }

    .footer .footer__lastrow .divider {
        color: #a9abb0;
    }
}

/* ------------------------------------------------- tablette et grand écran */

@media (min-width: 850px) {
    .footer .footer__top {
        padding: 14px 0 12px;
    }

    /* logo + signature à gauche, navigation au centre, contact à droite */
    .footer .footer__top__container {
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 32px;
        text-align: left;
    }

    .footer__brand {
        align-items: flex-start;
        justify-self: start;
    }

    .footer .footer__top__logo {
        width: 100px;
    }

    /* Largeur intermédiaire : deux colonnes nettes plutôt qu'un retour à la ligne orphelin */
    .footer__nav {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-self: center;
        gap: 8px 26px;
    }

    .footer .footer__social {
        justify-self: end;
        flex-wrap: nowrap;
    }
}

@media (min-width: 1200px) {
    .footer .footer__top__container {
        column-gap: 48px;
    }

    /* Grand écran : tous les liens sur une seule ligne */
    .footer__nav {
        display: flex;
        gap: 8px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer__nav__link { transition: none; }
}
