/* Shinkai — styles propres à chaque page. Une section par page. */

/* — Mentions légales « Impact » : un sommaire numéroté collé, une colonne de lecture — */
.legal {
  display: grid;
  gap: 40px;
}

.legal__sommaire ol {
  display: grid;
  margin-top: 12px;
  border-left: var(--trait-fin) solid var(--ardoise);
}

.legal__sommaire a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px;
  margin-left: -1px;
  padding: 8px 0 8px 14px;
  border-left: var(--trait-fort) solid transparent;
  color: var(--brume);
  font: 500 var(--t-s) / 1.35 var(--police-texte);
  text-decoration: none;
}

.legal__sommaire a:hover,
.legal__sommaire a:focus-visible {
  border-left-color: var(--papier);
  color: var(--papier);
}

.legal__numero {
  color: var(--cendre);
  font: 500 var(--t-xs) / 1.6 var(--police-mono);
}

.legal__texte {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  max-width: 68ch;
}

.legal__section {
  scroll-margin-top: calc(var(--entete) + 24px);
}

.legal__section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 0.7em;
  padding-bottom: 12px;
  border-bottom: var(--trait-fin) solid var(--trait);
  font-size: 22px;
  line-height: 1.2;
}

.legal__section h2 .legal__numero {
  flex: none;
  font-size: var(--t-s);
}

.legal__section p {
  color: var(--brume);
}

.legal__section p + p {
  margin-top: 0.8em;
}

@media (min-width: 1100px) {
  .legal {
    grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
  }

  .legal__sommaire {
    position: sticky;
    top: calc(var(--entete) + 32px);
  }
}

/* — Page 404 : le chapitre scellé — une onomatopée de silence, le sceau, la phrase, le retour — */
.scelle {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--entete));
  padding-block: 64px;
  overflow: hidden;
}

.scelle > .lignes-vitesse {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.scelle__sfx {
  position: absolute;
  top: 12%;
  left: 50%;
  font-size: clamp(120px, 20vw, 280px);
  -webkit-text-stroke-color: color-mix(in srgb, var(--papier) 22%, transparent);
  translate: -50% 0;
}

.scelle__contenu {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.scelle__fuda {
  display: grid;
  place-items: center;
  width: 92px;
  margin-bottom: 12px;
  padding: 24px 0;
  background: var(--papier);
  color: var(--encre);
  outline: 2px solid var(--encre);
  outline-offset: -8px;
  box-shadow: 10px 10px 0 var(--ardoise);
  transform: rotate(-6deg);
}

.scelle__fuda .kanji {
  font-size: 2.6rem;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
}

.scelle h1 {
  font-size: var(--t-titre-l);
}

.scelle p {
  max-width: 46ch;
}

/* — Accueil en vitrine « Impact » — */

/* L'ouverture : les courants, les lignes de concentration venues du S, l'onomatopée, le titre doublé d'un contour,
   le grand S cerné d'encre ; le bas coupé en diagonale. */
.accueil__ouverture {
  position: relative;
  overflow: hidden;
  padding-bottom: 64px;
  background: var(--encre);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 0 100%);
}

.accueil__courants {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.accueil__fond {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.accueil__fond::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: repeating-conic-gradient(
    from 0deg at 70% 46%,
    color-mix(in srgb, var(--papier) 40%, transparent) 0deg 0.6deg,
    transparent 0.6deg 3deg,
    color-mix(in srgb, var(--papier) 18%, transparent) 3deg 3.35deg,
    transparent 3.35deg 5.4deg
  );
  mask-image: radial-gradient(circle at 70% 46%, transparent 0 16%, #000 34%, transparent 70%);
}

.accueil__fond::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 70%;
  background-image: radial-gradient(circle, var(--ardoise) 1.5px, transparent 2.2px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to top, #000, transparent);
}

.accueil__sfx {
  position: absolute;
  top: 6%;
  left: 38%;
  font-size: clamp(120px, 15vw, 220px);
  -webkit-text-stroke: 2px color-mix(in srgb, var(--papier) 26%, transparent);
  transform: rotate(-12deg);
}

.accueil__grille {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
  min-height: min(calc(100svh - var(--entete) - 64px), 780px);
  padding-block: clamp(40px, 7vw, 72px);
}

.accueil__texte {
  position: relative;
  z-index: 1;
}

.accueil__surtitre {
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.24em;
}

.accueil__surtitre::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--trait);
}

.accueil__titre {
  position: relative;
  z-index: 0;
  margin-top: 22px;
  font-size: clamp(56px, 8vw, 116px);
  line-height: 0.88;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.accueil__titre::after {
  content: attr(data-texte) / "";
  position: absolute;
  top: 0.09em;
  left: 0.09em;
  z-index: -1;
  width: 100%;
  color: transparent;
  -webkit-text-stroke: 2px var(--papier);
  pointer-events: none;
}

.accueil__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 0;
  margin-top: 36px;
}

.accueil__presence {
  margin-top: 18px;
}

.accueil__statut {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--brume);
  font: 500 var(--t-xs) / 1.3 var(--police-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.accueil__statut::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--papier);
  transform: rotate(45deg);
}

/* Caché tant que le serveur n'a pas répondu (le display ci-dessus l'emporterait sur [hidden]). */
.accueil__statut[hidden] {
  display: none;
}

.accueil__s {
  position: relative;
  justify-self: center;
  width: min(100%, 520px);
  color: var(--papier);
  stroke: var(--encre);
  stroke-width: 2.4px;
  paint-order: stroke fill;
  filter: drop-shadow(18px 18px 0 var(--encre)) drop-shadow(-3px -3px 0 var(--papier));
}

/* Les chiffres, en bandeau négatif */
.accueil__chiffres {
  position: relative;
  margin-top: 24px;
  background: var(--papier);
  color: var(--encre);
}

.accueil__chiffres:empty {
  display: none;
}

.chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-block: 0;
}

.chiffre {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px 0 24px 28px;
  border-left: var(--trait-fin) solid color-mix(in srgb, var(--encre) 18%, transparent);
}

.chiffre:first-child {
  padding-left: 0;
  border-left: 0;
}

.chiffre dt {
  color: var(--encre-2);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.chiffre dd {
  margin: 0;
  font: 400 clamp(36px, 4vw, 52px) / 1 var(--police-titre);
}

/* « Prochainement » : les 3 prochains événements publiés, en cartes datées. */
.accueil__prochainement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px 32px;
  padding-top: clamp(56px, 8vw, 104px);
}

.accueil__prochainement-titre {
  font: 400 var(--t-titre-l) / 1 var(--police-titre);
}

