/* Lobbydex — une seule feuille de style, sans dépendance.
   Les couleurs sont des variables : le thème sombre ne redéfinit qu'elles. */

:root {
  --fond: #f6f7f9;
  --surface: #ffffff;
  --texte: #171b24;
  --texte-doux: #5a6272;
  --bordure: #dde1e8;
  --accent: #0b7a4b;
  --accent-texte: #ffffff;
  --accent-fond: #e3f5ec;
  --alerte-fond: #fff4d6;
  --alerte-texte: #6b4a00;
  --whitelist-fond: #ece8fb;
  --whitelist-texte: #4a35a0;
  --rayon: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #10131a;
    --surface: #181c26;
    --texte: #eef0f4;
    --texte-doux: #a0a8b8;
    --bordure: #2b3140;
    --accent: #2fd08a;
    --accent-texte: #06231a;
    --accent-fond: #12301f;
    --alerte-fond: #3a2e0c;
    --alerte-texte: #f3d27a;
    --whitelist-fond: #26214a;
    --whitelist-texte: #c0b4f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.conteneur { width: 100%; max-width: 60rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 1.5rem 0 .5rem; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .5rem; }
p, ul, ol, dl { margin: 0 0 1rem; }

.evitement { position: absolute; left: -999rem; }
.evitement:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* En-tête et pied de page */

.entete { background: var(--surface); border-bottom: 1px solid var(--bordure); }
.entete-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--texte); text-decoration: none; }
.logo span { color: var(--accent); }
.entete nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.entete nav a { color: var(--texte); text-decoration: none; font-weight: 600; padding: .25rem 0; }
.entete nav a:hover { color: var(--accent); }

.pied { margin-top: 3rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--bordure); color: var(--texte-doux); font-size: .875rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }

/* Textes */

.chapeau { font-size: 1.1rem; color: var(--texte-doux); max-width: 46rem; }
.note, .aide { font-size: .875rem; color: var(--texte-doux); }
.facultatif { font-weight: 400; color: var(--texte-doux); }
.avis { background: var(--alerte-fond); color: var(--alerte-texte); padding: .75rem 1rem; border-radius: var(--rayon); }
.fil { font-size: .875rem; color: var(--texte-doux); margin-top: 1rem; }

.accroche { padding: 1rem 0 .5rem; }
.chiffres { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .95rem; color: var(--texte-doux); }
.chiffres strong { display: block; font-size: 1.6rem; line-height: 1.2; color: var(--texte); font-variant-numeric: tabular-nums; }

.encart { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .25rem 1.25rem 1rem; margin-top: 2.5rem; }
.encart h2 { margin-top: 1rem; }

/* Boutons */

.bouton {
  display: inline-block; padding: .55rem 1rem; margin: 0 .5rem .5rem 0;
  border: 1px solid var(--bordure); border-radius: var(--rayon);
  background: var(--surface); color: var(--texte);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.bouton:hover { border-color: var(--accent); }
.bouton-principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton-principal:hover { filter: brightness(1.08); }

/* Classement */

.classement { list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; }
.ligne { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 7rem; align-items: center; gap: .75rem; padding: .7rem 1rem; }
.ligne + .ligne { border-top: 1px solid var(--bordure); }
.rang { color: var(--texte-doux); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ligne-nom { font-weight: 700; color: var(--texte); text-decoration: none; overflow-wrap: anywhere; }
.ligne-nom:hover { color: var(--accent); text-decoration: underline; }
.ligne-etiquettes { margin: .2rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.ligne-joueurs { text-align: right; font-variant-numeric: tabular-nums; }
.ligne-joueurs strong { font-size: 1.15rem; }
.ligne-joueurs span { color: var(--texte-doux); font-size: .875rem; }

.etiquette { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: var(--fond); border: 1px solid var(--bordure); color: var(--texte-doux); }
.etiquette-libre { background: var(--accent-fond); border-color: transparent; color: var(--accent); }
.etiquette-whitelist { background: var(--whitelist-fond); border-color: transparent; color: var(--whitelist-texte); }

.jauge { height: 4px; margin-top: .3rem; background: var(--bordure); border-radius: 2px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--accent); }

.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: 1rem 0; }

/* Filtres et formulaires */

.filtres { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1.25rem 0; }
.filtres label { display: grid; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--texte-doux); }
.filtres .bouton { margin: 0; }

select, input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea {
  width: 100%; padding: .5rem .65rem;
  border: 1px solid var(--bordure); border-radius: 8px;
  background: var(--surface); color: var(--texte); font: inherit;
}
.filtres select, .filtres input { width: auto; min-width: 9rem; }

.formulaire { max-width: 36rem; }
.champ { margin-bottom: 1.1rem; }
.champ > label { display: block; font-weight: 600; margin-bottom: .25rem; }
.champ .aide { margin: .25rem 0 0; }
.champ-case { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.champ-case input { width: 1.1rem; height: 1.1rem; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: #c0392b; font-size: .9rem; font-weight: 600; }
.erreurs { margin-bottom: 1rem; }
.piege { position: absolute; left: -999rem; }

/* Fiche d'un serveur */

.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.fiche > section { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.1rem 1.25rem; }
.grand-chiffre { margin-bottom: .4rem; color: var(--texte-doux); }
.grand-chiffre strong { font-size: 2rem; line-height: 1.1; color: var(--texte); font-variant-numeric: tabular-nums; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin-top: 1rem; }
dt { color: var(--texte-doux); }
dd { margin: 0; font-weight: 600; }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font-size: .85rem; padding: .15rem .6rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--bordure); }

/* Projets GTA 6 */

.projets { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 1.5rem; }
.projet { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .25rem 1.25rem 1rem; }
.projet h2 { margin-top: 1rem; }

/* Assistant « trouver mon serveur » */

.questions fieldset { border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); padding: .5rem 1.25rem .75rem; margin: 0 0 1rem; }
.questions legend { font-weight: 700; padding: 0 .4rem; }
.questions label { display: block; padding: .3rem 0; }
.questions label span { color: var(--texte-doux); font-size: .875rem; }

/* Guides */

.guide { max-width: 46rem; }
.guide h3 { font-size: 1.05rem; margin: 1.5rem 0 .25rem; }
.guide li { margin-bottom: .4rem; }
.guide code { font-size: .9em; background: var(--surface); border: 1px solid var(--bordure); border-radius: 4px; padding: .05rem .3rem; overflow-wrap: anywhere; }
.lexique { display: block; }
.lexique dt { color: var(--texte); font-weight: 700; margin-top: .75rem; }
.lexique dd { font-weight: 400; }
.defilement { overflow-x: auto; margin-bottom: 1rem; }
.guide table { border-collapse: collapse; width: 100%; }
.guide th, .guide td { border: 1px solid var(--bordure); padding: .4rem .6rem; text-align: left; vertical-align: top; }

@media (max-width: 30rem) {
  .ligne { grid-template-columns: 1.75rem minmax(0, 1fr) 5rem; gap: .5rem; padding: .65rem .75rem; }
  .filtres label, .filtres select, .filtres input { width: 100%; }
  .filtres label { flex: 1 1 100%; }
}
