/*
Theme Name: Lune de Miel
Template: hello-elementor
Author: Saison d'Or Pau
Author URI: https://www.saisondor.com
Description: Hello Elementor Child Theme for Lune de Miel
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.4
Version: 2.0
Text Domain: lunedemiel
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/** GENERAL **/
body {
  background-image: url('/wp-content/themes/lunedemiel/assets/img/lunedemiel-background.webp');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
}

/** HEADER **/
header.elementor-location-header {
    top: 45px;
    z-index: 9999;
}
#site-header,
#site-header .e-con-inner {
    max-height: 100px;
    overflow: visible;
}

.home #site-header {
    background-color: transparent !important;
}
.home #site-header nav ul li a{
    color: #81312F !important;
}

/** HOME HEADER **/
/* VIDEO (dans le stage, derrière tout) */
.bgVideo {
  position: absolute;
  inset: 0;
  height: 100vh;     /* le viewport */
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bgVideo__el {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 16:9 recadré plein écran */
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  z-index: 2; /* au-dessus de la vidéo */
}

.hero__zoom {
  position: relative;
  height: 100%;
  width: 100%;
  transform: translateZ(0);
  will-change: transform;
}

.hero__frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100vh !important;
  object-fit: cover;
  pointer-events: none;
  will-change: opacity;
}
.hero__zoom,
.hero__frame {
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform, opacity;
}

.hero__content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 64px 20px;
  text-align: center;
}

.hero__extra {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  will-change: transform;
}
.hero__extra.hero_title h2 {
  color: var(--e-global-color-primary);
  font-size: 84px;
  line-height: 93px;
  text-align: left;
}
@media (min-width: 1920px) {
  .hero__extra.hero_title h2 {
    font-size: 104px;
    line-height: 113px;
  }
}

.beeWrap {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%); /* Centre le point d'accroche au milieu de l'objet */
  will-change: transform;
}

.hero__extra.badge {
  width: var(--size, 240px);
  height: var(--size, 240px);
  display: inline-block;
}
.hero__extra.badge svg{
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 50%;
  animation: spin var(--speed, 0s) linear infinite;
}
/* Le groupe texte tourne autour du centre du viewBox (100,100) */
.hero__content .badge__ring{
  transform-box: fill-box;
  transform-origin: 100px 100px; /* centre du viewBox 200x200 */
  animation: badge-spin 12s linear infinite;
}
@keyframes spin{ to { transform: rotate(360deg); } }
.hero__extra.badge .badge__text{
  font: 700 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: 2px;
  text-transform: uppercase;
  fill: currentColor;
  color: #81312F;
  text-transform: uppercase;
}
/* Décaler légèrement les textes pour ne pas toucher l’image */
.hero__extra.badge .badge__text--top{ transform: translateY(-6px);font-size: 24px; }
.hero__extra.badge .badge__text--bottom{ transform: translateY(10px);font-size: 18px; }
/* Image ronde (si tu veux) */
.hero__extra.badge .badge__img{
  /* L’arrondi via CSS ne marche pas toujours sur <image> selon contexte SVG,
     mais sur la majorité des navigateurs modernes c’est OK. */
  clip-path: circle(50% at 50% 50%);
}

/* SECTION 2 */
.section2 {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  z-index: 2; /* au-dessus de la vidéo */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero__zoom, .hero__frame, .section2__content { transition: none !important; }
}

/** MOBILE **/
@media (max-width: 1023px) {
  .hero__extra {
    display: var(--mob-display, block) !important; /* contrôle facile de l'affichage sur mobile */
    position: absolute;
    left: var(--mob-x, 50%);
    top: var(--mob-y, 50%);
    transform: translate(-50%, -50%);
    will-change: transform;
    scale: var(--mob-scale, 1);
  }
}
/* Réglage vitesse et sens facilement */
.hero__content .badge{
  --spin-duration: 12s; /* change la vitesse ici */
  --spin-direction: 1;  /* 1 = horaire, -1 = anti-horaire */
}
.hero__content .badge__ring{
  animation-duration: var(--spin-duration);
  animation-direction: normal;
}
.hero__content .badge[data-spin="ccw"] .badge__ring{
  animation-direction: reverse;
}

@keyframes badge-spin{
  to { transform: rotate(360deg); }
}

/* (optionnel) respect des préférences accessibilité */
@media (prefers-reduced-motion: reduce){
  .hero__content .badge__ring{ animation: none; }
}

@supports (-webkit-touch-callout: none) {
  .hero__contentInner,
  .section2__content {
    backdrop-filter: none !important;
  }
}


