 /* ============================================================
    RALLUMONS LES ÉTOILES
    MENU PRINCIPAL + SOUS-MENU
    ============================================================ */


/* ============================================================
   LOGO
   ============================================================ */

#rle-menu-logo {
  cursor: pointer;
}


/* ============================================================
   PETIT POPUP
   ============================================================ */

#rle-menu-hint {
  position: absolute;

  top: 50%;
  left: calc(100% + 12px);

  transform: translateY(-50%);

  padding: 6px 10px;

  background: #111;
  color: #fff;

  border-radius: 4px;

  font-family: sans-serif;
  font-size: 13px;

  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity .25s ease,
    visibility .25s ease;

  z-index: 100;
}


#rle-menu-hint.is-visible {
  opacity: 1;
  visibility: visible;
}


#rle-menu-hint::before {
  content: "";

  position: absolute;

  top: 50%;
  left: -4px;

  width: 8px;
  height: 8px;

  transform: translateY(-50%) rotate(45deg);

  background: #111;
}


/* ============================================================
   CONTENEUR DU MENU
   ============================================================ */

/*
   IMPORTANT :
   display:none empêche les images de menu d'apparaître
   sous le logo lorsque la page est chargée.
*/

#rle-menu {
  position: fixed;

  inset: 0;

  z-index: 2147483000;

  width: 100vw;
  height: 100dvh;

  display: none;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: rgba(0, 0, 0, .92);
}


/*
   Le JS ajoute cette classe au clic sur le logo.
*/

#rle-menu.is-open {
  display: flex;
}


/* ============================================================
   MENU PRINCIPAL
   ============================================================ */

#rle-menu-primary {
  position: relative;

  display: flex;

  align-items: center;
  justify-content: center;
}


#rle-menu-primary img {
  display: block;

  width: min(974px, 96vw);

  height: auto;

  max-height: 94dvh;
}


/* ============================================================
   SOUS-MENU
   ============================================================ */

#rle-menu-secondary {
  position: relative;

  display: none;

  align-items: center;
  justify-content: center;
}


#rle-menu-secondary img {
  display: block;

  width: min(441px, 90vw);

  height: auto;

  max-height: 94dvh;
}


/*
   Niveau secondaire actif.
*/

#rle-menu.is-secondary #rle-menu-primary {
  display: none;
}


#rle-menu.is-secondary #rle-menu-secondary {
  display: flex;
}


/* ============================================================
   MAP SECONDAIRE
   ============================================================ */

#rle-menu-secondary-map {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;
}


/* ============================================================
   BOUTON FERMER
   ============================================================ */

#rle-menu-close {
  position: absolute;

  top: 18px;
  right: 20px;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(255,255,255,.12);

  color: white;

  font-size: 30px;
  line-height: 42px;

  cursor: pointer;
}


#rle-menu-close:hover {
  background: rgba(255,255,255,.25);
}


/* ============================================================
   BOUTON RETOUR
   ============================================================ */

#rle-menu-back {
  position: absolute;

  top: 18px;
  left: 20px;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(255,255,255,.12);

  color: white;

  font-size: 26px;
  line-height: 42px;

  cursor: pointer;

  display: none;
}


#rle-menu.is-secondary #rle-menu-back {
  display: block;
}


#rle-menu-back:hover {
  background: rgba(255,255,255,.25);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

  #rle-menu-primary img {
    width: 98vw;
  }

  #rle-menu-secondary img {
    width: 94vw;
  }

  #rle-menu-close {
    top: 10px;
    right: 10px;
  }

  #rle-menu-back {
    top: 10px;
    left: 10px;
  }

  #rle-menu-hint {
    top: calc(100% + 8px);
    left: 50%;

    transform: translateX(-50%);
  }

}

/* ============================================================
   LIBELLÉS DES ZONES DE MENU
   ============================================================ */

.rle-menu-label {
  position: absolute;

  z-index: 100;

  display: block;

  padding: 5px 9px;

  background: rgba(0, 0, 0, .78);
  color: #fff;

  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;

  font-family: sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;

  white-space: nowrap;

  pointer-events: none;

  transform: translate(-50%, 0);

  opacity: 1;

  box-sizing: border-box;

  text-shadow:
    0 1px 2px rgba(0,0,0,.8);
}


.rle-menu-label.is-hover {
  background: rgba(0, 0, 0, .95);

  transform:
    translate(-50%, 0)
    scale(1.05);
}


/* Le conteneur doit être le repère des coordonnées */

#rle-menu-primary,
#rle-menu-secondary {
  position: relative;
}


/*
 * Le libellé devient légèrement plus visible
 * quand on passe sur la zone correspondante.
 */

.rle-menu-label.is-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}


/*
 * Sous-menu
 */

.rle-menu-secondary .rle-menu-label {
  font-size: 12px;
  padding: 4px 7px;
}
