/*
 * assets/css/style.css
 * ====================
 * Charte reprise des cartes du bot (/niveau, /topniveau) : fond sombre,
 * panneaux « verre dépoli » (glassmorphisme), dégradé bleu-violet → rose.
 * Les couleurs sont EXACTEMENT celles de cogs/Levels/constants.py, pour que
 * le site et les images générées par le bot forment un ensemble cohérent.
 */

:root {
  /* Palette identique au bot (cogs/Levels/constants.py) */
  --xp-start: #7289ff;   /* COLOR_XP_RGB      (114, 137, 255) */
  --xp-end:   #cb6cff;   /* COLOR_XP_END_RGB  (203, 108, 255) */
  --level:    #ffbd42;   /* COLOR_LEVEL_RGB   (255, 189,  66) */
  --rank:     #2ecc71;   /* COLOR_RANK_RGB    ( 46, 204, 113) */

  --bg:          #0a0b10;
  --panel-tint:  14, 16, 24;   /* PANEL_TINT — en composantes, pour rgba() */
  --text:        #ffffff;
  --text-soft:   #e2e5ee;
  --text-muted:  #a2a9ba;
  --text-dim:    #7e8596;

  --discord: #5865f2;
  --tiktok:  #25f4ee;

  --radius:      20px;   /* PANEL_RADIUS */
  --radius-sm:   14px;   /* SUBPANEL_RADIUS */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Fond : halos colorés flous, façon bannière assombrie ───────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  display: block;
  border-radius: 50%;
  /* Le flou est ce qui donne l'effet « bannière floutée » des cartes. */
  filter: blur(90px);
  opacity: 0.55;
}

.glow--violet {
  width: 45vmax; height: 45vmax;
  top: -12vmax; left: -10vmax;
  background: var(--xp-start);
  animation: drift 22s ease-in-out infinite alternate;
}

.glow--rose {
  width: 38vmax; height: 38vmax;
  bottom: -14vmax; right: -8vmax;
  background: var(--xp-end);
  animation: drift 27s ease-in-out infinite alternate-reverse;
}

.glow--or {
  width: 26vmax; height: 26vmax;
  top: 45%; left: 55%;
  background: var(--level);
  opacity: 0.22;
  animation: drift 32s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

/* Respecte les réglages système : pas d'animation si l'utilisateur n'en
   veut pas (confort visuel, vertiges, économie de batterie). */
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ── Mise en page ───────────────────────────────────────────────────── */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 20px;
}

/* ── Carte centrale « verre dépoli » ────────────────────────────────── */

.card {
  width: 100%;
  max-width: 520px;
  padding: 40px 32px 34px;
  text-align: center;

  background: rgba(var(--panel-tint), 0.70);   /* PANEL_ALPHA ≈ 179/255 */
  border: 1px solid rgba(255, 255, 255, 0.15); /* PANEL_BORDER_ALPHA */
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.card__logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;

  font-size: 38px;
  font-weight: 800;
  letter-spacing: 1px;

  border-radius: 50%;
  background: linear-gradient(135deg, var(--xp-start), var(--xp-end));
  box-shadow: 0 8px 28px rgba(114, 137, 255, 0.45);
}

.card__title {
  margin: 0;
  font-size: clamp(38px, 9vw, 54px);
  font-weight: 800;
  letter-spacing: 2px;

  /* Dégradé appliqué au texte lui-même, comme la barre de progression. */
  background: linear-gradient(90deg, var(--xp-start), var(--xp-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card__tagline {
  margin: 10px 0 30px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ── Boutons ────────────────────────────────────────────────────────── */

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  text-align: left;
  text-decoration: none;
  color: var(--text);

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-sm);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Contour de focus visible au clavier — accessibilité. */
.link:focus-visible {
  outline: 2px solid var(--xp-start);
  outline-offset: 3px;
}

.link:active { transform: translateY(0); }

.link__icon {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.link__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.link__text { min-width: 0; }   /* autorise la troncature du sous-titre */

.link__label {
  display: block;
  font-weight: 600;
  font-size: 16px;
}

.link__sublabel {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link__arrow {
  margin-left: auto;
  color: var(--text-dim);
  transition: transform 0.18s ease, color 0.18s ease;
}

.link:hover .link__arrow {
  transform: translateX(3px);
  color: var(--text-soft);
}

/* Variantes colorées — bord gauche accentué, comme les panneaux du bot. */

.link--discord {
  border-left: 4px solid var(--discord);
}
.link--discord .link__icon {
  background: rgba(88, 101, 242, 0.22);
  color: #c9cffb;
}

.link--tiktok {
  border-left: 4px solid var(--tiktok);
}
.link--tiktok .link__icon {
  background: rgba(37, 244, 238, 0.16);
  color: var(--tiktok);
}

.link--neutral {
  border-left: 4px solid var(--level);
}
.link--neutral .link__icon {
  background: rgba(255, 189, 66, 0.16);
  color: var(--level);
}

/* ── Pied de page ───────────────────────────────────────────────────── */

.footer {
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

.footer p { margin: 0; }

/* ── Mobile ─────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .card { padding: 32px 20px 26px; }
  .link { padding: 13px 15px; gap: 13px; }
  .link__icon { flex-basis: 40px; height: 40px; }
}