.accueil__prochainement-liste {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.accueil__prochainement-liste > li {
  display: grid;
  border: var(--trait-fin) solid var(--trait);
  border-top: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
}

.accueil__prochainement-liste > li > a,
.accueil__prochainement-liste > li:not(:has(a)) {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px 22px 22px;
  color: var(--papier);
  font: 600 var(--t-l) / 1.35 var(--police-texte);
  text-decoration: none;
}

.accueil__prochainement-liste > li > a:hover,
.accueil__prochainement-liste > li > a:focus-visible {
  background: var(--graphite);
}

.accueil__prochainement-liste time {
  color: var(--brume);
  font: 500 var(--t-xs) / 1.2 var(--police-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.accueil__prochainement-type {
  justify-self: start;
  padding: 3px 8px;
  border: var(--trait-fin) solid var(--trait);
  color: var(--brume);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.accueil__prochainement-tous {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: var(--trait-moyen) solid var(--papier);
  font: 600 14px / 1 var(--police-texte);
  text-decoration: none;
}

.accueil__prochainement-tous::after {
  content: '→';
}

/* L'équipe : quatre avis de recherche sur une rangée */
.vitrine-equipe {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  padding-block: 8px 0;
}

/* Le Discord : la seule case négative de la page, ses lignes de vitesse, son nom en katakana */
.vitrine-discord {
  --coupe: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 48px 260px 48px 56px;
  overflow: hidden;
}

.vitrine-discord::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg at 80% 50%, color-mix(in srgb, var(--encre) 16%, transparent) 0deg 0.6deg, transparent 0.6deg 4deg);
  mask-image: radial-gradient(circle at 80% 50%, transparent 0 12%, #000 40%, transparent 70%);
  pointer-events: none;
}

.vitrine-discord > * {
  position: relative;
}

.vitrine-discord > .vitrine-discord__kana {
  position: absolute;
  top: 36px;
  right: 56px;
  color: transparent;
  font: 400 clamp(48px, 5.4vw, 76px) / 1 var(--police-titre);
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--encre) 22%, transparent);
  writing-mode: vertical-rl;
  pointer-events: none;
}

.vitrine-discord__titre {
  font: 400 clamp(48px, 6vw, 88px) / 1 var(--police-titre);
}

.vitrine-discord__adresse {
  margin-top: 12px;
  color: var(--encre-2);
  font: 500 14px / 1 var(--police-mono);
}

.vitrine-discord__actions {
  display: grid;
  justify-items: end;
  gap: 14px;
}

/* Tablette : le S passe au-dessus du titre */
@media (max-width: 899px) {
  .accueil__grille {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    min-height: 0;
  }

  .accueil__s {
    order: -1;
    justify-self: start;
    width: min(56%, 240px);
  }

  .accueil__sfx {
    top: 2%;
    left: auto;
    right: -4%;
  }

  .vitrine-discord {
    padding-right: 56px;
  }

  .vitrine-discord > .vitrine-discord__kana {
    display: none;
  }
}

/* Téléphone : les chiffres deux par deux, le Discord empilé */
@media (max-width: 640px) {
  .accueil__ouverture {
    padding-bottom: 32px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
  }

  .chiffres {
    grid-template-columns: 1fr 1fr;
  }

  .chiffre:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .chiffre:nth-child(n + 3) {
    border-top: var(--trait-fin) solid color-mix(in srgb, var(--encre) 18%, transparent);
  }

  .accueil__prochainement {
    grid-template-columns: minmax(0, 1fr);
  }

  .accueil__prochainement-tous {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  /* Les avis de recherche défilent de côté, un et demi à l'écran, arrêtés sur chacun */
  .vitrine-equipe {
    grid-auto-columns: 74%;
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 4px 20px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  .vitrine-equipe > .affiche {
    scroll-snap-align: start;
  }

  .vitrine-discord {
    grid-template-columns: minmax(0, 1fr);
    padding: 32px 24px;
  }

  .vitrine-discord__actions {
    justify-items: start;
  }
}

/* — Page Événements — */
.evenements {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

.evenements__abonnement {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 28px);
  border: var(--trait-fin) solid var(--trait);
  border-left: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
}

.evenements__abonnement-titre,
.evenements__jour-titre {
  font: 500 var(--t-xs) / 1.2 var(--police-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brume);
}

.evenements__abonnement-texte {
  max-width: 60ch;
}

.evenements__abonnement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.evenements__aide {
  color: var(--brume);
  font-size: var(--t-s);
}

/* Aucun événement : un état vide, le kanji du jour en contour au-dessus de la phrase */
.evenements__vide {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(36px, 6vw, 56px) 24px;
  border: var(--trait-fin) dashed var(--trait);
  color: var(--brume);
  text-align: center;
}

.evenements__vide::before {
  content: '日' / "";
  color: transparent;
  font: 800 72px / 1 var(--police-mincho);
  -webkit-text-stroke: 1.5px var(--cendre);
}

.evenements__jour {
  display: grid;
  gap: 16px;
}

/* Le jour : un titre en Dela sur un trait papier */
.evenements__jour-titre {
  padding-bottom: 10px;
  border-bottom: var(--trait-moyen) solid var(--papier);
  color: var(--papier);
  font: 400 var(--t-titre-s) / 1.1 var(--police-titre);
  letter-spacing: 0;
  text-transform: none;
}

.evenements__liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.evenement {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 28px);
  border: var(--trait-fin) solid var(--trait);
  border-top: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
}

.evenement--annulee {
  border-top-color: var(--trait);
  color: var(--brume);
}

.evenement--annulee .evenement__titre {
  text-decoration: line-through;
}

.evenement__haut {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evenement__type,
.evenement__etat {
  padding: 2px 8px;
  border: 1px solid var(--trait);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evenement__etat {
  border-color: var(--papier);
}

.evenement__titre {
  font: 400 var(--t-l) / 1.25 var(--police-titre);
  overflow-wrap: anywhere;
}

.evenement__horaire {
  font: 500 var(--t-s) / 1.4 var(--police-mono);
}

.evenement__infos {
  display: grid;
  gap: 4px;
  font-size: var(--t-s);
}

.evenement__infos div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.evenement__infos dt {
  color: var(--brume);
}

.evenement__infos dt::after {
  content: ' :';
}

.evenement__infos dd {
  overflow-wrap: anywhere;
}

.evenement__resume {
  max-width: 70ch;
  overflow-wrap: anywhere;
}

.evenement__ics {
  justify-self: start;
}

/* — Lore « Impact » — */

/* Les tomes : des couvertures en case forte au coin coupé ; le cadre est une couche à part, pour que le kanji (papier,
   cerné d'encre) puisse en sortir par le haut. */
.tomes {
  display: grid;
  gap: 72px 28px;
  padding-top: 56px;
}

@media (min-width: 960px) {
  .tomes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tome {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 470px;
  padding: 40px 40px 36px;
}

.tome__cadre {
  position: absolute;
  inset: 0;
  padding: 0;
}

.tome__cadre::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--ardoise) 1.4px, transparent 2.1px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to top left, #000, transparent 65%);
}

.tome__kanji {
  position: absolute;
  top: -62px;
  right: 44px;
  z-index: 1;
  color: var(--papier);
  font-size: 168px;
  -webkit-text-stroke: 7px var(--encre);
  paint-order: stroke fill;
  pointer-events: none;
  user-select: none;
}

.tome__corps {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.tome__village {
  margin-top: 18px;
  font-size: 68px;
  line-height: 0.9;
}

.tome__nom-complet {
  margin-top: 14px;
  color: var(--brume);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tome__intitule {
  margin-top: 28px;
  font: 500 22px / 1.3 var(--police-mincho);
}

.tome__corps > .texte-secondaire {
  max-width: 40ch;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
}

.tome__fiche {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: auto 0 0;
  padding-top: 30px;
}

.tome__fiche dt {
  color: var(--brume);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tome__fiche dd {
  margin: 7px 0 0;
  font: 600 var(--t-m) / 1.25 var(--police-texte);
}

.tome__corps > .pastilles {
  margin-top: 22px;
}

.tome__corps > .bouton {
  margin-top: 28px;
}

/* Tome pas encore écrit : cadre pointillé, kanji éteint, tampon « À paraître » */
.tome--a-paraitre .tome__cadre {
  border-style: dashed;
}

.tome--a-paraitre .tome__kanji {
  color: var(--graphite);
  -webkit-text-stroke: 2px var(--trait);
}

.tome__tampon {
  margin-top: 24px;
  padding: 6px 14px;
  border: var(--trait-moyen) solid var(--papier);
  font: 400 var(--t-s) / 1 var(--police-titre);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}

/* Lore : clans */
.clans__intro {
  max-width: 62ch;
}

/* La légende des accès : un cadre par mode d'accès utilisé */
.acces {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.acces__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  max-width: 62ch;
  padding: 12px 16px;
  border: var(--trait-fin) solid var(--trait);
  border-left: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
}

.acces__item dt {
  font-weight: 600;
}

.acces__item dd {
  margin: 0;
  color: var(--brume);
  font-size: var(--t-s);
}

.acces__marque {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 1px;
}

.acces__marque--candidature {
  background: linear-gradient(135deg, currentColor 50%, transparent 50%);
}

.acces__marque--dossier {
  background: currentColor;
}

/* Les cartes de clan : égales, un trait papier de 3 px en haut, le kanji vertical en contour (rempli au survol) ;
   toute la carte mène à la fiche. */
.clans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.clan {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 24px 22px 22px;
  border-top: var(--trait-fort) solid var(--papier);
  transition:
    background-color var(--duree-courte),
    box-shadow var(--duree-courte);
}

.clan:hover,
.clan:focus-within {
  background: var(--graphite);
  box-shadow: inset 0 0 0 1px var(--papier);
}

.clan__kanji {
  position: absolute;
  top: 20px;
  right: 18px;
  color: transparent;
  font-size: 29px;
  line-height: 1.04;
  -webkit-text-stroke: 1.2px var(--cendre);
  writing-mode: vertical-rl;
  pointer-events: none;
  transition: color var(--duree-courte);
}

.clan:hover .clan__kanji,
.clan:focus-within .clan__kanji {
  color: var(--papier);
  -webkit-text-stroke-color: var(--papier);
}

.clan .case__corps {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.clan__nom {
  margin-top: 10px;
  padding-right: 44px;
  font-size: 28px;
  line-height: 1.05;
}

.clan__heritage {
  margin-top: 8px;
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.08em;
}

.clan .case__corps > .texte-secondaire {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

/* Statut particulier d'un clan (« Famille majeure »), en tampon */
.clan__statut {
  margin-block: 12px 4px;
  padding: 4px 10px;
  border: var(--trait-moyen) solid var(--papier);
  font: 400 13px / 1.2 var(--police-titre);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

/* La carte d'un clan scellé : « Document scellé » à la place de sa description */
.clan__scelle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--brume);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.clan__scelle .kanji {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: var(--trait-moyen) solid var(--papier);
  color: var(--papier);
  font-size: 14px;
}

/* L'accès et les places, en pastilles, en bas de la carte */
.clan__acces {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding: 4px 9px;
  border: var(--trait-fin) solid var(--papier);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.clan__acces + .clan__places {
  margin-top: 6px;
}

.clan__places {
  display: inline-flex;
  padding: 4px 9px;
  border: var(--trait-fin) solid var(--trait);
  color: var(--brume);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.clan__places[hidden] {
  display: none;
}

.clan__lien {
  margin-top: 18px;
}

/* Une carte sans accès (la famille Hayabusa) garde son lien en bas */
.clan .case__corps > .clan__scelle + .clan__lien,
.clan .case__corps > .texte-secondaire + .clan__lien {
  margin-top: auto;
  padding-top: 18px;
}

.clan__lien::before {
  content: '';
  position: absolute;
  inset: 0;
}

.clan--dossier {
  border-style: double;
}

.clan:target {
  outline: 2px solid var(--papier);
  outline-offset: 6px;
}

@media (max-width: 760px) {
  .tome {
    min-height: 0;
    padding: 28px 22px 26px;
  }

  .tome__kanji {
    top: -50px;
    right: 20px;
    font-size: 104px;
    -webkit-text-stroke-width: 5px;
  }

  .tome__village {
    font-size: 44px;
  }

  .clan {
    min-height: 0;
  }
}

/* — Lecture d'un tome ou d'une chronique « Impact » — */

/* Repères de lecture : barre de progression en haut, bouton « Chapitre » flottant */
.lecture-progression {
  position: fixed;
  inset: 0 0 auto;
  z-index: 55;
  height: 3px;
  pointer-events: none;
}

.lecture-progression__barre {
  display: block;
  height: 100%;
  background: var(--papier);
  transform: scaleX(0);
  transform-origin: left;
}

/* Le récit reçoit le focus quand le bouton « Chapitre » se cache sous un lecteur au clavier : point d'arrivée, pas
   un élément interactif, donc sans contour */
[data-recit]:focus {
  outline: none;
}

/* Le bouton vient avant sa liste dans le document (ordre du clavier) ; la liste s'affiche au-dessus */
.chapitres-flottant {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
}

.chapitres-flottant[hidden] {
  display: none;
}

.chapitres-flottant__bouton {
  min-height: 44px;
  padding: 10px 16px;
  border: var(--trait-moyen) solid var(--papier);
  background: var(--encre);
  color: var(--papier);
  font: 500 var(--t-xs) / 1 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.chapitres-flottant__bouton[aria-expanded='true'] {
  background: var(--papier);
  color: var(--encre);
}

.chapitres-flottant__liste {
  width: min(320px, calc(100vw - 32px));
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 6px;
  border: var(--trait-moyen) solid var(--papier);
  background: var(--nuit);
}

.chapitres-flottant__liste ol {
  display: grid;
  gap: 2px;
  list-style: none;
}

.chapitres-flottant__liste a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 10px 10px 10px 8px;
  border-left: var(--trait-fort) solid transparent;
  color: var(--papier);
  text-decoration: none;
}

.chapitres-flottant__liste a:hover,
.chapitres-flottant__liste a:focus-visible,
.chapitres-flottant__liste a[aria-current='true'] {
  background: var(--graphite);
}

.chapitres-flottant__liste a[aria-current='true'] {
  border-left-color: var(--papier);
}

.chapitres-flottant__liste .mono {
  min-width: 2.2em;
  color: var(--brume);
}

/* Le corps de la lecture : sur grand écran, le sommaire collé à gauche (les clans du village dessous), le récit à
   droite ; ailleurs, le sommaire en pastilles au-dessus du récit. */
.lecture__corps {
  padding-top: clamp(24px, 4vw, 40px);
}

.lecture__sommaire-titre {
  margin-bottom: 12px;
}

.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sommaire__lien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border: var(--trait-fin) solid var(--trait);
  color: var(--brume);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color var(--duree-courte), color var(--duree-courte);
}

.sommaire__lien:hover,
.sommaire__lien:focus-visible {
  border-color: var(--papier);
  color: var(--papier);
}

.sommaire__lien[aria-current='true'] {
  border-color: var(--papier);
  background: var(--papier);
  color: var(--encre);
}

.sommaire__numero {
  color: var(--cendre);
}

.sommaire__lien[aria-current='true'] .sommaire__numero {
  color: var(--encre-2);
}

.sommaire__lien--clans {
  border-color: var(--papier);
  color: var(--papier);
}

@media (pointer: coarse) {
  .sommaire__lien {
    min-height: 44px;
  }
}

/* Les clans du village (la barre des fiches), sous le sommaire */
.lecture__clans-du-village .barre-clans {
  width: auto;
  margin: 20px 0 0;
}

.lecture__recit {
  display: grid;
  gap: clamp(56px, 9vw, 112px);
  padding-block: clamp(32px, 5vw, 56px) clamp(40px, 7vw, 88px);
}

@media (min-width: 1100px) {
  .lecture__corps {
    display: grid;
    grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
    column-gap: clamp(40px, 5vw, 72px);
    align-items: start;
    padding-top: clamp(40px, 5vw, 64px);
  }

  /* La colonne du sommaire court sur toute la hauteur du récit : un élément collant ne quitte pas sa zone de grille
     (Firefox suit la règle à la lettre), il lui faut donc toute cette hauteur pour suivre la lecture. */
  .lecture__cote {
    grid-column: 1;
    align-self: stretch;
  }

  /* Opaque : la barre des clans passe dessous en défilant */
  .lecture__sommaire {
    position: sticky;
    top: calc(var(--entete) + 32px);
    z-index: 1;
    background: var(--encre);
  }

  .lecture__recit {
    grid-column: 2;
    padding-top: 0;
  }

  /* Le sommaire de côté : une liste à trait, le chapitre lu marqué d'un trait de 3 px */
  .sommaire {
    display: grid;
    gap: 0;
    border-left: var(--trait-fin) solid var(--ardoise);
  }

  .sommaire__lien {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
    margin-left: -1px;
    padding: 9px 0 9px 14px;
    border: 0;
    border-left: var(--trait-fort) solid transparent;
    color: var(--brume);
    font: 500 var(--t-s) / 1.35 var(--police-texte);
    letter-spacing: 0;
    text-transform: none;
  }

  .sommaire__lien:hover,
  .sommaire__lien:focus-visible {
    color: var(--papier);
  }

  .sommaire__lien[aria-current='true'] {
    border-left-color: var(--papier);
    background: none;
    color: var(--papier);
  }

  .sommaire__numero {
    font: 500 var(--t-xs) / 1.6 var(--police-mono);
  }

  .sommaire__lien[aria-current='true'] .sommaire__numero {
    color: var(--papier);
  }

  .sommaire__lien--clans {
    display: block;
    margin-top: 12px;
    color: var(--papier);
    font-weight: 600;
  }

  .sommaire__lien--clans::after {
    content: ' →';
  }
}

.lecture__attente {
  color: var(--brume);
  font: 500 var(--t-s) / 1.4 var(--police-mono);
}

.lecture__message {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 52ch;
}

.lecture__introduction {
  max-width: 62ch;
  font: 500 var(--t-l) / 1.75 var(--police-mincho);
}

.chapitre {
  position: relative;
  max-width: 62ch;
}

.chapitre__tete {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: clamp(24px, 4vw, 40px);
  padding-bottom: 22px;
  border-bottom: var(--trait-fin) solid var(--trait);
}

/* Trait incliné à l'angle du S sous chaque titre de chapitre */
.chapitre__tete::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 72px;
  height: 4px;
  background: var(--papier);
  transform: skewX(var(--incl));
  transform-origin: 0 100%;
}

/* Le numéro du chapitre en kanji, en contour ; dans la marge sur grand écran */
.chapitre__kanji {
  position: absolute;
  top: 0;
  right: 0;
  color: transparent;
  font-size: clamp(4.5rem, 12vw, 8rem);
  line-height: 1;
  -webkit-text-stroke: 1.5px var(--ardoise);
  pointer-events: none;
}

@media (min-width: 1100px) {
  .chapitre {
    display: grid;
    grid-template-columns: minmax(0, 62ch) auto;
    column-gap: clamp(40px, 5vw, 88px);
    max-width: none;
  }

  .chapitre > :not(.chapitre__kanji) {
    grid-column: 1;
  }

  .chapitre__kanji {
    position: sticky;
    top: calc(var(--entete) + 32px);
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    font-size: clamp(8rem, 11vw, 12rem);
    -webkit-text-stroke-width: 2px;
  }
}

.chapitre__tete .etiquette,
.chapitre__titre {
  position: relative;
}

.chapitre__titre {
  font-size: var(--t-titre-m);
  line-height: 1.08;
}

.chapitre__texte {
  font: 500 clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem) / 1.9 var(--police-mincho);
}

.chapitre__texte p + p {
  margin-top: 1.1em;
}

/* Lettrine sur le premier paragraphe (sauf s'il s'agit d'un temps fort ou d'un extrait) */
.chapitre__texte:not(.chapitre__texte--extrait) > p:first-child:not(.temps-fort)::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font: 400 3.6em / 0.82 var(--police-titre);
}

.chapitre__texte strong {
  font-weight: 800;
}

/* Sous-titres d'un chapitre (« ### » dans le récit) */
.chapitre__texte .chapitre__intertitre {
  margin-top: 1.8em;
  font: 400 22px / 1.2 var(--police-titre);
}

.chapitre__texte > .chapitre__intertitre:first-child {
  margin-top: 0;
}

.chapitre__texte .chapitre__intertitre + p {
  margin-top: 0.5em;
}

.lecture__introduction p + p {
  margin-top: 1em;
}

/* Temps forts : les phrases courtes du récit, en bandeau papier incliné, comme une bulle */
.chapitre__texte .temps-fort {
  margin-block: 1.6em;
  padding: 16px 26px 16px 30px;
  background: var(--papier);
  color: var(--encre);
  font: 500 clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem) / 1.5 var(--police-mincho);
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

/* Plusieurs temps forts à la suite : un seul bloc, à peine séparé */
.chapitre__texte .temps-fort + .temps-fort {
  margin-top: 6px;
}

.lecture__fin {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 62ch;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.lecture__suivant {
  display: grid;
  gap: 4px;
  color: inherit;
  font: 400 var(--t-xl) / 1.1 var(--police-titre);
  text-decoration: none;
}

a.lecture__suivant:hover,
a.lecture__suivant:focus-visible {
  text-decoration: underline;
}

/* Les clans du village, à la suite du récit */
.lecture__clans {
  border-top: var(--trait-fin) solid var(--trait);
}

/* — Fiche d'un clan — */
/* Kanji du clan à la verticale, réduit selon son nombre de signes (うちは, 磁石…) pour tenir dans l'en-tête */
.fiche-clan__kanji {
  font-size: clamp(4rem, calc(30vw / var(--signes, 1)), calc(22rem / var(--signes, 1)));
  line-height: 1;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.fiche-clan__fiche {
  padding-top: clamp(24px, 4vw, 40px);
}

/* La fiche, en case forte : les faits en grille, l'accès expliqué, l'appel à candidater */
.fiche-clan__carte {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 760px;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 36px);
}

.fiche-clan__carte .faits {
  gap: 18px 40px;
}

.fiche-clan__carte .faits a {
  color: var(--papier);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* D'où vient le lore affiché : le tome du village ou la chronique du clan */
.fiche-clan__source {
  max-width: 62ch;
  color: var(--brume);
  font: 500 var(--t-l) / 1.6 var(--police-mincho);
}

.fiche-clan__source .etiquette {
  display: block;
  margin-bottom: 8px;
}

.fiche-clan__source a {
  color: var(--papier);
}

/* Le document scellé d'un clan scellé (la famille Hayabusa) : un papier barré
   de deux bandes en croix, le sceau 封 et sa phrase */
.document-scelle {
  display: grid;
  place-items: center;
  padding-block: clamp(24px, 5vw, 56px);
}

.document-scelle__papier {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 520px);
  padding: clamp(40px, 8vw, 72px) clamp(20px, 5vw, 48px);
  overflow: hidden;
  border: var(--trait-moyen) solid var(--papier);
  background: var(--graphite);
  text-align: center;
}

.document-scelle__papier::before,
.document-scelle__papier::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: calc(50% - 18px);
  left: -15%;
  width: 130%;
  height: 36px;
  background: var(--papier);
  opacity: 0.08;
  transform: rotate(-24deg);
}

.document-scelle__papier::after {
  transform: rotate(24deg);
}

.document-scelle__papier > * {
  position: relative;
  z-index: 1;
}

/* Le sceau : un cachet carré, posé de travers */
.document-scelle__sceau {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: var(--trait-fort) solid var(--papier);
  background: var(--encre);
  color: var(--papier);
  font-size: 52px;
  transform: rotate(-4deg);
}

.document-scelle__texte {
  max-width: 34ch;
  color: var(--papier);
  font: 500 var(--t-l) / 1.5 var(--police-mincho);
}

/* Passages du tome : le nom du clan ressort, une coupure […] sépare deux passages éloignés */
.extrait mark {
  background: none;
  color: inherit;
  text-decoration: underline 2px;
  text-underline-offset: 0.2em;
}

.extrait p mark {
  font-weight: 800;
}

.extrait__coupure {
  overflow: visible;
  height: auto;
  margin: 1.1em 0;
  border: 0;
  color: var(--brume);
  font: 500 var(--t-s) / 1 var(--police-mono);
  letter-spacing: 0.3em;
}

.extrait__coupure::after {
  content: '[…]';
}

.extrait__source {
  display: inline-block;
  margin-top: 1.4em;
  color: var(--brume);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.extrait__source:hover,
.extrait__source:focus-visible {
  color: var(--papier);
}

.extrait__source::after {
  content: ' →';
}

/* — Bingo Book — */
.bingo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(24px, 3.5vw, 44px);
  padding-block: clamp(40px, 6vw, 72px);
}

.affiche {
  transform: rotate(var(--inclinaison, 0deg));
  transition: transform 0.35s var(--ease-sortie);
}

.affiche:hover,
.affiche:focus-within {
  transform: rotate(0deg) translateY(-6px);
}

.affiche__papier {
  container-type: inline-size;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--papier);
  color: var(--encre);
  outline: 2px solid var(--encre);
  outline-offset: -8px;
  box-shadow: 8px 8px 0 var(--ardoise);
}

.affiche--s .affiche__papier {
  outline: 6px double var(--encre);
  outline-offset: -11px;
}

/* L'en-tête de l'affiche : le kanji 手配 seul, centré */
.affiche__tete {
  display: flex;
  justify-content: center;
  padding: 0 8px 8px;
  border-bottom: 2px solid var(--encre);
}

.affiche__tehai {
  font-size: 2rem;
}

.affiche__portrait {
  --trame-couleur: var(--trait);
  --trame-pas: 6px;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--encre);
}

.affiche__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.affiche__kanji {
  padding: 0 0.12em;
  background: var(--papier);
  font-size: clamp(3.6rem, 8vw, 5.5rem);
}

.affiche__rang {
  position: absolute;
  top: 6px;
  right: 10px;
  font: 400 2.2rem / 1 var(--police-titre);
}

.affiche__pseudo {
  padding-inline: 8px;
  font-size: min(var(--t-xl), 14cqi); /* un pseudo de 8 lettres tient dans l'affiche */
  line-height: 1;
  overflow-wrap: anywhere;
}

.affiche__role {
  padding-inline: 8px;
  color: var(--encre-2);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.affiche__citation {
  padding-inline: 8px;
  font: 500 var(--t-m) / 1.45 var(--police-mincho);
}

.affiche__citation p::before {
  content: '«\00a0';
}

.affiche__citation p::after {
  content: '\00a0»';
}

.affiche__discord {
  justify-self: start;
  margin: 0 8px 6px;
  padding: 6px 10px;
  border: 1px solid var(--encre);
  background: none;
  color: var(--encre);
  font: 500 var(--t-xs) / 1 var(--police-mono);
  letter-spacing: 0.06em;
}

.affiche__discord:hover,
.affiche__discord:focus-visible {
  background: var(--encre);
  color: var(--papier);
}

.recrutement .case__corps {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 60ch;
}

@media (prefers-reduced-motion: reduce) {
  .affiche,
  .affiche:hover {
    transform: none;
  }
}

/* — Réseaux — */
.reseaux {
  display: grid;
  gap: var(--gouttiere);
  padding-block: clamp(40px, 6vw, 72px);
}

@media (min-width: 640px) {
  .reseaux {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reseau--discord {
    grid-column: span 2;
  }

  /* Pas de case vide en bas de la planche */
  .reseau:last-child:nth-child(even) {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .reseaux {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reseau--discord {
    grid-row: span 2;
  }

  .reseau:last-child:nth-child(even) {
    grid-column: auto;
  }
}

/* Un seul réseau ouvert (Discord) : sa case prend toute la largeur de la planche */
.reseau:only-child {
  grid-column: 1 / -1;
  grid-row: auto;
}

/* Les réseaux pas encore ouverts : une ligne sous la planche */
.reseaux:has(+ .reseaux__bientot:not([hidden])) {
  padding-bottom: 18px;
}

.reseaux__bientot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding-bottom: clamp(40px, 6vw, 72px);
  color: var(--brume);
}

.reseaux__bientot[hidden] {
  display: none;
}

.reseau {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 240px;
}

.reseau__kana {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--graphite);
  font: 400 clamp(2.2rem, 5vw, 3.4rem) / 1 var(--police-titre);
  writing-mode: vertical-rl;
}

/* Le Discord en négatif : des lignes de vitesse à l'encre derrière son nom */
.reseau--discord.case--negatif {
  overflow: hidden;
}

.reseau--discord.case--negatif::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg at 82% 50%, color-mix(in srgb, var(--encre) 14%, transparent) 0deg 0.6deg, transparent 0.6deg 4deg);
  mask-image: radial-gradient(circle at 82% 50%, transparent 0 12%, #000 40%, transparent 70%);
  pointer-events: none;
}

.case--negatif .reseau__kana {
  color: color-mix(in srgb, var(--encre) 14%, var(--papier));
}

.reseau .case__corps {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.reseau__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.reseau__nom {
  font-size: var(--t-titre-m);
}

.reseau__pseudo {
  color: var(--brume);
  font: 400 var(--t-s) / 1.4 var(--police-mono);
}

.case--negatif .reseau__pseudo {
  color: var(--ardoise);
}

.reseau__pseudo,
.reseau .texte-secondaire {
  overflow-wrap: anywhere;
}

/* — Boutique — */
.boutique__note {
  margin-top: 18px;
}

.categories-nav {
  margin-top: 28px;
}

.categorie {
  padding-block: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--trait);
}

.categorie__tete {
  display: grid;
  gap: 8px;
  max-width: 60ch;
  margin-bottom: 24px;
}

.articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--gouttiere);
}

.article {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 0;
}

/* Un abonnement (les sceaux) : la case forte */
.article--abonnement {
  border: var(--trait-fort) solid var(--papier);
}

/* La tuile du kanji : une trame et des lignes de concentration derrière le kanji papier */
.article__visuel {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--trait-fin) solid var(--trait);
  background-image: radial-gradient(circle, var(--ardoise) 1.3px, transparent 2px);
  background-size: 8px 8px;
}

.article__visuel::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--papier) 22%, transparent) 0deg 0.5deg, transparent 0.5deg 4deg);
  mask-image: radial-gradient(circle at 50% 50%, transparent 0 18%, #000 36%, transparent 64%);
  pointer-events: none;
}

