/* ================================
   TEXTES — justification par défaut
================================ */

.entry-content p,
.site-content p,
.wp-block-paragraph,
.uagb-desc-text,
.uagb-ifb-desc,
.uagb-testimonial__desc {
  margin-bottom: 1.4em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Respect des alignements choisis dans WordPress */
.has-text-align-center,
.has-text-align-center *,
.wp-block-heading.has-text-align-center,
p.has-text-align-center {
  text-align: center !important;
  hyphens: none !important;
}

.has-text-align-left,
.has-text-align-left *,
p.has-text-align-left {
  text-align: left !important;
  hyphens: none !important;
}

.has-text-align-right,
.has-text-align-right *,
p.has-text-align-right {
  text-align: right !important;
  hyphens: none !important;
}

/* Titres : on ne les justifie jamais */
h1, h2, h3, h4, h5, h6,
.uagb-heading-text,
.uagb-ifb-title,
.uagb-testimonial__title,
.uagb-testimonial__author,
.uagb-testimonial__company {
  text-align: inherit;
  hyphens: none;
}

/* ================================
   ACCUEIL — blocs qui doivent rester centrés
================================ */

body.home .uagb-heading-text,
body.home .wp-block-heading,
body.home .uagb-testimonial__author,
body.home .uagb-testimonial__company,
body.home .uagb-testimonial__title {
  text-align: center !important;
}

/* Avis clients : noms + étoiles centrés */
body.home .wp-block-uagb-testimonial,
body.home .wp-block-uagb-testimonial * {
  text-align: center !important;
}

/* Bloc contact accueil */
body.home .wp-block-uagb-info-box .uagb-ifb-title,
body.home .wp-block-uagb-info-box .uagb-heading-text {
  text-align: center !important;
}

/* ================================
   HEADER — articles uniquement
================================ */

body.single-post .ast-primary-header-bar,
body.single-post .main-header-bar {
  background: #353535 !important;
}

body.single-post .main-header-menu > .menu-item > a,
body.single-post .ast-header-menu a,
body.single-post .site-title a,
body.single-post .site-header a {
  color: #E5D7D1 !important;
}

body.single-post .main-header-menu > .menu-item > a:hover,
body.single-post .main-header-menu > .menu-item.current-menu-item > a,
body.single-post .main-header-menu > .menu-item.current-menu-ancestor > a {
  color: #E5D7D1 !important;
  opacity: 0.85;
}

/* ================================
   FOOTER — responsive propre
================================ */

footer,
footer * {
  box-sizing: border-box;
}

footer {
  overflow-x: hidden;
}

footer a {
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Cache le titre du site dans le footer */
footer .site-title,
footer .ast-site-title-wrap,
footer .site-branding {
  display: none !important;
}

/* Liens villes footer */
.footer-villes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
}

.footer-villes a {
  white-space: nowrap !important;
}

/* ================================
   MOBILE
================================ */

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  footer,
  footer * {
    max-width: 100%;
  }

  .footer-villes {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .footer-villes a {
    white-space: normal !important;
    text-align: center !important;
  }
}