/*
Theme Name: Webecode FSE
Theme URI: https://webecode.be
Author: Webecode
Author URI: https://webecode.be
Description: Thème Full Site Editing de Webecode. Dédié aux projets vitrine avec bibliothèque de patterns Gutenberg. Stack : FSE natif, theme.json, block patterns.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webecode-fse
Tags: full-site-editing, block-patterns, custom-colors, custom-typography, eco-conception
*/

html {
  scroll-behavior: smooth;
}

/* Section large */
@media (min-width: 89%) {
  .large-section {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
}

a {
  text-decoration: none;
}

@media (max-width: 768px) {
  h1.has-heading-5-xl-font-size {
    font-size: 42px !important;
  }
}

/* Section Portfolio */

/* Carte : référence de positionnement + flex colonne */
.card-portfolio {
  position: relative;
  display: flex !important;
  flex-direction: column;
}

/* Div interne : occupe toute la hauteur, ferré à gauche */
.card-portfolio > .wp-block-group {
  flex: 1;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

/* Contenu ferré à gauche — annule le margin:auto du is-layout-constrained de WP */
.card-portfolio
  .is-layout-constrained
  > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.card-portfolio p,
.card-portfolio h1,
.card-portfolio h2,
.card-portfolio h3,
.card-portfolio h4,
.card-portfolio h5,
.card-portfolio h6,
.card-portfolio .wp-block-post-terms {
  text-align: left !important;
}

/* Lien ACF étiré sur toute la surface de la carte */
.card-portfolio__link {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.activity-cards {
  position: relative;
  overflow: hidden;
  background: var(--accent-2); /* ton fond de base */
}

/* Overlay */
.activity-cards::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;

  /* 👉 couleur du hover (à adapter) */
  background: #E3DBCE;

  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Hover */
.activity-cards:hover::before {
  height: 100%;
}

/* Mobile : empilement vertical */
@media (max-width: 768px) {
  .is-layout-flex:has(.activity-cards) {
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }
}

/* Contenu au-dessus de l'overlay */
.activity-cards > * {
  position: relative;
  z-index: 1;
}

/* 2. On rend le conteneur du Meta Field invisible mais présent */
.card-portfolio .wp-block-mfb-meta-field-block {
  position: static;
}

/* 3. On étire le lien sur TOUTE la surface de l'article */
.card-portfolio .wp-block-mfb-meta-field-block a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* On rend le texte invisible */
  color: transparent !important;
  font-size: 0 !important;

  /* On s'assure qu'il passe au-dessus de tout le reste */
  z-index: 10;
}
