/*
Theme Name: Lockall Child
Theme URI: https://lockall.fr
Template: hello-elementor
Author: We Are PLEH
Author URI: https://wearepleh.com
Description: Child theme for Lockall.fr based on Hello Elementor
Version: 1.2.16
Updated: 2026-04-20
*/

/* =============================================================
   LOCKALL CHILD THEME — CUSTOM STYLES
   =============================================================
   Color reference (Elementor global vars):
     --e-global-color-primary:   #1D1DCD  (Lockall blue)
     --e-global-color-secondary: #202020  (dark text)
     --e-global-color-text:      #202020  (body text)
     --e-global-color-accent:    #FFA300  (Lockall orange)
     --e-global-color-d0d111e:   #FFFFFF  (white)
     --e-global-color-ddfd85d:   #F4F4F4  (light gray)
     --e-global-color-42597f9:   #DCDCFF  (light blue)

   Overrides strategy (v1.2.9):
     1. Prefer selector specificity over !important whenever possible.
     2. !important is kept ONLY when overriding:
        - CSS generated by plugins that use !important themselves (Elementor Pro, Jet)
        - Inline <style> blocks on injected SVGs (.st1, .st2)
        - CSS animations/keyframes from Elementor
        - Browser defaults of native elements (<details>, button)
        - Inline styles set by plugin JS (Slick slider dimensions)
     3. Every remaining !important has a "/* why: ... */" note.
     4. Selectors that can disambiguate using .elementor-location-header,
        .acordeon-footer, .header-bar or body-class context use that
        instead of !important.
   ============================================================= */


/* =============================================================
   1. HEADER — Sticky scroll + logo colors
   ============================================================= */

/* --- Sticky background (migrated from Elementor Custom CSS) --- */
.header-bar .header-internal {
  border: 1px solid rgba(0, 0, 0, 0);
  transition: .3s all ease-in-out;
}

/* why !important: Elementor sticky applies inline background when the
   --effects class toggles, and the widget-level .elementor-element-XYZ
   CSS ships with !important on the background token. */
.header-bar.elementor-sticky--effects .header-internal {
  background: var(--e-global-color-ddfd85d) !important;
  border-radius: 0.75rem;
  border: 1px solid var(--e-global-color-d0d111e);
  box-shadow: 0px 0px 13px 1px rgba(0, 0, 0, 0.2);
}

/* --- On scroll (all pages): logo + text → primary blue --- */
/* Specificity win: .elementor-location-header wraps the whole header template,
   adding it bumps us to (0,4,0) against Elementor's (0,2,0) on the heading. */
.elementor-location-header .header-bar.elementor-sticky--effects .logo-text .elementor-heading-title {
  color: var(--e-global-color-primary);
}
/* why !important: the menu-icon SVG is injected with inline <style>.st1/.st2,
   and inline styles beat any external CSS unless we use !important. */
.header-bar.elementor-sticky--effects .menu-icon .elementor-icon svg,
.header-bar.elementor-sticky--effects .menu-icon .elementor-icon svg path {
  fill: var(--e-global-color-primary) !important;
}
.header-bar.elementor-sticky--effects .logo-icon svg .st1 {
  fill: var(--e-global-color-primary) !important; /* why: SVG inline <style> */
}
.header-bar.elementor-sticky--effects .logo-icon svg .st2 {
  fill: var(--e-global-color-accent) !important;  /* why: SVG inline <style> */
}

/* --- Non-homepage: logo starts as primary blue (not white) --- */
body:not(.home) .elementor-location-header .logo-text .elementor-heading-title {
  color: var(--e-global-color-primary);
}
body:not(.home) .elementor-location-header .logo-icon svg .st1 {
  fill: var(--e-global-color-primary) !important; /* why: SVG inline <style> */
}
body:not(.home) .elementor-location-header .menu-icon .elementor-icon svg,
body:not(.home) .elementor-location-header .menu-icon .elementor-icon svg path {
  fill: var(--e-global-color-primary) !important; /* why: SVG inline <style> */
}

/* --- Landing pages (Canvas): logo + text start white on dark hero --- */
body.elementor-template-canvas .elementor-location-header .logo-text .elementor-heading-title {
  color: #fff;
}

