/* =============================================================
   Wagner Gestion Privée — Animations (recréation esprit Hervin)
   À charger sur le nouveau thème bloc. Aucune dépendance externe
   sauf Lenis (smooth-scroll, chargé par le JS). Tout est en CSS
   natif + IntersectionObserver, donc léger et maîtrisable.
   ============================================================= */

:root {
  --anim-duration: 1s;
  --anim-ease: cubic-bezier(0.16, 1, 0.3, 1); /* easeOutExpo, la « douceur » Hervin */
}

/* --- 1. Apparition au scroll (remplace .has-animation) --------
   L'élément part invisible + décalé, puis se révèle quand il
   entre dans le viewport (classe .is-visible ajoutée par le JS). */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--anim-duration) var(--anim-ease),
              transform var(--anim-duration) var(--anim-ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Délais en cascade pour enchaîner titre → sous-titre → bouton */
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }

/* --- 2. Révélation de titre par masque (remplace .has-mask) ---
   Le titre monte depuis sous une ligne invisible : effet « rideau ». */
.reveal-mask { overflow: hidden; }
.reveal-mask > * {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--anim-ease);
  will-change: transform;
}
.reveal-mask.is-visible > * { transform: translateY(0); }

/* --- 3. Parallaxe sur les images/sections (remplace .has-parallax)
   Le JS met à jour --parallax en fonction du scroll. -------------*/
.parallax { overflow: hidden; }
.parallax img,
.parallax .parallax-inner {
  transform: translateY(var(--parallax, 0));
  will-change: transform;
  scale: 1.15; /* marge pour que le déplacement ne montre pas de vide */
}

/* --- 4. Hero : titre au contour, filigrane, invite au scroll ---- */
/* Le groupe interne est en is-layout-constrained (centrage via margin auto
   sur les enfants). On force le groupe ET ses enfants à gauche. */
.hero-cover .wp-block-cover__inner-container {
  text-align: left !important;
  width: 100%;
}
.hero-cover .wp-block-cover__inner-container > .wp-block-group {
  max-width: 1280px;
  width: 100%;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding: 0 50px;
  box-sizing: border-box;
  text-align: left !important;
}
/* is-layout-constrained centre ses enfants via margin auto : on annule */
.hero-cover .is-layout-constrained > *,
.hero-cover .wp-block-group > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}
.hero-cover .hero-title,
.hero-cover .hero-subtitle {
  text-align: left !important;
  margin-left: 0 !important;
}
/* Neutralise les paragraphes vides parasites autour du sous-titre */
.hero-cover .wp-block-paragraph:empty,
.hero-cover p:empty { display: none !important; margin: 0 !important; }
/* Boutons du hero alignés à gauche */
.hero-cover .wp-block-buttons { justify-content: flex-start !important; }
.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2.75rem, 1.5rem + 6vw, 5.375rem);
  line-height: 1.3;
  color: #fff;
  margin: 0;
}
.hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
  color: #fff;
  margin-top: 12px;
  padding-top: 20px;
  max-width: 620px;
  position: relative;
}
/* Trait doré AU-DESSUS du sous-titre (::before, top:0, largeur 45%) */
.hero-subtitle.with-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: -25px;
  width: 45%;
  height: 1px;
  background-color: #f5d470;
}

/* Souris animée (invite au scroll) — repris d'Hervin en pur CSS */
.scroll-mouse {
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 14px;
  position: relative;
  margin: 3rem auto 0;
}
.scroll-mouse .wheel {
  width: 3px; height: 7px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  animation: wagner-wheel 1.6s var(--anim-ease) infinite;
}
@keyframes wagner-wheel {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* --- 5. Curseur magnétique (remplace #magic-cursor) ------------- */
.magic-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--anim-ease), height 0.3s var(--anim-ease),
              background 0.3s var(--anim-ease);
  mix-blend-mode: difference;
}
.magic-cursor.is-hovering {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.1);
}
/* Sur mobile / sans souris fine, on masque le curseur custom */
@media (hover: none) { .magic-cursor { display: none; } }

