/* =====================================================================
   Tribunal de Suna : la salle d'audience en plein écran.
   Boiseries sombres, vermillon, or. Tout est préfixé .tri- (ou body.tri-ouvert) :
   rien ne change pour la Haruba. Les pages gardent leurs feuilles (.jur, juridique.css).
   ===================================================================== */
body.tri-ouvert { background: #170f09; }
body.tri-ouvert > #fond { display: none; }

.tri {
  --tri-bois: #2a1a10; --tri-bois-2: #3a2416; --tri-bois-3: #1b110a;
  --tri-vermillon: #b8342a; --tri-vermillon-clair: #d64a3c;
  --tri-or: #d9b25f; --tri-or-pale: #f1dca4; --tri-filet: rgb(217 178 95 / 0.35);
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgb(217 178 95 / 0.08), transparent 70%),
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.18) 0 2px, transparent 2px 140px),
    repeating-linear-gradient(90deg, rgb(255 220 160 / 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, var(--tri-bois-2), var(--tri-bois) 40%, var(--tri-bois-3));
  color: var(--texte);
}

/* En-tête */
.tri-entete {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  padding: 12px clamp(16px, 3vw, 34px);
  background: linear-gradient(180deg, #1a0f08, #23150c);
  border-bottom: 3px solid var(--tri-vermillon);
  box-shadow: 0 1px 0 var(--tri-filet), 0 10px 24px rgb(0 0 0 / 0.45);
}
.tri-marque { display: flex; align-items: center; gap: 12px; color: var(--texte); text-decoration: none; min-width: 0; }
.tri-marque:hover { color: var(--tri-or-pale); }
.tri-sceau {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  font: 1.7rem/1 'Yuji Syuku', 'Noto Serif JP', serif; color: #fff4e6;
  background: radial-gradient(circle at 35% 30%, var(--tri-vermillon-clair), var(--tri-vermillon) 60%, #8a2219);
  border-radius: 6px; box-shadow: inset 0 0 0 2px rgb(255 235 210 / 0.35), 0 3px 8px rgb(0 0 0 / 0.5);
  transform: rotate(-3deg);
}
.tri-logo { flex: none; height: 38px; width: auto; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.7)); }
.tri-nom { min-width: 0; }
.tri-nom b { display: block; font: 700 1.35rem/1.05 var(--titre); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tri-or-pale); }
.tri-nom small { display: block; font: 600 0.7rem/1.4 var(--titre); letter-spacing: 0.2em; text-transform: uppercase; color: var(--tri-or); }
.tri-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tri-bouton {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 3px;
  font: 600 0.88rem/1 var(--titre); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--texte); background: rgb(0 0 0 / 0.3); border: 1px solid var(--tri-filet); box-shadow: none; cursor: pointer;
}
.tri-bouton:hover { color: #1b110a; background: var(--tri-or); border-color: var(--tri-or); }
.tri-bouton-or { color: #1b110a; background: var(--tri-or); border-color: var(--tri-or); }
.tri-bouton-or:hover { background: var(--tri-or-pale); }
.tri-compte { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tri-qui { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--texte); text-decoration: none; }
.tri-qui:hover { color: var(--tri-or-pale); }
.tri-qui > span { min-width: 0; }
.tri-qui b { display: block; font: 600 0.92rem/1.1 var(--corps); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18ch; }
.tri-qui small { display: block; font-size: 0.72rem; color: var(--tri-or); }

/* Menu des pages */
.tri-menu {
  display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 10px clamp(16px, 3vw, 34px);
  background: rgb(10 6 3 / 0.45); border-bottom: 1px solid var(--tri-filet);
}
.tri-groupe { display: flex; align-items: center; gap: 6px 10px; min-width: 0; }
.tri-groupe-titre { flex: none; font: 700 0.72rem/1 var(--titre); letter-spacing: 0.18em; text-transform: uppercase; color: var(--tri-or); }
.tri-liens { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tri-onglet {
  padding: 6px 10px; border-radius: 3px; font: 500 0.92rem/1.2 var(--corps); color: var(--texte); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
}
.tri-onglet:hover { color: var(--tri-or-pale); border-color: var(--tri-filet); }
.tri-onglet[aria-current='page'] { color: #fff4e6; background: var(--tri-vermillon); border-color: var(--tri-vermillon-clair); }

/* Salle : la page juridique, sur ses feuilles de papier */
.tri-salle { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(20px, 4vh, 40px) clamp(16px, 3vw, 34px) 60px; outline: none; min-width: 0; }
.tri-salle .jur { min-width: 0; }
.tri-salle .jur h1 { color: var(--tri-or-pale); }
.tri-salle .jur .carte h1, .tri-salle .jur .noeud h1 { color: var(--j-encre); }
.tri-salle .message-page { margin-top: 4vh; }
.tri-pied { text-align: center; padding: 18px 16px 24px; font: 600 0.72rem/1.4 var(--titre); letter-spacing: 0.2em; text-transform: uppercase; color: rgb(217 178 95 / 0.6); border-top: 1px solid rgb(217 178 95 / 0.15); }

/* Registres de la Haruba */
.tri-registres .tri-onglets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tri-registres .tri-onglets .tri-onglet { border-color: var(--tri-filet, rgb(217 178 95 / 0.35)); background: rgb(0 0 0 / 0.3); }
.tri-registres .tri-onglets .tri-onglet[aria-current='page'] { background: #b8342a; border-color: #d64a3c; }
.tri-recherche { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.tri-recherche input { flex: 1 1 220px; min-width: 0; }
.tri-recherche .doux { flex-basis: 100%; margin: 0; }
.tri-registres td a { font-weight: 600; }
.tri-registres .tri-retour { display: inline-block; margin: 0 0 12px; color: var(--mur-clair); }

@media (max-width: 700px) {
  .tri-entete { padding: 10px 16px; }
  .tri-nom b { font-size: 1.1rem; letter-spacing: 0.08em; }
  .tri-nom small { font-size: 0.62rem; letter-spacing: 0.14em; }
  .tri-logo { display: none; }
  .tri-actions { width: 100%; }
  .tri-compte { margin-left: auto; }
  .tri-qui b { max-width: 12ch; }
  .tri-menu { flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 8px 16px; }
  .tri-groupe { max-width: 100%; }
  .tri-groupe-titre { min-width: 80px; }
  .tri-liens { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tri-liens::-webkit-scrollbar { display: none; }
  .tri-salle { padding: 18px 16px 48px; }
}
@media (max-width: 420px) {
  .tri-qui > span { display: none; }
  .tri-bouton { padding: 6px 10px; font-size: 0.8rem; }
}
.tri-pastille { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px;
  background: #b8342a; color: #fff4e6; font: 700 0.7rem/1 var(--corps); vertical-align: 1px; }
.tri-onglet[aria-current='page'] .tri-pastille { background: #fff4e6; color: #b8342a; }
.tri-salle .liste-appels { display: grid; gap: 12px; margin-bottom: 20px; }
.tri-salle .jur .jur-page > div > p { color: var(--texte-doux); }
