/* Pôle juridique : les pages du tribunal habillées aux couleurs du poste.
   Tout est limité à .jur : rien ne change pour le reste du site. */
.jur { --j-papier: var(--papier); --j-papier-2: var(--papier-2); --j-ligne: var(--papier-3); --j-encre: var(--encre); --j-doux: var(--encre-douce); --j-accent: var(--sceau); --j-bord: #b9a37a; }
.jur-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid rgb(233 207 139 / 0.25); }
.jur-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.jur-groupe-titre { font: 700 0.78rem/1 var(--titre); letter-spacing: 0.16em; text-transform: uppercase; color: var(--texte-doux); }
.jur .segments a.bouton { background: rgb(0 0 0 / 0.3); color: var(--texte); border: 1px solid rgb(233 207 139 / 0.3); box-shadow: none; text-decoration: none; }
.jur .segments a.bouton:hover { background: rgb(0 0 0 / 0.5); color: var(--lampe); }
.jur .segments a.bouton[aria-current='true'] { background: var(--mur); color: var(--encre); border-color: var(--mur); }
.jur h1 { color: var(--texte); text-shadow: 0 2px 6px rgb(0 0 0 / 0.6); }
.jur .etroit { max-width: 820px; margin-inline: auto; }
.jur .piece-registre { font: 700 0.78rem/1 var(--titre); letter-spacing: 0.18em; text-transform: uppercase; color: var(--sceau); margin: 0 0 8px; }
.jur .ligne-espace { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.jur .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jur > .jur-page > div > h2, .jur .jur-page h2.titre-section { color: var(--texte); text-shadow: 0 1px 4px rgb(0 0 0 / 0.6); margin: 26px 0 12px; }

/* Feuilles de papier : tout ce qui était une « carte » devient une feuille du poste */
.jur .carte, .jur .fiche, .jur .compteur-carte, .jur .noeud, .jur .branche, .jur .etapes > li, .jur .jour, .jur table, .jur .citation-bloc {
  position: relative; background: var(--j-papier); color: var(--j-encre); border-radius: var(--rayon); box-shadow: var(--ombre-papier);
  background-image: radial-gradient(circle at 20% 10%, rgb(255 255 255 / 0.35), transparent 40%), repeating-linear-gradient(0deg, rgb(120 90 40 / 0.025) 0 2px, transparent 2px 4px);
}
.jur .carte { padding: clamp(16px, 2.2vw, 22px); margin-bottom: 16px; }
.jur .carte > :last-child { margin-bottom: 0; }
.jur .carte h2, .jur .carte h3, .jur .noeud h3, .jur .branche h3, .jur .etapes h3 { color: var(--j-encre); }
.jur .carte a, .jur table a, .jur .noeud a, .jur .jour a { color: var(--sceau); }
.jur .carte a.bouton, .jur table a.bouton { color: var(--encre); }
.jur .carte a.bouton.danger { color: #fff; }
.jur .carte .doux, .jur .carte .aide, .jur table .doux, .jur .carte .vide { color: var(--j-doux); }
.jur .grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }
.jur .grille > .carte { margin-bottom: 0; }
.jur .champs-2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.jur fieldset.carte > legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; color: var(--j-encre); font: 700 1.05rem var(--titre); }
.jur fieldset.carte > legend + * { clear: both; }
.jur .compteurs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.jur .compteur-carte, .jur .fiche { padding: 12px 16px 14px; border-left: 4px solid var(--mur-ombre); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--j-doux); font-weight: 600; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.jur .compteur-carte strong, .jur .fiche strong { display: block; font: 700 2.3rem/1 var(--titre); color: var(--sceau); letter-spacing: 0; text-transform: none; margin-top: 6px; }
.jur .edit .signature { font: italic 1.1rem var(--titre); text-align: right; margin: 6px 0 18px; }
.jur .citation { font: italic 1.15rem/1.45 var(--titre); border: 0; border-left: 3px solid var(--sceau); padding: 4px 0 4px 18px; margin: 14px 0 6px; background: none; box-shadow: none; }
.jur .citation p { margin: 0; }
.jur .compteur { font-size: 0.9rem; text-align: right; color: var(--j-doux); }
.jur .compteur.insuffisant { color: var(--sceau); font-weight: 600; }
.jur .recit { white-space: pre-wrap; overflow-wrap: anywhere; }
.jur .meta { display: grid; gap: 4px 16px; grid-template-columns: max-content 1fr; margin: 0; }
.jur .meta dt { font-weight: 700; color: var(--j-doux); }
.jur .meta dd { margin: 0; overflow-wrap: anywhere; }
.jur .entete-dossier { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.jur .entete-dossier h1 { margin: 0; font-size: clamp(1.25rem, 3.5vw, 1.8rem); overflow-wrap: anywhere; }
.jur .liste-simple { list-style: none; padding: 0; margin: 0; }
.jur .liste-simple > li { padding: 10px 0; border-bottom: 1px solid var(--j-ligne); }
.jur .liste-simple > li:last-child { border-bottom: 0; }
.jur .version-info { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.jur .lien-article { font-weight: 700; text-decoration: none; white-space: nowrap; }
.jur .alerte-boite, .jur .info-boite { background: var(--j-papier-2); color: var(--j-encre); padding: 10px 14px; border-radius: 0 var(--rayon) var(--rayon) 0; margin: 10px 0; border-left: 5px solid var(--sceau); }
.jur .info-boite { border-left-color: var(--mur-ombre); }
.jur .erreur-champ { color: var(--sceau); font-size: 0.92rem; font-weight: 600; }

/* Notes, pièces, audiences */
.jur .note { border-left: 4px solid #b9a37a; padding: 8px 12px; margin-bottom: 10px; background: var(--j-papier-2); border-radius: 0 var(--rayon) var(--rayon) 0; color: var(--j-encre); }
.jur .note.enquete { border-color: var(--olive); }
.jur .note.defense { border-color: #1f2a44; }
.jur .note.interne { border-color: var(--mur-ombre); }
.jur .note p { white-space: pre-wrap; margin: 4px 0 0; overflow-wrap: anywhere; }
.jur .pieces { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.jur .piece img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--rayon); border: 1px solid var(--j-bord); }
.jur .piece figcaption { font-size: 0.88rem; overflow-wrap: anywhere; }
.jur .semaine { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 14px 0 20px; }
.jur .jour .vide { color: var(--j-doux); font-style: italic; }
.jur .jour { padding: 10px; min-height: 120px; }
.jur .jour.aujourdhui { box-shadow: var(--ombre-papier), inset 0 0 0 2px var(--sceau); }
.jur .jour h2 { color: var(--j-encre); font-size: 1.05rem; }
.jur .audience { background: var(--j-papier-2); color: var(--j-encre); border-left: 4px solid var(--sceau); border-radius: 0 var(--rayon) var(--rayon) 0; padding: 6px 8px; margin-bottom: 8px; font-size: 0.92rem; }
.jur .progression { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.jur .progression li { flex: 1 1 0; min-width: 34px; text-align: center; font-size: 0.8rem; padding: 6px 2px; border-bottom: 4px solid rgb(255 255 255 / 0.15); color: var(--texte-doux); }
.jur .progression li.fait { border-color: var(--mur); color: var(--texte); }
.jur .progression li.actif { border-color: var(--sceau-clair); color: var(--texte); font-weight: 700; }
.jur .suggestions { list-style: none; margin: 4px 0 0; padding: 4px; background: var(--papier-2); color: var(--encre); border: 1px solid var(--j-bord); border-radius: var(--rayon); box-shadow: var(--ombre-papier); }
.jur .suggestions button { width: 100%; justify-content: flex-start; background: transparent; color: var(--encre); border: 0; font-weight: 400; box-shadow: none; }
.jur .suggestions button:hover { background: var(--papier-3); }
.jur .liste-articles { list-style: none; padding: 0; margin: 0; }
.jur .liste-articles li { border-bottom: 1px solid var(--j-ligne); }
.jur .liste-articles label { display: flex; gap: 10px; padding: 10px 6px; cursor: pointer; align-items: flex-start; }
.jur .liste-articles input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--sceau); }
.jur .liste-articles .peine { font-size: 0.9rem; color: var(--j-doux); }
.jur .calc { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.jur .calc-total { position: sticky; top: 8px; }
.jur .total-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--j-bord); }
.jur .total-ligne strong { font-size: 1.15rem; }
.jur .filtres { display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr; align-items: end; }

/* Organigramme et déroulement */
.jur .arbre { display: flex; flex-direction: column; align-items: center; }
.jur .noeud { padding: 14px 22px; text-align: center; min-width: 240px; border-top: 4px solid var(--couleur, var(--mur-ombre)); }
.jur .noeud .fonction { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--j-doux); font-weight: 700; margin: 0 0 6px; }
.jur .noeud ul, .jur .rang-groupe ul { list-style: none; margin: 0; padding: 0; font: 600 1.15rem var(--titre); }
.jur .branches { position: relative; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; padding-top: 28px; }
.jur .branches::before { content: ''; position: absolute; top: 0; left: 12.5%; right: 12.5%; height: 2px; background: var(--mur-clair); opacity: 0.7; }
.jur .branche { position: relative; padding: 16px 18px; border-top: 4px solid var(--couleur, var(--mur-ombre)); }
.jur .branche::before { content: ''; position: absolute; top: -32px; left: 50%; width: 2px; height: 28px; background: var(--mur-clair); opacity: 0.7; }
.jur .branche .effectif { float: right; font: 700 1.4rem/1 var(--titre); color: var(--sceau); }
.jur .rang-groupe { margin-top: 12px; }
.jur .rang-groupe h4 { font: 700 0.72rem var(--corps); letter-spacing: 0.16em; text-transform: uppercase; color: var(--j-doux); margin: 0 0 4px; }
.jur .rang-groupe li { padding: 3px 0; border-bottom: 1px dotted var(--j-bord); }
.jur .rang-groupe li:last-child { border-bottom: 0; }
.jur .vacant { color: var(--j-doux); font-style: italic; margin: 4px 0 0; font-size: 0.92rem; }
.jur .etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.jur .etapes > li { counter-increment: etape; padding: 16px 16px 16px 70px; }
.jur .etapes > li::before { content: counter(etape); position: absolute; left: 16px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--sceau); color: var(--sceau); font: 700 1.3rem var(--titre); display: flex; align-items: center; justify-content: center; }

