/* ========================================================= */
/* ===== GRILLE EXTENSIONS (4 images) ====================== */
/* ========================================================= */

.extensions-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  align-items: stretch;
  margin-top: 0;
  margin-bottom: 0;
}

.extensions-grid > .wp-block-column {
  flex: 0 0 25%;
  max-width: 25%;
}

.extensions-grid img {
  width: 100%;
  height: auto;
  display: block;
}


/* ========================================================= */
/* ===== HEADER – ULTRA COMPACT (Template Part "Général") === */
/* ========================================================= */

:where(.wp-site-blocks) header,
:where(.wp-site-blocks) .wp-block-template-part,
:where(.wp-site-blocks) .wp-block-template-part header {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:where(.wp-site-blocks) header .wp-block-group,
:where(.wp-site-blocks) header .wp-block-columns,
:where(.wp-site-blocks) .wp-block-template-part .wp-block-group,
:where(.wp-site-blocks) .wp-block-template-part .wp-block-columns {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
}

:where(.wp-site-blocks) header * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:where(.wp-site-blocks) header .wp-block-site-title {
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

:where(.wp-site-blocks) header .wp-block-site-logo img {
  max-height: 32px !important;
  height: auto !important;
}

:where(.wp-site-blocks) header .wp-block-navigation__container {
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 14px;
}

/* Cache le libellé "Mon compte" */
.wc-block-customer-account__label {
  display: none !important;
}


/* ========================================================= */
/* ===== LOGO EN VIOLET (lisible sur toutes les pages) ===== */
/* ========================================================= */

:where(.wp-site-blocks) header .wp-block-site-title,
:where(.wp-site-blocks) header .wp-block-site-title a {
  color: #bc98f3 !important;
}

:where(.wp-site-blocks) header .wp-block-site-logo svg {
  fill: #bc98f3 !important;
}

:where(.wp-site-blocks) header .wp-block-site-logo img {
  filter: none !important;
}


/* ========================================================= */
/* ===== HEADER BLOG HOME : logo gauche / nav centrée ======= */
/* ========================================================= */

.blog header,
.blog .wp-site-blocks header {
  position: relative;
  width: 100%;
}

.blog .wp-site-blocks header .wp-block-group,
.blog .wp-site-blocks header .wp-block-columns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
}

.blog .wp-site-blocks header .wp-block-group > *,
.blog .wp-site-blocks header .wp-block-columns > * {
  min-width: 0;
}

.blog .wp-site-blocks header .wp-block-navigation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}


/* ========================================================= */
/* ===== VIDEO : suppression de la légende ================= */
/* ========================================================= */

.wp-block-video figcaption,
.wp-block-image figcaption {
  display: none !important;
}

.wp-block-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ========================================================= */
/* ===== SUPPRESSION DES ESPACES PAR DÉFAUT GUTENBERG ====== */
/* ========================================================= */

.page .wp-block-group,
.page .wp-block-columns,
.page .wp-block-cover {
  margin-top: 0;
  margin-bottom: 0;
}

.page .wp-site-blocks > * {
  margin-block-start: 0;
  margin-block-end: 0;
}


/* ========================================================= */
/* ===== MOBILE : éviter le texte collé aux bords =========== */
/* ========================================================= */

@media (max-width: 768px) {
  /* On remet un peu d’air sur les conteneurs en mobile */
  .page .wp-block-group,
  .page .wp-block-columns,
  .page .wp-block-cover {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


/* ========================================================= */
/* ===== BLOG : ENCART BANNIÈRE (FORCE FRONT + VOIR + PHOTO) */
/* ========================================================= */
/*
Objectif :
- ton "encart bannière" est plus grand dans l’éditeur que sur le front
- on force le front à afficher un grand bloc
- ET on affiche l’image sans crop (contain) pour voir plus de photo
*/

/* 1) On cible le PREMIER bloc après le header (c’est là que se trouve l’encart dans 90% des thèmes) */
@media (min-width: 1024px) {
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + *,
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * {
    min-height: 70vh !important;   /* ⇦ augmente ici si tu veux encore plus : 80vh */
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* 2) Dans CE premier bloc, on force toutes les images à "contain" + hauteur confortable */
@media (min-width: 1024px) {
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * img,
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * img {
    width: 100% !important;
    height: 70vh !important;          /* ⇦ clé : la photo devient visiblement plus grande */
    max-height: none !important;
    object-fit: contain !important;   /* ⇦ clé : on voit plus de photo (pas coupée) */
    object-position: center top !important;
    display: block !important;
  }
}

/* 3) Cas WordPress Cover (si ton encart est en cover) */
@media (min-width: 1024px) {
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * .wp-block-cover__image-background,
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * .wp-block-cover__image-background,
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * .wp-block-cover__video-background,
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * .wp-block-cover__video-background {
    height: 70vh !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

/* 4) Cas background-image inline (encart du thème) */
@media (min-width: 1024px) {
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * [style*="background-image"],
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * [style*="background-image"] {
    min-height: 70vh !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
  }
}

/* Mobile : plus simple */
@media (max-width: 1023px) {
  body.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * img,
  body.home.blog :where(.wp-site-blocks) > :is(header, .wp-block-template-part) + * img {
    height: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}