/*
 * Passion Bien-Etre - CSS commun LAB
 * ACTION 079 - extraction phase 1 depuis header.php et footer.php
 * Lecture/ecriture UTF-8 explicite sans BOM.
 * Styles communs header / menu / navigation / footer.
 */

/* =========================
   Header / navigation
   ========================= */

header.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to right, #b9e4c9, #dbeecb);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: nowrap;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
  }

  .menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  .menu-list {
    list-style: none;
    display: flex;
    gap: 3rem;
    margin: 0;
    padding: 0;
    align-items: center;
  }

  .menu-item {
    position: relative;
  }

  .submenu {
    display: none;
    position: absolute;
    top: 2.5rem;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
    z-index: 10;
    width: max-content;
    min-width: 220px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .menu-item.show-submenu .submenu {
    display: block;
    opacity: 1;
  }

  nav a {
    position: relative;
    text-decoration: none;
    color: #2b3a2f;
    font-weight: 600;
    transition: transform 0.3s ease;
  }

  nav a::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: #9cccaa;
    filter: blur(3px);
    transform: translate(2px, 2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  nav a:hover::after {
    opacity: 1;
  }

  nav a:hover {
    transform: scale(1.08);
  }

  .header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
  }

  .icon-btn {
    background: rgba(255, 255, 255, 0.85);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }

  .loader {
    width: 12px;
    height: 12px;
    border: 2px solid #2b3a2f;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @media (max-width: 768px) {
    .menu-toggle {
      display: block;
    }
    .menu-list {
      display: none !important;
    }
    #mobile-submenu {
      display: none;
      position: absolute;
      top: 100%;
      left: 1rem;
      width: max-content;
      min-width: 220px;
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      z-index: 2000;
      flex-direction: column;
      padding: 0.5rem 1rem;
      border-radius: 8px;
    }
    #mobile-submenu.active {
      display: flex;
    }
    #mobile-submenu a {
      padding: 0.4rem 0;
      font-weight: 500;
      color: #2b3a2f;
      text-decoration: none;
    }
  }

  @media (min-width: 769px) {
    .menu-toggle {
      display: none;
    }
    #mobile-submenu {
      display: none !important;
    }
  }

/* =========================
   Footer commun
   ========================= */

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background: #dbeecb;
  color: #2b3a2f;
}

/* =========================
   Utilitaires typographie
   ACTION 095
   ========================= */

.u-text-center {
  text-align: center;
}

.u-underline {
  text-decoration: underline;
}

/* =========================
   Livre d'or - utilitaires édition
   ACTION 101
   ========================= */

.livre-edit-toggle {
  background: none;
  border: none;
  color: #234d20;
  cursor: pointer;
  font-size: .9rem;
  margin: 0 0 1rem 0;
  padding: 0;
  display: inline-block;
}

.livre-edit-code-block {
  display: none;
  margin-bottom: 1rem;
}

.livre-edit-code-input {
  padding: .5rem;
  border: 1px solid #cfe4cf;
  border-radius: 5px;
}

.livre-edit-code-submit {
  padding: .5rem 1rem;
  margin: 0 0 0 .5rem;
  background: #234d20;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
}

.livre-privacy-link {
  text-align: center;
  margin: 2rem 0;
  font-size: .85rem;
}

.u-text-right {
  text-align: right;
}

/* =========================
   Impression - interface commune
   ACTION 111
   ========================= */

@media print {
  header,
  .icon-btn,
  .header-tools {
    display: none !important;
  }
}


/* ACTION 119 - QR / modal commun contact + tarifs */
.qr-code {
  text-align: center;
  margin-top: 2rem;
  cursor: pointer;
}

.qr-code img:hover {
  transform: scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.modal-content img {
  max-width: 400px;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
}

/* Sélecteur de langue FR / NL / EN */
.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-right: 0.45rem;
  font-size: 0.82rem;
}

.lang-switch a {
  color: #2f5d3a;
  text-decoration: none;
  font-weight: 600;
  padding: 0.15rem 0.25rem;
  border-radius: 999px;
  opacity: 0.75;
}

.lang-switch a.active {
  background: rgba(47, 93, 58, 0.12);
  opacity: 1;
}

.lang-switch a:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .lang-switch {
    font-size: 0.78rem;
    gap: 0.25rem;
    margin-right: 0.25rem;
  }
}

/* ACTION_237_SEARCH_LAYER_START
   Recherche header au premier plan pendant l'ouverture de la loupe. */
header.sticky-header.search-open {
  z-index: 3000;
}
/* ACTION_237_SEARCH_LAYER_END */

/* ACTION_239_HEADER_MENU_LAYER_START
   Menu principal au premier plan pendant l'ouverture du sous-menu Passion*Bien-Être. */
header.sticky-header.menu-open {
  z-index: 3000;
}

header.sticky-header.menu-open .submenu,
header.sticky-header.menu-open #mobile-submenu {
  z-index: 3001;
}
/* ACTION_239_HEADER_MENU_LAYER_END */
