/*
Theme Name: BoostYourDates - Divi Child
Theme URI: https://boostyourdates.com
Description: Thème enfant Divi pour BoostYourDates.com
Author: YoD / BoostYourDates
Author URI: https://boostyourdates.com
Template: Divi
Version: 1.0.0
Text Domain: boostyourdates-divi-child
*/

/* =========================
   HEADER Divi: logo responsive + menu à droite
   sans casser les sous-menus
   ========================= */

:root{
  --byd-logo-w: clamp(250px, 18vw, 260px);
  --byd-logo-h: 62px;
  --byd-orange:#e74c32;
}

.accent-word{color:#e74c32;}


/* 1) Par défaut (avant JS / avant classes), le header ne doit JAMAIS être blanc */
.byd-header,
.byd-header .et_pb_section,
.byd-header .et_pb_row,
.byd-header .et_pb_menu,
.byd-header .et_pb_menu__wrap,
.byd-header .et_pb_menu__menu,
.byd-header .et_pb_menu__logo-wrap,
.byd-header .et_pb_menu__inner-container{
  background: transparent !important;
  box-shadow: none !important;
}

/* 2) Si tu veux être sûr: tant qu'on n'est pas "scrolled", on force le style "haut de page" */
body:not(.byd-scrolled) .byd-header{
  background: transparent !important;
  box-shadow: none !important;
}

/* 3) IMPORTANT: si ton menu mobile full screen a un flash blanc,
      c’est souvent le UL #mobile_menu / .et_mobile_menu qui a un fond blanc par défaut.
      On le met invisible + fond noir dès le départ (même fermé). */
.byd-header ul#mobile_menu,
.byd-header ul.et_mobile_menu{
  background: rgba(0,0,0,.94) !important;
  border-top: 0 !important;

  /* état fermé (anti flash) */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0,-10px,0) !important;
}

/* état ouvert */
.byd-header .mobile_nav.opened ul#mobile_menu,
.byd-header .mobile_nav.opened ul.et_mobile_menu{
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate3d(0,0,0) !important;
  transition: opacity .25s ease, transform .25s ease !important;
}

/* optionnel: transition propre quand on ferme */
.byd-header ul#mobile_menu,
.byd-header ul.et_mobile_menu{
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s !important;
}



/* Conteneur du module menu: en ligne */
.byd-header .et_pb_menu__inner-container{
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Logo: largeur responsive en % via clamp */
.byd-header .et_pb_menu__logo-wrap{
  flex: 0 0 auto !important;
  width: var(--byd-logo-w) !important;
  max-width: 100% !important;
}

.byd-header .et_pb_menu__logo-wrap img,
.byd-header .et_pb_menu__logo-wrap svg{
  width: 100% !important;
  height: auto !important;
  max-height: var(--byd-logo-h) !important;
  object-fit: contain;
  display: block;
}

/* Menu poussé à droite (sans toucher au UL) */
.byd-header .et_pb_menu__menu{
  margin-left: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
}

.byd-header nav.et-menu-nav{
  width: auto !important;
}

/* On compacte un peu les liens quand ça commence à serrer */
@media (max-width: 1350px){
  .byd-header .et-menu-nav > ul > li{
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .byd-header .et-menu-nav > ul > li > a{
    font-size: 15px !important;
  }
}

/* Tablette: logo plus petit */
@media (max-width: 1180px){
  :root{
    --byd-logo-w: clamp(140px, 16vw, 220px);
    --byd-logo-h: 56px;
  }
}

/* 980px: Divi passe en hamburger, on garde un logo compact */
@media (max-width: 980px){
  :root{
    --byd-logo-w: clamp(150px, 45vw, 240px);
    --byd-logo-h: 52px;
  }
}

/* Sécurise l’affichage vertical des sous-menus (au cas où) */
.byd-header .et-menu-nav ul ul{
  display: block !important;
  white-space: normal !important;
}
.byd-header .et-menu-nav ul ul li{
  display: block !important;
}

/* FIX uniquement pour le bouton Contact : le texte reste blanc même en "current" */
body .byd-header .et_pb_menu.et_pb_menu ul li.btn-contact-menu.current-menu-item > a,
body .byd-header .et_pb_menu.et_pb_menu ul li.btn-contact-menu.current-menu-ancestor > a,
body .byd-header .et_pb_menu.et_pb_menu ul li.btn-contact-menu.current-menu-parent > a,
body .byd-header .et_pb_menu.et_pb_menu ul li.btn-contact-menu.current_page_item > a,
body .byd-header .et_pb_menu.et_pb_menu ul li.btn-contact-menu.current_page_ancestor > a{
  color:#fff !important;
  background:#e74c32 !important; /* au cas où Divi le modifie */
}