/* --- 6. Boutons (esprit .clapat-button) -------------------------
   Fond BLANC en permanence, texte NOIR. Au survol, le libellé
   glisse vers le haut et un second texte le remplace. */
.wagner-button {
  display: inline-block;
  padding: 1.1rem 2.4rem;
  background: #fff;
  border-radius: 999px;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.4;
}
/* Le conteneur du texte masque le débordement pour l'effet de glissement */
.wagner-button span {
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 1.4;
}
/* Libellé visible */
.wagner-button span .label {
  display: block;
  color: #000;
  transition: transform 0.4s var(--anim-ease);
}
/* Second libellé (survol), positionné juste en dessous */
.wagner-button span::after {
  content: attr(data-hover);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  color: #000;
  transition: top 0.4s var(--anim-ease);
}
.wagner-button:hover span .label { transform: translateY(-100%); }
.wagner-button:hover span::after { top: 0; }

/* --- 8. Header global : transparent sur le hero, #141414 au scroll
   Reproduit exactement l'original : hauteur 80px, couleur #141414. */
/* Le hero doit toucher le haut : on annule tout espace au-dessus,
   sur toutes les pages (accueil, notre-métier, etc.). Le hero est
   toujours le 1er bloc, donc on remonte son conteneur. */
.wp-site-blocks > main { margin-top: 0 !important; padding-top: 0 !important; }
main > .wp-block-cover.hero-cover:first-child,
main > *:first-child > .wp-block-cover.hero-cover,
.hero-cover:first-child { margin-top: 0 !important; }
/* Si le hero est enveloppé dans un groupe (modèle Pages), annule son padding haut */
main > .wp-block-group:first-child { padding-top: 0 !important; margin-top: 0 !important; }
main.wp-block-group > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }

.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 80px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  box-sizing: border-box;
  background: transparent !important;
  transition: background-color 0.3s ease;
}
.site-header.is-scrolled { background: #141414 !important; }
.site-header .site-logo img { height: 60px; width: auto; display: block; }
/* Le hero est sombre : on affiche le logo blanc */
.site-header .site-logo .black-logo { display: none; }
.site-header .site-logo .white-logo { display: block; }

/* Menu principal */
.site-header .main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-header .main-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: opacity 0.3s var(--anim-ease);
}
.site-header .main-nav a:hover { opacity: 0.6; }

@media (max-width: 900px) {
  .site-header { padding: 0 24px; }
  .site-header .main-nav { display: none; } /* menu burger à prévoir si besoin */
}

/* --- 9. Filigrane « W » dans le hero (doré, grand, en fond) ----- */
.hero-cover { position: relative; }
.hero-cover .wp-block-cover__inner-container { position: relative; z-index: 2; }
.hero-watermark {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5d470;
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}
.hero-watermark svg { width: 100%; height: auto; fill: currentColor; }

/* --- 10. Filtre noir & blanc sur les images (comme l'original) -- */
.wp-block-image img,
.wp-block-cover:not(.hero-cover) .wp-block-cover__image-background,
.wp-block-cover:not(.hero-cover) .wp-block-cover__video-background {
  filter: grayscale(1);
}
/* Images de section : masque à hauteur fixe (comme .medium-height + parallax).
   La figure masque (overflow:hidden), l'image la déborde et se déplace. */
.section-media {
  overflow: hidden;
  max-height: 60vh;
  margin: 0;
}
.section-media img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  transform: translateY(var(--parallax, 0)) scale(1.15);
  will-change: transform;
}

/* --- 10b. Vidéo dans le cadre de la télé (page Notre métier) ----
   L'image de la télé est au premier plan (écran transparent),
   la vidéo YouTube est positionnée dans la zone écran, derrière. */
