/* ============================================================
   BATI PROFIT - CORRECTION LOGO MOBILE (version forcée)
   ============================================================ */

/* === MOBILE (≤ 781 px) === */
@media (max-width: 781px) {

  /* === LOGO HEADER : forcer une taille raisonnable === */
  
  /* Le bloc site-logo lui-même */
  header .wp-block-site-logo,
  .site-header-linear .wp-block-site-logo,
  .site-brand .wp-block-site-logo,
  .wp-block-site-logo {
    width: 110px !important;
    max-width: 110px !important;
  }

  /* L'image à l'intérieur du logo - sélecteurs hyper spécifiques */
  header .wp-block-site-logo img,
  header .wp-block-site-logo a img,
  .site-header-linear .wp-block-site-logo img,
  .site-brand .wp-block-site-logo img,
  .site-brand img.custom-logo,
  .wp-block-site-logo.is-default-size img,
  .wp-block-site-logo img.custom-logo {
    width: 110px !important;
    max-width: 110px !important;
    height: auto !important;
    max-height: 50px !important;
    object-fit: contain !important;
  }

  /* === HEADER container === */
  .site-header-linear,
  header .wp-block-group.site-header-linear {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    min-height: auto !important;
  }


  /* === LOGO FOOTER : même traitement === */
  
  .pre-footer .wp-block-site-logo,
  footer .wp-block-site-logo {
    width: 140px !important;
    max-width: 140px !important;
    margin: 0 auto !important;
  }

  .pre-footer .wp-block-site-logo img,
  .pre-footer .wp-block-site-logo a img,
  footer .wp-block-site-logo img,
  footer .wp-block-site-logo img.custom-logo {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    max-height: 65px !important;
    object-fit: contain !important;
  }

  /* === FOOTER container : réduire les paddings === */
  .pre-footer {
    padding-top: 25px !important;
    padding-bottom: 25px !important;
  }

  /* Compacter les colonnes du footer */
  .pre-footer .wp-block-column {
    padding: 4px 0 !important;
    margin-bottom: 8px !important;
  }

  /* Icônes sociales centrées et compactes */
  .pre-footer .wp-block-social-links {
    gap: 6px !important;
    justify-content: center !important;
    margin: 0 !important;
  }
}


/* === SMARTPHONE (≤ 480 px) === */
@media (max-width: 480px) {
  
  /* Logo header encore plus petit */
  header .wp-block-site-logo,
  .site-brand .wp-block-site-logo,
  .wp-block-site-logo {
    width: 95px !important;
    max-width: 95px !important;
  }
  
  header .wp-block-site-logo img,
  .site-brand img,
  .wp-block-site-logo img.custom-logo {
    width: 95px !important;
    max-width: 95px !important;
    max-height: 42px !important;
  }

  /* Header padding minimal */
  .site-header-linear {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  /* Logo footer plus petit */
  .pre-footer .wp-block-site-logo,
  footer .wp-block-site-logo {
    width: 120px !important;
    max-width: 120px !important;
  }

  .pre-footer .wp-block-site-logo img,
  footer .wp-block-site-logo img {
    width: 120px !important;
    max-width: 120px !important;
    max-height: 55px !important;
  }

  .pre-footer {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
}
/* ============================================================
   BATI PROFIT - CORRECTION FOOTER (renforcée)
   ============================================================ */

@media (max-width: 781px) {
  
  /* Cibler le logo footer avec TOUS les sélecteurs possibles */
  footer .wp-block-site-logo,
  footer.wp-block-template-part .wp-block-site-logo,
  .site-footer-container .wp-block-site-logo,
  .pre-footer .wp-block-site-logo,
  .wp-block-group.pre-footer .wp-block-site-logo,
  body footer .wp-block-site-logo {
    width: 130px !important;
    max-width: 130px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  footer .wp-block-site-logo img,
  footer .wp-block-site-logo a img,
  footer .wp-block-site-logo img.custom-logo,
  footer.wp-block-template-part .wp-block-site-logo img,
  .site-footer-container .wp-block-site-logo img,
  .pre-footer .wp-block-site-logo img,
  .wp-block-group.pre-footer .wp-block-site-logo img,
  body footer .wp-block-site-logo img {
    width: 130px !important;
    max-width: 130px !important;
    height: auto !important;
    max-height: 60px !important;
    object-fit: contain !important;
  }

  /* Réduire le padding du conteneur principal du footer */
  footer .pre-footer,
  .site-footer-container .pre-footer,
  body footer.wp-block-template-part .pre-footer,
  .wp-block-group.pre-footer {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  /* Compacter l'empilement des colonnes du footer */
  footer .pre-footer .wp-block-columns,
  .site-footer-container .wp-block-columns {
    gap: 8px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
  }

  footer .pre-footer .wp-block-column,
  .site-footer-container .wp-block-column {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
  }

  /* Compacter les liens du menu footer (Nos services, Réalisations...) */
  footer .wp-block-navigation,
  footer .wp-block-navigation-item,
  footer .wp-block-navigation__container {
    gap: 8px !important;
  }

  footer .wp-block-navigation-item__content,
  footer .wp-block-navigation a {
    padding: 4px 0 !important;
    line-height: 1.3 !important;
  }

  /* Icônes sociales : centrées et compactes */
  footer .wp-block-social-links {
    gap: 6px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    justify-content: center !important;
  }

  footer .wp-block-social-link {
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  
  /* Logo footer encore plus petit sur smartphone */
  footer .wp-block-site-logo,
  body footer .wp-block-site-logo,
  .pre-footer .wp-block-site-logo {
    width: 110px !important;
    max-width: 110px !important;
  }

  footer .wp-block-site-logo img,
  body footer .wp-block-site-logo img,
  .pre-footer .wp-block-site-logo img {
    width: 110px !important;
    max-width: 110px !important;
    max-height: 50px !important;
  }

  /* Padding minimal sur smartphone */
  footer .pre-footer,
  .wp-block-group.pre-footer {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }
}
