/* ============================================================
   LA FORGE COSPLAY — explorer.css  v20260407a
   ============================================================ */

/* ── TOOLBAR ─────────────────────────────────────────────── */
.explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(184,115,51,.17);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.explorer-search {
  flex: 1 1 220px;
  min-width: 0;
}

.explorer-search .form-input {
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
}

.explorer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.explorer-filters .form-select {
  padding: 8px 28px 8px 11px;
  font-size: 13px;
  width: auto;
  min-width: 130px;
  background-size: 14px;
}

.explorer-contracts-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: rgba(232,213,176,.6);
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid rgba(184,115,51,.14);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.explorer-contracts-toggle:has(input:checked),
.explorer-contracts-toggle:hover {
  border-color: rgba(184,115,51,.38);
  color: var(--forge-parchment);
}

.explorer-contracts-toggle input {
  accent-color: var(--forge-copper);
  cursor: pointer;
}

/* ── RESULTS GRID ────────────────────────────────────────── */
.explorer-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  align-items: start;
}

.explorer-empty {
  grid-column: 1 / -1;
  padding: 40px 28px;
  text-align: center;
  border: 1px dashed rgba(184,115,51,.22);
  border-radius: 18px;
  color: var(--forge-stone);
  font-size: 14px;
}

/* ── CARD ────────────────────────────────────────────────── */
.explorer-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(184,115,51,.15);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  height: 210px; /* hauteur fixe = toutes les cartes identiques */
}

.explorer-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184,115,51,.38);
  box-shadow: 0 16px 36px rgba(0,0,0,.28), 0 0 0 1px rgba(184,115,51,.07);
}

.exc-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Header row: avatar + info + menu */
.exc-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.exc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(215,154,66,.28);
  background: linear-gradient(135deg, #1a0f05, #6b3a16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exc-avatar-letter {
  font-size: 22px;
  color: rgba(232,213,176,.7);
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1;
}

