.floating-panel {
  position: fixed;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  z-index: 101;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    left   0.45s cubic-bezier(0.4, 0, 0.2, 1),
    top    0.45s cubic-bezier(0.4, 0, 0.2, 1),
    width  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

/* ── Contenu interne du floating panel ── */
.floating-content {
  flex: 1;
  min-height: 0;
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  box-sizing: border-box;
}

.floating-content > * {
  flex-shrink: 0;
}

.floating-content::-webkit-scrollbar {
  display: none;
}

/* ── Settings sections dans le floating panel ── */
.floating-content .settings-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 8px;
  min-height: 0;
}

body[data-page="settings"] .floating-content {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

.floating-content .settings-section__title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  padding: 0 4px;
}

.floating-content .settings-section__items {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.floating-content .settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.floating-content .settings-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.floating-content .settings-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}

.floating-content .settings-item__label {
  flex: 1;
  font-size: 14px;
  font-weight: 450;
  color: #000;
}

.floating-content .settings-item__chevron {
  width: 16px;
  height: 16px;
  opacity: 0.2;
  flex-shrink: 0;
}

/* ── Footer settings dans le floating panel ── */
.floating-content .settings-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 8px;
  flex-shrink: 0;
}

.floating-content .settings-footer__links {
  font-size: 11px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.25);
  text-align: center;
  line-height: 1.7;
  max-width: 220px;
}

.floating-content .settings-footer__links span {
  cursor: pointer;
}

.floating-content .settings-footer__links span:hover {
  text-decoration: underline;
}

.floating-content .settings-footer__copy {
  font-size: 11px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.3);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

/* ── Keyframes contenu ── */
@keyframes fp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fp-scale-in {
  0%   { transform: scale(0.9);  }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1);    }
}

/* Search bar — apparaît quand le panel finit (0.45s) */
.floating-content .search-bar {
  opacity: 0;
  animation:
    fp-fade-in  0.25s ease forwards 0.45s,
    fp-scale-in 0.25s ease         0.45s;
}

/* Pills — stagger 100ms à partir de 0.55s */
.floating-content > .pills .pill {
  opacity: 0;
  animation:
    fp-fade-in  0.2s ease forwards,
    fp-scale-in 0.2s ease;
}

.floating-content .pills .pill:nth-child(1)  { animation-delay: 0.55s; }
.floating-content .pills .pill:nth-child(2)  { animation-delay: 0.60s; }
.floating-content .pills .pill:nth-child(3)  { animation-delay: 0.65s; }
.floating-content .pills .pill:nth-child(4)  { animation-delay: 0.70s; }
.floating-content .pills .pill:nth-child(5)  { animation-delay: 0.75s; }
.floating-content .pills .pill:nth-child(6)  { animation-delay: 0.80s; }
.floating-content .pills .pill:nth-child(7)  { animation-delay: 0.85s; }
.floating-content .pills .pill:nth-child(8)  { animation-delay: 0.90s; }
.floating-content .pills .pill:nth-child(9)  { animation-delay: 0.95s; }
.floating-content .pills .pill:nth-child(10) { animation-delay: 1.00s; }
.floating-content .pills .pill:nth-child(11) { animation-delay: 1.05s; }
.floating-content .pills .pill:nth-child(12) { animation-delay: 1.10s; }
.floating-content .pills .pill:nth-child(13) { animation-delay: 1.15s; }
.floating-content .pills .pill:nth-child(14) { animation-delay: 1.20s; }
.floating-content .pills .pill:nth-child(15) { animation-delay: 1.25s; }

/* ── Gauche : messages, search, settings ── */
body[data-page="messages"] .floating-panel,
body[data-page="search"]   .floating-panel,
body[data-page="settings"] .floating-panel {
  left: 70px;
  top: 16px;
  width: 30%;
  height: calc(100vh - 16px);
  border-radius: 48px 48px 0 0;
  opacity: 1;
  pointer-events: all;
}

body.is-logged-out[data-page="messages"] .floating-panel,
body.is-logged-out[data-page="search"]   .floating-panel,
body.is-logged-out[data-page="settings"] .floating-panel {
  top: calc(16px + var(--join-pills-height) + var(--join-pills-gap));
  height: calc(100vh - 16px - var(--join-pills-height) - var(--join-pills-gap));
}

/* ── Profil : page comme la map, floating avec padding tout autour ── */
body[data-page="profile"] .floating-panel {
  left: var(--nav-width);
  top: 16px;
  width: calc(100vw - var(--nav-width) - 16px);
  height: calc(100vh - 16px);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  opacity: 1;
  pointer-events: all;
}

/* ── Map : pleine largeur ── */
body[data-page="map"] .floating-panel {
  left: 70px;
  top: 16px;
  width: calc(100vw - 70px - 16px);
  height: calc(100vh - 16px);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  opacity: 1;
  pointer-events: all;
}

/* ── Auth : modal centré ── */
body[data-page="auth"] .floating-panel {
  top: 16px;
  left: 16px;
  width: 57%;
  height: calc(100vh - 32px);
  border-radius: 48px;
  opacity: 1;
  pointer-events: all;
}

/* ── Centre : home ── */
/* Sur home, le panel n'est plus le cadre visible : c'est un viewport
   transparent pleine largeur (stage) qui contient les blocs post (carte + rail)
   scrollables. La carte 9:16 est centrée dans le stage, le rail à sa droite. */
body[data-page="home"] .floating-panel {
  top: 0;
  height: 100vh;
  left: var(--nav-width);
  width: calc(100vw - var(--nav-width));
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  pointer-events: all;
}
