/* ============================================================
   AKALAVOLO — Guides de classe (CSS unifié)
   
   Remplace : builds.css, tokens.css, shortcode-styles.css
   Charger APRÈS pages.css (qui gère le layout de base equipement-list)
   ============================================================ */


/* ── Variables de design ── */
:root {
  --ak-bg-deep: #0a0810;
  --ak-bg-card: #2C192E;
  --ak-border: rgba(255, 255, 255, 0.07);
  --ak-border-soft: rgba(255, 255, 255, 0.04);
  --ak-gold: #F0D351;
  --ak-gold-soft: rgba(240, 211, 81, 0.15);
  --ak-text: #E6E0D4;
  --ak-text-muted: #9a8fb8;
  --ak-text-dim: #6c6486;
  --ak-red: #C41E3A;
  --ak-radius: 8px;
}


/* ── Items : pourcentages à droite ── */

.equipement-list ul li {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  list-style: none !important;
}

/* Le lien (y compris après injection Wowhead icontinyl) prend l'espace dispo */
.equipement-list ul li > a,
.equipement-list ul li > a.icontinyl,
.equipement-list ul li > .ak-itemlink {
  flex: 1 1 auto !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
}

/* Le badge % reste compact à droite, ne rétrécit jamais */
.equipement-list ul li > .akalavolo-pct {
  flex: 0 0 auto !important;
  margin-left: auto;
  white-space: nowrap;
}


/* ── Badges de pourcentage ── */

.akalavolo-pct {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.akalavolo-pct-high {
  background: rgba(240, 211, 81, 0.18);
  color: var(--ak-gold);
}

.akalavolo-pct-mid {
  background: rgba(230, 224, 212, 0.12);
  color: var(--ak-text);
}

.akalavolo-pct-low {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ak-text-dim);
}


/* ── Méta (nombre de joueurs) ── */

.akalavolo-builds-meta {
  font-size: 0.85rem;
  color: var(--ak-text-muted);
  margin-bottom: 20px;
  font-style: italic;
}

.akalavolo-builds-meta strong {
  color: var(--ak-gold);
  font-style: normal;
  font-weight: 700;
}


/* ── Titres de section (H3 dans les groupes d'équipement) ── */

.ak-h3 {
  font-size: 1.2rem;
  color: var(--ak-gold);
  margin: 24px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ak-border);
  font-weight: 600;
}


/* ── Séparateur entre groupes ── */

.ak-sep {
  border: none;
  border-top: 1px solid rgba(240, 211, 81, 0.15);
  margin: 24px 0;
}


/* ── Barre de filtre (titre section + pills de mode) ── */

.ak-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ak-border);
  flex-wrap: wrap;
}

.ak-filterbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ak-section-h2 {
  margin: 0 !important;
  font-size: 1.4rem !important;
  color: var(--ak-gold) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.ak-mode-badge {
  background: var(--ak-gold-soft);
  color: var(--ak-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ak-filterbar-right {
  display: flex;
  align-items: center;
}


/* ── Pills de mode (2v2, 3v3, shuffle, etc.) ── */

.ak-mode-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ak-mode-pill {
  /* Reset button navigateur */
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  outline: none;
  /* Styles custom */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ak-text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1.4;
}

.ak-mode-pill:hover {
  background: rgba(240, 211, 81, 0.1);
  border-color: rgba(240, 211, 81, 0.3);
  color: var(--ak-text);
}

.ak-mode-pill.is-active {
  background: var(--ak-gold-soft);
  border-color: var(--ak-gold);
  color: var(--ak-gold);
}


/* ── Sections dynamiques (tabs) ── */

.ak-section[hidden] {
  display: none !important;
}


/* ── Placeholder (sections pas encore implémentées) ── */

.ak-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--ak-text-muted);
  font-style: italic;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.ak-placeholder strong {
  color: var(--ak-gold);
  font-style: normal;
}


/* ── Erreurs ── */

.akalavolo-error {
  color: var(--ak-red);
  font-style: italic;
  padding: 12px;
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: 6px;
  background-color: rgba(196, 30, 58, 0.05);
}


/* ── Responsive ── */

@media (max-width: 768px) {
  .ak-filterbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .ak-mode-pills {
    width: 100%;
  }

  .ak-mode-pill {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
  }
}
