/*
 Theme Name:   Stile Sapori
 Version:      1.0
 Tags:         flexible-header, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, full-width-template, microformats, post-formats, theme-options, threaded-comments, translation-ready
 Text Domain:  chardonnay
*/


/* =Theme customization starts here
------------------------------------------------------------ */

/* =============================================
   WPML Language Switcher — Style Chardonnay
   Mode : Dropdown (hover)
   ============================================= */

/* Conteneur principal */
.wpml-ls-statics-shortcode_actions,
.wpml-ls-legacy-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Bouton/lien de la langue active */
.wpml-ls-legacy-dropdown > ul > li > a,
.wpml-ls-legacy-dropdown > ul > li > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary, #1a1a1a);
  background: transparent !important;
  background-color: transparent !important;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.wpml-ls-legacy-dropdown > ul > li > a:hover {
  color: var(--color-accent, #b89d6f);
}

/* Suppression du triangle natif WPML */
.wpml-ls-legacy-dropdown a.wpml-ls-item-toggle::after {
  display: none !important;
}

/* Notre flèche CSS sur le bon élément */
.wpml-ls-legacy-dropdown a.wpml-ls-item-toggle {
  position: relative;
  padding-right: 20px !important;
}

.wpml-ls-legacy-dropdown a.wpml-ls-item-toggle .wpml-ls-native::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 6px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

/* Rotation 90° au survol — pointe vers le haut */
.wpml-ls-legacy-dropdown > ul > li:hover a.wpml-ls-liitem-toggle .wpml-ls-native::after {
  transform: rotate(-135deg) translateY(2px);
}

/* Dropdown — panneau déroulant (caché par défaut) */
.wpml-ls-legacy-dropdown > ul > li > ul {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 130px;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 4px;
  padding: 6px 0;
  z-index: 9999;
  list-style: none;
  margin: 0;
}

/* Affichage au survol via CSS pur */
.wpml-ls-legacy-dropdown > ul > li:hover > ul {
  display: block;
  animation: wpmlFadeIn 0.18s ease;
}

@keyframes wpmlFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Liens des langues dans le dropdown */
.wpml-ls-legacy-dropdown > ul > li > ul > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

/* Suppression de tous les backgrounds WPML par défaut */
.wpml-ls-legacy-dropdown a,
.wpml-ls-legacy-dropdown a:hover,
.wpml-ls-legacy-dropdown a:focus,
.wpml-ls-legacy-dropdown .wpml-ls-current-language:hover > a,
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu a:hover,
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu a:focus,
.wpml-ls-legacy-dropdown ul li a:hover,
.wpml-ls-legacy-dropdown ul li a:focus {
  background: transparent !important;
  background-color: transparent !important;
}

/* Hover sur les langues dans le dropdown */
.wpml-ls-legacy-dropdown > ul > li > ul > li > a:hover {
  color: var(--color-accent, #b89d6f);
}

/* Langue actuellement active dans la liste */
.wpml-ls-legacy-dropdown > ul > li > ul > li.wpml-ls-current-language > a {
  color: var(--color-accent, #b89d6f);
  pointer-events: none;
}

/* Drapeaux (si activés) */
.wpml-ls-flag {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

/* Suppression du border natif WPML sur les liens du sous-menu */
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu .wpml-ls-link {
  border: none !important;
}

/* Flèche — couleur explicite + alignement vertical */
.wpml-ls-legacy-dropdown a.wpml-ls-item-toggle .wpml-ls-native::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid rgb(249, 249, 249);
  border-bottom: 1.5px solid rgb(249, 249, 249);
  transform: rotate(45deg);
  margin-left: 6px;
  transition: transform 0.2s ease;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Rotation au survol */
.wpml-ls-legacy-dropdown > ul > li:hover a.wpml-ls-item-toggle .wpml-ls-native::after {
  transform: rotate(-135deg);
  top: 1px;
}

/* Alignement des liens du sous-menu sur la langue primaire */
.wpml-ls-legacy-dropdown > ul > li > ul > li > a.wpml-ls-link {
  padding: 6px 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 1.12px !important;
}

/* Font-weight 700 au hover dans le dropdown */
.wpml-ls-legacy-dropdown > ul > li > ul > li > a.wpml-ls-link:hover {
  font-weight: 700 !important;
}

/* Réduction du widget WPML à sa taille naturelle */
.elementor-element-585343f {
  width: auto !important;
  min-width: 0 !important;
  flex-shrink: 1 !important;
}

.elementor-element-585343f .elementor-widget-container {
  width: auto !important;
}

.elementor-element-585343f,
.elementor-element-04c811e {
  width: auto !important;
  min-width: 0 !important;
  flex-shrink: 1 !important;
}

.elementor-element-585343f .elementor-widget-container,
.elementor-element-04c811e .elementor-widget-container {
  width: auto !important;
}

.elementor-element-585343f .wpml-elementor-ls,
.elementor-element-585343f .wpml-ls,
.elementor-element-04c811e .wpml-elementor-ls,
.elementor-element-04c811e .wpml-ls {
  width: auto !important;
  display: inline-flex !important;
}

@media (max-width: 1024px) {
  .elementor-element-585343f,
  .elementor-element-04c811e {
    display: none !important;
  }
}
@media (max-width: 1024px) {

  /* Séparation du sélecteur de langue avec la nav */
  .wpml-mobile-switcher {
    margin-top: 1.5em !important;
    padding-top: 1.5em !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  /* Lien toggle FR/NL/EN */
  .wpml-mobile-switcher > a.wpml-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    opacity: 0.5;
  }

  /* Flèche */
  .wpml-mobile-switcher > a.wpml-mobile-toggle::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-left: 16px; 
    vertical-align: middle;
	position: relative;
    top: -2px;
  }

  .wpml-mobile-switcher.open > a.wpml-mobile-toggle::after {
    transform: rotate(-135deg);
    top: 1px;
  }

  /* Sous-menu fermé */
  .wpml-mobile-sub {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0.5em 0 0 0;
  }

  /* Sous-menu ouvert */
  .wpml-mobile-switcher.open > .wpml-mobile-sub {
    display: block;
  }

  /* Liens des langues */
  .wpml-mobile-sub li a {
    display: block;
    padding: 0.4em 0 0.4em 1em;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s ease;
  }

  .wpml-mobile-sub li a:hover {
    opacity: 1;
    color: var(--color-accent, #b89d6f);
  }

  /* Masquer le sélecteur desktop en mobile */
  .elementor-element-585343f {
    display: none !important;
  }
}

/* Bannière page de recherche — hauteur augmentée, contenu aligné en haut */
body.search-results .elementor-element-610d030b {
  min-height: 400px !important;
}

body.search-results .elementor-element-610d030b > .elementor-container {
  min-height: 460px !important;
  align-items: flex-start !important;
}

/* Marge au-dessus du h1 sur la page de recherche */
body.search-results .sc_layouts_title_content {
  margin-top: 100px;
}

/* Descendre le chevron sous le h1 sur la page de recherche */
body.search-results .elementor-element-34cae5e4 .elementor-spacer-inner {
  height: 32px; /* ajuste selon le rendu souhaité */
}