/* =========================================================
   ISE — CSS GLOBAL (HEADER/FOOTER + ESPACES + LARGEURS)
   À coller en UNE SEULE FOIS dans : Apparence > Personnaliser > CSS additionnel
   ========================================================= */

/* --- 1) SUPPRESSION ESPACES PAR DÉFAUT (haut/bas) --- */
.wp-site-blocks{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.wp-block-post-content{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Supprime les marges parasites du 1er et du dernier bloc dans le contenu */
.entry-content > :first-child{ margin-top: 0 !important; }
.entry-content > :last-child{  margin-bottom: 0 !important; }

/* Sécurise le footer contre tout margin-top automatique */
.wp-block-template-part.footer,
footer{ margin-top: 0 !important; }

/* --- 2) LARGEUR DESKTOP (pages courantes) --- */
@media (min-width: 1200px){
  .wp-block-post-content,
  .entry-content{
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- 3) PAGES SECONDAIRES (layout "constrained") :
        fonds FULL WIDTH conservés + contenu centré --- */
@media (min-width: 1200px){

  /* Fixe les variables WP utilisées par alignwide/content */
  .wp-site-blocks{
    --wp--style--global--content-size: 1280px;
    --wp--style--global--wide-size: 1280px;
  }

  /* Blocs alignwide => colonne centrée */
  .is-layout-constrained > .alignwide,
  .is-layout-constrained > p.alignwide,
  .is-layout-constrained > h1.alignwide,
  .is-layout-constrained > h2.alignwide,
  .is-layout-constrained > h3.alignwide{
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Blocs alignfull => fond pleine largeur + gouttières internes centrées */
  .is-layout-constrained > .alignfull{
    padding-left: max(40px, calc((100% - 1280px)/2)) !important;
    padding-right: max(40px, calc((100% - 1280px)/2)) !important;
  }
}/* ==============================
   ISE — CTA FLOTTANT (GLOBAL)
   Cible la classe : ise-cta-flottant
   (classe posée sur : Boutons OU Bouton OU lien)
================================ */

/* 1) On force le flottant sur le bon élément selon où est la classe */
.wp-block-buttons.ise-cta-flottant,
.wp-block-button.ise-cta-flottant,
.wp-block-button__link.ise-cta-flottant {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  left: auto !important;
  top: auto !important;
  z-index: 99999 !important;
}

/* 2) Si la classe est sur le conteneur Boutons, on force le lien à rester “normal” */
.wp-block-buttons.ise-cta-flottant .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 3) Mobile : CTA pleine largeur, centré */
@media (max-width: 768px) {

  .wp-block-buttons.ise-cta-flottant,
  .wp-block-button.ise-cta-flottant,
  .wp-block-button__link.ise-cta-flottant {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    width: auto !important;
    text-align: center !important;
  }

  .wp-block-buttons.ise-cta-flottant .wp-block-button__link,
  .wp-block-button.ise-cta-flottant .wp-block-button__link,
  .wp-block-button__link.ise-cta-flottant {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
  }
}