/* =====================
   FOOTER STYLES
   ===================== */

.garrigues-footer {
    font-family: var(--wp--preset--font-family--inria-sans);
    background-color: var(--wp--preset--color--white);
    border-top: 1px solid rgba(31, 41, 51, 0.2);
    padding: 40px 20px;
}

.garrigues-footer h2 {
    color: var(--wp--preset--color--primary-dark);
    margin-bottom: 24px;
}

/* Section Contact */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 24px;
}

.contact-button {
    flex: 1 1 0;
    min-width: 180px;
}

.contact-button-address {
    flex-basis: 100%;
}

.contact-button a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wp--preset--color--white);
    text-decoration: none;
    font-size: var(--wp--preset--font-size--font-small);
    width: 100%;
    padding: 0 !important;
}

.contact-button i {
    font-size: 20px;
    color: var(--wp--preset--color--white);
}

/* Section Partenaires */
.footer-partners {
    margin-top: 48px;
}

.footer-partners h2 {
    color: var(--wp--preset--color--primary-dark);
}

.partners-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.partners-grid figure {
    margin: 0;
    flex: 0 1 auto;
}

.partners-grid img {
    max-height: 50px;
    max-width: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Desktop: utiliser grid pour contrôle précis */
@media (min-width: 782px) {
    .partners-grid {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr);
        gap: 24px;
    }

    .partners-grid img {
        max-height: 60px;
        max-width: none;
    }

    /* Tous les logos prennent 2 colonnes par défaut */
    .partners-grid figure {
        grid-column: span 2;
    }

    /* Fondation de France (1er) : 1 colonne */
    .partners-grid figure:nth-child(1) {
        grid-column: 2 / span 1;
    }

    /* Brignoles (3ème) : 1 colonne */
    .partners-grid figure:nth-child(3) {
        grid-column: span 1;
    }

    /* 7ème logo (premier de la ligne 2) commence à la colonne 2 pour centrer */
    .partners-grid figure:nth-child(7) {
        grid-column: 2 / span 2;
    }
}

/* Section Légale */
.footer-legal {
    border-top: 1px solid rgba(31, 41, 51, 0.1);
    padding-top: 24px;
    margin-top: 48px;
}

.footer-menu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu-list li {
    margin: 0;
    list-style: none;
}

.footer-menu-list a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-size: var(--wp--preset--font-size--font-tiny);
}

.footer-menu-list a:hover {
    text-decoration: underline;
}

/* Mobile : contact buttons = icônes seulement */
@media (max-width: 781px) {
    .contact-title {
        display: none;
    }

    .contact-buttons {
        justify-content: space-evenly;
    }

    .garrigues-footer .contact-button a span {
        display: none;
    }

    .garrigues-footer .contact-button a {
        justify-content: center;
    }

    .garrigues-footer .contact-button i {
        font-size: var(--wp--preset--font-size--font-small);
    }

    .garrigues-footer .contact-button {
        flex: 0 0 auto;
        min-width: auto;
    }
}

/* Desktop styles */
@media (min-width: 782px) {
    .garrigues-footer {
        padding: 60px 40px;
    }

    .contact-buttons {
        max-width: 1000px;
    }

    .contact-buttons span {
        font-size: var(--wp--preset--font-size--font-large);
    }

    .garrigues-footer .contact-button i {
        font-size: var(--wp--preset--font-size--font-extra-large);
    }

    .contact-button a {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }


    .partners-grid {
        gap: 32px;
    }

    .partner-logo img {
        height: 80px;
    }

    .footer-menu-list a {
        font-size: var(--wp--preset--font-size--font-large);
    }
}