/* =========================
   BB.css — Bottom Bar & Context Sheet (tiles)
   Indépendant des autres CSS
   ========================= */

/* Par défaut : rien n’apparaît en desktop/tablette */
.GM-bottomNavShell {
  display: none;
}

/* Icônes images de la bottom bar (taille fixe, pas de zoom) */
.GM-bottomNav-imgIcon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

/* Vue mobile uniquement */
@media (max-width: 768px) {

  /* On masque l'ancien bouton IA où qu'il soit */
  [data-gm-ai-launcher] {
    display: none !important;
  }

  /* On masque le footer global */
  #site-footer {
    display: none !important;
  }

  /* On évite que le contenu soit caché sous la bottom bar */
  body {
    padding-bottom: 90px;
  }

  .GM-bottomNavShell {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1150;
    font-family: inherit;
  }

  /* ============================
     CONTEXT = SHEET (tuiles)
     ============================ */

  /* Le conteneur #gmBottomContext ne doit PLUS être une barre flex.
     Il sert juste de “mount point” pour overlay + sheet. */
  .GM-bottomContext {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;               /* important: permet à l’overlay d’être plein écran */
    bottom: 0;
    z-index: 1600;        /* au-dessus du contenu + au-dessus du bouton IA */
    pointer-events: none; /* fermé par défaut */
  }

  .GM-bottomNavShell.has-context .GM-bottomContext {
    pointer-events: auto;
  }

  /* Overlay sombre derrière le sheet */
  .GM-ctxOverlay {
    position: fixed;
    left: 0; right: 0;
    top: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity .18s ease-out;
  }

  .GM-bottomNavShell.has-context .GM-ctxOverlay {
    opacity: 1;
  }

  /* Le sheet qui monte au-dessus de la bottom bar */
  .GM-ctxSheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 62px;               /* juste au-dessus de la nav */
    border-radius: 18px 18px 12px 12px;

    background: #20466e;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);

    transform: translateY(14px);
    opacity: 0;

    max-height: 58vh;
    overflow: hidden;

    transition: transform .18s ease-out, opacity .18s ease-out;
    z-index: 1610;
  }

  .GM-bottomNavShell.has-context .GM-ctxSheet {
    transform: translateY(0);
    opacity: 1;
  }

  .GM-ctxSheetHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
  }

.GM-ctxTitle {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #ffffff;
}


  .GM-ctxClose {
    border: none;
    background: rgba(255,255,255,0.10);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .GM-ctxClose:active {
    transform: translateY(1px);
    background: rgba(255,255,255,0.16);
  }

  /* Grille de tuiles */
  .GM-ctxTiles {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    overflow: auto;
    -webkit-overflow-scrolling: touch;

    max-height: calc(58vh - 54px); /* head ~54px */
  }

  /* 3 colonnes sur grands mobiles */
  @media (min-width: 430px) {
    .GM-ctxTiles {
      grid-template-columns: 1fr 1fr 1fr;
    }
  }

  /* Tuile cliquable */
  .GM-ctxTile {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;

    padding: 12px 12px;
    border-radius: 14px;

    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #f8fafc;
  }

  .GM-ctxTile:active {
    background: rgba(56,189,248,0.22);
    border-color: rgba(56,189,248,0.45);
    transform: translateY(1px);
  }

  .GM-ctxTileIcon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
  }

  .GM-ctxTileText { min-width: 0; }

.GM-ctxTileLabel {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  color: #f9fafb;
}


  .GM-ctxTileSub {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(226,232,240,0.85);
    line-height: 1.15;
  }

  /* ============================
     BARRE PRINCIPALE (NAV)
     ============================ */
  .GM-bottomNav {
    display: flex;
    justify-content: space-around;

    background: #20466e;
    color: #ffffff;
    padding: 2px 0 6px;
    border-top: none;
  }

  .GM-bottomNav-btn {
    flex: 1 1 0;
    border: none;
    background: none;
    color: inherit;
    padding: 6px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 12px;
  }

  /* Conteneur d’icône : base pour le halo */
  .GM-bottomNav-btnIcon {
    font-size: 24px;
    line-height: 1;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Texte explicatif sous les icônes : masqué */
  .GM-bottomNav-btnLabel {
    display: none;
  }

  /* Bouton actif : le halo fait le job */
  .GM-bottomNav-btn.is-active {
    color: #ffffff;
  }

  /* Halo ORANGE autour de l’icône active */
  .GM-bottomNav-btn.is-active .GM-bottomNav-btnIcon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 165, 0, 0.45);
    filter: blur(10px);
    z-index: 0;
    animation: gmHaloPop 0.18s ease-out;
  }

  @keyframes gmHaloPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }

  /* ============================
     BOUTON IA FLOTTANT
     ============================ */

  .GM-iaBtnWrapper {
    position: fixed;
    right: 16px;
    bottom: 72px;
    z-index: 1500;
    transition: bottom 0.25s ease-out;
  }

  .GM-iaBtn {
    border: none;
    border-radius: 999px;
    width: 48px;
    height: 48px;
    background: #20466e;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(15,23,42,.35);
    cursor: pointer;
  }

  .GM-iaBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(15,23,42,.3);
  }

  .GM-iaBtn-icon {
    font-size: 28px;
    transform: translateY(-1px);
  }

  /* Quand le sheet est ouvert, on remonte le bouton IA */
  .GM-bottomNavShell.has-context ~ .GM-iaBtnWrapper {
    bottom: 320px;
  }
}

/* ==========================================================
   GM-joinHint — Bulle d’aide / confirmation d’inscription
   ========================================================== */

@media (max-width: 768px) {
  .GM-joinHint {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 78px;
    z-index: 1700; /* au-dessus overlay */
    pointer-events: auto;
    display: none;
  }

  .GM-joinHint.is-visible { display: block; }

  .GM-joinHint-inner {
    position: relative;
    background: #f3f4f6;
    color: #111827;

    padding: 14px 16px 12px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);

    display: flex;
    flex-direction: column;
    gap: 12px;

    max-width: min(340px, 94vw);
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .GM-joinHint-inner::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #f3f4f6 transparent transparent transparent;
  }

  .GM-joinHint-text { flex: 1 1 auto; font-weight: 500; }

  .GM-joinHint-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
  }

  .GM-joinHint-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #e5e7eb;
    color: #111827;
    white-space: nowrap;
  }

  .GM-joinHint-btn.GM-joinHint-confirm {
    background: #22c55e;
    color: #022c22;
    font-weight: 600;
  }
}

@media (min-width: 769px) {
  .GM-joinHint {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    z-index: 1700;
    pointer-events: auto;
    display: none;
  }
  .GM-joinHint.is-visible { display: block; }
}

/* ===========================================
   Agrandissement x2 du bouton "Je participe"
   uniquement sur page évènement
   =========================================== */
@media (max-width: 768px) {
  .GM-bottomNavShell[data-gm-page-kind="event"]
    .GM-bottomNav-btn[data-gm-nav="event_join"]
    .GM-bottomNav-btnIcon {
      transform: scale(2);
      transform-origin: center;
  }
}

/* Profil : par défaut, on cache le bouton "Retour" */
@media (max-width: 768px) {
  .GM-profileBackBtn { display: none; }
}
.GM-profileBackBtn { display: none; }
.GM-profileMeBtn { display: inline-flex; }

.GM-ctxTileIcon img{
  width: 28px;
  height: 28px;
  object-fit: contain;
}
