:root {
  --night: #0a0716;
  --crypt: #130d2a;
  --crypt-2: #1a1238;
  --line: #3a2a7a;
  --violet: #a678ff;
  --violet-btn: #7b3ff2;
  --cyan: #4cc9ff;
  --text: #ece8ff;
  --muted: #a99fcf;
  --ok: #3ee08f;
  --warn: #ffb02e;
  --bad: #ff5470;
  --radius: 10px;
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .6rem; }
h1 { font-size: clamp(2rem, 5vw, 2.7rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* Barre du haut */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  background: var(--crypt);
  border-bottom: 1px solid var(--violet-btn);
  box-shadow: 0 6px 24px -10px var(--violet-btn);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  font: 700 1.35rem var(--serif);
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; border-radius: 50%; display: block; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; }
.topbar nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.topbar nav a:hover { color: var(--cyan); }
.topbar nav a.btn { color: #fff; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; flex: 1; }
.site-footer { padding: 1.2rem clamp(1rem, 4vw, 2.5rem); color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* Boutons */
.btn {
  display: inline-block;
  background: var(--violet-btn);
  color: #fff;
  border: 2px solid var(--violet-btn);
  border-radius: 8px;
  padding: .7rem 1.25rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #8d5bff; border-color: #8d5bff; }
.btn.small { padding: .35rem .8rem; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.btn.ghost:hover { background: rgba(76, 201, 255, .12); }
.btn.danger { background: #c92b49; border-color: #c92b49; color: #fff; }
.btn.discord { background: #4752c4; border-color: #4752c4; color: #fff; }
button.link { background: none; border: 0; color: var(--cyan); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
button.link:hover { text-decoration: underline; }
form.inline { display: inline; }

/* Messages */
.alert { padding: .85rem 1.1rem; border-radius: 8px; margin: 0 0 1.25rem; font-weight: 600; border-left: 4px solid; }
.alert.ok { background: #0f3324; border-color: var(--ok); }
.alert.warn { background: #3a2807; border-color: var(--warn); }
.alert.bad { background: #3a1020; border-color: var(--bad); }

/* Page d'accueil */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 400px);
  gap: 2rem 3.5rem;
  align-items: center;
  padding: 1.5rem 0 3rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); max-width: 14ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.hero-logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 36px rgba(123, 63, 242, .55));
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }

/* Panneaux : planches de taverne avec un liseré à la couleur du jeu */
.sign {
  display: block;
  background: var(--crypt);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent, var(--violet));
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.2rem;
  text-decoration: none;
}
.sign h3 { margin-top: .2rem; }
.sign p { margin: 0; color: var(--muted); }
.sign .tag {
  display: inline-block;
  margin-bottom: .7rem;
  padding: .15rem .65rem;
  border-radius: 999px;
  background: var(--accent, var(--violet));
  color: #12081f;
  font-weight: 700;
  font-size: .85rem;
}
a.sign:hover { border-color: var(--accent, var(--violet)); box-shadow: 0 0 24px -6px var(--accent, var(--violet)); }

.steps { margin: 3rem 0 0; padding: 0; list-style: none; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: etape; }
.steps li { counter-increment: etape; padding-left: 3rem; position: relative; color: var(--muted); }
.steps li::before {
  content: counter(etape);
  position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--violet-btn); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.steps strong { display: block; color: var(--text); }

/* Voyants d'etat */
.status { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; }
.lamp {
  width: .95rem; height: .95rem; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35), 0 0 12px currentColor;
}
.st-online { color: var(--ok); }
.st-maintenance { color: var(--warn); }
.st-offline { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0 0 1.5rem; color: var(--muted); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; }

.server .status { margin-bottom: .8rem; }
.server .meta { margin-top: .8rem; font-size: .95rem; color: var(--muted); }

.back { display: inline-block; margin-bottom: 1.2rem; font-weight: 600; }

/* Fiche d'un serveur */
.info .row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.info dt { font-weight: 600; color: var(--muted); }
.info dd { margin: 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
code {
  font: 600 1rem/1.4 ui-monospace, Consolas, "Courier New", monospace;
  background: #0d0820; color: var(--violet); border: 1px solid var(--line);
  padding: .15rem .5rem; border-radius: 6px; word-break: break-all;
}
.notes { white-space: pre-line; margin-top: 1rem; }

/* Formulaires */
.plate { background: var(--crypt); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; max-width: 460px; margin: 1rem auto; }
.plate.wide { max-width: 760px; }
.plate .muted, .hint { color: var(--muted); }
.plate label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
.plate label.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.plate input, .plate select, .plate textarea {
  width: 100%; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: 8px;
  font: inherit; background: #0d0820; color: var(--text);
}
.plate input:focus, .plate select:focus, .plate textarea:focus { border-color: var(--cyan); outline: none; }
.plate input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--violet-btn); }
.plate input[type="color"] { padding: .15rem; height: 2.6rem; }
.plate textarea { min-height: 6rem; resize: vertical; }
.plate .btn { margin-top: 1.3rem; }
.plate hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.field-error { color: #ff8da1; font-size: .92rem; margin: .35rem 0 0; font-weight: 600; }
.hint { font-size: .9rem; margin: .3rem 0 0; }
.form-grid { display: grid; gap: 0 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.qr { display: inline-block; background: #fff; padding: .8rem; border-radius: 10px; }
.qr svg { display: block; width: 190px; height: 190px; }
.codes { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Tableau d'administration */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
td .row-actions { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: .5rem; }
  .hero-logo { order: -1; max-width: 260px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .plate { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* FEATURES-V2 : logo libre, choix d'affichage, textes multi-lignes */
.brand img { border-radius: 0; object-fit: contain; }
.hero p, .sign p { white-space: pre-line; }
.plate fieldset { border: 0; padding: 0; margin: 1.2rem 0 0; min-width: 0; }
.plate legend { font-weight: 600; padding: 0; margin-bottom: .2rem; }
.plate label.option { display: flex; align-items: flex-start; gap: .7rem; font-weight: 500; margin: .8rem 0 0; }
.plate label.option small { display: block; color: var(--muted); font-weight: 400; }
.plate input[type="radio"] { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--violet-btn); flex: none; }
.plate input[type="file"] { padding: .5rem; }
.logo-preview { margin: .5rem 0 0; }
.logo-preview img { display: block; max-width: 160px; height: auto; border-radius: 8px; background: var(--night); }

.sign .game-name { margin-bottom: .5rem; }

/* FEATURES-V3 : favoris, sous-menu admin, statistiques, journal */
.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; }
.section-title { margin: 2rem 0 .9rem; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; }

.server { position: relative; }
.server .card-link { display: block; color: inherit; text-decoration: none; padding-right: 2.4rem; }
.server:hover, .server:focus-within { border-color: var(--accent, var(--violet)); box-shadow: 0 0 24px -6px var(--accent, var(--violet)); }
.fav-form { position: absolute; top: .7rem; right: .7rem; margin: 0; }
.fav { background: none; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--muted); padding: .2rem .35rem; border-radius: 8px; }
.fav:hover, .fav.on { color: #ffd75e; }

.subnav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0 0 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.subnav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: .25rem 0; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--violet); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 0 0 1.5rem; }
.stat { background: var(--crypt); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat strong { display: block; font: 700 1.7rem var(--serif); }
.stat span { color: var(--muted); font-size: .9rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1rem; }
.toolbar input, .toolbar select { padding: .5rem .7rem; border: 2px solid var(--line); border-radius: 8px; background: #0d0820; color: var(--text); font: inherit; }
.pager { display: flex; gap: 1.2rem; margin-top: 1rem; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--crypt-2); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; }
.badge.admin { border-color: var(--violet); color: var(--violet); }
.small-muted { color: var(--muted); font-size: .85rem; }
.st-neutral { color: var(--muted); }

/* FEATURES-V4 : fenetre des e-mails, boutons d'etat */
dialog { background: var(--crypt); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; width: min(92vw, 480px); }
dialog::backdrop { background: rgba(5, 3, 12, .78); }
dialog h2 { font-size: 1.3rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 .8rem; }
.btn:disabled { cursor: default; }
.btn.on-online { background: var(--ok); border-color: var(--ok); color: #05210f; }
.btn.on-maintenance { background: var(--warn); border-color: var(--warn); color: #2a1a00; }
.btn.on-offline { background: var(--bad); border-color: var(--bad); color: #2a0610; }
.status-switch { display: flex; flex-wrap: wrap; gap: .4rem; }

/* FEATURES-V5 : pages legales, bandeau d'information, pied de page */
.legal { max-width: 780px; }
.legal h2 { margin-top: 2rem; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: .4rem; }
.legal .summary { background: var(--crypt); border: 1px solid var(--line); border-left: 4px solid var(--violet); border-radius: var(--radius); padding: 1rem 1.3rem; margin: 1.2rem 0 0; }
.legal .summary h2 { margin-top: 0; font-size: 1.15rem; }
.legal .summary ul { margin: 0; }
.legal table { min-width: 560px; font-size: .95rem; }
.legal td { vertical-align: top; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1.2rem; padding: .9rem clamp(1rem, 4vw, 2.5rem); background: var(--crypt-2); border-top: 1px solid var(--violet-btn); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .6); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; max-width: 60rem; font-size: .95rem; }

.plate label.option input[type="checkbox"] { margin-top: .25rem; flex: none; }

/* FEATURES-V6 : identite CyberVPS - bleu electrique, cyan et blanc sur fond nuit.
   Les anciens noms de variables sont conserves : seules leurs couleurs changent. */
:root {
  --night: #02050d;
  --crypt: #08112a;
  --crypt-2: #0d1a3b;
  --line: #183776;
  --violet: #4da3ff;
  --violet-btn: #0a5cff;
  --cyan: #19e3ff;
  --text: #eef3ff;
  --muted: #9fb2d9;
  --serif: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  background:
    radial-gradient(70rem 38rem at -18% 108%, rgba(0, 80, 255, .30), transparent 62%),
    radial-gradient(48rem 28rem at 112% -12%, rgba(0, 150, 255, .14), transparent 62%),
    var(--night);
  background-repeat: no-repeat;
}

h1 { font-weight: 800; }
.hero h1 { text-transform: uppercase; letter-spacing: .05em; font-size: clamp(1.8rem, 4.6vw, 2.8rem); max-width: 18ch; }

.brand { letter-spacing: .02em; }
.brand-text { display: inline-flex; align-items: baseline; gap: .55rem; }
.brand-text strong { font-weight: 800; letter-spacing: .14em; }
.brand-text span { font-weight: 300; letter-spacing: .5em; font-size: .78em; color: var(--muted); }

.btn:hover { background: #2c78ff; border-color: #2c78ff; }
.btn.ghost:hover { background: rgba(25, 227, 255, .12); border-color: var(--cyan); }
.plate input, .plate select, .plate textarea, .toolbar input, .toolbar select, code { background: #050b1c; }

.hero-logo { border-radius: 22px; filter: drop-shadow(0 0 40px rgba(10, 92, 255, .5)); }

.landing { text-align: center; padding: clamp(1rem, 5vw, 3.5rem) 0 2.5rem; }
.landing-banner { display: block; width: min(100%, 760px); height: auto; margin: 0 auto; }
.landing-tagline { max-width: 34rem; margin: 1.2rem auto 0; color: var(--muted); font-size: 1.15rem; }
.landing .actions { justify-content: center; margin-top: 2.2rem; }

/* Bouton principal : angles coupes, comme le ruban du logo */
.btn.big {
  padding: 1.05rem 2.8rem;
  font-size: 1.1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  border: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.btn.big:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #fff; }
