/* ==========================================================
   Tgl0be'Script – nouveau design
   Palette : violet profond, violet marque, jaune bouton,
   encre, brume, filets. Les couleurs des pseudos reprennent
   la logique du script (F / H / non précisé).
   ========================================================== */

:root {
  --violet-deep: #3a1280;
  --violet: #9b2df1;
  --yellow: #ffd84d;
  --ink: #1b1730;
  --ink-soft: #4d4963;
  --mist: #f4f3f9;
  --rule: #d9d6e8;
  --white: #ffffff;

  --nick-f: #b81d80;
  --nick-h: #1f4fd8;
  --nick-x: #5b6070;
  --nick-op: #1a7f37;

  --font-title: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--violet-deep); }
a:hover { color: var(--violet); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.band :focus-visible { outline-color: var(--yellow); }
main :focus-visible, .site-footer :focus-visible { outline-color: var(--violet); }

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Bandeau haut + hero (fond violet) ---------- */

.band {
  background: var(--violet-deep);
  color: var(--white);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--yellow); }

.topbar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.topbar nav a {
  color: #e8dcff;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover,
.topbar nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--yellow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3rem;
  align-items: center;
  padding-block: 3.5rem 4.5rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero .lead {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.2rem;
  color: #e8dcff;
}

.btn-download {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.75rem;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 0 #b9962a;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-download strong {
  font-family: var(--font-title);
  font-size: 1.3rem;
  line-height: 1.2;
}
.btn-download span { font-size: 0.95rem; color: #4a3f10; }
.btn-download:hover {
  color: var(--ink);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b9962a;
}
.btn-download:active { transform: translateY(4px); box-shadow: 0 0 0 #b9962a; }

.hero-meta {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: #cdbbf2;
}
.hero-meta strong { color: var(--white); font-weight: 600; }

/* ---------- Fenêtre de chat (élément mémorable) ---------- */

.win {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 0, 40, 0.45);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.win-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.9rem;
  background: var(--violet);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
}
.win-btns { letter-spacing: 0.6em; opacity: 0.85; }

.win-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem;
  min-height: 16rem;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.log time { color: #8a869c; margin-right: 0.5rem; }
.log .sys { color: #6b6780; }
.log b { font-weight: 600; }
.log b::before { content: "<"; font-weight: 400; color: #8a869c; }
.log b::after { content: ">"; font-weight: 400; color: #8a869c; }

.nicks {
  list-style: none;
  margin: 0;
  padding: 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--mist);
  border-left: 1px solid var(--rule);
}

.f { color: var(--nick-f); }
.h { color: var(--nick-h); }
.x { color: var(--nick-x); }
.op { color: var(--nick-op); }

.win-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.9rem;
  border-top: 1px solid var(--rule);
  background: #ebe9f5;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.win figcaption {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.win figcaption .f::before,
.win figcaption .h::before,
.win figcaption .x::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin: 0 0.35rem 0 0.9rem;
  border-radius: 50%;
  background: currentColor;
}
.win figcaption .f::before { margin-left: 0.2rem; }

/* Séquence unique à l'ouverture de la page */
@media (prefers-reduced-motion: no-preference) {
  .log li {
    opacity: 0;
    animation: line-in 0.01s forwards;
    animation-delay: calc(0.5s + var(--i) * 0.7s);
  }
  @keyframes line-in { to { opacity: 1; } }
}

/* ---------- Contenu ---------- */

main section { padding-block: 4rem; }
main section + section { border-top: 1px solid var(--rule); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: start;
}

h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-grid > header p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

.about p {
  margin: 0 0 1rem;
  max-width: 44rem;
  font-size: 1.15rem;
}
.about p:last-child { margin-bottom: 0; }

.changes { list-style: none; margin: 0; padding: 0; }
.changes li {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.changes li:first-child { padding-top: 0; }
.changes li:last-child { border-bottom: 0; }
.changes strong { font-family: var(--font-title); font-weight: 600; }
.changes p { margin: 0; color: var(--ink-soft); }

.old { color: #b3261e; font-weight: 600; }

/* Capture d'écran */
.shot {
  display: block;
  max-width: 880px;
  margin-inline: auto;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 36px rgba(27, 23, 48, 0.14);
  background: var(--white);
}
.shot img { width: 100%; }
.shot-note {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Commandes */
.cmds { margin: 0; padding: 0; list-style: none; }
.cmds li {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 0.35rem 2rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.cmds li:last-child { border-bottom: 0; }

.cmd-copy {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  padding: 0.3rem 0.65rem;
  color: var(--violet-deep);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cmd-copy:hover { border-color: var(--violet); }
.cmd-copy[data-copied="true"] {
  background: #e6f6ea;
  border-color: var(--nick-op);
  color: #11592a;
}
.cmds p { margin: 0; color: var(--ink-soft); }

/* Appel final */
.cta {
  text-align: center;
}
.cta h2 { margin-bottom: 1.5rem; }
.cta .btn-download { box-shadow: 0 4px 0 #b9962a; }

/* ---------- Pied de page ---------- */

.site-footer {
  padding-block: 2rem;
  background: var(--ink);
  color: #cfcbe2;
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.site-footer a { color: var(--yellow); }
.site-footer a:hover { color: var(--white); }

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: 2.5rem 3rem; }
  .section-grid { grid-template-columns: minmax(0, 1fr); }
  main section { padding-block: 3rem; }
}

@media (max-width: 640px) {
  .changes li,
  .cmds li { grid-template-columns: minmax(0, 1fr); }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .nicks {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .btn-download { display: flex; }
}




/* ----- Variables ----- */
:root {
  --bg: #0f1220;
  --bg-card: #e6e6e6;
  --bg-card-hover: #1f2440;
  --border: #2a3050;
  --text: #e6e8f2;
  --text-muted: #9aa0bd;
  --accent: #353e60;
  --accent-2: #472289;
  --success: #38d39f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --transition: 0.25s ease;
}

/* ----- Liste des serveurs ----- */
.servers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.servers > li {
  position: relative;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(180deg, var(--bg-card), rgba(122, 122, 122, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition),
    background var(--transition);
  overflow: hidden;
}

/* Barre d'accent à gauche */
.servers > li::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.7;
  transition: opacity var(--transition), width var(--transition);
}

.servers > li:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, var(--bg-card-hover), rgba(31, 36, 64, 0.7));
  border-color: rgba(108, 140, 255, 0.5);
}

.servers > li:hover::before {
  opacity: 1;
  width: 6px;
}

/* ----- Titre du serveur ----- */
.srv-name {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter var(--transition);
}

.srv-name:hover {
  filter: brightness(1.2);
}

/* Petit indicateur "en ligne" */
.srv-name::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.6rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(56, 211, 159, 0.15);
  vertical-align: middle;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(56, 211, 159, 0.15); }
  50%      { box-shadow: 0 0 0 6px rgba(56, 211, 159, 0); }
}

/* ----- Description ----- */
.servers p {
  margin: 0.75rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ----- Bouton Se connecter ----- */
.btn-connect {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(108, 140, 255, 0.35);
  transition: transform var(--transition), box-shadow var(--transition),
    filter var(--transition);
}

.btn-connect::after {
  content: "→";
  transition: transform var(--transition);
}

.btn-connect:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 24px rgba(108, 140, 255, 0.5);
}

.btn-connect:hover::after {
  transform: translateX(4px);
}

.btn-connect:active {
  transform: translateY(0);
}

/* ----- Hint ----- */
.servers-hint {
  margin-top: 1.75rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}

/* ----- Accessibilité (sr-only) ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Responsive ----- */
@media (max-width: 600px) {
  body { padding: 2rem 0.75rem; }

  .servers > li { padding: 1.25rem; }

  .srv-name { font-size: 1.15rem; }

  .btn-connect { width: 100%; justify-content: center; }
}

/* ----- Mode clair (optionnel) ----- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-card: #ffffff;
    --bg-card-hover: #faf4e8;
    --border: #e2e5f0;
    --text: #1a1d2e;
    --text-muted: #212121;
    --shadow: 0 10px 30px rgba(20, 25, 50, 0.08);
  }
  .servers-hint {
    background: rgba(0, 0, 0, 0.02);
  }
}