/* --- Landing pages: on scroll → primary blue --- */
body.elementor-template-canvas .elementor-location-header .header-bar.elementor-sticky--effects .logo-text .elementor-heading-title {
  color: var(--e-global-color-primary);
}
.elementor-location-header .header-bar.elementor-sticky--effects .logo-icon-lp svg .st1 {
  fill: var(--e-global-color-primary) !important; /* why: SVG inline <style> */
}
.elementor-location-header .header-bar.elementor-sticky--effects .logo-icon-lp svg .st2 {
  fill: var(--e-global-color-accent) !important;  /* why: SVG inline <style> */
}

/* --- Transitions --- */
.logo-text .elementor-heading-title { transition: color .3s ease-in-out; }
.menu-icon .elementor-icon svg { transition: fill .3s ease-in-out; }
.logo-icon svg .st1,
.logo-icon svg .st2 { transition: fill .3s ease-in-out; }
.logo-icon-lp svg .st1,
.logo-icon-lp svg .st2 { transition: fill .3s ease-in-out; }

/* --- Header: phone visible without animation ---
   why !important (both lines): Elementor's e-transform widget JS writes
   transform/opacity as inline style during the hover/entry animation,
   and inline styles beat external CSS unless !important.
   The .e-transform.e-transform class duplication is Elementor's own
   specificity hack, kept as-is for compatibility. */
.header-bar .elementor-widget.e-transform.e-transform {
  --e-transform-transition-duration: 0s !important;
  transform: none !important;
  opacity: 1 !important;
}

/* --- Header: hide phone text on mobile, keep icon ---
   why !important: Elementor button widget ships with
   .elementor-button-text { display: inline-block !important } and
   .elementor-button { min-width: Xpx !important } at the kit level. */
@media (max-width: 767px) {
  .call-button .elementor-button-text {
    display: none !important;
  }
  .call-button .elementor-button {
    min-width: auto !important;
  }

  /* why !important: same as desktop sticky-effects above (Elementor
     inline bg token). */
  .header-bar.elementor-sticky--effects .header-internal {
    background: var(--e-global-color-ddfd85d) !important;
  }
}


/* =============================================================
   2. ANIMATIONS — Disable all entrance effects
   =============================================================
   why !important (both blocks): Elementor attaches CSS animations via
   keyframes (.animated class + data-settings). Setting animation-duration
   without !important loses to the keyframe-level declarations. */

.elementor-element.animated,
.elementor-element.animated-fast,
.elementor-element.animated-slow {
  animation-duration: 0s !important;
  -webkit-animation-duration: 0s !important;
}

/* CRITICAL: :not(.elementor-sticky__spacer) MUST stay.
   Elementor Pro Sticky clones the nav with class .elementor-invisible
   + inline visibility:hidden during hydration. Forcing visibility:visible
   on the spacer caused the double-header FOUC bug on 2026-04-16
   (see vault: incidencias/Doble header FOUC Elementor Pro Sticky lockall).
   Only the entrance-animation use-case of .elementor-invisible should be
   forced visible here. */
.elementor-invisible:not(.elementor-sticky__spacer) {
  visibility: visible !important;
}


/* =============================================================
   3. HOVER EFFECTS — Remove from non-clickable elements
   =============================================================
   why !important (whole section): Elementor writes transform/opacity
   on hover via inline style (via data-settings on the widget).
   The .e-transform.e-transform duplication we inherited is the
   Elementor-native specificity trick; kept as-is. */

.elementor-widget.e-transform:not(.elementor-widget-button):hover,
.jet-listing-grid__item .e-transform:hover,
.e-loop-item .e-transform:hover {
  transform: none !important;
  -webkit-transform: none !important;
}

.elementor-widget.e-transform:not(.elementor-widget-button),
.jet-listing-grid__item .e-transform,
.e-loop-item .e-transform {
  --e-transform-transition-duration: 0s !important;
}

/* --- Clickable cards: show pointer cursor --- */
.jet-listing-grid__item {
  cursor: pointer;
}
.jet-listing-grid__item a.e-con {
  cursor: pointer;
}


/* =============================================================
   4. TYPOGRAPHY — Responsive & hierarchy fixes
   ============================================================= */

/* Fix H1 < H2 inversion on center pages.
   why !important: Elementor widget-level CSS uses id-based selectors
   `.elementor-PAGE .elementor-element.elementor-element-ID .elementor-heading-title`
   with specificity (0,3,0). Adding more classes still loses to Elementor's
   generated inline-ish CSS, so !important is required. */
