.site-footer{background:#0f0f0f;color:#fff;padding:28px 0;line-height:1.5}
.site-footer .container{max-width:1200px;margin:0 auto;padding:0 16px}
.footer-title{font-size:1.125rem;font-weight:700;margin:0 0 8px}
.footer-row{display:grid;gap:12px;margin-bottom:8px}
.footer-row--copyright{margin-top:8px;text-align:center;opacity:.85;font-size:.95rem}
.footer-social-list{display:flex;gap:16px;flex-wrap:wrap;list-style:none;padding:0;margin:0;justify-content:center}
.footer-social-list a,.footer-legal a,.footer-tel,.footer-mail{color:#fff;text-decoration:none}
.footer-social-list a:hover,.footer-legal a:hover,.footer-tel:hover,.footer-mail:hover{text-decoration:underline}
.footer-telemail{margin:0;display:flex;align-items:center;justify-content:center;gap:8px}
.sep{opacity:.6}
.footer-address address{margin:0;text-align:center}
.footer-brand{order:1;text-align:center}
.footer-contacts{order:2}
.footer-address{order:3}
.footer-social{order:4}
.footer-legal{order:5;text-align:center}
.footer-row--copyright{order:6}
@media (min-width: 992px){
  .footer-row--top,.footer-row--mid{grid-template-columns:1fr 1fr 1fr;align-items:center}
  .footer-brand{order:0;text-align:left}
  .footer-social{order:0;justify-self:center}
  .footer-contacts{order:0;justify-self:end}
  .footer-address{order:0;text-align:left}
  .footer-legal{order:0;text-align:center}
  .footer-email-only{order:0}
  .footer-row--copyright{text-align:center}
}
.footer-legal nav{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center}
.footer-legal .sep{margin:0 2px}

/* Masque les anciens footers pour éviter les doublons */
div.footer, .footer-grid.container { display: none !important; }
/* Nettoie un éventuel séparateur orphelin */
.footer-legal .sep:first-child, .footer-legal .sep:last-child { display: none; }


/* Copyright: mobile vs desktop */
.footer-copy { display: none; }               /* caché en mobile (on garde la rangée dédiée en bas) */
@media (min-width: 992px){
  .footer-copy { display: block; justify-self: center; text-align: center; opacity: .85; }
  .footer-row--copyright { display: none; }   /* on remonte le copyright d'une ligne sur desktop */
}

/* Desktop placement: adresse à gauche, copyright au centre, légal à droite */
@media (min-width: 992px){
  .footer-row--mid{ grid-template-columns: 1fr 1fr 1fr; }
  .footer-address { justify-self: start; text-align: left; }
  .footer-legal   { justify-self: end;   text-align: right; }
}


/* Layout mid row: address | copy | legal */
@media (min-width: 992px){
  .footer-row--mid{ grid-template-columns: 1fr 1fr 1fr; align-items: center; }
  .footer-address{ justify-self: start; text-align: left; }
  .footer-copy{ display: block; justify-self: center; text-align: center; opacity: .85; }
  .footer-legal{ justify-self: end; text-align: right; }
  /* Hide bottom copyright row on desktop (copyright is now centered above) */
  .footer-row--copyright{ display: none; }
}
/* Keep mid copyright hidden on mobile; use bottom row (already styled) */
@media (max-width: 991.98px){
  .footer-copy{ display: none; }
}


/* --- Stronger layout rules for desktop (override theme) --- */
@media (min-width: 992px){
  .site-footer .footer-row--mid{ display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; align-items: center !important; }
  .site-footer .footer-address{ grid-column: 1 !important; justify-self: start !important; text-align: left !important; }
  .site-footer .footer-copy{ grid-column: 2 !important; display: block !important; justify-self: center !important; text-align: center !important; opacity: .85; }
  .site-footer .footer-legal{ grid-column: 3 !important; justify-self: end !important; text-align: right !important; }
  .site-footer .footer-row--copyright{ display: none !important; }
}
/* Mobile: keep legal centered, copy at bottom; make sure legal isn't centered on desktop */
@media (max-width: 991.98px){
  .site-footer .footer-copy{ display: none !important; }
  .site-footer .footer-legal{ text-align: center !important; justify-self: center !important; }
}

/* Avoid external grid/flex from theme altering our mid row */
.site-footer .footer-row--mid > .footer-col{ margin: 0 !important; }


/* ---- Desktop alignment & visibility fixes ---- */
@media (min-width: 992px){
  .site-footer .footer-inner{max-width:1200px;margin:0 auto;padding:0 16px;}
  .site-footer .footer-row--top,
  .site-footer .footer-row--mid{display:grid !important;grid-template-columns:1fr 1fr 1fr !important;align-items:center !important;column-gap:16px;}
  /* Aligner les colonnes de gauche (titre & adresse) */
  .site-footer .footer-brand,
  .site-footer .footer-address{justify-self:start !important;text-align:left !important;margin-left:0 !important;padding-left:0 !important;}
  /* Centre = copyright visible */
  .site-footer .footer-copy{grid-column:2 !important;display:block !important;justify-self:center !important;text-align:center !important;opacity:.85;}
  /* Droite = tel en haut, légal en mid */
  .site-footer .footer-contacts{justify-self:end !important;text-align:right !important;}
  .site-footer .footer-legal{grid-column:3 !important;justify-self:end !important;text-align:right !important;}
  /* Cacher la rangée copyright du bas en desktop */
  .site-footer .footer-row--copyright{display:none !important;}
}

/* Mobile: copyright reste en bas, légal centré */
@media (max-width: 991.98px){
  .site-footer .footer-copy{display:none !important;}
  .site-footer .footer-legal{justify-self:center !important;text-align:center !important;}
}


/* Minifix: © visible sur fond sombre */
.site-footer .footer-copy, .site-footer .footer-copy * { color:#fff !important; }