.article--abonnement .article__visuel {
  border-bottom: var(--trait-fort) solid var(--papier);
}

.article__visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article__kanji {
  position: relative;
  padding: 0 0.12em;
  background: var(--nuit);
  color: var(--papier);
  font-size: clamp(4rem, 8vw, 6rem);
}

.article__corps {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-inline: 20px;
}

.article__nom {
  font-size: 22px;
  line-height: 1.1;
}

.article__description {
  color: var(--brume);
  font-size: var(--t-s);
}

.article__description > * + * {
  margin-top: 0.6em;
}

.article__description ul,
.article__description ol {
  padding-left: 1.2em;
}

.article__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--trait);
}

.article__prix {
  font: 400 28px / 1 var(--police-titre);
}

.article__prix span {
  color: var(--brume);
  font: 400 var(--t-s) / 1 var(--police-texte);
}

.article--chargement .article__visuel {
  animation: chargement 1.1s ease-in-out infinite alternate;
}

.article--chargement .article__corps span {
  display: block;
  height: 14px;
  margin-block: 8px;
  background: var(--graphite);
}

.article--chargement .article__corps span + span {
  width: 60%;
}

@keyframes chargement {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.boutique__erreur {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 28px;
}

.garanties {
  display: grid;
  gap: var(--gouttiere);
}

@media (min-width: 760px) {
  .garanties {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.garantie {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: var(--trait-fin) solid var(--trait);
  border-top: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
}

.garantie .kanji {
  font-size: 2.6rem;
}

.garantie h3 {
  font-size: var(--t-l);
}

.bouton:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bouton[aria-busy='true'] {
  cursor: progress;
}

/* Arbre généalogique des fiches de clan : une rangée par génération, reliées par des traits d'encre */
.fiche-clan__arbre {
  display: grid;
  gap: 10px;
  margin-block: 32px 8px;
}

/* Arbre généalogique : chaque ancêtre porte ses enfants dessous (listes imbriquées) ; les lignées, côte à côte, ne
   sont pas reliées entre elles. Un·e conjoint·e hors clan se tient à droite de la personne du clan, relié·e par un
   trait double, et le trait des enfants part du milieu du couple. Chaque case : la photo en haut, le texte dessous,
   jamais sur l'image. Un arbre plus large que l'écran défile à l'horizontale au lieu de déborder ; la marge intérieure
   garde visibles le double cadre du chef et la sélection du panneau. */
.arbre-defilement {
  overflow-x: auto;
  padding: 10px 10px 12px;
}

.arbre {
  --case: clamp(104px, 26vw, 148px);
  --lien: clamp(12px, 3vw, 22px);
  --ecart: clamp(8px, 2vw, 18px);
  --trait-arbre: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(18px, 6vw, 64px);
  width: max-content;
  min-width: 100%;
  margin-top: 14px;
}

.arbre__personne {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arbre__case {
  position: relative;
  display: block;
  width: var(--case);
  padding: 0;
  border: var(--trait-moyen) solid var(--papier);
  border-radius: 0;
  background: var(--nuit);
  color: var(--papier);
  font: inherit;
  text-align: center;
}

/* La grille de la case (photo, puis texte) : portée par un span, pas par le bouton du panneau */
.arbre__contenu {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}

.arbre__case--vide {
  border-style: dashed;
  border-color: var(--brume);
}

/* Chef actuel du clan : un double cadre */
.arbre__case--chef {
  box-shadow: 0 0 0 3px var(--encre), 0 0 0 4px var(--papier);
}

/* Mort : la case s'atténue (« † » suit le nom) */
.arbre__case--mort {
  border-color: var(--brume);
}

/* Assombrie plutôt que transparente : la silhouette dessous ne doit pas apparaître à travers la photo */
.arbre__case--mort .arbre__photo {
  filter: brightness(0.5);
}

/* La photo, carrée, couvre la silhouette ; si elle ne charge pas, la silhouette reste */
.arbre__photo-cadre {
  position: relative;
  display: grid;
  place-items: end center;
  aspect-ratio: 1;
  overflow: hidden;
  border-bottom: 1px solid var(--trait);
  background: var(--encre);
  color: var(--ardoise);
}

.arbre__silhouette {
  width: 62%;
  height: auto;
}

.arbre__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arbre__texte {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 8px 6px 10px;
}

.arbre__generation {
  color: var(--brume);
  font: 500 0.75rem / 1.2 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.arbre__nom {
  font-size: var(--t-xs);
  color: var(--brume);
  overflow-wrap: anywhere;
}

.arbre__case:not(.arbre__case--vide) .arbre__nom {
  color: var(--papier);
  font: 500 var(--t-s) / 1.25 var(--police-texte);
}

.arbre__statut,
.arbre__origine,
.arbre__arme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  color: var(--brume);
  font-size: 0.75rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.arbre__statut .icone,
.arbre__arme .icone {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--papier);
}

.arbre__case--chef .arbre__statut {
  color: var(--papier);
}

/* Dans le panneau, chaque case est un bouton : la sélection s'encadre, à distance du double cadre du chef */
button.arbre__case {
  cursor: pointer;
}

button.arbre__case:hover {
  background: var(--graphite);
}

button.arbre__case[aria-pressed='true'] {
  outline: 2px solid var(--papier);
  outline-offset: 6px;
}

button.arbre__case:focus-visible {
  outline: 2px dashed var(--papier);
  outline-offset: 6px;
}

/* Couple : la personne du clan, le trait double, puis sa conjointe ou son conjoint */
.arbre__couple {
  display: flex;
  align-items: stretch;
}

.arbre__lien {
  position: relative;
  flex: none;
  width: var(--lien);
}

.arbre__lien::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 7px;
  border-block: 2px solid var(--papier);
  transform: translateY(-50%);
}

/* Avec des enfants : un trait descend du trait double jusqu'au bas du couple, puis vers les enfants */
.arbre__couple--parents .arbre__lien::after {
  content: '';
  position: absolute;
  top: calc(50% + 3px);
  bottom: 0;
  left: 50%;
  border-left: 2px solid var(--papier);
}

/* Les enfants d'une personne : un trait descend de sa case (ou du couple) jusqu'au trait horizontal des enfants */
.arbre__enfants {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: calc(var(--trait-arbre) * 2);
}

.arbre__enfants::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: var(--trait-arbre);
  border-left: 2px solid var(--papier);
}

.arbre__enfants > .arbre__personne {
  padding-inline: calc(var(--ecart) / 2);
}

/* Chaque enfant : un trait monte jusqu'au trait horizontal, qui court d'un enfant à l'autre */
.arbre__enfants > .arbre__personne::before {
  content: '';
  position: absolute;
  top: calc(var(--trait-arbre) * -1);
  left: 50%;
  height: var(--trait-arbre);
  border-left: 2px solid var(--papier);
}

.arbre__enfants > .arbre__personne::after {
  content: '';
  position: absolute;
  top: calc(var(--trait-arbre) * -1);
  left: 0;
  right: 0;
  border-top: 2px solid var(--papier);
}

.arbre__enfants > .arbre__personne:first-child::after {
  left: 50%;
}

.arbre__enfants > .arbre__personne:last-child::after {
  right: 50%;
}

.arbre__enfants > .arbre__personne:only-child::after {
  display: none;
}

/* Un enfant en couple : le trait arrive sur sa case (à gauche du couple), pas entre les deux */
.arbre__enfants > .arbre__personne--couple::before {
  left: calc(50% - (var(--case) + var(--lien)) / 2);
}

.arbre__enfants > .arbre__personne--couple:first-child::after {
  left: calc(50% - (var(--case) + var(--lien)) / 2);
}

.arbre__enfants > .arbre__personne--couple:last-child::after {
  right: calc(50% + (var(--case) + var(--lien)) / 2);
}

.arbre__enfants > .arbre__personne--couple:only-child::after {
  display: block;
  left: calc(50% - (var(--case) + var(--lien)) / 2);
  right: 50%;
}

.fiche-clan__arbre[hidden] {
  display: none;
}

/* Barre « Les clans de <Village> » : accès direct à chaque fiche (fiches de clan et tomes) */
.barre-clans {
  display: grid;
  gap: 10px;
  padding-top: clamp(20px, 3vw, 32px);
}

.barre-clans a.pastille[aria-current='page'] {
  border-color: var(--papier);
  background: var(--papier);
  color: var(--encre);
}

/* — Règlement : le bandeau des nouveautés en négatif, les grands liens des parties, puis la
   lecture comme un tome (le sommaire collé de côté à partir de 1100 px) ; chaque partie ouvre sur un bandeau papier,
   et un article nouveau ou modifié porte un trait papier de 3 px et sa marque en toutes lettres. — */
.reglement__entree {
  display: grid;
  gap: var(--gouttiere);
  padding-top: clamp(24px, 4vw, 40px);
}

.reglement__entree [hidden] {
  display: none;
}

/* Le bandeau des nouveautés : la date en titre, les trois chiffres, les articles à droite sur grand écran */
.nouveautes-reglement {
  display: grid;
  gap: 20px;
  align-items: start;
}

.nouveautes-reglement :focus-visible {
  outline-color: var(--encre);
}

.nouveautes-reglement__titre {
  margin-top: 8px;
  color: var(--encre);
  font-size: var(--t-titre-s);
  line-height: 1.1;
}

.nouveautes-reglement__chiffres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: var(--trait-fort) solid var(--encre);
}

.nouveautes-reglement__chiffre {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 12px 0 0;
}

.nouveautes-reglement__chiffre + .nouveautes-reglement__chiffre {
  padding-left: 12px;
  border-left: var(--trait-fin) solid color-mix(in srgb, var(--encre) 22%, transparent);
}

.nouveautes-reglement__chiffre dt {
  color: var(--encre-2);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nouveautes-reglement__chiffre dd {
  margin: 0;
  font: 400 var(--t-titre-m) / 1 var(--police-titre);
}

.nouveautes-reglement__liste {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--trait-fort) solid var(--encre);
}

.nouveautes-reglement__liste li {
  border-bottom: var(--trait-fin) solid color-mix(in srgb, var(--encre) 18%, transparent);
}

.nouveautes-reglement__lien,
.nouveautes-reglement__retire {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 10px 0;
  color: var(--encre);
  font: 500 var(--t-s) / 1.4 var(--police-texte);
  text-decoration: none;
}

.nouveautes-reglement__lien:hover,
.nouveautes-reglement__lien:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nouveautes-reglement__retire {
  color: var(--encre-2);
}

.nouveautes-reglement__numero {
  color: var(--encre-2);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.08em;
}

/* Au-delà de six articles, la suite repliée : « Et 7 autres articles » ouvre le reste de la liste, à la suite */
.nouveautes-reglement__plus {
  padding: 10px 0;
  color: var(--encre);
  cursor: pointer;
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 3px;
}

.nouveautes-reglement__suite .nouveautes-reglement__liste {
  border-top: 0;
}

.nouveautes-reglement__fin {
  color: var(--encre-2);
  font: 500 var(--t-xs) / 1.5 var(--police-mono);
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .nouveautes-reglement {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(32px, 4vw, 56px);
  }

  .nouveautes-reglement__tete,
  .nouveautes-reglement__chiffres,
  .nouveautes-reglement__fin {
    grid-column: 1;
  }

  .nouveautes-reglement__articles {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

/* La marque d'un article : en toutes lettres, en négatif ; dans le bandeau (papier), en encre ; « Retiré », au trait */
.marque-reglement {
  display: inline-block;
  padding: 2px 7px;
  border: var(--trait-fin) solid var(--papier);
  background: var(--papier);
  color: var(--encre);
  font: 600 var(--t-xs) / 1.3 var(--police-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nouveautes-reglement .marque-reglement {
  border-color: var(--encre);
  background: var(--encre);
  color: var(--papier);
}

.nouveautes-reglement__retire .marque-reglement {
  border-color: var(--encre-2);
  background: none;
  color: var(--encre-2);
}

/* Les parties : de grandes cases à trait fort, le numéro en Dela ; survolées, elles passent en négatif. Neuf parties :
   deux colonnes, puis trois sur un grand écran */
.reglement__parties {
  display: grid;
  gap: var(--gouttiere);
}

.lien-partie {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(16px, 2.4vw, 28px);
  row-gap: 6px;
  align-items: center;
  padding: clamp(18px, 2.6vw, 30px);
  border: var(--trait-fort) solid var(--papier);
  background: var(--nuit);
  color: var(--papier);
  text-decoration: none;
  transition: background-color var(--duree-courte), color var(--duree-courte);
}

/* La largeur de « VIII » : dans une colonne, les noms des parties s'alignent */
.lien-partie__numero {
  grid-row: 1 / span 3;
  min-width: 1.9em;
  font: 400 clamp(2rem, 1.5rem + 1.4vw, 2.8rem) / 0.9 var(--police-titre);
  text-align: center;
}

/* Neuf cartes, jusqu'à trois de front : un nom plus court de corps, coupé en fin de ligne plutôt que de déborder */
.lien-partie__nom {
  font: 400 clamp(1.25rem, 1rem + 0.7vw, 1.6rem) / 1.1 var(--police-titre);
  overflow-wrap: break-word;
  hyphens: auto;
}

.lien-partie__detail {
  color: var(--brume);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lien-partie__changements {
  justify-self: start;
  padding: 2px 7px;
  background: var(--papier);
  color: var(--encre);
  font: 600 var(--t-xs) / 1.3 var(--police-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lien-partie:hover,
.lien-partie:focus-visible {
  background: var(--papier);
  color: var(--encre);
}

.lien-partie:hover .lien-partie__detail,
.lien-partie:focus-visible .lien-partie__detail {
  color: var(--encre-2);
}

.lien-partie:hover .lien-partie__changements,
.lien-partie:focus-visible .lien-partie__changements {
  background: var(--encre);
  color: var(--papier);
}

@media (min-width: 700px) {
  .reglement__parties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .reglement__parties {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* L'API muette : la base est affichée, une ligne le dit */
.reglement__hors-ligne {
  padding-left: 12px;
  border-left: var(--trait-moyen) solid var(--cendre);
  color: var(--brume);
  font: 500 var(--t-xs) / 1.5 var(--police-mono);
  letter-spacing: 0.04em;
}

/* Le sommaire de côté (parties, puis leurs sections) ; plus étroit, le bouton flottant des sections le remplace */
.sommaire__repere {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 9px;
  background: var(--papier);
  vertical-align: 0.12em;
  transform: rotate(45deg);
}

@media (max-width: 1099.98px) {
  .reglement__sommaire {
    display: none;
  }
}

@media (min-width: 1100px) {
  .reglement__sommaire {
    max-height: calc(100vh - var(--entete) - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .reglement__sommaire .sommaire__lien--partie {
    margin-top: 14px;
    color: var(--papier);
    font-weight: 600;
  }

  .reglement__sommaire li:first-child .sommaire__lien--partie {
    margin-top: 0;
  }
}

/* Une partie : son bandeau papier (« I · HRP », son titre, sa date), puis ses sections et leurs articles */
.reglement__partie {
  display: grid;
  gap: clamp(32px, 4.5vw, 52px);
}

.reglement__bandeau {
  display: grid;
  gap: 8px;
}

.reglement__numero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--encre-2);
  font: 500 var(--t-s) / 1.2 var(--police-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reglement__chiffre {
  color: var(--encre);
  font: 400 var(--t-l) / 1 var(--police-titre);
  letter-spacing: 0;
}

.reglement__titre-partie {
  color: var(--encre);
  font-size: var(--t-titre-m);
  line-height: 1.05;
}

.reglement__date {
  color: var(--encre-2);
  font: 500 var(--t-xs) / 1.5 var(--police-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reglement__introduction {
  max-width: var(--lecture);
  color: var(--brume);
  font-size: var(--t-l);
  line-height: 1.6;
}

.reglement__introduction p + p {
  margin-top: 0.8em;
}

.section-reglement {
  display: grid;
  gap: 22px;
}

.section-reglement__titre {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: var(--trait-fin) solid var(--trait);
  font-size: var(--t-titre-s);
  line-height: 1.15;
}

.section-reglement__numero {
  flex: none;
  color: var(--cendre);
  font: 500 var(--t-s) / 1 var(--police-mono);
}

.section-reglement > p {
  max-width: var(--lecture);
  color: var(--brume);
}

.article-reglement {
  max-width: var(--lecture);
  padding: 2px 0 2px 20px;
  border-left: var(--trait-fin) solid var(--ardoise);
  color: var(--brume);
  line-height: 1.7;
}

.article-reglement--nouveau,
.article-reglement--modifie {
  padding: 14px 16px 14px 18px;
  border-left: var(--trait-fort) solid var(--papier);
  background: linear-gradient(90deg, color-mix(in srgb, var(--papier) 7%, transparent), transparent 75%);
}

/* Arrivé par un lien du bandeau ou du sommaire : l'article visé ressort un instant */
.article-reglement:target {
  background: color-mix(in srgb, var(--papier) 10%, transparent);
}

.article-reglement__titre {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 8px;
  color: var(--papier);
  font: 600 var(--t-m) / 1.35 var(--police-texte);
}

.article-reglement__numero {
  color: var(--cendre);
  font: 500 var(--t-xs) / 1.4 var(--police-mono);
  letter-spacing: 0.06em;
}

.article-reglement p + p,
.article-reglement p + .reglement__liste,
.article-reglement .reglement__liste + p {
  margin-top: 0.7em;
}

.article-reglement strong {
  color: var(--papier);
  font-weight: 600;
}

.reglement__liste {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reglement__liste li {
  position: relative;
  padding-left: 18px;
}

.reglement__liste li::before {
  content: '';
  position: absolute;
  top: 0.8em;
  left: 2px;
  width: 7px;
  height: 2px;
  background: var(--cendre);
}

@media (pointer: coarse) {
  .nouveautes-reglement__lien {
    min-height: 44px;
    align-content: center;
  }

  .nouveautes-reglement__plus {
    min-height: 44px;
    padding-block: 13px;
  }
}

/* Au doigt, 44 px au moins : le sommaire des mentions légales ; le pseudo Discord d'une
   affiche se prolonge sans déformer l'affiche. */
@media (pointer: coarse) {
  .legal__sommaire a {
    min-height: 44px;
    align-content: center;
  }

  .affiche__discord {
    position: relative;
  }

  .affiche__discord::after {
    content: '';
    position: absolute;
    inset: -9px -4px;
  }

  /* Un lien seul dans une étiquette ou dans les faits d'une fiche (le village d'un clan) */
  .tete-page .etiquette a,
  .faits dd a {
    display: inline-block;
    padding: 14px 4px;
    margin: -14px -4px;
  }
}
