/* ======================================================
   WPZ – Template Article Mariage (spécifique)
   Dépend du root app.css (variables, reset, cartes, etc.)
   ====================================================== */

/* ===== Scope & variables locales ===== */
body.wpz-single-3cols{
  /* Variables locales au template — mêmes gouttières desktop & mobile */
  --pad: 1rem;          /* ✅ gouttières unifiées partout */
  --maxCenter: 820px;   /* conservée si besoin ailleurs, mais non limitante pour la grille */
  --leftW: 360px;
  --rightW: 360px;
  --accent: #9C1657; /* prune pour les hovers */
  background: var(--soft);
}

/* ======================================================
   HERO – Intégré dans l’article (avant sommaire)
   ====================================================== */
.wpz-hero.wpz-hero--in{
  position: relative;
  width: 100%;
  margin: -8px 0 18px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 400px;
}
.wpz-hero.wpz-hero--in img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
.wpz-hero.wpz-hero--in::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.70) 0%,
    rgba(0,0,0,.55) 18%,
    rgba(0,0,0,.35) 32%,
    rgba(0,0,0,.15) 48%,
    rgba(0,0,0,0) 68%
  );
  pointer-events: none;
  z-index: 1;
}
.wpz-hero.wpz-hero--in .wpz-hero-caption{
  position: absolute; left: 50%;
  bottom: clamp(16px, 3.4vh, 34px);
  transform: translateX(-50%);
  width: min(100% - 2*var(--pad), 1100px); /* ✅ suit la gouttière unifiée */
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35);
  z-index: 2;
}
.wpz-hero-badges{
  display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px;
}
.wpz-hero-badge{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
  color: #fff; font-size: 12.5px; line-height: 1;
  border: 1px solid rgba(255,255,255,.22);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
a.wpz-hero-badge{ color: #fff; }
.wpz-hero-badge:hover{ background: rgba(255,255,255,.25); transform: translateY(-1px); }

h1.wpz-hero-title{
  margin: 0 0 6px; font-weight: 800; line-height: 1.15; color: #fff;
}
@media (min-width:981px){
  h1.wpz-hero-title{ font-size: clamp(30px, 2.6vw, 34px); }
}
@media (min-width:641px) and (max-width:980px){
  h1.wpz-hero-title{ font-size: clamp(30px, 4vw, 42px); }
}
@media (max-width:640px){
  h1.wpz-hero-title{ font-size: clamp(22px, 1.5vw, 32px); }
}
.wpz-hero-meta{
  opacity:.95; font-size:14px; display:flex; gap:12px; flex-wrap:wrap; color:#fff;
}

/* ============================================================
   WPZ – Vignette Prix (fond vert, texte blanc)
   ============================================================ */
.wpz-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: .5rem;
}

.wpz-price {
  display: inline-block;
  background: var(--brand, #5CA174); /* vert Iliade */
  color: #fff;
  font-weight: 600;
  font-size: clamp(13px, 0.9vw, 15px);
  padding: 6px 12px;
  border-radius: 999px; /* pastille ronde */
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  white-space: nowrap;
  user-select: none;
  transition: background .2s ease, transform .2s ease;
}
.wpz-price:hover {
  background: color-mix(in oklab, var(--brand, #5CA174) 85%, #000);
  transform: translateY(-2px);
}

/* NOTE : :contains() n’est pas standard en CSS pur. Préférer une classe utilitaire si besoin. */

/* responsive */
@media (max-width:640px){
  .wpz-price{
    font-size: 13px;
    padding: 5px 10px;
  }
}

@media (max-width:980px){
  .wpz-hero.wpz-hero--in{ height: clamp(220px, 38vh, 440px); }
}
@media (max-width:640px){
  .wpz-hero.wpz-hero--in{ height: clamp(200px, 34vh, 380px); }
}

/* ======================================================
   WRAP 3 COLONNES (layout page) — unifié full width
   ====================================================== */
.wpz-wrap{
  width: 100%;
  max-width: 100%;
  margin: clamp(5px,3vh,5px) auto 60px;
  padding-inline: var(--pad);              /* ✅ mêmes gouttières partout */
  box-sizing: border-box;
  display: grid; gap: 24px;
  grid-template-columns: var(--leftW) minmax(0, 1fr) var(--rightW); /* ✅ centre extensible */
  align-items: start;
}
.wpz-col{ min-width: 0; }
.wpz-col--left, .wpz-col--right{ position: relative; }
.wpz-sticky{ position: sticky; top: 20px; }

/* Sticky cols (désactivé en mobile) */
.wpz-col--left .wpz-sticky,
.wpz-col--right .wpz-sticky{
  position: sticky;
  top: clamp(88px, 6vw, 100px);
  z-index: 2;
}
@media (max-width:980px){
  .wpz-col--left .wpz-sticky,
  .wpz-col--right .wpz-sticky{ position: static; top: auto; }
}

/* RWD colonnes */
@media (max-width:1200px){
  body.wpz-single-3cols{ --leftW: 220px; --rightW: 300px; }
}
@media (max-width:980px){
  .wpz-wrap{ grid-template-columns: minmax(0, 1fr) var(--rightW); } /* centre + droite */
  .wpz-col--left{ display: none; }
}
@media (max-width:740px){
  .wpz-wrap{ grid-template-columns: 1fr; } /* full largeur en mobile, même gouttière */
  .wpz-col--right{ order: 2; }
}

/* ======================================================
   CARTES LATÉRALES – listes produits / posts
   ====================================================== */
.wpz-card { padding:20px; margin-bottom:1.5rem; }
.wpz-card h3{ margin: 0 0 10px; color: var(--brand); }
.wpz-card .titre{ color: var(--brand); font-weight:600; }
.wpz-reco .titre{ color: var(--brand); font-weight:600; }

.wpz-produits-lies .wpz-prod-list,
.wpz-related-posts .wpz-rel-list{
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0px;
}
.wpz-prod-item, .wpz-rel-item{
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wpz-prod-item:hover, .wpz-rel-item:hover{
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.wpz-prod-link, .wpz-rel-link{
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); padding: 8px 10px;
}
.wpz-prod-thumb, .wpz-rel-thumb{
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
}
.wpz-prod-thumb img, .wpz-rel-thumb img{
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block;
}
.wpz-prod-info, .wpz-rel-info{
  display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0;
}
.wpz-prod-title, .wpz-rel-title{
  font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--ink);
  white-space: normal; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.wpz-prod-item:hover .wpz-prod-title,
.wpz-rel-item:hover .wpz-rel-title{ color: var(--accent); }

/* ======================================================
   CONTENU CENTRAL
   ====================================================== */
.wpz-article{
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem; /* ✅ même logique de gouttière interne douce */
}
.wpz-article > *:first-child{ margin-top: 0; }
.wpz-article figure{ margin: 18px 0; }
.wpz-article img{ max-width: 100%; height: auto; border-radius: 12px; }
.wpz-article .alignwide{ width: min(100%, 1200px); margin-inline: auto; }

/* Aligner les “full” sur la largeur de contenu (évite 100vw en débord) */
.wpz-article .alignfull{
  width: 100%;
  margin: 0;
  transform: none;
  border-radius: 0;
}

/* ======================================================
   BLOC AUTEUR
   ====================================================== */
.wpz-author{
  margin-top: 40px; padding: 22px 24px;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--brand) 10%, #fff);
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.wpz-author-inner{ display: flex; align-items: flex-start; gap: 16px; }
.wpz-author-avatar img{
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--brand); box-shadow: 0 0 0 3px #fff;
}
.wpz-author-info{ flex: 1; }
.wpz-author-name{
  margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--brand);
}
.wpz-author-name a{ text-decoration: none; color: inherit; }
.wpz-author-name a:hover{ color: var(--accent); }
.wpz-author-bio{ margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width:600px){
  .wpz-author-inner{ flex-direction: column; align-items: center; text-align: center; }
  .wpz-author-avatar img{ width: 80px; height: 80px; }
}

/* ======================================================
   SOMMAIRE AUTOMATIQUE
   ====================================================== */
.wpz-toc{
  background: color-mix(in oklab, var(--brand) 10%, #fff);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 28px;
  box-shadow: 0 3px 10px rgba(0,0,0,.05);
}
.wpz-toc strong{
  display: block; font-size: 17px; margin-bottom: 10px; color: var(--brand);
}
.wpz-toc ul{ list-style: none; margin: 0; padding: 0; }
.wpz-toc li{ margin: 6px 0; position: relative; padding-left: 12px; }
.wpz-toc li::before{
  content: "›"; position: absolute; left: 0; color: var(--brand);
}
.wpz-toc a{ text-decoration: none; color: var(--ink); transition: color .2s ease; }
.wpz-toc a:hover{ color: var(--accent); }

/* ======================================================
   NAVIGATION APRÈS-ARTICLE — full width + mêmes gouttières
   ====================================================== */
.wpz-post-nav{
  width: 100%;
  max-width: 100%;
  margin: 24px 0 12px;
  padding-inline: var(--pad);               /* ✅ mêmes gouttières */
  box-sizing: border-box;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.wpz-post-nav__item{
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; overflow: hidden;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wpz-post-nav__item:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.10); }
.wpz-post-nav__prev{ justify-self: start; }
.wpz-post-nav__next{ justify-self: end; flex-direction: row-reverse; text-align: right; }
.wpz-post-nav__thumb img{ width: 140px; height: 100px; object-fit: cover; display: block; }
.wpz-post-nav__meta{ padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.wpz-post-nav__label{ font-size: 12px; letter-spacing: .2px; color: var(--muted); }
.wpz-post-nav__title{ font-weight: 700; line-height: 1.3; font-size: 14px; color: var(--ink); }
@media (max-width:740px){
  .wpz-post-nav{ grid-template-columns: 1fr; }
  .wpz-post-nav__next{ flex-direction: row; text-align: left; }
}

/* ======================================================
   CARROUSEL “Produits similaires” — full width + mêmes gouttières
   ====================================================== */
.wpz-reco{
  width: 100%;
  max-width: 100%;
  padding-inline: var(--pad);               /* ✅ mêmes gouttières */
  box-sizing: border-box;
  margin: 8px 0 60px;
}
.wpz-reco__head{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.wpz-reco h3{ margin: 0; font-size: 18px; color: var(--brand); }
.wpz-reco__controls{ display: flex; gap: 8px; }
.wpz-reco__btn{
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--brand);
  background: #fff; color: var(--brand);
  cursor: pointer; line-height: 1; font-size: 18px; transition: all .2s ease;
}
.wpz-reco__btn:hover{ background: color-mix(in oklab, var(--brand) 10%, #fff); }
.wpz-reco__track{
  list-style: none; margin: 0; padding: 6px 2px 10px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px,280px);
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
}
.wpz-reco__track::-webkit-scrollbar{ height: 8px; }
.wpz-reco__track::-webkit-scrollbar-thumb{ background: #d7e7dd; border-radius: 8px; }
.wpz-reco__item{ scroll-snap-align: start; display: flex; }
.wpz-reco__card{
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  height: 100%; min-height: 230px;
}
.wpz-reco__card:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.10); }
.wpz-reco__thumb{ width: 100%; height: 160px; overflow: hidden; flex-shrink: 0; }
.wpz-reco__thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.wpz-reco__title{
  padding: 14px 14px 22px; font-weight: 600; font-size: 14px; line-height: 1.4; color: #111;
}
.wpz-reco__card:hover .wpz-reco__title{ color: var(--accent); }
@media (max-width:640px){
  .wpz-reco__track{ grid-auto-columns: minmax(200px, 80%); gap: 12px; }
  .wpz-reco__thumb{ height: 150px; }
  .wpz-reco__title{ font-size: 13.5px; padding: 12px 12px 18px; }
}

/* ======================================================
   ANIMATIONS DOUCES (locales)
   ====================================================== */
@media (prefers-reduced-motion:no-preference){
  .fade-in{ animation: fade .6s ease both; }
  @keyframes fade{ from{ opacity:0; transform: translateY(8px); } to{ opacity:1; transform:none; } }
}

/* ======================================================
   BOUTONS DE PARTAGE (dans le hero)
   ====================================================== */
.wpz-share{
  display:flex; gap:10px; align-items:center; margin-top:10px;
}
.wpz-share__btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12); backdrop-filter: blur(3px);
  color:#fff; text-decoration:none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  overflow:hidden;
}
.wpz-share__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.75);
}
.wpz-share__btn svg{
  width:18px; height:18px; fill:#fff; display:block; flex-shrink:0;
  aspect-ratio:1/1; viewBox: 0 0 24 24; transform: scale(1.05);
}

/* Teintes hover “marque” (facultatif) */
.wpz-share--fb:hover    { background: rgba(24,119,242,.22); }
.wpz-share--x:hover     { background: rgba(17,17,17,.22); }
.wpz-share--pin:hover   { background: rgba(189,8,28,.22); }
.wpz-share--ig:hover    { background: rgba(156,22,87,.22); }
.wpz-share--native:hover{ background: rgba(92,161,116,.24); }

.wpz-share--pin svg{ transform: scale(1.22); }
.wpz-share--x   svg{ transform: scale(1.08); }
.wpz-share--fb  svg{ transform: scale(1.00); }
.wpz-share--ig  svg{ transform: scale(0.98); }
.wpz-share--native svg{ transform: scale(1.00); }

/* ===== Groupe prix + note ===== */
.wpz-price-wrap{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Positionnements possibles */
.wpz-price-wrap--right{ flex-direction: row; }
.wpz-price-wrap--top{ flex-direction: column-reverse; align-items: flex-start; }
.wpz-price-wrap--bottom{ flex-direction: column; align-items: flex-start; }

/* Pastille prix */
.wpz-price{
  display: inline-block;
  background: var(--brand, #5CA174);
  color: #fff;
  font-weight: 700;
  font-size: clamp(13px, 0.95vw, 15px);
  padding: 6px 12px;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.wpz-price:hover{ filter: brightness(.98); transform: translateY(-1px); }

/* Mention “hors livraison” */
.wpz-price-note{
  font-size: 12px;
  line-height: 1;
  color: color-mix(in oklab, var(--ink, #0f172a) 55%, #fff);
  opacity: .85;
  white-space: nowrap;
  letter-spacing: .1px;
}
.wpz-price-wrap--right .wpz-price-note::before{
  content: "·";
  margin: 0 4px 0 2px;
  opacity: .5;
}

/* En hero sombre */
.wpz-hero .wpz-price-note{ color: rgba(255,255,255,.9); opacity: .9; }

/* Responsive */
@media (max-width:640px){
  .wpz-price-note{ font-size: 11.5px; }
}

/* Contenu des Produits */
h2.wp-block-heading{
  margin-top:2rem;
  margin-bottom:1rem; /* ✅ correction de "magin-bottom" */
}
h3.wp-block-heading{
  margin-top:1rem;
  margin-bottom:1rem;
}
