/*
 Theme Name:   Le Foyer by UPCOM Sàrl
 Theme URI:    https://generatepress.com
 Description:  GeneratePress child theme for Le Foyer : Antiquités et Art Populaire le foyer
 Author:       Frédéric Paltenghi
 Author URI:   https://upcom.sarl
 Template:     generatepress
 Version:      1.0
*/



/* Le menu de l'en-tête passe au-dessus du contenu */
.site-header,
#site-navigation,
.main-navigation {
    position: relative;
    z-index: 999;
}
.main-navigation .main-nav ul ul {
    z-index: 1000;
}

/* Le bloc titre/menu de collection reste en dessous */
.gb-container-cfd5fc30 {
    position: relative;
    z-index: 1;
}

/* =========================================
   Scroll avec full screen FirelightWP
   ========================================= */

.fancybox-container,
.firelight-lightbox,
.firelight-overlay {
  overflow-y: auto !important;
}

.fancybox-stage {
  overflow: visible !important;
}

html.fancybox-active,
body.fancybox-active {
  overflow: auto !important;
}

/* =========================================
   Contact Form 7 - Minimal Premium
   ========================================= */

.cf7-required {
  display: block;
  margin-bottom: 22px;
  font-size: 16px;
}

.cf7-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 36px;
}

.cf7-grid .full {
  grid-column: 1 / -1;
}

.group-input,
.group-input-end {
  width: 100%;
}

.group-input p,
.group-input-end p {
  margin: 0;
}

.group-input input,
.group-input textarea {
  width: 100%;
  padding: 8px 0;
  border: none !important;
  border-bottom: 2px solid #d6d6d6 !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 18px;
  line-height: 1.35;
  color: inherit;
  box-sizing: border-box;
}

.group-input input:focus,
.group-input textarea:focus {
  outline: none;
  border-bottom-color: #CF000F !important;
}

.group-input input[readonly] {
  color: #777;
}

.group-input textarea {
  height: 72px !important;
  min-height: 72px !important;
  resize: vertical;
}

.group-input input::placeholder,
.group-input textarea::placeholder {
  color: #999;
  opacity: 1;
}

.group-input-end {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 14px;
}

/* Bouton CF7 avec ligne */

.cf7-submit-wrap {
  display: inline-block;
}

.cf7-submit {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit !important;
  font-family: inherit;
  font-size: 22px;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.25s ease;
}

.cf7-submit-wrap:hover,
.cf7-submit-wrap:hover .cf7-submit {
  color: #CF000F !important;
}

/* =========================================
   Mobile formulaire
   ========================================= */

@media (max-width: 768px) {

  .cf7-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .group-input input,
  .group-input textarea {
    font-size: 17px;
  }

  .cf7-submit {
    font-size: 21px;
  }
}

/* =========================================
   Google map
   ========================================= */

/*.map-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.map-wrapper iframe {
  filter: grayscale(100%) contrast(1.05);
  display: block;
}

.map-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: auto;
  transform: translate(-50%, -100%);
  pointer-events: none;
}*/

/* =========================================
   Bouton avec ligne type menu
   ========================================= */

.btn-ligne {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.btn-ligne::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.35s cubic-bezier(0.68, -0.4, 0.265, 1.4);
}

.btn-ligne:hover::after {
  width: 33px;
}

/* =========================================================
   MENU PRINCIPAL + MENU COLLECTION
   ========================================================= */

