/* ===================================
   SOURCE NAV — masquée dès le chargement,
   utilisée uniquement comme source de données par le JS
   =================================== */
.smtut-source-nav {
  display: none !important;
}

/* ===================================
   VARIABLES
   =================================== */
#smtut-mobile-menu {
  --forest-dark: #125d64;
  --white: #ffffff;
  --honeydew: #e8ffde;
  --panel-width: 100vw;
  --panel-shadow: 100px 0px 250px 0px rgba(0, 0, 0, 0.5);
  --header-height: 48px;
}

/* ===================================
   SCROLL LOCK (body)
   =================================== */
body.smtut-no-scroll {
  overflow: hidden;
}

/* ===================================
   OVERLAY (fond semi-transparent)
   =================================== */
.smtut-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  visibility: hidden;
  z-index: 999998;
  transition: background-color 0.3s ease, visibility 0.3s ease;
}

#smtut-mobile-menu.is-open .smtut-overlay {
  background-color: rgba(0, 0, 0, 0.4);
  visibility: visible;
}

/* ===================================
   PANNEAUX — BASE
   visibility: hidden empêche l'ombre
   de se voir en desktop quand hors écran
   =================================== */
.smtut-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--panel-width);
  height: 100dvh;
  overflow-y: auto;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s ease, visibility 0.3s ease;
}

.smtut-panel.is-active {
  visibility: visible;
  transform: translateX(0);
  box-shadow: var(--panel-shadow);
}

/* Largeur 402px à partir de 768px */
@media (min-width: 768px) {
  #smtut-mobile-menu {
    --panel-width: min(402px, 90vw);
  }
}

/* Chaque niveau actif passe au-dessus du précédent */
.smtut-panel--1.is-active { z-index: 1000001; }
.smtut-panel--2.is-active { z-index: 1000002; }
.smtut-panel--3.is-active { z-index: 1000003; }

/* Couleurs par niveau */
.smtut-panel--1 {
  background-color: var(--white);
}

.smtut-panel--2 {
  background-color: var(--honeydew);
}

.smtut-panel--3 {
  background-color: var(--forest-dark);
}

/* ===================================
   HEADER DU PANNEAU
   Sert d'espaceur pour pousser le contenu
   sous les boutons positionnés en absolu
   =================================== */

/* Niveau 1 : 32px (top croix) + 24px (hauteur croix) + 44px (espace) = 100px */
.smtut-panel--1 .smtut-panel__header {
  height: 100px;
  flex-shrink: 0;
}

/* Niveaux 2 et 3 : espace pour la croix, le bouton retour et le titre
   158px (top titre) + 28px (line-height titre) + 16px (marge basse) */
.smtut-panel--2 .smtut-panel__header,
.smtut-panel--3 .smtut-panel__header {
  height: 202px;
  flex-shrink: 0;
}

/* ===================================
   BOUTON FERMER (×)
   Positionné en absolu dans le panneau :
   32px du haut, 32px de la droite
   =================================== */
.smtut-btn-close {
  position: absolute;
  top: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
  color: var(--forest-dark);
  transition: none !important;
}

.smtut-btn-close:hover,
.smtut-btn-close:focus,
.smtut-btn-close:active {
  background: none !important;
  box-shadow: none !important;
  color: var(--forest-dark);
}

.smtut-panel--3 .smtut-btn-close,
.smtut-panel--3 .smtut-btn-close:hover,
.smtut-panel--3 .smtut-btn-close:focus,
.smtut-panel--3 .smtut-btn-close:active {
  color: var(--white);
  background: none !important;
  box-shadow: none !important;
}

/* ===================================
   BOUTON RETOUR
   Positionné en absolu dans le panneau :
   80px du haut, 32px de la gauche
   =================================== */
.smtut-btn-back {
  position: absolute;
  top: 80px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: var(--forest-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: none !important;
}

.smtut-btn-back:hover,
.smtut-btn-back:focus,
.smtut-btn-back:active {
  background: none !important;
  box-shadow: none !important;
  color: var(--forest-dark);
}

.smtut-panel--3 .smtut-btn-back,
.smtut-panel--3 .smtut-btn-back:hover,
.smtut-panel--3 .smtut-btn-back:focus,
.smtut-panel--3 .smtut-btn-back:active {
  color: var(--white);
  background: none !important;
  box-shadow: none !important;
}

/* ===================================
   TITRE DE CATÉGORIE (niveaux 2 et 3)
   =================================== */
.smtut-panel__title {
  position: absolute;
  top: 158px;
  left: 32px;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--forest-dark);
}

.smtut-panel--3 .smtut-panel__title {
  color: var(--white);
}

/* ===================================
   LISTE DES ITEMS
   =================================== */
.smtut-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===================================
   LIENS
   =================================== */
.smtut-panel__link {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 32px;
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: var(--forest-dark);
  text-decoration: none !important;
}

.smtut-panel--3 .smtut-panel__link {
  color: var(--white);
}

/* Flèche ferrée à droite */
.smtut-panel__arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}