body.single-nos-sites h1.elementor-heading-title,
body.post-type-archive-nos-sites h1.elementor-heading-title {
  font-size: 42px !important;
}

/* Mobile: reduce oversized titles.
   why !important: Elementor widget CSS uses id-based selectors per widget
   that beat any semantic selector. Same rationale as nos-sites H1 above. */
@media (max-width: 767px) {
  h1.elementor-heading-title {
    font-size: clamp(28px, 8vw, 40px) !important;
    line-height: 1.15 !important;
  }
  h2.elementor-heading-title {
    font-size: clamp(22px, 6vw, 32px) !important;
    line-height: 1.2 !important;
  }
}


/* =============================================================
   5. BUTTONS — Chevron links left-aligned
   ============================================================= */

/* Specificity win: :has() contributes (0,1,0) + two classes = (0,3,0).
   Elementor's .elementor-button-text shipping text-align is (0,1,0). */
.elementor-widget-button:has(.e-fas-chevron-right) .elementor-button .elementor-button-text {
  text-align: left;
}


/* =============================================================
   6. FOOTER — Accordion responsive behavior
   =============================================================
   why !important (whole section): Elementor Nested Accordion is a
   <details>/<summary> widget that toggles visibility via the [open]
   attribute and an internal JS controller writing display/height inline.
   Forcing "always open on desktop" requires beating (a) browser <details>
   defaults, (b) Elementor's inline styles, and (c) the widget's own CSS
   that uses !important. Kept as-is. */

