/* ==== Réparation des boutons déformés du bandeau ==== */
/* 1. Aucune pilule du menu ne doit passer sur deux lignes */
header nav a {
  white-space: nowrap;
  flex: none;
}
/* 2. « Guide gratuit » tient sur une ligne, même quand le bandeau est chargé */
header a[href="#guide"],
header a[href="/#guide"] {
  white-space: nowrap;
  flex: none;
}
/* 3. Sous 1200 px, le lien « Comment ça marche » se retire pour libérer le bandeau
      (il reste accessible dans la fenêtre de recherche et la visite guidée) */
@media (max-width: 1199px) {
  .mvt-howto-desktop {
    display: none;
  }
}

/* ==== Améliorations navigation (libellés, transparence, aide recherche) ==== */

/* Sous-titres visibles dans le tiroir mobile */
.mvt-nav-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #c9a227; /* or */
  opacity: 0.9;
  line-height: 1.2;
  margin-top: 1px;
}
header a.mvt-labeled {
  line-height: 1.25 !important;
  position: relative;
}

/* Infobulle explicative au survol (ordinateur) */
header a.mvt-labeled::after {
  content: attr(data-mvt-sub);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  top: 100%;
  background: #1e2a4a;
  color: #f8f6f0;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}
header a.mvt-labeled:hover::after,
header a.mvt-labeled:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* Lien « Comment ça marche » */
.mvt-howto-link {
  cursor: pointer;
}
.mvt-howto-desktop {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex: none;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px dashed rgba(201, 162, 39, 0.6);
  padding: 2px 1px;
  margin: 0 8px;
  transition: color 0.15s ease;
}
.mvt-howto-desktop:hover {
  color: #c9a227;
}

/* Encart « portée & limites » dans la fenêtre de recherche existante */
.mvt-search-help {
  margin: 0;
  padding: 10px 20px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #4b5563;
  background: #faf7ef;
  border-bottom: 1px solid #eee6d0;
}
.mvt-search-help b {
  color: #1e2a4a;
}
.mvt-search-help-note {
  display: block;
  margin-top: 4px;
  color: #8a7f5c;
  font-size: 0.72rem;
}
.mvt-search-help-note a {
  color: #9a7b1e;
  text-decoration: underline;
}

/* Fenêtre « Comment ça marche » */
#mvt-howto-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(10, 15, 35, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#mvt-howto-overlay.mvt-open {
  display: flex;
}
#mvt-howto-box {
  background: #fff;
  border-radius: 18px;
  max-width: 620px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px 28px 22px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
#mvt-howto-box h2 {
  font-family: "Playfair Display", serif;
  color: #1e2a4a;
  font-size: 1.4rem;
  margin-bottom: 4px;
}
#mvt-howto-box h3 {
  color: #1e2a4a;
  font-size: 1rem;
  margin: 18px 0 6px;
}
#mvt-howto-box p,
#mvt-howto-box li {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.55;
}
#mvt-howto-box ol,
#mvt-howto-box ul {
  padding-left: 20px;
  margin: 6px 0;
}
.mvt-howto-step {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  align-items: flex-start;
}
.mvt-howto-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #c9a227;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.mvt-transparency {
  margin-top: 18px;
  background: #faf7ef;
  border: 1px solid #eee6d0;
  border-left: 4px solid #c9a227;
  border-radius: 10px;
  padding: 14px 16px;
}
#mvt-howto-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
}

/* ==== Visite guidée première visite ==== */
#mvt-tour-dim {
  position: fixed;
  inset: 0;
  z-index: 99980;
  background: rgba(10, 15, 35, 0.55);
  display: none;
}
#mvt-tour-dim.mvt-open {
  display: block;
}
#mvt-tour-welcome {
  position: fixed;
  inset: 0;
  z-index: 99997;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#mvt-tour-welcome.mvt-open {
  display: flex;
}
#mvt-tour-tip {
  position: fixed;
  z-index: 99997;
  display: none;
  width: 320px;
  max-width: calc(100vw - 24px);
}
#mvt-tour-tip.mvt-open {
  display: block;
}
.mvt-tour-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 22px 24px 18px;
  max-width: 420px;
  border: 1px solid #eee6d0;
  border-top: 4px solid #c9a227;
}
#mvt-tour-welcome .mvt-tour-card {
  max-width: 420px;
}
.mvt-tour-hello {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e2a4a;
  margin-bottom: 6px;
}
.mvt-tour-card p {
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.55;
  margin: 0 0 14px;
}
.mvt-tour-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mvt-tour-btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mvt-tour-primary {
  background: #c9a227;
  border: 2px solid #c9a227;
  color: #fff;
}
.mvt-tour-primary:hover {
  background: #b08e1e;
  border-color: #b08e1e;
}
.mvt-tour-ghost {
  background: transparent;
  border: 2px solid #e5ddc8;
  color: #6b7280;
}
.mvt-tour-ghost:hover {
  border-color: #c9a227;
  color: #9a7b1e;
}
.mvt-tour-progress {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #1e2a4a;
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

/* Élément mis en lumière pendant la visite */
.mvt-tour-highlight {
  position: relative !important;
  z-index: 99990 !important;
  outline: 3px solid #c9a227 !important;
  outline-offset: 3px;
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.25);
}
