/* Section : kenoma — arbre de vie, presque noir sur noir */
.kenoma-page {
  --void:       #030303;  /* fond */
  --path:       #0e0e0e;  /* les 22 sentiers */
  /* Les trois niveaux de luminosité des nœuds : */
  --sef-dark:   #0b0b0b;  /* les huit autres — presque noir */
  --sef-mid:    #1d1d1d;  /* Tiphereth (6) et Daath */
  --sef-bright: #3c3c3c;  /* Malkhut (10) */
  /* Ce que le survol ajoute : */
  --sef-lit:    #6e6e6e;  /* le nœud survolé */
  --label:      #1a1a1a;  /* les noms, au repos */
  --label-lit:  #8a8a84;  /* le nom survolé */

  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6vh 6vw 8vh;
  background: var(--void);
}

/* Le fond du gabarit (vidéo, grain, ticker, signature) n'a pas sa place ici :
   les pages kenoma ne portent aucune identité, seulement le noir. */
body[data-section="kenoma"] { background: var(--void); }
body[data-section="kenoma"] video#bg-video,
body[data-section="kenoma"] .news-ticker,
body[data-section="kenoma"] #corner-identity { display: none; }

.kenoma-page a.back-btn {
  align-self: flex-start;
  color: #2a2a2a;
}
.kenoma-page a.back-btn:hover { color: var(--sef-bright); }

.tree {
  width: min(100%, 540px);
  height: auto;
  margin: auto;
  overflow: visible;
}

.tree .paths path {
  fill: none;
  stroke: var(--path);
  stroke-width: 1;
}

/* --- nœuds --- */
.tree .sef { cursor: pointer; outline: none; }
.tree .sef-hit { fill: transparent; }   /* zone de survol confortable */

.tree .sef-dot {
  fill: var(--sef-dark);
  stroke: #141414;
  stroke-width: 1;
  transition: fill 0.45s ease, stroke 0.45s ease, filter 0.45s ease;
}
.tree .sef--mid .sef-dot    { fill: var(--sef-mid);    stroke: #262626; }
.tree .sef--bright .sef-dot { fill: var(--sef-bright); stroke: #4e4e4e; }

/* --- survol : le nœud s'allume --- */
.tree .sef:hover .sef-dot,
.tree .sef:focus .sef-dot {
  fill: var(--sef-lit);
  stroke: #9a9a94;
  filter: drop-shadow(0 0 7px rgba(255, 255, 245, 0.28));
  transition-duration: 0.18s;
}
/* --- noms --- */
.tree .sef-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--label);
  pointer-events: none;
  transition: fill 0.45s ease;
}
.tree .sef:hover .sef-label,
.tree .sef:focus .sef-label {
  fill: var(--label-lit);
  transition-duration: 0.18s;
}

/* --- cartouche : la glose du nœud survolé --- */
.sef-caption {
  margin-top: 2.5rem;
  max-width: 34ch;
  min-height: 4.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sef-caption.on { opacity: 1; }

.sef-caption-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #9a9a94;
  margin-bottom: 0.45rem;
}
.sef-caption-desc {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12px;
  line-height: 1.7;
  color: #4a4a46;
}

/* Sans survol (tactile) : les noms restent lisibles, le cartouche suit le toucher. */
@media (hover: none) {
  .tree .sef-label { fill: #3a3a3a; }
}

/* ---------------------------------------------------------------
   Tiphereth — le rouleau de paroles (kenoma/tiphereth.html)
   Image fabriquée par scripts/lyrics-scroll.sh : 800 x 13584,
   12 pages empilées. Le rapport ci-dessous doit suivre l'image
   si on la régénère à une autre largeur.
   --------------------------------------------------------------- */
.tiphereth-page {
  --void: #030303;
  --scroll-w: 800;      /* largeur de l'image, en px */
  --scroll-h: 13584;    /* hauteur de l'image, en px */

  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6vh 6vw 12vh;
  background: var(--void);
}

.tiphereth-head {
  width: min(100%, 800px);
  margin-bottom: 4vh;
}
.tiphereth-page a.back-btn { color: #2a2a2a; }
.tiphereth-page a.back-btn:hover { color: #6e6e6e; }

.tiphereth-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1.1;
  color: #9a9a94;
  margin-top: 1.4rem;
}
.tiphereth-sub {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #4a4a46;
  margin-top: 0.6rem;
}

/* Le rouleau. La hauteur découle du rapport de l'image, donc toutes
   les pages sont atteignables en faisant simplement défiler. */
.scroll {
  width: min(100%, calc(var(--scroll-w) * 1px));
  aspect-ratio: var(--scroll-w) / var(--scroll-h);
  margin-top: 2vh;
  background-color: #f5f4f0;
  background-image: url("/assets/images/kenoma/tiphereth-scroll.jpg");
  background-image: image-set(
    url("/assets/images/kenoma/tiphereth-scroll.webp") type("image/webp"),
    url("/assets/images/kenoma/tiphereth-scroll.jpg")  type("image/jpeg")
  );
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  /* le papier éclaire le noir plutôt que de le trancher */
  box-shadow: 0 0 90px rgba(245, 244, 240, 0.06);
}

.tiphereth-foot {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #3a3a36;
  margin-top: 5vh;
  text-align: center;
  max-width: 40ch;
}

/* ---------------------------------------------------------------
   Daath — trois panneaux (kenoma/daath.html)
   Sombres au repos, éclaircis au survol, texte dessous.
   --------------------------------------------------------------- */
.daath-page {
  --void: #030303;
  --panel-rest: 0.22;   /* luminosité au repos */
  --panel-lit:  1;      /* luminosité au survol */

  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6vh 6vw 12vh;
  background: var(--void);
}

.daath-head {
  width: min(100%, 1100px);
  margin-bottom: 6vh;
}
.daath-page a.back-btn { color: #2a2a2a; }
.daath-page a.back-btn:hover { color: #6e6e6e; }

.daath-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1.1;
  color: #9a9a94;
  margin-top: 1.4rem;
}
.daath-sub {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #4a4a46;
  margin-top: 0.6rem;
}

/* Trois colonnes égales : l'espacement reste régulier à toute largeur. */
.triad {
  width: min(100%, 1100px);
  margin: auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

.panel {
  margin: 0;
  cursor: pointer;
  outline: none;
}

.panel-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  -webkit-user-drag: none;
  filter: brightness(var(--panel-rest));
  transition: filter 0.5s ease, transform 0.5s ease;
}
.panel:hover .panel-img,
.panel:focus .panel-img {
  filter: brightness(var(--panel-lit));
  transform: scale(1.02);
  transition-duration: 0.25s;
}

/* Le texte n'apparaît qu'au survol, mais sa place est réservée :
   sans cela les trois colonnes sauteraient au passage de la souris. */
.panel-text {
  min-height: 3.4em;
  margin-top: 1.1rem;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: #6e6e68;
  text-align: center;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.panel:hover .panel-text,
.panel:focus .panel-text {
  opacity: 1;
  transform: translateY(0);
  transition-duration: 0.25s;
}

.daath-hint {
  margin-top: 5vh;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3a3a36;
}

/* Sans survol (tactile) : ni éclaircissement ni son au passage,
   on montre donc les images et les textes tels quels. */
@media (hover: none) {
  .panel-img { filter: brightness(0.75); }
  .panel-text { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .triad { grid-template-columns: 1fr; gap: 3rem; }
  .panel-text { min-height: 0; }
}
