/* Nimoria RP · nimoria.fr
   Palette relevée sur l'affiche du launcher : la nuit violette de la ville,
   le rose néon du « RP », l'orange du soleil couchant. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("polices/big-shoulders-display-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("polices/public-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("polices/public-sans-italique-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --nuit: #140c24;
  --nuit-claire: #1f1535;
  --trait: rgba(191, 178, 220, 0.16);
  --craie: #f4eef6;
  --lavande: #bfb2dc;
  --neon: #ff6ad5;
  --neon-vif: #ff8fe0;
  --soleil: #ffa35c;
  --encre: #1a0b22;

  --titre: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --corps: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --gouttiere: clamp(1rem, 4vw, 3rem);
  --largeur: 72rem;
  --hauteur-bandeau: 4rem;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--craie);
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--neon-vif); text-underline-offset: 0.2em; }
a:hover { color: var(--craie); }

:focus-visible {
  outline: 3px solid var(--soleil);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); }
h3 { font-size: clamp(1.625rem, 2.4vw, 2rem); font-weight: 700; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--nuit-claire);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  background: var(--craie);
  color: var(--encre);
  font-weight: 700;
  border-radius: 6px;
}
.evitement:focus { top: 0.75rem; }

/* ---------------------------------------------------------------- bouton --- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--neon);
  color: var(--encre);
  font-family: var(--corps);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 143, 224, 0.5), 0 10px 32px -10px rgba(255, 106, 213, 0.7);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.bouton:hover { background: var(--neon-vif); color: var(--encre); }
.bouton:active { transform: translateY(1px); }

.bouton-petit {
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.9375rem;
  box-shadow: none;
}

/* --------------------------------------------------------------- bandeau --- */

.bandeau {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
/* voile propre au bandeau : un lien ne doit jamais tomber sur un nuage clair */
.bandeau::before {
  content: "";
  position: absolute;
  inset: 0 0 -2.5rem 0;
  background: linear-gradient(rgba(20, 12, 36, 0.85), rgba(20, 12, 36, 0));
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bandeau.rempli {
  background: rgba(20, 12, 36, 0.92);
  box-shadow: 0 1px 0 var(--trait);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.bandeau.rempli::before { opacity: 0; }

.bandeau-interieur {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  height: var(--hauteur-bandeau);
  margin: 0 auto;
  padding-inline: var(--gouttiere);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--craie);
  text-decoration: none;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.marque:hover { color: var(--craie); }

.navigation {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.navigation a {
  padding: 0.5rem 0.75rem;
  color: var(--craie);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 6px;
}
.navigation a:hover { color: var(--neon-vif); }

/* le bouton du bandeau n'apparaît qu'une fois l'affiche dépassée :
   sur l'affiche, le grand bouton suffit */
.bandeau .bouton-petit {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.bandeau.rempli .bouton-petit {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease;
}

@media (max-width: 820px) {
  .navigation { display: none; }
  .bandeau .bouton-petit { margin-left: auto; }
}

/* --------------------------------------------------------------- affiche --- */

.affiche {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--hauteur-bandeau) + 2rem) var(--gouttiere) clamp(2rem, 6vh, 4rem);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.affiche-image {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.affiche-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* le logo peint est un peu au-dessus du centre de l'image */
  object-position: 51% 38%;
}
/* le bas de l'affiche se fond dans la nuit de la page */
.affiche-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 12, 36, 0) 55%, rgba(20, 12, 36, 0.7) 80%, var(--nuit) 100%);
}

.affiche-texte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
}

.etat {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.95rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 12, 36, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 163, 92, 0.35);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* le gyrophare orange du chantier : le seul mouvement de la page */
.voyant {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--soleil);
  box-shadow: 0 0 0 0 rgba(255, 163, 92, 0.6);
  flex: none;
  animation: gyrophare 2.4s ease-out infinite;
}
@keyframes gyrophare {
  0%   { box-shadow: 0 0 0 0 rgba(255, 163, 92, 0.6); }
  70%  { box-shadow: 0 0 0 0.6rem rgba(255, 163, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 163, 92, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .voyant { animation: none; }
}

.details {
  color: var(--lavande);
  font-size: 0.9375rem;
  text-shadow: 0 1px 8px rgba(20, 12, 36, 0.9);
}
.details a { margin-left: 0.35rem; font-weight: 600; }

/* Écran en hauteur (téléphone, tablette debout) : l'affiche recadrée autour
   du logo s'affiche entière, et le texte passe dessous en mordant sur la route. */
@media (max-aspect-ratio: 1/1) {
  .affiche {
    min-height: 0;
    padding: 0 var(--gouttiere) 0.5rem;
  }
  .affiche-image {
    position: relative;
    inset: auto;
    width: calc(100% + 2 * var(--gouttiere));
    aspect-ratio: 680 / 941;
    max-height: 88svh;
  }
  .affiche-image img { object-position: 50% 30%; }
  .affiche-image::after {
    background: linear-gradient(to bottom, rgba(20, 12, 36, 0) 62%, rgba(20, 12, 36, 0.75) 84%, var(--nuit) 100%);
  }
  .affiche-texte {
    margin-top: clamp(-9rem, -18vw, -5rem);
  }
}

/* -------------------------------------------------------------- sections --- */

.section {
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7.5rem) var(--gouttiere) 0;
  scroll-margin-top: calc(var(--hauteur-bandeau) - 3rem);
}
.section:last-of-type { padding-bottom: clamp(4rem, 10vw, 7.5rem); }

.colonnes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) {
  .colonnes { grid-template-columns: minmax(0, 1fr); }
}

