/* Vue « Liens » (décision 0028) : le graphe à gauche, la fiche choisie à droite (dessous sur
   téléphone). Mêmes couleurs de catégories que la frise ; curseur du temps de la carte. */
/* Curseur du temps : mêmes classes et même allure que celui de la carte (carte.css, CA5), repris
   ici parce que la feuille de la carte stylise aussi des pastilles de légende. */
.liens-reglages .carte-frise { flex: 1 1 18rem; display: flex; align-items: center; gap: .7rem; min-width: 0; }
.carte-frise label { font-size: .85rem; color: var(--discret); }
.carte-annee { font: 600 1rem var(--chiffres); color: var(--or); }
.carte-frise label { white-space: nowrap; font-size: .9rem; color: var(--texte); font-weight: 600; }
.carte-curseur { width: 100%; accent-color: var(--or-vif); min-height: 32px; margin: 0; }
/* Barre des réglages : une seule ligne (54 px) sur ordinateur, qui passe à la ligne sur téléphone. */
.liens-barre { display: flex !important; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; min-height: 54px;
  padding: .35rem .8rem; border: 1px solid var(--ligne); border-radius: 12px; background: var(--carte); }
.liens-barre .segments { padding: 2px !important; gap: 2px !important; flex-wrap: nowrap; }
.liens-barre .segments span { padding: .3rem .65rem; font-size: .82rem; white-space: nowrap; }
.liens-niveaux[hidden] { display: none; }
.liens-regle { position: relative; flex: 1 1 auto; min-width: 8rem; padding-bottom: 1.1rem; }
.liens-regle .carte-curseur { min-height: 22px; display: block; }
.liens-regle .carte-reperes { position: absolute; inset-inline: .5rem; bottom: 0; height: 1rem; margin: 0; }
.liens-barre .carte-lecture button { min-height: 32px; }
.carte-reperes { list-style: none; padding: 0;
  font: .72rem var(--chiffres); color: var(--discret); }
.carte-reperes li { position: absolute; inset-inline-start: var(--pos); transform: translateX(-50%); white-space: nowrap; }
[dir="rtl"] .carte-reperes li { transform: translateX(50%); }
.carte-lecture { display: flex; gap: .4rem; align-items: center; }
.carte-lecture[hidden] { display: none; }
.carte-lecture button { font: .85rem var(--chiffres); min-width: 44px; min-height: 36px; padding: .3rem .6rem;
  border: 1px solid var(--ligne); border-radius: 999px; background: var(--carte); color: inherit; cursor: pointer; }
.carte-lecture button[aria-pressed="true"] { border-color: var(--or-vif); }
.liens-scene { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--ligne);
  border-radius: 12px; overflow: hidden; margin-top: 1rem; background: var(--carte); }
@media (min-width: 64rem) { .liens-scene { grid-template-columns: minmax(0, 1fr) 22rem; } }
.liens-toile { position: relative; min-width: 0; min-height: 62vh; background-color: var(--fond);
  background-image: radial-gradient(var(--point) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.liens-dessin { display: block; width: 100%; height: 62vh; min-height: 360px; touch-action: none; cursor: grab; user-select: none; }
.liens-dessin:active { cursor: grabbing; }
.liens-dessin[hidden] { display: none; }
/* Sigma.js dessine en WebGL dans ses propres canevas ; par-dessus, le voile porte les ondes des
   fiches qui apparaissent, l'anneau du centre et les « +3 » des bulles repliées (décision 0032). */
.liens-voile { position: absolute; inset: 0 0 auto 0; width: 100%; height: 62vh; min-height: 360px; pointer-events: none; }
.liens-sans-webgl { position: absolute; inset: auto 1rem 1rem; margin: 0; color: var(--discret); font-size: .9rem; }
.liens-toile.dessine .liens-sans-webgl { display: none; }
.liens-3d { cursor: grab; display: grid; place-items: center; color: var(--discret); font-size: .9rem; }
/* Mêmes jetons que l'infobulle commune (décision 0145) ; la bulle du moteur 3D n'est qu'un cadre vide. */
.liens-3d .scene-tooltip { background: none !important; padding: 0 !important; }
.liens-infobulle { font: 600 .82rem/1.4 var(--corps); color: var(--bulle-texte); background: var(--bulle-fond);
  border-radius: 9px; padding: .32rem .65rem; box-shadow: var(--bulle-ombre); }
.liens-vide { padding: 2rem 1rem; color: var(--discret); }

.liens-haut { position: absolute; top: .6rem; inset-inline-end: .6rem; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; max-width: 70%; }
.liens-compte { margin: 0; font: .75rem var(--chiffres);
  color: var(--discret); background: var(--carte); border: 1px solid var(--ligne); border-radius: 99px; padding: .15rem .6rem; }
.liens-commandes { position: absolute; bottom: .7rem; inset-inline-start: .7rem; display: grid; gap: .35rem; }
.liens-commandes[hidden] { display: none; }
.liens-commandes button { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--ligne);
  background: var(--carte); color: var(--texte); font-size: 1.05rem; cursor: pointer; display: grid; place-items: center; }
.liens-commandes svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.liens-commandes button:focus-visible { outline: 2px solid var(--or-vif); outline-offset: 2px; }
.liens-commandes button:hover { border-color: var(--or-vif); }
.liens-commandes .liens-bouton-3d { font: 600 .78rem var(--chiffres); }
.liens-commandes .liens-bouton-3d[aria-pressed="true"] { border-color: var(--or-vif); color: var(--or); }

.liens-panneau { border-top: 1px solid var(--ligne); max-height: none; overflow-y: auto; }
@media (min-width: 64rem) { .liens-panneau { max-height: calc(62vh + 2px); } }
.liens-panneau .pastille { flex: none; }
.liens-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.bouton-secondaire { font-weight: 600; font-size: .9rem; padding: .45rem .9rem; border: 1px solid var(--ligne);
  border-radius: 10px; text-decoration: none; background: var(--fond); }
.liens-voisins { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.liens-voisins button { display: grid; grid-template-columns: auto 1fr auto; gap: 0 .4rem; align-items: center;
  width: 100%; text-align: start; font: inherit; font-size: .88rem; background: none; border: 0; border-radius: 8px;
  padding: .3rem .4rem; color: inherit; cursor: pointer; }
.liens-voisins button:hover { background: var(--panneau); }
.liens-voisins small { grid-column: 1 / -1; color: var(--or); font-style: italic; font-size: .76rem; }
.liens-voisins i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--c, var(--discret)); }
.liens-voisins bdi { font: .75rem var(--chiffres); color: var(--discret); }
.liens-voisins .cache span::after { content: " +"; color: var(--or); }
.liens-texte { margin-top: 1rem; font-size: .9rem; }
.liens-texte ul { columns: 2 22rem; padding-inline-start: 1.1rem; }
.liens-texte em { color: var(--or); }


