/* Menu mobile : offcanvas Bootstrap aux couleurs 2SM (pages publiques et pages membres). */
.sm-offcanvas.offcanvas {
  width: min(88vw, 340px); border: 0; color: #fff; z-index: 1080;
  background: linear-gradient(170deg, var(--sm-navy, #061630) 0%, var(--sm-navy-2, #0B2540) 62%, #0E4A3C 100%);
  border-radius: 0 26px 26px 0; box-shadow: 24px 0 60px -24px rgba(6, 22, 48, .8);
  font-family: var(--sm-font, 'Plus Jakarta Sans'), sans-serif;
}
/* Fond derrière le menu (Bootstrap 5.0 le nomme .modal-backdrop) */
body.sm-menu-open .modal-backdrop, .offcanvas-backdrop { z-index: 1075; background: #061630; }
body.sm-menu-open .modal-backdrop.show, .offcanvas-backdrop.show { opacity: .55; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sm-offcanvas-header { padding: 18px 18px 8px; }
.sm-offcanvas-logo img { height: 40px; width: auto; }
.sm-offcanvas-close {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.sm-offcanvas-close:hover { background: rgba(255, 255, 255, .18); }
.sm-offcanvas-body { padding: 8px 14px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }

.sm-offcanvas-user {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 0 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none;
}
.sm-offcanvas-user:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.sm-offcanvas-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(34, 197, 94, .7); }
.sm-offcanvas-user span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-offcanvas-user strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-offcanvas-user small { font-size: 12px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-offcanvas-user .mdi { font-size: 20px; color: rgba(255, 255, 255, .5); }

.sm-offcanvas-auth { padding: 12px; margin: 4px 0 10px; border-radius: 18px; background: rgba(255, 255, 255, .06); }
.sm-offcanvas-auth p { font-size: 12.5px; color: rgba(255, 255, 255, .7); margin: 0 0 10px; }
.sm-offcanvas-auth div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sm-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none; line-height: 1;
}
.sm-pill-primary { background: var(--sm-grad, linear-gradient(135deg, #22C55E, #0F7A34)); color: #fff; box-shadow: 0 8px 18px -8px rgba(22, 163, 74, .8); }
.sm-pill-ghost { border: 1px solid rgba(255, 255, 255, .4); color: #fff; }
.sm-pill:hover { color: #fff; filter: brightness(1.08); }

.sm-offcanvas-group { margin: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.sm-offcanvas-link {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 999px; color: rgba(255, 255, 255, .86);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s;
}
.sm-offcanvas-link .mdi { font-size: 20px; width: 22px; text-align: center; color: rgba(255, 255, 255, .7); line-height: 1; }
.sm-offcanvas-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sm-offcanvas-link.is-active { background: var(--sm-grad, linear-gradient(135deg, #22C55E, #0F7A34)); color: #fff; box-shadow: 0 10px 22px -10px rgba(22, 163, 74, .9); }
.sm-offcanvas-link.is-active .mdi { color: #fff; }

.sm-offcanvas-logout { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sm-offcanvas-logout button {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 0; border-radius: 999px;
  background: transparent; color: #FF8A8E; font-size: 15px; font-weight: 600;
}
.sm-offcanvas-logout button:hover { background: rgba(229, 72, 77, .12); }
.sm-offcanvas-logout .mdi { font-size: 20px; width: 22px; }

/* Pages publiques : boutons de l'en-tête en bas du menu */
.sm-offcanvas-cta { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sm-offcanvas-cta .sm-pill { padding: 13px 14px; font-size: 15px; }
.sm-offcanvas-cta .sm-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
