/*****************************************
 *  ENTÊTE — version encore plus compacte
 *****************************************/

/* Réduction maximale de la hauteur */
header.wp-block-template-part,
header.wp-block-template-part .wp-block-group {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  min-height: 35px !important;   /* tu peux descendre jusqu'à 30px */
}

/* Logo encore plus petit */
header .wp-block-site-logo img {
  max-height: 30px !important;   /* avant : 40 → maintenant : 30 */
  height: auto !important;
}

/* Titre / slogan encore plus serrés */
header .wp-block-site-title,
header .wp-block-site-tagline {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.1 !important;
}

/* Navigation : réduire l'épaisseur du menu */
header .wp-block-navigation .wp-block-navigation-item__content {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  line-height: 1.1 !important;
}

/* Sticky header toujours compact */
header.is-position-sticky {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

/*****************************************
 * TEXTE DES COLONNES
 * Pages : A propos / Développeurs / Fabricants / Investisseurs
 *****************************************/

/* Règle générale fermée correctement */
.wp-block-columns p {
  text-align: left !important;
  text-justify: auto !important;
  hyphens: auto;
  word-spacing: normal !important;
}

/* Règle ciblée sur les 4 pages pour corriger les espaces entre mots */
body.page-a-propos-kilowattsol .wp-block-columns p,
body.page-developpeurs .wp-block-columns p,
body.page-fabricants .wp-block-columns p,
body.page-investisseurs .wp-block-columns p {
  text-align: left !important;       /* supprime la justification forcée */
  text-justify: auto !important;
  word-spacing: normal !important;   /* enlève les gros blancs entre mots */
  letter-spacing: normal !important; /* au cas où le thème l’augmente */
  text-transform: none !important;   /* évite les majuscules qui semblent trop espacées */
  line-height: 1.55;
}

/*****************************************
 * A PROPOS — Réduction du haut de page (version compacte)
 *****************************************/

/* Conteneur principal : pas de padding haut + léger remontage */
body.page-a-propos-kilowattsol .wp-site-blocks {
  padding-top: 0 !important;
  margin-top: -20px !important;   /* remonte tout le contenu de 20px */
}

/* 1. Supprime toute marge / padding du premier bloc de contenu */
body.page-a-propos-kilowattsol .wp-site-blocks > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 2. Premier group / cover / conteneurs principaux sans marge/padding haut */
body.page-a-propos-kilowattsol .wp-block-group:first-of-type,
body.page-a-propos-kilowattsol .wp-block-cover:first-of-type,
body.page-a-propos-kilowattsol .wp-block-post-content,
body.page-a-propos-kilowattsol .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 3. Si un espacement vertical est forcé (styles inline, patterns WordPress) */
body.page-a-propos-kilowattsol [style*="margin-top"],
body.page-a-propos-kilowattsol [style*="padding-top"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/*****************************************
 * COLONNES GÉNÉRIQUES
 *****************************************/

.columns {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* important */
  gap: 40px;
}

.column {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.column img {
  height: 120px; /* optionnel mais rend l’alignement parfait si les icônes diffèrent */
  object-fit: contain;
  margin-bottom: 20px;
}

.column h3 {
  min-height: 40px; /* force tous les titres à avoir la même hauteur */
  margin-bottom: 20px;
}

.column p {
  flex-grow: 1; /* étire les paragraphes pour un alignement uniforme */
}

/*****************************************
 * Section "Expertise from three perspectives"
 *****************************************/

/* s'assure que les colonnes prennent la même hauteur */
.expertise-columns {
  align-items: stretch;
}

/* Chaque colonne devient une petite "carte" en flex */
.expertise-columns .wp-block-column {
  display: flex;
  flex-direction: column;
  align-items: center; /* ou flex-start si tu préfères aligné à gauche */
  text-align: center;
}

/* Conteneur de l'image : même hauteur partout */
.expertise-columns .wp-block-image {
  height: 140px;              /* à ajuster selon la taille souhaitée */
  display: flex;
  align-items: flex-end;      /* l’icône se pose en bas du bloc */
  justify-content: center;
  margin-bottom: 20px;
}

/* L'image s'adapte à ce conteneur sans déformation */
.expertise-columns .wp-block-image img {
  max-height: 100%;
  width: auto;
}

/* Sous-titres (We industrialize precision, etc.) */
.expertise-columns h3,
.expertise-columns h4,
.expertise-columns p:first-of-type {
  margin-bottom: 12px;
}

/*****************************************
 * PAGE D'ACCUEIL — effet parallax / fond fixe
 *****************************************/

/* Garde l’image de fond de la page d’accueil FIXE en toute circonstance */
.home {
  background-attachment: fixed !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* S'assure que le contenu ne "casse" pas l'effet parallax */
.home .wp-site-blocks {
  background: transparent !important;
}

/* Au cas où le premier bloc de la page glisse sous le header */
.home .wp-site-blocks > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/*****************************************
 * GLOBAL / HEADER (haut de site)
 *****************************************/

/* Supprime tout espace entre le menu sticky et le haut du site
   + supprime le trait (shadow) éventuel */
header.wp-block-template-part {
  margin-top: 0 !important;
  padding-top: 0 !important;
  box-shadow: none !important;
}

/* Supprime tout espace fantôme ajouté au body */
body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Conteneur des 3 cartes */
.expertise-cards {
  display: flex;
  gap: 40px;
}

/* Carte individuelle */
.expertise-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Zone icône : hauteur identique */
.expertise-icon {
  min-height: 140px; /* ajuste si besoin */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sécurité : pas de décalage involontaire */
.expertise-card h3,
.expertise-card p {
  margin-top: 0;
}

/* 1) Les 3 colonnes */
.expertise-cards {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.expertise-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
}

/* 2) On fixe la hauteur du BLOC image (figure), pas du img */
.expertise-cards .wp-block-image {
  min-height: 150px;            /* 👈 ajuste (140–180 selon tes icônes) */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;          /* espace sous l’icône */
}

/* 3) On évite que l'image elle-même crée des décalages */
.expertise-cards .wp-block-image img {
  height: auto;
  max-height: 150px;            /* 👈 même valeur que min-height */
  width: auto;
}