/* Légende repliable des types de liens, en bas à droite : chaque famille se masque. Les teintes
   viennent des couleurs de catégories du site (`--c`), le style de trait distingue les familles
   (aussi pour qui ne voit pas les couleurs). */
.liens-legende { position: absolute; bottom: .7rem; inset-inline-end: .7rem; max-width: 15rem; background: var(--carte);
  border: 1px solid var(--ligne); border-radius: 10px; padding: .4rem .6rem; font-size: .78rem; }
.liens-legende summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
.liens-legende ul { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .2rem; }
.liens-legende label { display: flex; align-items: center; gap: .45rem; cursor: pointer; }
.liens-legende input { margin: 0; accent-color: var(--or-vif); }
.liens-legende svg { width: 34px; height: 8px; flex: none; stroke: var(--c); stroke-width: 2.2; }
.liens-legende .trait-savoir line { stroke-dasharray: 6 3; }
.liens-legende .trait-oeuvre line { stroke-dasharray: 1.5 3; stroke-linecap: round; }
.liens-legende .trait-evenement line { stroke-dasharray: 10 3 2 3; }
.liens-legende li:has(input:not(:checked)) span { opacity: .45; text-decoration: line-through; }

/* Volet de droite : dates sans coupure, état « centre actuel » discret, action principale visible. */
.sans-coupure { white-space: nowrap; }
.liens-etat { margin: .25rem 0; min-height: 0; }
.liens-centre-actuel { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--or);
  border: 1px dashed var(--or-vif); border-radius: 99px; padding: .05rem .55rem; }
.liens-centre-actuel[hidden] { display: none; }
.liens-actions { align-items: center; gap: .4rem .8rem; }
.liens-actions .bouton-principal { background: var(--encre); color: var(--encre-texte); text-decoration: none; }
.liens-nb { font-size: .78rem; color: var(--discret); }
.liens-traits { position: absolute; inset: 0 0 auto 0; width: 100%; height: 62vh; min-height: 360px; pointer-events: none; }
.liens-dessin { position: relative; z-index: 1; }
.liens-commandes, .liens-legende { z-index: 4; }
.liens-voile { z-index: 2; }
.liens-panneau .fiche-date small { display: block; margin: .1rem 0 0; font-size: .85rem; white-space: nowrap; }
.liens-legende summary { white-space: nowrap; }
.liens-legende summary b { font-weight: 600; color: var(--discret); }
.liens-voile { pointer-events: none; }
.liens-autres { font: 600 .75rem var(--chiffres); color: var(--encre-texte); background: var(--or-vif); border: 0;
  border-radius: 99px; padding: .15rem .65rem; cursor: pointer; white-space: nowrap; }
.liens-autres[hidden] { display: none; }
.liens-autres:focus-visible { outline: 2px solid var(--texte); outline-offset: 2px; }