@media (min-width: 769px) {

  :root {
    --menu-link-pad-x: 20px;
    --menu-underline-gap: 14px;
    --menu-underline-width: 33px;
    --menu-underline-height: 2px;
  }

  /* MENU PRINCIPAL */

  .main-navigation .main-nav ul li > a,
  #site-navigation .main-nav ul li > a {
    position: relative;
  }

  .main-navigation .main-nav ul li > a::after,
  #site-navigation .main-nav ul li > a::after {
    content: "";
    position: absolute;
    left: var(--menu-link-pad-x);
    bottom: var(--menu-underline-gap);
    width: var(--menu-underline-width);
    height: var(--menu-underline-height);
    background-color: currentColor;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
  }

  .main-navigation .main-nav ul li:hover > a::after,
  #site-navigation .main-nav ul li:hover > a::after,
  .main-navigation .main-nav ul li.current-menu-item > a::after,
  #site-navigation .main-nav ul li.current-menu-item > a::after,
  .main-navigation .main-nav ul li.current_page_item > a::after,
  #site-navigation .main-nav ul li.current_page_item > a::after,
  .main-navigation .main-nav ul li.current-menu-ancestor > a::after,
  #site-navigation .main-nav ul li.current-menu-ancestor > a::after {
    transform: scaleX(1);
  }

  /* MENU COLLECTION */

  .collection-menu ul,
  .collection-menu li,
  .collection-menu .wp-block-navigation-item,
  .collection-menu .wp-block-navigation-item__content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .collection-menu ul {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }

  .collection-menu a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    width: fit-content;
    text-decoration: none;
    padding: 0 !important;
    line-height: 1.2;
  }

  .collection-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 33px;
    height: 2px;
    background-color: currentColor;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
  }

  .collection-menu a:hover::after,
  .collection-menu .current-menu-item > a::after,
  .collection-menu .current-menu-ancestor > a::after,
  .collection-menu .current_page_item > a::after {
    transform: scaleX(1);
  }
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

  .main-navigation .main-nav ul li > a::after,
  #site-navigation .main-nav ul li > a::after,
  .collection-menu a::after {
    display: none;
  }
}

/* =========================================================
   HEADER / FOOTER TOUJOURS AU-DESSUS
   ========================================================= */

.site-header,
#site-navigation,
.main-navigation {
  position: relative;
  z-index: 9999;
}

.site-footer,
footer {
  position: relative;
  z-index: 50;
}

/* =========================================================
   STACKING CONTEXT UNIVERSEL POUR LE FILLIGRANE
   Couvre toute structure de page (accueil, produit, catégorie, etc.)
   ========================================================= */

/* Tout parent contenant un .filligrane devient un contexte d'empilement */
*:has(> .filligrane) {
  position: relative;
  z-index: 0;
}

/* Tous les frères/sœurs d'un .filligrane passent au-dessus de lui */
*:has(> .filligrane) > *:not(.filligrane) {
  position: relative;
  z-index: 1;
}

/* =========================================================
   BASE FILLIGRANE
   ========================================================= */

.filligrane {
  position: relative;
  overflow: visible;
}

/* Contenu interne (la petite frise) au-dessus du ::before */
.filligrane > *,
.filligrane > * > * {
  position: relative;
  z-index: 2;
}

/* L'image du filigrane (::before) passe en arrière-plan */
.filligrane::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 360px;
  height: 724px;
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  filter: brightness(1.3) contrast(1.2);
}

/* Variante gauche */
.filligrane.filligrane-gauche::before {
  left: 0;
  background-image: url("https://antiquiteslefoyer.ch/wp-content/uploads/2026/05/Logo-filigrane-15.png");
  background-position: left center;
}

/* Variante droite */
.filligrane.filligrane-droite::before {
  right: 0;
  left: auto;
  background-image: url("https://antiquiteslefoyer.ch/wp-content/uploads/2026/05/Logo-filigrane-droit-15.png");
  background-position: right center;
}

/* Adaptation mobile */
@media (max-width: 768px) {
  .filligrane::before {
    width: 60vw;
    height: auto;
    aspect-ratio: 360 / 724;
    opacity: 0.6;
  }
}

/* =========================================================
   EXCEPTIONS - éléments hors du scope :has() qui doivent
   passer devant le filigrane
   ========================================================= */

/* Carte Google Maps + son iframe */
.map-wrapper {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.map-wrapper iframe {
  position: relative;
  z-index: 1;
}

/* Bloc "Coup de cœur" et tout bloc gb-query placé hors de l'article */
.gb-query-17e94699,
[class*="gb-query-"] {
  position: relative;
  z-index: 1;
}