/* Desktop: accordions always open, non-clickable */
@media (min-width: 1025px) {
  .acordeon-footer .e-n-accordion-item-title-icon {
    display: none !important;
  }

  .acordeon-footer .e-n-accordion-item-title {
    cursor: default !important;
    pointer-events: none !important;
  }

  .acordeon-footer .e-n-accordion-item {
    pointer-events: none !important;
  }

  .acordeon-footer .e-n-accordion-item > div {
    pointer-events: auto !important;
  }

  .acordeon-footer .e-n-accordion-item a {
    pointer-events: auto !important;
  }

  /* Title color
     Specificity win: .acordeon-footer + widget + item + title =
     (0,4,0), no !important needed. */
  .acordeon-footer .e-n-accordion-item-title-text {
    color: var(--e-global-color-secondary);
  }

  /* Border: primary color.
     why !important: Elementor Nested Accordion ships widget-level CSS with
     an id-based selector (.elementor-PAGE .elementor-element-ID > .e-n-accordion
     > .e-n-accordion-item > .e-n-accordion-item-title { border-color: ... })
     whose specificity (0,5,0) cannot be beaten by the semantic class selector
     below without !important. */
  .acordeon-footer .e-n-accordion-item-title {
    border-color: var(--e-global-color-primary) !important;
    transition: border-color 0.3s ease !important;
  }

  /* Hover: accent color. Same !important rationale as the base border. */
  .acordeon-footer .e-n-accordion-item:hover .e-n-accordion-item-title {
    border-color: var(--e-global-color-accent) !important;
  }

  /* Force content always visible — needs !important because Elementor
     writes display/height/visibility inline when the accordion toggles. */
  .acordeon-footer .e-n-accordion-item .e-con {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .acordeon-footer .e-n-accordion-item[open] > .e-con,
  .acordeon-footer .e-n-accordion-item:not([open]) > .e-con {
    display: block !important;
    height: auto !important;
  }
}

/* Mobile: interactive accordion.
   Specificity win: .acordeon-footer + two classes = (0,3,0), no !important. */
@media (max-width: 1024px) {
  .acordeon-footer .e-n-accordion-item-title {
    cursor: pointer;
  }
}

/* Social icons: light fill on blue background.
   why !important: <svg> inline attributes beat external CSS. */
.elementor-social-icon svg {
  fill: var(--e-global-color-ddfd85d) !important;
}

/* Footer centers menu.
   Specificity win: .footer + two classes + tag = (0,3,1). */
.footer .centros-menu-item a {
  display: block;
}



/* =============================================================
   7. STORE LOCATOR — Search bar + Leaflet map + distance badges
   ============================================================= */

.lockall-search-bar { margin-top: 20px; width: 100%; max-width: 480px; }
.lockall-search-input-wrapper { position: relative; }
.lockall-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none; z-index: 1; }
#lockall-cp-search { width: 100%; padding: 14px 44px 14px 44px; border: 2px solid var(--e-global-color-42597f9, #DCDCFF); border-radius: 12px; font-size: 15px; font-family: inherit; background: #fff; color: var(--e-global-color-secondary, #202020); transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
#lockall-cp-search:focus { border-color: var(--e-global-color-primary, #1D1DCD); box-shadow: 0 0 0 3px rgba(29,29,205,0.1); }
#lockall-cp-search::placeholder { color: #999; }
#lockall-search-clear { display: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 20px; color: #999; cursor: pointer; padding: 4px 8px; line-height: 1; }
#lockall-geo-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.2s;
}
#lockall-geo-btn:hover { color: var(--e-global-color-primary, #1D1DCD); }
#lockall-geo-btn.loading { animation: lockall-pulse 1s infinite; }
@keyframes lockall-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
#lockall-search-clear:hover { color: var(--e-global-color-secondary, #202020); }
.lockall-search-suggestions { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 1000; max-height: 280px; overflow-y: auto; }
.lockall-suggestion { padding: 12px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: background 0.15s; }
.lockall-suggestion:first-child { border-radius: 12px 12px 0 0; }
.lockall-suggestion:last-child { border-radius: 0 0 12px 12px; }
.lockall-suggestion:hover { background: var(--e-global-color-ddfd85d, #F4F4F4); }
.lockall-suggestion-name { font-weight: 600; color: var(--e-global-color-secondary, #202020); font-size: 14px; }
.lockall-suggestion-distance { font-size: 12px; color: var(--e-global-color-primary, #1D1DCD); }
.lockall-suggestion-empty { padding: 12px 16px; color: #999; font-size: 14px; text-align: center; }
.lockall-distance-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--e-global-color-primary, #1D1DCD);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.lockall-distance-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: var(--e-global-color-primary, #1D1DCD);
}
.jet-listing-grid__item { position: relative; }
/* why !important: Leaflet writes .lockall-marker { background: #fff; border: ...; }
   inline on the marker div via L.DivIcon. */
.lockall-marker, .lockall-user-marker { background: transparent !important; border: none !important; }
.lockall-marker-pin svg, .lockall-user-pin svg { width: 24px; height: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
#lockall-map { border-radius: 12px; overflow: hidden; }
/* why !important: Leaflet ships z-indexes on .leaflet-pane/.leaflet-top/
   .leaflet-control at various levels; we need a stable stack inside
   Elementor sections which also use z-index aggressively. */
.leaflet-pane { z-index: 1 !important; }
.leaflet-top, .leaflet-bottom { z-index: 2 !important; }
.leaflet-control { z-index: 2 !important; }
/* Leaflet attribution styling — ID selector wins (1,0,0) without !important. */
#lockall-map .leaflet-control-attribution { font-size: 9px; opacity: 0.6; background: rgba(255,255,255,0.6); }
#lockall-map .leaflet-control-attribution a { color: #666; }
/* why !important: Elementor applies `position: relative` inline on every
   .e-con, overriding our sticky positioning without !important. */
@media (min-width: 1025px) { .elementor-element-784259b4 { position: sticky !important; top: 100px; align-self: flex-start; } }
@media (max-width: 767px) { .lockall-search-bar { max-width: 100%; } #lockall-cp-search { font-size: 16px; } .lockall-distance-badge { font-size: 11px; padding: 3px 8px; } }

/* Safety net: hide Google Maps error if any script still loads it.
   why !important: gm-err-container ships with inline display:block from the Google script. */
#lockall-map .gm-err-container { display: none !important; }


/* =============================================================
   8. UPCOMING OPENINGS — "Ouverture Prochaine" badge on cards
   ============================================================= */

.jet-listing-grid__item.lockall-upcoming {
  opacity: 0.92;
}

.lockall-opening-badge {
  position: absolute;
  bottom: 16px;
  left: 0;
  background: var(--e-global-color-accent, #FFA300);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 20px 8px 16px;
  border-radius: 0 6px 6px 0;
  z-index: 10;
  letter-spacing: 0.03em;
  text-transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* =============================================================
   9. GALLERY — Uniform image heights in JetEngine gallery slider
   =============================================================
   why !important (whole section): Slick slider (used by JetEngine
   gallery) writes width/height/style inline on each slide + image on
   every resize. Only !important survives. */

.jet-engine-gallery-slider .slick-slide img {
  width: 100% !important;
  height: 400px !important;
  object-fit: cover !important;
  border-radius: 8px;
}

.jet-engine-gallery-slider .jet-engine-gallery-slider__item-wrap {
  height: 400px !important;
  overflow: hidden;
}

@media (max-width: 767px) {
  .jet-engine-gallery-slider .slick-slide img {
    height: 250px !important;
  }
  .jet-engine-gallery-slider .jet-engine-gallery-slider__item-wrap {
    height: 250px !important;
  }
}


/* =============================================================
   10. OPENING HOURS — Google Maps style dropdown
   ============================================================= */

.lockall-hours-dropdown {
  width: 100%;
  max-width: 360px;
  font-family: inherit;
}

.lockall-hours-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--e-global-color-secondary, #202020);
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
}

.lockall-hours-toggle:hover {
  border-color: var(--e-global-color-primary, #1D1DCD);
}

.lockall-hours-toggle:focus-visible {
  outline: 2px solid var(--e-global-color-primary, #1D1DCD);
  outline-offset: 2px;
}

.lockall-hours-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--e-global-color-secondary, #202020);
  white-space: nowrap;
}

.lockall-hours-status {
  font-size: 13px;
  white-space: nowrap;
}

.lockall-hours-dropdown.is-open .lockall-hours-status {
  color: #059669;
}

.lockall-hours-dropdown.is-closed .lockall-hours-status {
  color: #DC2626;
}

.lockall-hours-chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: #999;
}

.lockall-hours-toggle[aria-expanded="true"] .lockall-hours-chevron {
  transform: rotate(180deg);
}

.lockall-hours-table {
  margin-top: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
}

.lockall-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  color: var(--e-global-color-secondary, #202020);
}

.lockall-hours-row + .lockall-hours-row {
  border-top: 1px solid #f0f0f0;
}

.lockall-hours-day {
  font-weight: 500;
  min-width: 90px;
}

.lockall-hours-time {
  text-align: right;
  color: #666;
}

.lockall-hours-row.is-today .lockall-hours-day,
.lockall-hours-row.is-today .lockall-hours-time {
  color: var(--e-global-color-primary, #1D1DCD);
  font-weight: 600;
}

.lockall-hours-magasin + .lockall-hours-box {
  margin-top: 10px;
}

@media (max-width: 767px) {
  .lockall-hours-dropdown {
    max-width: 100%;
  }
  .lockall-hours-toggle {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* =============================================================
   11. LANGUAGE SWITCHER — Pill-style segmented control
   =============================================================
   Rendered by shortcode [lockall_language_pill] (functions.php).

   Minimal static design (per user request):
     - NO transitions, NO transforms, NO filter, NO animated shadows.
     - Only state change on hover of inactive item: font-weight → 700.
     - Active item stays in primary blue, inactive stays white bg + dark text.

   Specificity: child selectors are nested under `.lockall-lang-pill`
   (→ 0,2,0) so they beat Elementor kit `.elementor-kit-NNNN a` (→ 0,1,1)
   without !important.

   Colors: Elementor Global Colors — changing the kit's primary updates
   the pill automatically (principio #0 Zero Hardcode).
   ============================================================= */

.lockall-lang-pill {
  --pill-bg:        var(--e-global-color-d0d111e, #fff);
  --pill-fg:        var(--e-global-color-text, #202020);
  --pill-accent:    var(--e-global-color-primary, #1D1DCD);
  --pill-on-accent: var(--e-global-color-d0d111e, #fff);

  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  background: var(--pill-bg);
  border: 1px solid color-mix(in srgb, var(--pill-fg) 12%, transparent);
  border-radius: 10px;
  line-height: 1;
}

.lockall-lang-pill .lockall-lang-pill__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pill-fg);
  background: transparent;
  text-decoration: none;
  border-radius: 7px;
}

.lockall-lang-pill .lockall-lang-pill__item.is-active {
  background: var(--pill-accent);
  color: var(--pill-on-accent);
}

/* Hover on inactive item: bold only. Gated to fine pointers so touch
   devices don't keep a sticky bold after a tap. */
@media (hover: hover) and (pointer: fine) {
  .lockall-lang-pill .lockall-lang-pill__item:not(.is-active):hover {
    font-weight: 700;
  }
}