/** FLOWER ANIMATION **/
.flower-zone{
  position: relative;
  overflow: hidden; /* important : confine visuellement les fleurs dans la zone */
}
/* Couche dédiée aux particules */
.flower-layer{
  position: absolute;
  inset: 0;
  pointer-events: none; /* ne bloque jamais les clics/hover sur tes images/liens */
  z-index: 10;          /* ajuste si tes images ont un z-index plus haut */
}
.flower-particle{
  position: absolute;
  left: 0; top: 0;
  /*width: 34px;
  height: 34px;*/
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
}
.flower-particle img.flower-img{
  width: 100%;
  height: 100%;
  display: block;
}

/** BUTTONS **/
/* fleurs à gauche et à droite du texte */
.elementor-button-info a {
  color: var(--e-global-color-secondary) !important;
  font-family: var(--e-global-typography-28a20ef-font-family) !important;
  font-size: 20px;
  background-color: transparent !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding:0px;
}
.elementor-button-info a::before,
.elementor-button-info a::after {
  content:"";
  display: inline-block;
  width: 27px;
  height: 33px;
  background-image: url('/wp-content/themes/lunedemiel/assets/img/lunedemiel-sprite.webp');
  background-repeat: no-repeat;
  background-size: 175px 125px;
  z-index: 1;
}
.elementor-button-info a::before {
  background-position: -147px 0px;
  margin-right: -11px;
  margin-bottom: -24px;
}
.elementor-button-info a::after {
  background-position: -121px 0px;
  margin-left: -14px;
  margin-top: -5px;
}
.elementor-button-info a span {
  background-color: var(--e-global-color-primary) !important;
  border-radius: 14px;
  padding: 8px 14px;
}

/* fleur à gauche et à droite avec un soulignement */
.elementor-button-success a span {
  padding: 8px;
}

.elementor-button-success a {
  font-family: var(--e-global-typography-28a20ef-font-family) !important;
  font-size: 24px;
  background-color: transparent !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding:0px;
}
.elementor-button-success a::before,
.elementor-button-success a::after {
  content:"";
  display: inline-block;
  width: 54px;
  height: 66px;
  background-image: url('/wp-content/themes/lunedemiel/assets/img/lunedemiel-sprite.webp');
  background-repeat: no-repeat;
  background-size: 350px 250px;
  z-index: 1;
}
.elementor-button-success a::before {
  background-position: -293px 0px;
  margin-right: -25px;
  margin-bottom: -17px;
}
.elementor-button-success a::after {
  background-position: -242px 0px;
  margin-left: -21px;
  margin-top: 30px;
}

.elementor-button-success .elementor-button-text{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

.btn__underline{
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 22px;
  pointer-events: none;
}

.btn__dash{
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
}

.elementor-button-success.is-inview .btn__dash{
  animation: dashIn 160ms ease-out forwards;
}

@keyframes dashIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

/* Lien avec surlignement décalé */
a.underline {
  position: relative;
  display: inline-block;
  text-decoration: none; /* on supprime le soulignement natif */
}

a.underline::after {
  content: "";
  position: absolute;
  
  /* largeur = largeur du texte */
  width: 100%;
  height: 0.8em; /* épaisseur du surlignage */
  
  /* positionnement demandé */
  bottom: 12%;        /* 60% vers le bas = on remonte de 40% */
  left: 10px;         /* décalage horizontal */
  
  background: rgba(153, 153, 153, 0.2);
  border-radius: 999px; /* arrondi maximal type feutre */
  
  z-index: -1;
}
a.underline::after {
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .3s ease;
}



/** LINKED PRODUCT **/

.linked-product__inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.linked-product__col--image {
  flex: 0 0 40%;
}

.linked-product__col--image img {
  width: 100%;
  height: auto;
  display: block;
}

.linked-product__col--content {
  flex: 1;
}

.linked-product__title {
  margin-top: 0;
}
.linked-product__title a {
  color: var(--e-global-color-primary) !important;
}

.linked-product__button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/** PAGE NOS RECETTES **/
#recettes .elementor-portfolio__filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  height: 385px;
  background-color: var(--e-global-color-primary);
  border-radius: 20px;
}
#recettes .elementor-portfolio {
  max-width: 1280px;
  margin: auto;
}

/** PAGE DETAIL RECETTE **/
.recette-template-default .image-banner img {
  max-height: 60vh;
}
@media (max-width: 768px) {
  .recette-template-default h1 {
    font-size: 44px;
    line-height: 50px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .linked-product__inner {
    flex-direction: column;
    gap: 20px;
  }

  .linked-product__col--image,
  .linked-product__col--content {
    width: 100%;
  }
}
