/* ---------- Ajouts communs aux pages du site ----------
   Tout reprend les jetons et les formes de style.css : panneaux sombres arrondis,
   pilules, Fredoka en capitales pour les titres, or pour l'accent. */

/* --- adresse et etat du serveur (accueil, guide) --- */

.ip-pill--hero { width: auto; padding: 13px 22px; gap: 14px; }

.adresse-rapide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
}

.hero-statut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
}
.hero-statut .online-badge { font-size: 12.5px; }

.online-badge.hors-ligne .dot { background: #ff6b6b; box-shadow: 0 0 6px #ff6b6b; }

.widget-lien {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.widget-lien:hover { text-decoration: underline; }

/* --- meilleurs voteurs --- */

.voteurs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.voteurs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12.5px;
}
.voteurs .vide { color: var(--text-muted); }
.voteurs .rang {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voteurs .r1 { background: rgba(255,203,61,0.16); color: var(--gold); }
.voteurs .r2 { background: rgba(255,255,255,0.10); color: #d9dbe3; }
.voteurs .r3 { background: rgba(255,138,61,0.16); color: var(--orange); }
.voteurs .nom {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.voteurs .nb { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* --- systemes : commande en pilule --- */

.cmd {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,203,61,0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.cmd--lieu { background: rgba(108,141,255,0.14); color: #97a4ff; }

/* --- cosmetiques --- */

.vitrine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.vitrine-onglets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.onglet {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.onglet:hover { background: var(--bg-panel); color: var(--text-primary); }
.onglet[aria-selected="true"] { background: var(--gold); border-color: transparent; color: #1a1204; }

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.case {
  position: relative;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.case:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--bg-panel-2); }
.case:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.case[aria-pressed="true"] {
  border-color: rgba(255,203,61,0.6);
  background: linear-gradient(180deg, rgba(255,203,61,0.10), var(--bg-panel) 70%);
}
.case img { width: 100%; height: 100%; object-fit: contain; }
.case-bientot::after {
  content: "Bientôt";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,138,61,0.16);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fiche {
  position: sticky;
  top: 90px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.fiche-apercu {
  aspect-ratio: 1;
  margin-bottom: 16px;
  border-radius: 14px;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(255,203,61,0.14), transparent 70%),
    var(--bg-panel-2);
}
.fiche-apercu img { width: 100%; height: 100%; object-fit: contain; }
.fiche-nom {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
}
.fiche-infos { margin: 0; display: grid; gap: 8px; }
.fiche-infos div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.fiche-infos dt { color: var(--text-muted); }
.fiche-infos dd { margin: 0; font-weight: 600; text-align: right; }
.fiche-infos .prix { color: var(--gold); }
.fiche-infos .bientot { color: var(--orange); }

/* couleurs des noms telles qu'en jeu (codes &), eclaircies juste assez pour rester lisibles
   sur le fond sombre */
.nom-3 { color: #2cc9c9; }
.nom-4 { color: #ee5a50; }
.nom-5 { color: #d96bd9; }
.nom-6 { color: #ffaa00; }
.nom-7 { color: #c9c9c9; }
.nom-8 { color: #9a9a9a; }
.nom-9 { color: #8080ff; }
.nom-a { color: #55ff55; }
.nom-b { color: #55ffff; }
.nom-c { color: #ff5555; }
.nom-d { color: #ff55ff; }
.nom-e { color: #ffff55; }
.nom-f { color: #ffffff; }

/* --- spawn --- */

.rendu {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.rendu img { width: 100%; height: auto; }
.rendu figcaption { padding: 12px 16px; font-size: 13px; color: var(--text-muted); }
.rendu--large { margin-bottom: 18px; }

.spawn-duo {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 18px;
  align-items: start;
}

.carte { position: relative; }
.repere {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1204;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 18px -6px rgba(0,0,0,0.6);
}
.repere::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255,203,61,0.3);
}

.credit { margin: 14px 0 0; font-size: 12.5px; color: var(--text-faint); }

/* --- Cobbleverse en chiffres --- */

.chiffre {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  text-transform: uppercase;
}
.chiffre-carte h3 { margin-top: 8px; }

/* --- fenetre de connexion --- */

.connexion {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 12, 0.78);
  backdrop-filter: blur(4px);
  animation: checkout-fade 0.18s ease;
}
.connexion[hidden] { display: none; }

.connexion-panneau {
  width: min(440px, 100%);
  padding: 32px 28px 26px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #100d18;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  text-align: center;
  outline: none;
}
.connexion-logo { display: block; width: 52px; height: 52px; margin: 0 auto 18px; }
.connexion-titre {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.connexion-titre.attention { color: var(--gold); }
.connexion-texte { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }
.connexion-actions { display: grid; gap: 10px; }
.connexion-actions[hidden] { display: none; }
.connexion-retour {
  margin-top: 4px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.connexion-retour:hover { color: var(--text-primary); }

.chargement { display: flex; justify-content: center; gap: 7px; height: 12px; }
.chargement[hidden] { display: none; }
.chargement i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  animation: chargement 0.9s ease-in-out infinite;
}
.chargement i:nth-child(2) { animation-delay: 0.15s; }
.chargement i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chargement {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* --- notification --- */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,203,61,0.35);
  background: var(--bg-panel);
  box-shadow: 0 16px 32px -12px rgba(0,0,0,0.6);
  transform: translateY(calc(100% + 30px));
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
}
.toast.visible { transform: none; visibility: visible; transition-delay: 0s; }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--gold); }
.toast strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.toast span { font-size: 13px; color: var(--text-muted); }

/* --- page Nouveautes : une fiche par entree de nouveautes.json --- */

.nouveaute-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.nouveaute h3 { margin-bottom: 6px; }
.nouveaute p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }

.etiquette {
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255,203,61,0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.etiquette--launcher { background: rgba(108,141,255,0.14); color: #97a4ff; }
.etiquette--site { background: rgba(94,228,155,0.12); color: var(--success); }
.etiquette--evenement { background: rgba(255,138,61,0.16); color: var(--orange); }
.etiquette--autre { background: var(--bg-panel-2); color: var(--text-muted); }

/* --- adaptations --- */

@media (max-width: 960px) {
  .vitrine { grid-template-columns: 1fr; }
  .fiche { position: static; display: grid; grid-template-columns: 160px 1fr; gap: 0 18px; align-items: start; }
  .fiche-apercu { grid-row: span 3; margin: 0; }
  .fiche .btn { grid-column: 2; }
}

@media (max-width: 860px) {
  .spawn-duo { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .cases { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
  .fiche { grid-template-columns: 1fr; }
  .fiche-apercu { grid-row: auto; width: 180px; margin: 0 auto 14px; }
  .fiche .btn { grid-column: auto; }
  .toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .case, .onglet { transition: none; }
  .case:hover { transform: none; }
  .connexion { animation: none; }
  .chargement i { animation: none; opacity: 1; }
  .toast { transition: none; }
}

/* --- liens dans les textes (conditions, pages legales) : visibles, sans quoi ils se
   confondent avec le texte puisque style.css retire couleur et soulignement --- */

.rule-section a,
.rule-note a,
.rule-list a,
.placeholder-note a,
.currency-note a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rule-section a:hover,
.rule-note a:hover,
.rule-list a:hover,
.placeholder-note a:hover,
.currency-note a:hover { color: var(--text-primary); }

/* une ancre (/boutique/#conditions) ne doit pas finir cachee sous la barre de navigation fixe */
section[id] { scroll-margin-top: 72px; }

/* --- page Credits et licences : tableaux des mods et des packs --- */

.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.45;
}
.credits-table th,
.credits-table td {
  padding: 9px 10px 9px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.credits-table th:last-child,
.credits-table td:last-child { padding-right: 0; }
.credits-table thead th {
  border-top: 0;
  padding-top: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.credits-table tbody th {
  width: 28%;
  font-weight: 600;
  color: var(--text-primary);
}
.credits-table td:nth-child(2) { width: 24%; }
.credits-table td:nth-child(3) { width: 20%; }
.credits-table-packs td:nth-child(2) { width: 20%; }
.credits-table-packs td:nth-child(3) { width: auto; }
.credits-vide { font-style: italic; }

/* script.js fait apparaitre chaque .rule-section quand 12 % de sa hauteur est a l'ecran : un tableau de
   plusieurs ecrans de haut n'y arriverait jamais et resterait invisible */
.credits-bloc.reveal { opacity: 1; transform: none; }

/* petit ecran : une fiche par mod, le titre de chaque colonne devant sa valeur */
@media (max-width: 640px) {
  .credits-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .credits-table tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .credits-table tbody tr:first-child { border-top: 0; padding-top: 0; }
  .credits-table th,
  .credits-table td { display: block; width: auto !important; padding: 2px 0; border-top: 0; }
  .credits-table td::before { content: attr(data-titre) " : "; color: var(--text-primary); font-weight: 600; }
}