.texte { max-width: 34rem; }
.texte h2 { margin-bottom: 1.5rem; }
.texte p { color: var(--lavande); }
.texte p:first-of-type { color: var(--craie); font-size: 1.1875rem; }

.remarque {
  padding-left: 0.9rem;
  border-left: 3px solid var(--soleil);
}

/* la fiche du serveur : une liste de définitions, pas des cartes */
.fiche {
  margin: 0;
  border-top: 1px solid var(--trait);
}
.fiche > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--trait);
}
.fiche dt {
  color: var(--lavande);
  font-size: 0.9375rem;
  padding-top: 0.15rem;
}
.fiche dd {
  margin: 0;
  font-weight: 600;
}
@media (max-width: 480px) {
  .fiche > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* ---------------------------------------------------------------- ville --- */

.section-ville h2 { margin-bottom: 1rem; }
.introduction {
  color: var(--lavande);
  font-size: 1.1875rem;
  max-width: 34rem;
}

.annuaire {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
@media (max-width: 960px) {
  .annuaire { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .annuaire { grid-template-columns: minmax(0, 1fr); }
}

.lieu {
  padding: 1.75rem 0 2.25rem;
  border-top: 2px solid var(--trait);
}
.lieu h3 {
  color: var(--craie);
  margin-bottom: 0.75rem;
}
.lieu p {
  color: var(--lavande);
  max-width: 34rem;
}

/* --------------------------------------------------------------- étapes --- */

.etapes {
  list-style: none;
  counter-reset: etape;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
}
@media (max-width: 900px) {
  .etapes { grid-template-columns: minmax(0, 1fr); }
}

.etape {
  counter-increment: etape;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.etape::before {
  content: counter(etape);
  font-family: var(--titre);
  font-weight: 800;
  font-size: clamp(4.5rem, 8vw, 6rem);
  line-height: 0.85;
  color: var(--soleil);
}
.etape p { color: var(--lavande); }
.etape .bouton { margin-top: 0.5rem; }

/* -------------------------------------------------------- configuration --- */

.tableau-conteneur {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.tableau th,
.tableau td {
  text-align: left;
  vertical-align: top;
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--trait);
}
.tableau thead th {
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--craie);
  padding-top: 0;
}
.tableau tbody th {
  color: var(--lavande);
  font-weight: 400;
  white-space: nowrap;
}
.tableau td { font-weight: 600; }
@media (max-width: 520px) {
  .tableau tbody th { white-space: normal; }
  .tableau { font-size: 0.9375rem; }
}

/* ------------------------------------------------------------ questions --- */

.questions {
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 48rem;
  border-top: 1px solid var(--trait);
}
.questions details { border-bottom: 1px solid var(--trait); }
.questions summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600;
  font-size: 1.125rem;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--neon);
  border-bottom: 2px solid var(--neon);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.questions details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.questions summary:hover { color: var(--neon-vif); }
.questions details p {
  color: var(--lavande);
  padding: 0 0 1.4rem;
  max-width: 42rem;
}
@media (prefers-reduced-motion: reduce) {
  .questions summary::after { transition: none; }
}

/* ------------------------------------------------------------------ pied --- */

.pied {
  border-top: 1px solid var(--trait);
  background: #0f091c;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pied-interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 2rem var(--gouttiere);
  color: var(--lavande);
  font-size: 0.875rem;
}
.pied .marque { font-size: 1.125rem; }

/* ------------------------------------------------------- autres serveurs --- */

.autres h2 { margin-bottom: 1rem; }

.autre-serveur {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
  max-width: 52rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding: 1rem;
  border: 1px solid var(--trait);
  border-radius: 10px;
  background: var(--nuit-claire);
  color: var(--craie);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.autre-serveur:hover { color: var(--craie); border-color: rgba(255, 143, 224, 0.55); }
.autre-serveur img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.autre-serveur h3 { margin-bottom: 0.5rem; }
.autre-serveur p { color: var(--lavande); }
.autre-lien {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--neon-vif);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.autre-serveur:hover .autre-lien { color: var(--craie); }
@media (max-width: 640px) {
  .autre-serveur { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .autre-serveur { transition: none; }
}