.tv-video-wrapper {
  position: relative;
  max-width: 1024px;
  margin: 0 auto;
  z-index: 1;
}
/* L'image de la télé, au premier plan */
.tv-frame-image {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  z-index: 2;
  pointer-events: none; /* laisse cliquer la vidéo à travers l'écran */
}
/* La vidéo, positionnée dans l'écran de la télé (valeurs de l'original) */
.tv-video-embed {
  position: absolute;
  width: 71%;
  top: calc(50% + 10px);
  left: 2px;
  right: auto;
  transform: translateY(-50%);
  z-index: 1;
  aspect-ratio: 16 / 9;
}
.tv-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- 11. Footer global ----------------------------------------- */
.site-footer {
  background: #000;
  color: rgba(255,255,255,0.5);
  padding: 4rem 80px 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.85rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { opacity: 0.6; }
.site-footer .footer-copy p { margin: 0.2rem 0; }
.site-footer .footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.site-footer .footer-social svg { fill: #fff; width: 22px; height: 22px; }
@media (max-width: 900px) {
  .site-footer { padding: 3rem 24px; flex-direction: column; text-align: center; }
}

/* --- 15. Page Contact : coordonnées + formulaire CF7 ----------- */
.contact-info h6 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5d470;
  margin: 1.5rem 0 0.3rem;
}
.contact-info p { margin: 0 0 0.5rem; }
.contact-info a { color: #fff; text-decoration: none; }
.contact-info a:hover { color: #f5d470; }

/* Champs du formulaire Contact Form 7, dans l'esprit sombre du site */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 0.8rem 0;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-bottom-color: #f5d470;
}
.wpcf7-form hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 1rem 0 2rem; }
/* Bouton d'envoi, style wagner (blanc, texte noir) */
.wpcf7-form input[type="submit"] {
  display: inline-block;
  padding: 1.1rem 2.4rem;
  background: #fff;
  border: none;
  border-radius: 999px;
  color: #000;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--anim-ease), color 0.3s var(--anim-ease);
}
.wpcf7-form input[type="submit"]:hover { background: #f5d470; }
.wpcf7-response-output { margin-top: 1rem !important; color: #fff; }

/* --- 14. Page Notre approche : étapes numérotées + partenaires -- */
/* Grand chiffre doré en arrière-plan de chaque titre d'étape */
.etape-titre {
  position: relative;
  padding-left: 40px;
}
.etape-titre .counter-item {
  color: #f5d470;
  position: absolute;
  opacity: 0.7;
  font-size: 6em;
  line-height: 1;
  z-index: -1;
  top: 50%;
  left: 0;
  transform: translate(-30%, -50%);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}
.etape-row { margin-bottom: 3rem; }

/* Grille de logos partenaires (6 par ligne, fond blanc) */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.partners-grid li {
  background: #fff;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
}
.partners-grid img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 900px) {
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 13. Page Le Cabinet : équipe et charte -------------------- */
/* Soulignement doré sous les noms des membres */
.has-underline-light {
  position: relative;
  margin-bottom: 20px;
  display: inline-block;
}
.has-underline-light::before {
  content: "";
  position: absolute;
  width: 110%;
  height: 2px;
  background: #f5d470;
  bottom: -11px;
  left: 0;
  z-index: -1;
}
/* Surlignage doré derrière les titres de section (Notre équipe, Notre charte) */
.has-highlight-mark {
  position: relative;
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.35);
}
.has-highlight-mark::before {
  content: "";
  height: 120%;
  position: absolute;
  width: 65%;
  background-color: rgba(245, 212, 112, 0.7);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}
/* Bouton LinkedIn des profils */
.profil-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #B19852;
  border-radius: 50%;
  color: #fff;
  margin: 10px 0;
  transition: background 0.3s var(--anim-ease);
}
.profil-linkedin:hover { background: #f5d470; }
.profil-linkedin svg { width: 22px; height: 22px; fill: currentColor; }

/* --- 12. Espacements de sections (repris de row_padding) -------- */
.section-pad { padding-top: 5vw; padding-bottom: 5vw; }

/* --- 7. Accessibilité : on respecte prefers-reduced-motion ------ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-mask > *, .parallax img, .parallax .parallax-inner {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    scale: 1 !important;
  }
  .scroll-mouse .wheel { animation: none; }
}