.exc-info {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.exc-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.exc-role svg,
.exc-location svg,
.exc-stat svg,
.exc-more-btn svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.exc-role--cosplayer {
  background: rgba(184,115,51,.16);
  border: 1px solid rgba(184,115,51,.28);
  color: #f0c060;
}

.exc-role--photographe {
  background: rgba(99,179,237,.13);
  border: 1px solid rgba(99,179,237,.26);
  color: #90cdf4;
}

.exc-role--visiteur {
  background: rgba(140,122,94,.13);
  border: 1px solid rgba(140,122,94,.26);
  color: #b0a080;
}

.exc-name {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: var(--forge-parchment);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.exc-location {
  font-size: 12px;
  color: rgba(184,115,51,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ⋯ menu button */
.exc-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.exc-more-btn {
  background: none;
  border: none;
  color: rgba(232,213,176,.28);
  font-size: 18px;
  padding: 2px 5px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color .14s, background .14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exc-more-btn:hover {
  color: var(--forge-parchment);
  background: rgba(255,255,255,.06);
}

/* Bio — occupe l'espace restant pour aligner le footer en bas */
.exc-bio {
  margin: 0;
  font-size: 13px;
  color: rgba(232,213,176,.52);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1; /* pousse le footer vers le bas */
}

/* Footer */
.exc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(184,115,51,.1);
}

.exc-stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.exc-stat {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(184,115,51,.12);
  color: rgba(232,213,176,.48);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.exc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.exc-btn {
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .16s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
}

.exc-btn--primary {
  background: var(--forge-copper);
  color: #fff8ee;
}

.exc-btn--primary:hover {
  background: #c98032;
  box-shadow: 0 4px 14px rgba(184,115,51,.38);
  color: #fff;
}

.exc-btn--ghost {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(184,115,51,.2);
  color: var(--forge-stone);
}

.exc-btn--ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(184,115,51,.4);
  color: var(--forge-parchment);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .explorer-results {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (max-width: 900px) {
  .explorer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .explorer-filters {
    flex-wrap: wrap;
  }

  .explorer-filters .form-select {
    flex: 1 1 120px;
    min-width: 0;
  }
}

@media (max-width: 580px) {
  .explorer-results {
    grid-template-columns: 1fr;
  }

  .exc-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .exc-actions {
    width: 100%;
  }

  .exc-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── SECTION VEDETTE (Forgerons de la semaine) ────────────────── */
.explorer-featured {
  margin-bottom: 24px;
}

.explorer-featured-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.explorer-featured-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--forge-gold);
  letter-spacing: .04em;
}

.explorer-featured-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--forge-copper);
  border: 1px solid rgba(200,132,58,.3);
  border-radius: 20px;
  padding: 2px 8px;
  text-transform: uppercase;
}

.explorer-featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 900px) {
  .explorer-featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 580px) {
  .explorer-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.exc-featured-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(184,115,51,.15);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  text-decoration: none;
  display: block;
  position: relative;
}

.exc-featured-card:hover {
  transform: translateY(-3px);
  border-color: rgba(184,115,51,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}

.exc-featured-card--winner {
  background: linear-gradient(160deg, rgba(224,180,78,.1) 0%, rgba(200,132,58,.06) 100%);
  border-color: rgba(224,180,78,.35);
  box-shadow: 0 4px 20px rgba(224,180,78,.1);
}

.exc-featured-card--winner:hover {
  border-color: rgba(224,180,78,.6);
  box-shadow: 0 12px 32px rgba(224,180,78,.15);
}

.exc-featured-rank {
  position: absolute;
  top: 8px; left: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--forge-stone);
}
.exc-featured-card--winner .exc-featured-rank {
  color: var(--forge-gold);
  font-size: 16px;
}

.exc-featured-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 auto 10px;
  border: 2px solid rgba(184,115,51,.25);
  background: linear-gradient(135deg, #1a0f05, #6b3a16);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-family: var(--font-display);
  color: rgba(232,213,176,.7);
}
.exc-featured-card--winner .exc-featured-avatar {
  border-color: rgba(224,180,78,.5);
  box-shadow: 0 0 14px rgba(224,180,78,.2);
}
.exc-featured-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

.exc-featured-name {
  font-size: 13px;
  color: var(--forge-parchment);
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.exc-featured-card--winner .exc-featured-name {
  color: var(--forge-amber);
}

.exc-featured-xp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--forge-copper);
}

.explorer-featured-empty {
  color: var(--forge-stone);
  font-size: 13px;
  font-style: italic;
  padding: 12px 0;
}

/* Sections Explorer v2 */
.explorer-section {
  margin-bottom: 30px;
}

.explorer-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.explorer-section-kicker {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--forge-copper);
}

.explorer-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--forge-gold);
}

.explorer-section-note {
  color: var(--forge-stone);
  font-size: 12px;
  text-align: right;
}

.explorer-results--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explorer-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.exc-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 500;
  min-width: 180px;
  overflow: hidden;
  background: var(--forge-dark);
  border: 1px solid rgba(184,115,51,.25);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
}

.exc-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--forge-stone);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.exc-menu button:hover {
  background: rgba(184,115,51,.1);
  color: var(--forge-parchment);
}

.explorer-rankings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.explorer-ranking-panel {
  border: 1px solid rgba(184,115,51,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  padding: 14px;
}

.explorer-ranking-title {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .05em;
  color: var(--forge-amber);
}

.explorer-ranking-list {
  display: grid;
  gap: 8px;
}

.explorer-ranking-item {
  display: grid;
  grid-template-columns: 34px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(184,115,51,.11);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  background: rgba(0,0,0,.12);
}

.explorer-ranking-item:hover {
  border-color: rgba(184,115,51,.32);
  background: rgba(184,115,51,.08);
}

.explorer-ranking-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--forge-copper);
}

.explorer-ranking-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(215,154,66,.24);
  background: linear-gradient(135deg, #1a0f05, #6b3a16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.explorer-ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explorer-ranking-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--forge-parchment);
  font-size: 13px;
  font-weight: 700;
}

.explorer-ranking-xp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--forge-copper);
  white-space: nowrap;
}

.explorer-ranking-empty {
  padding: 12px 8px;
  color: var(--forge-stone);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .explorer-results--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .explorer-rankings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .explorer-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .explorer-section-note {
    text-align: left;
  }

  .explorer-results--compact {
    grid-template-columns: 1fr;
  }
}
