/*
Theme Name:   OceanWP Child - AlwaysOnFleek
Theme URI:    https://alwaysonfleek.com
Description:  Thème enfant d'OceanWP pour AlwaysOnFleek. Toutes les personnalisations de code (CSS custom, fonctions PHP) vivent ici et survivent aux mises à jour du thème parent.
Author:       AlwaysOnFleek
Template:     oceanwp
Version:      1.0.0
Text Domain:  oceanwp-child
*/

/* ==========================================================================
   Styles personnalisés AlwaysOnFleek — ajoutés au-dessus d'OceanWP
   ========================================================================== */

/* ==========================================================================
   AOF Header — responsive (S4-02)
   Réplique le comportement de AOF-Header.dc.html.
   Le switch nav desktop <-> burger est géré nativement par le widget
   Elementor "Nav Menu" via le breakpoint Tablet (1120px, réglé dans
   Site Settings > Layout > Breakpoints) : pas de CSS custom nécessaire ici.
   Seuls la recherche inline et le texte du total panier sont entièrement
   masqués sous 640px (.aof-mobhide) ; compte et langue restent visibles
   en icône seule (.aof-acct-label masque juste le libellé texte, le
   sélecteur de langue est déjà icône+drapeau donc ne porte plus
   .aof-mobhide du tout).
   ========================================================================== */

@media (max-width: 640px) {
  .elementor-location-header .aof-mobhide {
    display: none !important;
  }

  /* Libellé "My account" masqué, icône conservée */
  .elementor-location-header .aof-acct-label {
    display: none;
  }

  /* Champ de recherche inline : largeur adaptative quand il est ouvert */
  .elementor-location-header .aof-search-field {
    width: min(72vw, 320px);
  }
}

/* États ouverts/fermés (recherche, langue) pilotés par aof-header.js
   via la classe .is-open ajoutée sur le wrapper [data-aof-search] / [data-aof-lang]. */
.elementor-location-header [data-aof-search] .aof-search-field {
  display: none;
}
.elementor-location-header [data-aof-search].is-open .aof-search-toggle {
  display: none;
}
.elementor-location-header [data-aof-search].is-open .aof-search-field {
  display: block;
}

.elementor-location-header [data-aof-lang] .aof-lang-menu {
  display: none;
}
.elementor-location-header [data-aof-lang].is-open .aof-lang-menu {
  display: block;
}

/* Badge + total panier : style porté par la CSS (pas par du style inline
   dans le widget), car wc-cart-fragments remplace ces éléments en AJAX
   et doit pouvoir les re-styler à l'identique après chaque mise à jour. */
.elementor-location-header .aof-cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: #7A1B5C;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(122, 27, 92, 0.4);
  line-height: 1;
}
.elementor-location-header .aof-cart-count[data-count="0"] {
  display: none;
}
.elementor-location-header .aof-cart-total {
  font-size: 14px;
  font-weight: 600;
  color: #1F3A5C;
}