/* Tableaux et pastilles */
.jur table { width: 100%; border-collapse: collapse; overflow: hidden; }
.jur th, .jur td { text-align: left; padding: 10px 12px; vertical-align: top; }
.jur thead th { background: var(--encre); color: var(--papier); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.jur tbody tr:nth-child(even) { background: rgb(255 255 255 / 0.3); }
.jur tbody tr + tr { border-top: 1px solid var(--j-ligne); }
.jur .titre-1 thead th { background: var(--olive-fonce); }
.jur .titre-2 thead th { background: #7a5a1e; }
.jur .titre-3 thead th { background: #8e1f1a; }
.jur td.num, .jur th.num { white-space: nowrap; }
.jur tr.cible { outline: 3px solid var(--mur-ombre); outline-offset: -3px; }
.jur .badge { color: #fff; background: #5b5249; }
.jur .badge.role-kazekage { background: var(--mur-ombre); color: var(--encre); }
.jur .badge.role-gerant { background: var(--sceau); }
.jur .badge.role-juge { background: var(--encre); }
.jur .badge.role-avocat { background: #1f2a44; }
.jur .badge.role-enqueteur { background: var(--olive-fonce); }
.jur .badge.role-greffier { background: #7a5a1e; }
.jur .badge.role-ninja, .jur .badge.rang, .jur .badge.statut-archive { background: transparent; color: var(--j-encre); border: 1px solid var(--j-bord); }
.jur .badge.rang { border-style: dashed; }
.jur .badge.statut-deposee { background: #1f2a44; }
.jur .badge.statut-recevable { background: var(--olive-fonce); }
.jur .badge.statut-en_enquete { background: #7a5a1e; }
.jur .badge.statut-audience_planifiee { background: var(--encre); }
.jur .badge.statut-verdict_en_attente_kazekage { background: var(--mur-ombre); color: var(--encre); }
.jur .badge.statut-verdict_rendu, .jur .badge.alerte, .jur .badge.titre-3 { background: var(--sceau); }
.jur .badge.statut-irrecevable, .jur .badge.statut-classe_sans_suite { background: #5b5249; }
.jur .badge.attention { background: var(--mur-ombre); color: var(--encre); }
.jur .badge.titre-1 { background: var(--olive-fonce); }
.jur .badge.titre-2 { background: #7a5a1e; }

@media (max-width: 900px) {
  .jur .calc { grid-template-columns: 1fr; }
  .jur .calc-total { position: sticky; bottom: 0; top: auto; z-index: 5; }
  .jur .semaine { grid-template-columns: 1fr; }
  .jur .branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jur .filtres { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .jur .branches { grid-template-columns: 1fr; padding-top: 0; }
  .jur .branches::before, .jur .branche::before { display: none; }
  .jur .noeud { min-width: 0; width: 100%; }
}

/* Passerelle de la Haruba : suivi du dossier juridique sur une plainte ou une fiche */
.suivi-juridique { border-left: 3px solid var(--sceau); padding: 4px 0 4px 10px; margin: 12px 0; color: var(--encre); font-size: 0.95rem; overflow-wrap: anywhere; }

/* Bouton d'accès au pôle depuis la plaque du poste */
.bouton-juridique { white-space: nowrap; color: var(--texte); border-color: rgb(233 207 139 / 0.5); text-decoration: none; }
.bouton-juridique:hover { color: var(--encre); }
.jur .carte h1, .jur .noeud h1 { color: var(--j-encre); text-shadow: none; }
.jur .branche .doux, .jur .noeud .doux, .jur .jour .doux, .jur .etapes .doux, .jur .fiche .doux { color: var(--j-doux); }

/* Mobile : chaque groupe du menu du tribunal tient sur une ligne qui défile */
@media (max-width: 700px) {
  .jur-nav { gap: 6px; flex-direction: column; }
  .jur-groupe { flex-wrap: nowrap; }
  .jur-groupe .segments { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .jur-groupe .segments::-webkit-scrollbar { display: none; }
  .jur-groupe .segments .bouton { white-space: nowrap; flex: none; }
  .jur-groupe-titre { min-width: 78px; }
}

/* Tableaux : en cartes sur petit écran seulement */
@media (max-width: 720px) {
  .jur table.adaptatif, .jur table.adaptatif tbody, .jur table.adaptatif tr, .jur table.adaptatif td { display: block; width: 100%; }
  .jur table.adaptatif thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .jur table.adaptatif { background: transparent; box-shadow: none; }
  .jur table.adaptatif tr { background: var(--j-papier); border-radius: var(--rayon); margin-bottom: 10px; padding: 6px 0; box-shadow: var(--ombre-papier); }
  .jur table.adaptatif td { padding: 4px 14px; }
  .jur table.adaptatif td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--j-doux); }
}
@media (max-width: 640px) { .jur .progression li .lib { display: none; } }
@media (max-width: 560px) { .jur .meta { grid-template-columns: 1fr; } .jur .meta dd { margin-bottom: 6px; } }

/* Aération générale des pages du tribunal */
.jur .carte { padding: 20px 22px 22px; margin-bottom: 20px; }
.jur .carte h2 { margin-bottom: 14px; }
.jur .carte .actions { margin-top: 14px; }
.jur .champs-2 { gap: 2px 20px; }
.jur .compteurs { gap: 16px; margin: 18px 0 26px; }
.jur .jur-page > div > h1 + p, .jur .etroit > h1 + p { margin-bottom: 18px; color: var(--texte-doux); }
.jur .liste-simple > li { padding: 12px 0; }
.jur .audience { padding: 8px 10px; }
.jur .jour { padding: 12px; }
.jur table th, .jur table td { padding: 11px 14px; }
@media (max-width: 640px) { .jur .carte { padding: 16px; } }

/* Appels à avocat (027) */
.liste-appels { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 18px; }
.carte-appel { background: var(--papier); color: var(--encre); border-radius: 8px; padding: 14px 16px; box-shadow: var(--ombre-papier); border-left: 4px solid var(--bois-clair); }
.carte-appel.ouvert { border-left-color: var(--sceau); }
.carte-appel header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.carte-appel p { margin: 0 0 6px; }
.carte-appel .doux { color: var(--encre-douce); }
