/* ===========================================================
   PERSO.CSS — PROFESSION FROMAGER
   BASE CANONIQUE — NETTOYÉE / OPTIMISÉE / GELÉE
   ⚠️ Aucun changement visuel
   =========================================================== */


/* =========================================================
   0. VARIABLES
   ========================================================= */
:root{
  --pf-rule: 1px solid #efefef;
  --pf-pad: 1.2rem;
  --pf-color-tag: #b39964;
}


/* =========================================================
   1. TYPOGRAPHIE GLOBALE
   ========================================================= */
body,
h1, h2, h3, h4, h5, h6,
nav,
button{
  font-family: "Inter", sans-serif;
}


/* =========================================================
   2. TEXTE ÉDITORIAL
   ========================================================= */
.gh-content p{
  margin-bottom: 1.4rem;
}


/* =========================================================
   3. LETTRINE
   ========================================================= */
.lett2{
  float: left;
  font-size: 53px;
  line-height: .8;
  color: var(--pf-color-tag);
  margin: 4px 6px 0 0;
  font-weight: 500;
}

.lettrine-container{
  display: flow-root;
}


/* =========================================================
   4. HERO HOME
   ========================================================= */
.pf-featured-hero{
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 1.6rem;
}

.pf-featured-hero-image img{
  width: 100vw;
  height: auto;
  object-fit: cover;
}

.pf-featured-hero-overlay{
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1.6rem 1.4rem;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.25) 35%,
    rgba(0,0,0,0.75) 100%
  );
}

.pf-featured-hero-tag{
  display: none;
}

.pf-featured-hero-title{
  margin: 0;
  font-size: 2.8rem;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.pf-featured-hero-title a{
  color: #fff;
  text-decoration: none;
}

@media (max-width: 600px){
  .pf-featured-hero-title{
    font-size: 2.4rem;
  }
}


/* =========================================================
   5. CARTES PF — STRUCTURE CANONIQUE
   Home / Tags / Flux
   ========================================================= */

.pf-card{
  border-bottom: var(--pf-rule);
  padding: var(--pf-pad) 0;
}

.pf-card:last-of-type{
  border-bottom: none;
}

/* Layout horizontal stable */
.pf-card-wrapper{
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

/* Zone texte fluide */
.pf-card-text{
  flex: 1 1 auto;
  min-width: 0; /* 🔒 anti overflow titres longs */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tag */
.pf-card-tag{
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pf-color-tag);
  margin-bottom: .25rem;
}

/* Titre */
.gh-card-title{
  font-size: 1.55rem;
  font-weight: 700;
  margin: .35rem 0;
}


/* =========================================================
   6. VIGNETTES — PF + GH (mutualisées)
   ========================================================= */

.pf-card-image,
.gh-card-image{
  width: 130px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  flex: 0 0 auto;
}

.pf-card-image img,
.gh-card-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================================================
   7. PAGES TAG — STRUCTURE & ALIGNEMENT
   ========================================================= */

.tag-template .gh-main{
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

.tag-template .gh-archive,
.tag-template .gh-archive-inner{
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.tag-template h1.gh-article-title{
  margin: 1.1rem 0 1.4rem;
  font-size: 2.3rem;
  font-weight: 600;
}

/* Suppression séparateurs Source */
.tag-template .gh-container.is-list .gh-card + .gh-card::before{
  display: none;
}

/* Lien = conteneur principal */
.tag-template .gh-card-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-width: 0; /* 🔒 Safari / iOS */
}

/* Sécurisation wrappers */
.tag-template .pf-card-wrapper{
  width: 100%;
}

.tag-template .pf-card-text{
  flex: 1 1 auto;
}

.tag-template .pf-card-image{
  flex-shrink: 0;
}


/* =========================================================
   8. IMAGES FLOTTANTES
   ========================================================= */

.float-wrapper{ 
  overflow: hidden; 
}

.float-wrapper img{
  max-width: 45%;
  margin: .3rem 0 .6rem 1rem;
}

.img-float-right{ 
  float: right; 
}

.img-float-left{ 
  float: left; 
  margin-right: 1rem; 
}


/* =========================================================
   9. FOOTER FIXE MOBILE
   ========================================================= */

.pf-footer-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.12);
}

.pf-footer-nav-list{
  display: flex;
  justify-content: space-around;
  padding:
    .8rem 0
    calc(.8rem + env(safe-area-inset-bottom));
  list-style: none;
}

.pf-footer-nav-link{
  font-size: 1.2rem;
  font-weight: 600;
  color: #000;
  text-decoration: none;
}

/* Évite chevauchement contenu */
body{
  padding-bottom: 64px;
}


/* =========================================================
   10. FEATURED SECONDARY — HOME & TAG
   ========================================================= */

.featured-secondary .pf-featured-large{
  margin-top: 1.6rem;
  margin-bottom: 2.2rem;
}

.featured-secondary .pf-featured-large-text{
  padding-top: 0.9rem;
}

.featured-secondary
.pf-featured-large-text
.pf-featured-large-tag{
  color: var(--pf-color-tag);
  font-weight: 600;
}


/* =========================================================
   TAG — FEATURED SECONDARY
   Rythme aligné Home
   ========================================================= */

.tag-template .featured-secondary{
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
}

.tag-template .featured-secondary .pf-featured-large{
  margin-bottom: 0;
  padding-bottom: 1.2rem;
  border-bottom: var(--pf-rule);
}

.tag-template .featured-secondary .pf-featured-large-text{
  padding-top: .8rem;
}


/* =========================================================
   HOME — MASQUAGE DES DOUBLONS APRÈS SLIDER
   Solution pragmatique VALIDÉE
   ========================================================= */

body.home-template .pf-feed-tail > article:nth-child(-n+3),
body.home-template .pf-feed-tail > .featured-secondary:nth-child(-n+3){
  display: none !important;
}