/* =========================================================
   NALYORA — layout.css
   Éléments communs à toutes les pages : barre de navigation, notifications, fenêtre de connexion, visionneuse, pied de page.
   ========================================================= */

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  width: min(1180px, 100% - 28px);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 18px;
  border-radius: 20px;
  background: rgba(8, 20, 50, 0.72);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(64, 160, 255, 0.6)); }
.brand span span { color: var(--cyan); }
.brand-logo img { width: auto; height: 42px; filter: drop-shadow(0 0 10px rgba(64, 160, 255, 0.45)); transition: transform .2s; }
.brand-logo:hover img { transform: scale(1.04); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: rgba(95, 208, 255, 0.07); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 18px;
  height: 3px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, var(--cyan) 0 3px, transparent 3px 6px);
}
.nav-links svg, .btn svg { width: 17px; height: 17px; flex: none; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.burger { display: none; width: 42px; height: 42px; border-radius: 12px; background: rgba(95, 208, 255, 0.08); align-items: center; justify-content: center; }
.burger svg { width: 22px; height: 22px; }

/* ---------- Pied de page ---------- */
.ft {
  position: relative;
  margin-top: 0;
  padding-top: 48px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 55% 180px at 50% 36px, rgba(43, 134, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 60%, rgba(88, 101, 242, 0.12), transparent 70%),
    linear-gradient(180deg, #0c2868 0%, #07183f 90px, #030916 42%, #02060f 100%);
  /* Même escalier pixel que les sections claires : le ciel reste visible dans les marches. */
  --edge-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M0 24V12h24V0h48v12h24v12z'/%3E%3C/svg%3E");
  -webkit-mask:
    var(--edge-top) top left / 96px 24px repeat-x,
    linear-gradient(#000 0 0) center bottom / 100% calc(100% - 24px) no-repeat;
          mask:
    var(--edge-top) top left / 96px 24px repeat-x,
    linear-gradient(#000 0 0) center bottom / 100% calc(100% - 24px) no-repeat;
  filter: drop-shadow(0 -1px 0 rgba(150, 214, 255, 0.45));
}
main > .section:last-child { padding-bottom: 56px; }
.ft-cubes i {
  position: absolute;
  z-index: -1;
  width: var(--s);
  height: var(--s);
  background: linear-gradient(135deg, #bff0ff, #5fd0ff 45%, #2b86ff);
  box-shadow: 0 0 14px rgba(95, 208, 255, 0.7), inset -3px -3px 0 rgba(10, 50, 140, 0.35);
  opacity: .5;
  animation: drift 8s ease-in-out infinite;
}
.ft-cubes i:nth-child(1) { --s: 14px; top: 90px; left: 6%; }
.ft-cubes i:nth-child(2) { --s: 9px; top: 220px; left: 46%; animation-delay: -2s; }
.ft-cubes i:nth-child(3) { --s: 12px; top: 120px; right: 5%; animation-delay: -4s; }
.ft-cubes i:nth-child(4) { --s: 7px; top: 360px; right: 22%; animation-delay: -1s; }
.ft-cubes i:nth-child(5) { --s: 10px; top: 430px; left: 18%; animation-delay: -5s; }

/* Bloc « rejoindre » */
.ft-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--card-border); }
.ft-hero h2 {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  text-transform: uppercase;
}
.ft-hero-text p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 470px; }

/* Carte serveur façon liste multijoueur */
.ft-server {
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 42, 102, 0.85), rgba(8, 21, 56, 0.9));
  border: 1px solid rgba(95, 208, 255, 0.3);
  box-shadow: 0 8px 0 #061536, 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 50px rgba(43, 134, 255, 0.15);
  transform: rotate(1deg);
  transition: transform .3s;
}
.ft-server:hover { transform: rotate(0) translateY(-3px); }
.ft-server-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  font-family: var(--font-pixel);
}
.ft-server-row img { width: 64px; height: 64px; flex: none; image-rendering: auto; }
.ft-server-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ft-server-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; color: #fff; }
.ft-count { color: #aaaaaa; font-size: .78rem; }
.ft-motd { font-size: .74rem; color: #aaaaaa; }
.ft-motd .c1 { color: #55ffff; }
.ft-motd .c2 { color: #ffff55; }
.ft-motd.small { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-family: var(--font); font-size: .8rem; color: var(--muted); }
.ft-motd.small b { color: #fff; }
.ft-motd.small .sep { margin: 0 4px; opacity: .5; }
.ft-bars { flex: none; align-self: flex-start; display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.ft-bars i { width: 3px; background: #555; }
.ft-bars i:nth-child(1) { height: 4px; } .ft-bars i:nth-child(2) { height: 7px; } .ft-bars i:nth-child(3) { height: 10px; } .ft-bars i:nth-child(4) { height: 13px; } .ft-bars i:nth-child(5) { height: 16px; }
.ft-server:has(.status-dot.online) .ft-bars i { background: #3ee08a; box-shadow: 0 0 6px rgba(62, 224, 138, .6); }
.ft-server:has(.status-dot.offline) .ft-bars i { background: #ff5d6c; }
.ft-server-actions { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 10px; }
.ft-server-actions .btn-ip { min-width: 0; font-size: .95rem; }

/* Colonnes */
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 44px 0 52px; }
.ft-logo img { height: 54px; width: auto; filter: drop-shadow(0 0 12px rgba(64, 160, 255, 0.45)); transition: transform .2s; }
.ft-logo:hover img { transform: scale(1.03); }
.ft-brand p { margin: 10px 0 14px; color: var(--muted); max-width: 330px; }
.ft-social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(121, 132, 255, 0.35);
  transition: background .2s, transform .2s;
}
.ft-social:hover { background: rgba(88, 101, 242, 0.28); transform: translateY(-2px); }
.ft-social svg { width: 26px; height: 26px; color: #9aa3ff; }
.ft-social b { display: block; font-size: .92rem; }
.ft-social small { display: block; font-size: .78rem; color: var(--muted); }
.ft-col h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cyan);
}
.ft-col h4 svg { width: 16px; height: 16px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ft-col a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: color .2s; }
.ft-col a svg { width: 13px; height: 13px; opacity: .6; }
.ft-arrow { display: inline-block; width: 0; overflow: hidden; color: var(--cyan); font-weight: 800; transition: width .2s; }
.ft-col a:hover { color: #fff; }
.ft-col a:hover .ft-arrow { width: 10px; }

/* Filigrane */
.ft-watermark {
  position: relative;
  z-index: -1;
  margin-top: -10px;
  text-align: center;
  font-family: var(--font-title);
  font-size: clamp(4.5rem, 17vw, 15rem);
  line-height: .8;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(95, 208, 255, 0.14);
  background: linear-gradient(180deg, rgba(95, 208, 255, 0.12), transparent 80%);
  -webkit-background-clip: text;
          background-clip: text;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.ft-bottom {
  position: relative;
  background: #02060f;
}
.ft-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 208, 255, 0.45), transparent);
}
.ft-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0 18px; }
.ft-legal { display: grid; gap: 3px; font-size: .84rem; color: #6f86ab; }
.ft-legal span:first-child { color: var(--muted); font-weight: 600; }
.ft-disclaimer { font-size: .78rem; opacity: .85; }
.ft-top {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 13px;
  font-weight: 700;
  font-size: .88rem;
  color: #fff;
  background: linear-gradient(180deg, #4aa3ff, var(--blue-2));
  box-shadow: 0 4px 0 #123f9e, 0 8px 20px rgba(43, 134, 255, 0.3);
  transition: transform .15s, filter .2s;
}
.ft-top:hover { filter: brightness(1.1); transform: translateY(-2px); }
.ft-top:active { transform: translateY(2px); box-shadow: 0 2px 0 #123f9e; }
.ft-top svg { width: 18px; height: 18px; }

@media (max-width: 980px) {
  .ft-hero { grid-template-columns: 1fr; gap: 34px; }
  .ft-server { transform: none; }
  .ft-grid { grid-template-columns: 1fr 1fr 1fr; }
  .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ft { padding-top: 40px; }
  main > .section:last-child { padding-bottom: 40px; }
  .ft-hero { padding-bottom: 32px; }
  .ft-server { padding: 10px; }
  .ft-server-row { padding: 8px; gap: 10px; }
  .ft-server-row img { width: 48px; height: 48px; }
  .ft-server-actions { grid-template-columns: 1fr; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 34px 20px; padding-top: 34px; }
  .ft-bottom-inner { flex-direction: column; align-items: flex-start; }
  .ft-top { align-self: stretch; justify-content: center; }
}

/* ---------- Bouton connexion (navbar) ---------- */
.btn-login { padding: 11px 16px; }
.account-wrap { position: relative; }
.btn-account { gap: 8px; }
.btn-account img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.account-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 300px;
  padding: 10px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 70% at 15% 0%, rgba(43, 134, 255, 0.28), transparent 68%),
    linear-gradient(180deg, #10285f, #0a1a42);
  border: 1px solid rgba(95, 208, 255, 0.32);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 24px rgba(43, 134, 255, 0.14);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.account-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 16px;
}
.account-panel::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 26px;
  width: 12px;
  height: 12px;
  background: #10285f;
  border-left: 1px solid rgba(95, 208, 255, 0.32);
  border-top: 1px solid rgba(95, 208, 255, 0.32);
  transform: rotate(45deg);
}
.account-wrap.is-open .account-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .account-wrap:hover .account-panel,
  .account-wrap:focus-within .account-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}
.account-id {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 12px;
}
.account-head {
  flex: none;
  width: 62px;
  height: 62px;
  padding: 3px;
  border-radius: 16px;
  background: linear-gradient(180deg, #8ae4ff, #2b86ff 55%, #1f5ee0);
  box-shadow: 0 4px 0 #123f9e, 0 0 18px rgba(64, 160, 255, 0.45);
}
.account-head img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  image-rendering: pixelated;
  background: #06102a;
  object-fit: cover;
}
.account-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.account-id b { display: block; color: #fff; font-size: 1.22rem; line-height: 1.1; letter-spacing: -.01em; }
.account-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 8px;
}
.account-stat {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 74px;
  padding: 10px 10px 9px;
  border-radius: 14px;
  overflow: hidden;
}
.account-stat.money {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 214, 107, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(255, 214, 107, 0.14), rgba(255, 180, 40, 0.05));
  border: 1px solid rgba(255, 214, 107, 0.4);
  box-shadow: 0 3px 0 rgba(120, 78, 8, 0.55);
}
.account-stat.paws {
  background:
    radial-gradient(circle at 0% 0%, rgba(95, 208, 255, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(95, 208, 255, 0.14), rgba(43, 134, 255, 0.05));
  border: 1px solid rgba(95, 208, 255, 0.4);
  box-shadow: 0 3px 0 #123f9e;
}
.account-stat-ico {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.account-stat.money .account-stat-ico { color: #ffd66b; background: rgba(255, 214, 107, 0.14); }
.account-stat.paws .account-stat-ico { color: var(--cyan); background: rgba(95, 208, 255, 0.14); }
.account-stat-ico svg { width: 16px; height: 16px; }
.account-stat-label {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-stat.money .account-stat-label { color: #ffd66b; }
.account-stat.paws .account-stat-label { color: var(--cyan); }
.account-stat b {
  font-family: var(--font-pixel);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
}
.account-stat em {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px 0;
  border-radius: 999px;
  font-style: normal;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(4, 12, 32, 0.35);
  vertical-align: 1px;
}
.account-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, #ff7d8b, #e44558);
  border: 0;
  box-shadow: 0 3px 0 #8d2434, inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: filter .15s, transform .15s, box-shadow .15s;
}
.account-logout svg { width: 16px; height: 16px; }
.account-logout:hover { filter: brightness(1.08); }
.account-logout:active { transform: translateY(2px); box-shadow: 0 1px 0 #8d2434; }

/* ---------- Fenêtre de connexion ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s;
}
.modal-dialog {
  position: relative;
  width: min(460px, 100%);
  margin: auto;
  padding: 34px 30px 26px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(43, 134, 255, 0.25), transparent 70%),
    linear-gradient(180deg, #0c1f4d, #081538);
  border: 1px solid rgba(95, 208, 255, 0.28);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 40px rgba(43, 134, 255, 0.2);
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .2s, transform .2s;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-dialog { opacity: 1; transform: none; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(95, 208, 255, 0.07);
  transition: color .2s, background .2s;
}
.modal-close:hover { color: var(--text); background: rgba(95, 208, 255, 0.15); }
.modal-close svg { width: 18px; height: 18px; }

.login-form { display: grid; gap: 14px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 7px; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 14px;
  height: 50px;
  border-radius: 13px;
  background: rgba(2, 8, 24, 0.65);
  border: 1.5px solid rgba(110, 180, 255, 0.2);
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(95, 208, 255, 0.15); }
.input-wrap.invalid { border-color: #ff6b7a; box-shadow: 0 0 0 4px rgba(255, 107, 122, 0.12); }
.input-wrap > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.input-wrap input::placeholder { color: #5c7299; }
.pass-toggle {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.pass-toggle:hover { color: var(--text); background: rgba(95, 208, 255, 0.08); }
.pass-toggle svg { width: 18px; height: 18px; }
.field-error { display: block; min-height: 0; color: #ff8d98; font-size: .82rem; margin-top: 5px; }
.field-error:empty { display: none; }

.form-msg { padding: 11px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.45; }
.form-msg.info { background: rgba(95, 208, 255, 0.1); border: 1px solid rgba(95, 208, 255, 0.35); color: var(--ice); }
.form-msg.success { background: rgba(62, 224, 138, 0.1); border: 1px solid rgba(62, 224, 138, 0.4); color: #8ff0bb; }
.form-msg.error { background: rgba(255, 93, 108, 0.1); border: 1px solid rgba(255, 93, 108, 0.4); color: #ffa3ad; }

.btn-block { width: 100%; margin-top: 4px; }
.btn.loading { opacity: .7; pointer-events: none; }

.cmd {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #000;
  border: 2px solid #4a4a4a;
  text-align: left;
  transition: border-color .2s;
}
.cmd:hover { border-color: var(--cyan); }
.cmd.copied { border-color: #3ee08a; }
.cmd code { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: .92rem; font-weight: 700; color: #fff; letter-spacing: .03em; word-break: break-word; }
.cmd code span { color: #ffff55; }
.cmd svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.help-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: #9aa3ff; }
.help-link:hover { color: #c3c8ff; }
.help-link svg { width: 17px; height: 17px; }

@media (max-width: 560px) {
  .btn-login-label { display: none; }
  .btn-login, .nav-actions .btn-ice { padding: 11px 13px; }
  .modal { padding: 12px; }
  .modal-dialog { padding: 30px 18px 20px; }
}

/* ---------- Bouton carré (Discord navbar) ---------- */
.btn-square { width: 46px; height: 46px; min-width: 46px; aspect-ratio: 1 / 1; padding: 0; border-radius: 14px; flex: none; }
.btn-square svg { width: 21px; height: 21px; }

@media (max-width: 560px) {
  .nav-actions { gap: 6px; }
  .btn-square { width: 42px; height: 42px; min-width: 42px; }
}
@media (max-width: 380px) {
  .nav { padding: 0 8px 0 12px; gap: 8px; }
  .brand-logo img { height: 32px; }
  .nav-actions { gap: 5px; }
  .nav-actions > .btn, .account-wrap > .btn-account, .burger { width: 40px; height: 40px; padding: 0; }
}

/* ---------- Visionneuse d'images ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(2, 6, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; max-width: min(1400px, 100%); transform: scale(.96); transition: transform .25s; }
.lightbox.open figure { transform: none; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 14px; border: 3px solid rgba(95, 208, 255, 0.4); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox figcaption { text-align: center; margin-top: 14px; font-family: var(--font-pixel); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }
.lightbox .modal-close { position: fixed; top: 20px; right: 20px; }


/* ---------- Fenêtre de connexion (2 panneaux) ---------- */
.modal-dialog.login-dialog {
  width: min(940px, 100%);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  overflow: hidden;
  border-radius: 28px;
}
.login-dialog .modal-close { z-index: 3; }

/* Panneau gauche */
.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 32px 30px;
  background:
    radial-gradient(ellipse 90% 60% at 0% 0%, rgba(95, 208, 255, 0.28), transparent 65%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(43, 134, 255, 0.25), transparent 70%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.025) 0% 25%, transparent 0% 50%) 0 0 / 28px 28px,
    linear-gradient(170deg, #12357f, #0a1d4c 60%, #071538);
  border-right: 1px solid rgba(95, 208, 255, 0.2);
  overflow: hidden;
}
.login-aside-top { position: relative; z-index: 1; }
.login-aside-logo { height: 46px; width: auto; margin-bottom: 26px; filter: drop-shadow(0 0 14px rgba(64, 160, 255, 0.6)); }
.login-aside h3 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 2.3rem;
  line-height: 1.02;
  text-transform: uppercase;
}
.login-aside h3 span {
  background: linear-gradient(180deg, #d6f3ff, #5fd0ff 60%, #2b86ff);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.login-aside-top > p { margin: 0 0 20px; color: #b6c9e8; font-size: .95rem; }
.login-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.login-perks li { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.login-perks svg {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(95, 208, 255, 0.12);
  border: 1px solid rgba(95, 208, 255, 0.3);
}

.login-help { position: relative; z-index: 1; display: grid; gap: 10px; }
.help-block {
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(2, 8, 24, 0.45);
  border: 1px solid rgba(95, 208, 255, 0.18);
}
.help-block h4 { margin: 0 0 2px; font-size: .92rem; }
.help-block p { margin: 0 0 9px; color: var(--muted); font-size: .84rem; }
.help-block b { color: var(--ice); }
.help-block .cmd code { font-size: .84rem; }

/* Cubes flottants du panneau */
.login-cube {
  position: absolute;
  width: var(--s);
  height: var(--s);
  background: linear-gradient(135deg, #bff0ff, #5fd0ff 45%, #2b86ff);
  box-shadow: 0 0 14px rgba(95, 208, 255, 0.7), inset -3px -3px 0 rgba(10, 50, 140, 0.35);
  opacity: .55;
  animation: drift 7s ease-in-out infinite;
}
.login-cube.c1 { --s: 16px; top: 34px; right: 38px; }
.login-cube.c2 { --s: 9px; top: 120px; right: 22px; animation-delay: -2s; }
.login-cube.c3 { --s: 12px; top: 48%; right: 30px; animation-delay: -4s; opacity: .35; }
.login-cube.c4 { --s: 7px; top: 70px; right: 90px; animation-delay: -1s; opacity: .4; }

/* Panneau droit */
.login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 42px 30px;
}
.login-head { text-align: center; margin-bottom: 26px; }
.login-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  padding: 4px;
  border-radius: 20px;
  background: linear-gradient(180deg, #5fd0ff, var(--blue-2));
  box-shadow: 0 5px 0 #123f9e, 0 0 30px rgba(64, 160, 255, 0.5);
  animation: float 5s ease-in-out infinite;
}
.login-avatar::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 26px;
  border: 2px solid rgba(95, 208, 255, 0.35);
  animation: ring 3s ease-out infinite;
  pointer-events: none;
}
.login-avatar img { width: 100%; height: 100%; border-radius: 15px; background: #06102a; image-rendering: pixelated; object-fit: cover; transition: transform .3s; }
.login-avatar.has-head img { transform: scale(1.02); }
.login-head h2 { font-family: var(--font-title); font-weight: 400; font-size: 2.3rem; line-height: 1; text-transform: uppercase; margin: 0 0 6px; letter-spacing: .02em; }
.login-head p { margin: 0; color: var(--muted); font-size: .98rem; min-height: 1.5em; }
.login-head p b { color: var(--cyan); }
.login-legal { margin: 18px 0 0; text-align: center; font-size: .8rem; color: #6f86ab; }
.login-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.login-legal a:hover { color: var(--text); }

@media (max-width: 820px) {
  .modal-dialog.login-dialog { grid-template-columns: 1fr; width: min(520px, 100%); }
  .login-aside { order: 2; border-right: 0; border-top: 1px solid rgba(95, 208, 255, 0.2); padding: 26px 24px; }
  .login-aside-top, .login-cube { display: none; }
  .login-main { padding: 40px 28px 24px; }
}
@media (max-width: 560px) {
  .modal-dialog.login-dialog { padding: 0; border-radius: 22px; }
  .login-main { padding: 34px 18px 20px; }
  .login-aside { padding: 20px 16px; }
}

/* ---------- Notifications (navbar) ---------- */
.mobile-only { display: none; }
.notif-wrap { position: relative; }
.notif-btn { position: relative; }
.notif-btn svg { width: 20px; height: 20px; }
.notif-btn.has-unread svg { animation: ring-bell 3.5s ease-in-out infinite; transform-origin: 50% 2px; }
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ff6b7a, #e03a4d);
  border: 2px solid #081430;
  box-shadow: 0 0 10px rgba(255, 93, 108, 0.6);
}
.notif-badge[hidden] { display: none; }

.notif-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 360px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 55% at 12% 0%, rgba(43, 134, 255, 0.28), transparent 68%),
    linear-gradient(180deg, #10285f, #0a1a42);
  border: 1px solid rgba(95, 208, 255, 0.32);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 24px rgba(43, 134, 255, 0.14);
  opacity: 0;
  transform: translateY(6px);
  transform-origin: top right;
  transition: opacity .15s, transform .15s;
  z-index: 60;
}
.notif-panel::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 17px;
  width: 12px;
  height: 12px;
  background: #10285f;
  border-left: 1px solid rgba(95, 208, 255, 0.32);
  border-top: 1px solid rgba(95, 208, 255, 0.32);
  transform: rotate(45deg);
}
.notif-panel[hidden] { display: none; }
.notif-panel.open { opacity: 1; transform: none; }
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(95, 208, 255, 0.14);
}
.notif-kicker {
  display: block;
  margin-bottom: 2px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cyan);
}
.notif-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.15; }
.notif-readall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(95, 208, 255, 0.08);
  border: 1px solid rgba(95, 208, 255, 0.22);
  transition: background .2s, color .2s;
}
.notif-readall[hidden] { display: none; }
.notif-readall svg { width: 15px; height: 15px; }
.notif-readall:hover:not(:disabled) { background: rgba(95, 208, 255, 0.1); color: #fff; }
.notif-readall:disabled { color: #5c7299; cursor: default; }

.notif-list { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow-y: auto; }
.notif-item {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  padding: 12px 28px 12px 12px;
  border-radius: 14px;
  background: rgba(4, 12, 32, 0.28);
  border: 1px solid rgba(95, 208, 255, 0.1);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  outline: none;
}
.notif-item:last-child { margin-bottom: 0; }
.notif-item:hover, .notif-item:focus-visible { background: rgba(95, 208, 255, 0.08); border-color: rgba(95, 208, 255, 0.28); }
.notif-item.unread { background: rgba(43, 134, 255, 0.14); border-color: rgba(95, 208, 255, 0.28); }
.notif-item.unread:hover { background: rgba(43, 134, 255, 0.2); }
.notif-ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: rgba(95, 208, 255, 0.08);
  border: 1px solid rgba(95, 208, 255, 0.28);
  box-shadow: 0 3px 0 #123f9e;
}
.notif-content { min-width: 0; }
.notif-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.notif-top b { font-size: .94rem; }
.notif-top time { flex: none; font-size: .74rem; color: #6f86ab; }
.notif-content p { margin: 0; font-size: .87rem; color: var(--muted); line-height: 1.45; }
.notif-item:not(.unread) .notif-top b { color: var(--muted); font-weight: 600; }
.notif-cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #7984ff, #5865f2);
  box-shadow: 0 3px 0 #3a43b8;
  transition: filter .2s;
}
.notif-cta:hover { filter: brightness(1.1); }
.notif-cta svg { width: 15px; height: 15px; }
.notif-dot {
  position: absolute;
  top: 20px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  transition: opacity .2s, transform .2s;
}
.notif-item:not(.unread) .notif-dot { opacity: 0; transform: scale(0); }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px; color: var(--muted); }
.notif-empty svg { width: 28px; height: 28px; opacity: .5; }

@keyframes ring-bell {
  0%, 82%, 100% { transform: rotate(0); }
  85% { transform: rotate(14deg); }
  88% { transform: rotate(-12deg); }
  91% { transform: rotate(8deg); }
  94% { transform: rotate(-4deg); }
}

@media (max-width: 820px) {
  .mobile-only { display: block; }
}
@media (max-width: 820px) {
  /* Boutique et Discord passent dans le menu déroulant */
  .btn-shop-nav { display: none; }
  .nav-links .nav-menu-actions {
    display: grid;
    gap: 8px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--card-border);
  }
  .nav-links .nav-menu-actions a.btn { justify-content: center; padding: 13px 16px; font-size: .98rem; font-weight: 700; }
  .nav-links .nav-menu-actions a.btn-ice { color: #0a2a66; }
  .nav-links .nav-menu-actions a.btn:hover { background-color: transparent; }
  .nav-links .nav-menu-actions a.btn-ice:hover { background: linear-gradient(180deg, #e6f7ff, #a9dcff); }
  /* La pop-up se cale sous la barre, sur toute sa largeur
     (la barre a un backdrop-filter : elle sert de repère aux éléments positionnés) */
  .notif-wrap { position: static; }
  .notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    transform-origin: top center;
  }
  .notif-list { max-height: calc(100vh - var(--nav-h) - 140px); }
}

/* ---------- Navbar : ajustements écrans moyens / notifications mobile ---------- */
/* La navbar a 5 liens : on resserre un peu sur écrans moyens */
@media (max-width: 1100px) and (min-width: 821px) {
  .nav-links a { padding: 8px 10px; font-size: .9rem; }
  .btn-login-label, .btn-shop-label { display: none; }
}
.notif-readall { white-space: nowrap; }
@media (max-width: 560px) { .notif-readall { font-size: .76rem; padding: 6px 8px; } .notif-head { padding: 14px; } .notif-top { flex-direction: column; align-items: flex-start; gap: 1px; } }
