/* ==========================================================================
   Footer tutiac.com — mise en page rééquilibrée
   Chargé par wp-content/novamira-sandbox/tutiac-footer-layout.php

   Le préfixe #footer est volontaire : il permet de passer devant les règles
   de themes/saras/style.css sans multiplier les !important.
   ========================================================================== */

#footer.site-footer{
    padding-top: 5rem;
}

/* --- Rangée de colonnes ---------------------------------------------------
   Grille auto-équilibrée. Remplace le flex figé à 33 % du thème, qui
   réservait une colonne pleine largeur même lorsqu'elle était vide.
   -------------------------------------------------------------------------- */
#footer .footer-widgets{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 3rem 3.5rem;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
#footer .footer-widgets .footer-widget{
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
}
#footer .footer-widgets .gg-widget{
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
}

/* Intitulés de colonne. Annule le décalage hérité des widgets de sidebar
   (position:relative ; left:-2em ; width:calc(100% + 4em) ; margin-top:-2em),
   qui faisait déborder le filet sous les titres hors de sa colonne. */
#footer .footer-widgets .widget-title{
    position: static;
    left: auto;
    width: auto;
    margin: 0 0 1.15rem !important;
    padding: 0 0 .7rem !important;
    font-size: 1.4rem !important;
    line-height: 1.2;
    color: #fff;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

/* --- Contenu des colonnes -------------------------------------------------- */
#footer .footer-widgets .textwidget{
    font-size: .95rem;
    line-height: 1.85;
    color: rgba(255,255,255,.72);
}
#footer .footer-widgets .textwidget a{
    color: rgba(255,255,255,.72);
    transition: color .2s ease;
}
#footer .footer-widgets .textwidget a:hover,
#footer .footer-widgets .textwidget a:focus-visible{
    color: #dcbe84;
}
#footer .footer-widgets .tutiac-org{
    display: block;
    color: #fff;
    letter-spacing: .04em;
}
#footer .footer-widgets .tutiac-hours{
    display: block;
    margin-top: .9rem;
    font-size: .8rem;
    line-height: 1.6;
    color: rgba(255,255,255,.5);
}

/* Neutralise les règles laissées par l'ancien widget d'icônes sociales :
   li flottants de 41-43 px et ul à marge latérale de 22 %. */
#footer .footer-widgets .gg-widget ul{
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    text-align: center;
}
#footer .footer-widgets .gg-widget ul li{
    width: auto !important;
    float: none !important;
    font-size: inherit !important;
    color: inherit !important;
    padding: 0 !important;
    border: 0 !important;
}
#footer .footer-widgets .tutiac-links li + li{
    margin-top: .35rem;
}

/* --- Réseaux sociaux ------------------------------------------------------- */
#footer .footer-widgets .tutiac-social{
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
}
#footer .footer-widgets .tutiac-social li{
    margin: 0 !important;
}
#footer .footer-widgets .tutiac-social a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 6px;
    color: rgba(255,255,255,.75);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
#footer .footer-widgets .tutiac-social a:hover,
#footer .footer-widgets .tutiac-social a:focus-visible{
    color: #101010;
    background: #dcbe84;
    border-color: #dcbe84;
    text-decoration: none;
}
#footer .footer-widgets .tutiac-social svg{
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --- Bas de page : mention légale, copyright, liens légaux ----------------- */
#footer .tutiac-footer-bottom{
    max-width: 1040px;
    margin: 3.5rem auto 0;
    padding: 0 1.5rem;
    text-align: center;
}
#footer .tutiac-footer-legal{
    margin: 0;
    padding: 1.4rem 0;
    font-size: .72rem;
    line-height: 1.5;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    border-top: 1px solid rgba(255,255,255,.1);
}
#footer .tutiac-footer-meta{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem 2rem;
    padding: 1.2rem 0 2.6rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
#footer .tutiac-footer-copyright{
    margin: 0;
    font-size: .82rem;
    color: rgba(255,255,255,.45);
}
#footer .tutiac-footer-nav-list{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .3rem 1.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
#footer .tutiac-footer-nav-list li{
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    float: none;
}
#footer .tutiac-footer-nav-list a{
    font-size: .82rem;
    color: rgba(255,255,255,.6);
    transition: color .2s ease;
}
#footer .tutiac-footer-nav-list a:hover,
#footer .tutiac-footer-nav-list a:focus-visible{
    color: #dcbe84;
}

/* --- Tablette et mobile ---------------------------------------------------
   style.css impose ici `display:block !important` sur la rangée ET une
   `height:280px` fixe sur chaque colonne (qui rognait ou espaçait le contenu
   selon sa longueur). On rend la main à la grille et à la hauteur automatique.
   -------------------------------------------------------------------------- */
@media (max-width: 768px){
    #footer.site-footer{ padding-top: 3.25rem; }

    /* Trois colonnes serrées plutôt que le 2 + 1 orphelin que produirait
       l'auto-fit à cette largeur. */
    #footer .footer-widgets{
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 2.25rem 1.75rem;
        max-width: 100% !important;
    }
    #footer .footer-widgets .footer-widget{
        height: auto !important;
        max-width: none !important;
    }

    #footer .tutiac-footer-bottom{ margin-top: 2.5rem; }
    #footer .tutiac-footer-meta{
        flex-direction: column;
        justify-content: center;
        gap: .9rem;
        padding-bottom: 2rem;
    }
    #footer .tutiac-footer-nav-list{ justify-content: center; }
}

/* En dessous, trois colonnes deviennent illisibles : on empile. */
@media (max-width: 639px){
    #footer .footer-widgets{
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}
