
/* Bords alignés sur le contenu des pages et sur l'en-tête (--page-gutter, --page-width de global.css) */
.site-footer,
.footer-bottom {
    --footer-pad-x: max(var(--page-gutter), (100% - var(--page-width)) / 2);
}

.site-footer {
    background: var(--c-green-dark);
    padding: 48px var(--footer-pad-x);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    grid-column: 1;
}

.footer-logo a {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: white;
    font-weight: 900;
    text-decoration: none;
}

.footer-desc {
    font-size: var(--text-md);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-lg);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.footer-col h4 {
    color: white;
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 6px;
}

.footer-col a {
    display: inline-block;
    padding: 4px 0;              /* zone tactile plus haute (mobile) */
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: var(--text-md);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    background: var(--c-green-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px var(--footer-pad-x);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-bottom__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 24px;
    width: 100%;
}

.footer-affiliate-disclaimer {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 10px;
}

.footer-bottom__row p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.footer-bottom-links a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* « À propos » et « Support » : seulement sur téléphone et dans l'app, où les colonnes sont masquées */
.footer-bottom-links__mobile {
    display: none;
}

/* Téléphone, tablette et application (barre du bas présente) : pied de page compact.
   Les colonnes de liens répètent la barre du bas et son panneau « Plus » : il reste le logo et les réseaux
   sur une ligne, puis une ligne de liens (à propos, support, pages légales), le copyright et la mention d'affiliation */
@media (max-width: 1024px) {
    .site-footer {
        display: block;
        padding: 24px var(--footer-pad-x) 16px;
    }
    .footer-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .footer-logo a {
        font-size: var(--text-2xl);
    }
    .footer-desc,
    .footer-col {
        display: none;
    }
    .footer-social {
        margin-top: 0;
        gap: 8px;
    }
    .footer-social a {
        width: 32px;
        height: 32px;
    }

    /* Place pour la barre de navigation du bas (header.css) : réservée ici plutôt que sous le <body>,
       sinon une bande claire apparaît sous le pied de page quand la barre se masque au défilement */
    .footer-bottom {
        gap: 10px;
        padding-top: 16px;
        padding-bottom: calc(16px + 60px + env(safe-area-inset-bottom));
    }
    .footer-bottom__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-bottom-links {
        order: -1;                       /* les liens avant le copyright */
        gap: 0 16px;
    }
    .footer-bottom-links a {
        padding: 4px 0;                  /* zone tactile plus haute */
    }
    .footer-bottom-links__mobile {
        display: inline-block;
    }
    .footer-bottom__row p {
        font-size: var(--text-xs);
    }
    .footer-affiliate-disclaimer {
        font-size: var(--text-2xs);
        padding-top: 8px;
    }
}
