/* Pages : accueil, rejoindre, légal, erreurs, pied de page. */

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h) - 6px);
  min-height: calc(100svh - var(--nav-h) - 6px);
  display: flex;
  align-items: center;
  padding: 72px 0 200px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 520px at 50% 60%, #7ee8fa1a, transparent 70%),
    radial-gradient(ellipse at 50% 40%, transparent 45%, #000000a6 100%);
}

.hero-factory {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: max(1920px, 100%);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.65;
}

.spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  filter: blur(0.6px);
  box-shadow: 0 0 8px currentColor;
  color: var(--cyan);
  animation: sparkle 3.6s ease-in-out infinite;
}

.spark:nth-child(even) {
  width: 2px;
  height: 2px;
  background: var(--yellow);
  color: var(--yellow);
}

.s1 { left: 8%; top: 28%; animation-delay: 0s; }
.s2 { left: 17%; top: 62%; animation-delay: 0.6s; }
.s3 { left: 29%; top: 18%; animation-delay: 1.2s; }
.s4 { left: 38%; top: 74%; animation-delay: 1.9s; }
.s5 { left: 63%; top: 22%; animation-delay: 0.3s; }
.s6 { left: 71%; top: 58%; animation-delay: 1.5s; }
.s7 { left: 82%; top: 30%; animation-delay: 2.2s; }
.s8 { left: 90%; top: 66%; animation-delay: 0.9s; }
.s9 { left: 52%; top: 12%; animation-delay: 2.7s; }
.s10 { left: 46%; top: 82%; animation-delay: 1.1s; }

@keyframes sparkle {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .spark {
    animation: none;
  }
}

.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-inner .eyebrow {
  justify-content: center;
}

.hero-inner .eyebrow::after {
  content: "";
  width: 28px;
  height: 8px;
  flex: none;
  background: var(--hazard-thin);
  box-shadow: 0 0 0 1px var(--black);
}

.hero-title {
  font-size: clamp(64px, 13vw, 156px);
  letter-spacing: 0.03em;
  text-shadow: 0 6px 0 var(--black), 0 0 60px #ffd16640;
}

.hero-lede {
  margin-left: auto;
  margin-right: auto;
  color: var(--text);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-ip {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hero-actions .live {
  padding: 10px 14px;
}

.hero-actions .live-label {
  display: inline;
}

/* --------------------------------------------------------------- IP */
.ip-hero {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--black);
  color: var(--text);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: inset 0 0 0 2px var(--line-strong), 0 0 40px #ffd16626;
  transition: transform 0.08s ease;
}

.ip-hero:active {
  transform: translateY(3px);
}

.ip-hero:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--yellow);
}

/* Étiquette « IP » : texte jaune sur noir, liseré danger à gauche. */
.ip-hero-label {
  display: grid;
  place-items: center;
  padding: 0 16px 0 26px;
  background:
    linear-gradient(90deg, transparent 10px, var(--black) 10px),
    var(--hazard-thin);
  color: var(--yellow);
  font: 700 15px var(--font-ui);
  letter-spacing: 0.12em;
  border-right: 1px solid var(--line);
}

.ip-hero-value {
  padding: 16px 22px;
  font-size: clamp(17px, 3.2vw, 26px);
  font-weight: 600;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ip-hero-action {
  display: grid;
  place-items: center;
  padding: 0 22px;
  background: var(--yellow);
  color: var(--black);
  font: 700 15px var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 -4px 0 var(--yellow-ink);
}

.ip-hero.copied .ip-hero-action {
  background: var(--ok);
  box-shadow: inset 0 -4px 0 #3a8f31;
}

.ip-box {
  margin-bottom: 28px;
}

.ip-label {
  display: block;
  font: 600 12px var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.ip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ip-value {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 600;
  color: var(--yellow);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------- accueil */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
  counter-reset: none;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--line-strong);
}

.step-title {
  font: 700 20px/1.3 var(--font-ui);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--yellow);
}

.step-card .link-arrow {
  margin-top: auto;
  padding-top: 6px;
}

.ranks-mini {
  margin: 30px 0 34px;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.duo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.duo-card .btn {
  margin-top: 12px;
}

@media (max-width: 860px) {
  .steps-grid,
  .duo {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------- rejoindre */
.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.join-steps {
  display: grid;
  gap: 12px;
}

.join-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--plate);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
}

.join-n {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--black);
  font-weight: 600;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.join-steps p {
  padding-top: 2px;
}

.join-side {
  display: grid;
  gap: 20px;
}

.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 17px var(--font-ui);
  margin-bottom: 4px;
}

.status-head i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}

.status-head.up { color: var(--ok); }
.status-head.up i { background: var(--ok); animation: livePulse 2.4s infinite; }
.status-head.down { color: var(--red); }
.status-head.down i { background: var(--red); }
.status-head.maint { color: var(--yellow); }
.status-head.maint i { background: var(--yellow); }

.nodes {
  display: grid;
  gap: 6px;
}

.node {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 14px;
}

.node-state {
  color: var(--muted);
}

.node.up .node-state { color: var(--ok); }
.node.down .node-state { color: var(--red); }

.side-discord .btn {
  margin-top: 12px;
}

.faq-title {
  margin-top: 56px;
}

@media (max-width: 860px) {
  .join-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------ légal */
.legal-body {
  max-width: 900px;
  padding: 34px 34px 18px;
}

.legal-section {
  margin-bottom: 26px;
}

.legal-section .block-title {
  color: var(--yellow);
  font-size: 18px;
}

.legal-p {
  color: var(--muted);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.legal-p.has-todo {
  color: var(--text);
}

@media (max-width: 620px) {
  .legal-body {
    padding: 24px 18px 8px;
  }
}

/* --------------------------------------------------- attente, erreurs */
.soon-plate {
  max-width: 760px;
}

.soon-plate .btn {
  margin-top: 14px;
}

.error-page {
  display: flex;
  justify-content: center;
}

.error-plate {
  max-width: 760px;
  width: 100%;
  text-align: left;
}

.error-plate .page-title {
  font-size: clamp(44px, 7vw, 72px);
}

/* ----------------------------------------------------------- footer */
.footer {
  flex-shrink: 0;
  margin-top: 64px;
  background: #121417;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer > .hazard {
  height: 8px;
}

.footer > .shell {
  padding-top: 48px;
  padding-bottom: 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.footer-h {
  font: 700 12px var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}

.footer-col a {
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--yellow);
}

.footer-text {
  margin-top: 12px;
  max-width: 36ch;
}

.footer-ip {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  font-size: 14px;
  color: var(--yellow);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 13.5px;
  color: var(--dim);
}

@media (max-width: 780px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------- hero et IP sur téléphone */
@media (max-width: 620px) {
  .hero {
    min-height: 0;
    padding: 48px 0 150px;
  }
  /* Sur téléphone, on montre la partie gauche : cheminées, toits en dents de scie, engrenage. */
  .hero-factory {
    width: 900px;
    left: 0;
    transform: none;
  }
  .ip-hero {
    width: 100%;
  }
  .ip-hero-label {
    display: none;
  }
  .ip-hero-value {
    flex: 1;
    padding: 14px 12px;
    font-size: 16px;
    text-align: left;
  }
  .ip-hero-action {
    padding: 0 14px;
  }
}
