/* --- APPLIQUÉ UNIQUEMENT À LA PAGE D'ACCUEIL --- */

/* HEADER FIXE – barre noire réduite */
.home .wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #000;
  width: 100%;
  box-sizing: border-box;
}

/* Supprime les marges parasites */
body.home {
  margin: 0;
}

/* Réduire la barre noire autour du logo */
.home .wp-block-template-part .wp-block-group {
  padding-top: 3px;
  padding-bottom: 3px;
}

/* 1. On annule la marge forcée sur le contenu après le header */
.home body > *:not(.wp-block-template-part) {
  margin-top: 0 !important;
}

/* 2. On nettoie les conteneurs de page */
.home .wp-site-blocks, 
.home .entry-content, 
.home main#wp--skip-link--target,
.home .has-global-padding {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 4. Sécurité pour le bloc affiche */
.home .wp-block-group, .home .wp-block-columns {
  margin-top: 0 !important;
}

/* Supprime l'espace au-dessus du footer */
.home .wp-block-template-part-footer, 
.home footer, 
.home .site-footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Supprime la marge du dernier bloc de contenu */
.home main#wp--skip-link--target > *:last-child,
.home .entry-content > *:last-child,
.home .wp-site-blocks > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.home .wp-block-post-author-name,
.home .wp-block-post-terms,
.home .has-accent-4-color.has-text-color.is-layout-flex {
  display: none;
}

.home .has-global-padding,
.home .is-layout-constrained,
.home .wp-block-group.has-global-padding,
.home .wp-block-group.alignfull,
.home .alignfull,
.home .entry-content,
.home .entry-content > * {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.home :where(.is-layout-constrained) > * {
  max-width: 100% !important;
}

.home .comments-area,
.home #comments,
.home .comment-respond,
.home #respond,
.home .entry-footer,
.home .post-meta,
.home .entry-meta,
.home .posted-on,
.home .entry-date,
.home .wp-block-comments,
.home .wp-block-comments-query-loop,
.home .wp-block-post-comments-form,
.home .wp-block-query,
.home .wp-block-separator,
.home .next-previous-post,
.home .post-navigation,
.home .nav-links,
.home .wp-block-query.alignwide,
.home .wp-block-group.is-layout-constrained > .wp-block-heading,
.home h2.wp-block-heading.alignwide.has-small-font-size {
  display: none !important;
}

.home .wp-block-separator,
.home hr,
.home .wp-block-template-part > hr {
  display: none !important;
}

.home nav.wp-block-group.alignwide {
  display: none !important;
}

.home .wp-site-blocks,
.home .entry-content,
.home main#wp-skip-link--target {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
/* 1. Cache le titre et supprime son espace sur articles et pages */
.single-post .wp-block-post-title, 
.page .wp-block-post-title,
.single-post .entry-header,
.page .entry-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Supprime les marges de sécurité en haut du contenu principal */
.page .wp-site-blocks, 
.single-post .wp-site-blocks,
main#wp--skip-link--target {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 3. Force le premier bloc à coller au header */
.page .wp-site-blocks > *:first-child,
.single-post .wp-site-blocks > *:first-child {
    margin-top: 0 !important;
}
/* --- FIX FOOTER EN BAS : UNIQUEMENT POUR LES CATÉGORIES --- */

/* 1. On prépare le conteneur principal sur les pages de catégories */
.category .wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Prend toute la hauteur de l'écran */
}

/* 2. On demande au contenu central de s'étirer pour pousser le footer */
.category main#wp--skip-link--target {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 3. Optionnel : Suppression des marges parasites spécifiques aux catégories */
.category .wp-block-template-part-footer, 
.category footer {
    margin-top: auto !important; /* Force le footer à se coller au bas du flex-container */
}