/* ─────────────────────────────────────────
   superlune/team-grid — style.css
   ───────────────────────────────────────── */

/* ── Grille ── */
.stg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ── Cartes ── */
.stg-card {
  cursor: pointer;
  background: #fff;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stg-card-name {
  line-height: 90%;
}

.stg-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  transition: width 0.3s ease;
}

.stg-detail-inner {
  margin-bottom: 5vh;
}

.stg-card h3 {
  font-size: normal;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stg-card .stg-role {
  font-size: small;
  margin: 0;
}

/* ── Panel détail ── */

.stg-detail-panel {
  background: #fff;
  overflow: hidden;
  position: relative;

  /* État fermé */
  max-height: 0;

  opacity: 0;
  pointer-events: none;

  /* Pas de display:none → les transitions peuvent fonctionner */
  display: none;

  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    padding 0.3s ease;
}

.stg-detail-panel.stg-visible {
  /* max-height: 420px; */

  max-height: 30vh;

  opacity: 1;
  pointer-events: auto;

  display: block;
}

.stg-detail-panel .stg-detail-name {
  font-size: 1.4rem;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stg-detail-panel .stg-detail-role {
  font-size: 0.85rem;
  opacity: 0.5;
  margin: 0 0 16px;
}

/* .stg-detail-panel .stg-detail-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
} */

/* .stg-detail-panel .stg-detail-desc {
  font-size: 0.9rem;
  margin: 0;
  column-count: 2;
  column-gap: 2rem;
  column-fill: balance;
} */

.stg-detail-panel .stg-detail-desc {
  font-size: 0.9rem;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.stg-detail-desc p {
  margin: 0;
}

/* Mobile */
@media (max-width: 560px) {
  .stg-detail-panel {
    max-height: none !important;
    overflow: visible;
  }

  .stg-detail-desc {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
}

/* ── Animations ── */
@keyframes stgShiftDown {
  from {
    transform: translateY(-8px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes stgShiftUp {
  from {
    transform: translateY(8px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.stg-shift-down {
  animation: stgShiftDown 0.38s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.stg-shift-up {
  animation: stgShiftUp 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── Éditeur Gutenberg ── */
.stg-editor-preview {
  background: #f4f1ec;
  border-radius: 4px;
}

.stg-editor-grid {
  pointer-events: none;
}

.stg-card--preview {
  cursor: default;
}

.stg-empty-notice {
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .stg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stg-detail-panel {
    grid-column: 2 / 3;
  }
}

@media (max-width: 560px) {
  .stg-grid {
    grid-template-columns: 1fr;
  }
  .stg-detail-panel {
    grid-column: 1;
  }
}
