/* Corrections finales v2 — wilfriedlajoie.fr */

:root {
  --wf2-gold: #d9aa4d;
  --wf2-gold-light: #efd18d;
  --wf2-bg: #0d0a09;
  --wf2-panel: #18120f;
  --wf2-panel-soft: #211713;
  --wf2-text: #f3e8d8;
  --wf2-muted: #c8b8a8;
}

/* -------------------------------------------------
   Le juridique reste dans le footer, jamais le header.
   Le filtre PHP fait le vrai travail ; ceci est un
   filet de sécurité si le menu a été enregistré à la main.
   ------------------------------------------------- */
header .wp-block-navigation a[href*="/mentions-legales"],
header .wp-block-navigation a[href*="/politique-de-confidentialite"],
header .wp-block-navigation a[href*="/confidentialite-et-cookies"] {
  display: none !important;
}

/* -------------------------------------------------
   Retour en haut
   ------------------------------------------------- */
#wilfried-back-to-top {
  position: fixed;
  z-index: 99999;
  right: clamp(1rem, 2vw, 1.6rem);
  bottom: clamp(1rem, 2vw, 1.6rem);
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(217,170,77,.78);
  border-radius: 50%;
  color: #17110e;
  background: var(--wf2-gold);
  box-shadow: 0 12px 32px rgba(0,0,0,.42);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity .2s ease,
    transform .2s ease,
    visibility .2s ease,
    background .2s ease;
}

#wilfried-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#wilfried-back-to-top:hover,
#wilfried-back-to-top:focus-visible {
  background: var(--wf2-gold-light);
  outline: 2px solid rgba(239,209,141,.42);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  #wilfried-back-to-top {
    width: 44px;
    height: 44px;
    right: .85rem;
    bottom: .85rem;
  }
}

/* -------------------------------------------------
   Pages légales : mise en page volontairement simple,
   lisible et sans plein-écran artificiel.
   ------------------------------------------------- */
body.wilfried-legal-page-active {
  background: var(--wf2-bg) !important;
}

body.wilfried-legal-page-active .wp-block-post-title {
  display: none !important;
}

body.wilfried-legal-page-active .wp-block-post-content {
  margin-block-start: 0 !important;
}

.wl-legal-page-v2 {
  width: min(1040px, calc(100% - 2rem));
  margin: clamp(2rem, 5vw, 4.5rem) auto clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  border: 1px solid rgba(217,170,77,.22);
  border-radius: 24px;
  color: var(--wf2-text);
  background:
    radial-gradient(circle at 90% 4%, rgba(217,170,77,.08), transparent 28%),
    #100d0b;
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}

.wl-legal-v2__hero {
  padding: clamp(2.2rem, 6vw, 4.6rem);
  border-bottom: 1px solid rgba(217,170,77,.2);
  background:
    linear-gradient(135deg, rgba(63,27,21,.78), rgba(14,11,10,.96));
}

.wl-legal-v2__kicker {
  margin: 0 0 .7rem;
  color: var(--wf2-gold);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.wl-legal-v2__hero h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
}

.wl-legal-v2__hero p:last-child {
  max-width: 760px;
  margin: 1rem 0 0;
  color: #d6c6b6;
  font-size: 1.05rem;
  line-height: 1.75;
}

.wl-legal-v2__content {
  padding: clamp(1.5rem, 5vw, 4rem);
}

.wl-legal-v2__section {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(217,170,77,.14);
}

.wl-legal-v2__section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.wl-legal-v2__section h2 {
  margin: 0 0 .95rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.15;
}

.wl-legal-v2__section h3 {
  margin: 1.35rem 0 .45rem;
  color: #eee0cd;
  font-size: 1.06rem;
}

.wl-legal-v2__section p,
.wl-legal-v2__section li {
  color: var(--wf2-muted);
  line-height: 1.75;
}

.wl-legal-v2__section p {
  margin: .6rem 0;
}

.wl-legal-v2__section ul {
  padding-left: 1.25rem;
}

.wl-legal-v2__section a {
  color: var(--wf2-gold-light);
}

.wl-legal-v2__card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .65rem 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(217,170,77,.22);
  border-radius: 16px;
  background: var(--wf2-panel);
}

.wl-legal-v2__card p {
  margin: 0;
}

.wl-legal-v2__card .wl-legal-v2__wide {
  grid-column: 1 / -1;
}

.wl-legal-v2__note {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--wf2-gold);
  color: #dbcdbc;
  background: rgba(217,170,77,.07);
}

.wl-legal-v2__date {
  margin-top: 2rem !important;
  color: #918477 !important;
  font-size: .84rem;
}

@media (max-width: 700px) {
  .wl-legal-page-v2 {
    width: min(100% - 1rem, 1040px);
    border-radius: 16px;
  }

  .wl-legal-v2__card {
    grid-template-columns: 1fr;
  }

  .wl-legal-v2__card .wl-legal-v2__wide {
    grid-column: auto;
  }
}

/* -------------------------------------------------
   Monsieur Pop : aucune couverture ne doit être rognée.
   On vise le nom de fichier actuel ET le texte alternatif.
   ------------------------------------------------- */
img[src*="couverture-monsieur-pop-recto"],
img[src*="monsieur-pop-recto"],
img[alt="Couverture de Monsieur Pop"],
img[alt*="couverture de Monsieur Pop" i] {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Les cadres qui entourent la couverture ne doivent pas
   imposer un recadrage. :has() est utilisé en complément ;
   l'image elle-même reste corrigée sans lui. */
figure:has(img[src*="couverture-monsieur-pop-recto"]),
figure:has(img[src*="monsieur-pop-recto"]),
.wilfried-book-card:has(img[src*="couverture-monsieur-pop-recto"]),
.wilfried-book-feature__image:has(img[src*="couverture-monsieur-pop-recto"]),
.wilfried-mrpop-cover:has(img[src*="couverture-monsieur-pop-recto"]),
.wj-entry__media:has(img[src*="monsieur-pop-recto"]) {
  overflow: visible !important;
}



/* -------------------------------------------------
   Liens utiles dans le footer uniquement
   ------------------------------------------------- */
.wl-footer-utility {
  width: 100%;
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(217,170,77,.18);
  color: #bcae9f;
  background: #0d0a09;
  text-align: center;
  font-size: .86rem;
}

.wl-footer-utility__inner {
  width: min(1180px,100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem 1rem;
}

.wl-footer-utility a {
  color: #d7c8b8;
  text-decoration: none;
}

.wl-footer-utility a:hover,
.wl-footer-utility a:focus-visible {
  color: var(--wf2-gold-light);
  text-decoration: underline;
  outline: none;
}

@media print {
  .wl-footer-utility {
    display: none !important;
  }
}

@media print {
  #wilfried-back-to-top {
    display: none !important;
  }
}

/* WILFRIED — suppression complète des pages légales du header */
header li:has(> a[href*="/mentions-legales/"]),
header li:has(> a[href*="/politique-de-confidentialite/"]),
header .wp-block-navigation-item:has(a[href*="/mentions-legales/"]),
header .wp-block-navigation-item:has(a[href*="/politique-de-confidentialite/"]),
header .wp-block-pages-list__item:has(a[href*="/mentions-legales/"]),
header .wp-block-pages-list__item:has(a[href*="/politique-de-confidentialite/"]) {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
