/* Page d'un lieu : en-tête d'atlas (territoire.css), graphique de population sur toute la largeur
   du cadre, fiches liées rangées par sorte. Couleurs et polices de chrono.css (clair et sombre). */
.page-territoire .carte-lieu { margin: 0; }
.page-territoire .carte-lieu svg { aspect-ratio: auto; block-size: 320px; }
.cl-centre { fill: var(--texte); stroke: var(--carte); stroke-width: .1; }

.population { grid-template-columns: minmax(0, 1fr); }
.population > *, .groupe-population, .graphique-population { min-width: 0; }
.pop-cadre { overflow-x: auto; direction: ltr; }
.graphique-population > .pop-cadre > svg { display: block; width: 100%; min-width: 560px; height: auto; max-height: none; }
.marque-pop rect.zone-survol { fill: transparent; stroke: none; }
.marque-pop:hover line, .marque-pop:focus-within line { stroke-width: 4.5; }

.groupes-fiches { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.4rem 2rem; }
.groupes-fiches li { align-items: baseline; }
.nb-fiches { margin-inline-start: .3rem; padding: 0 .4rem; border-radius: 99px; background: var(--panneau);
  color: var(--discret); font: 600 .72rem/1.5 var(--chiffres); letter-spacing: 0; }

@media (max-width: 40rem) {
  .page-territoire .carte-lieu svg { block-size: 220px; }
}

/* Enrichissements : capitale, compteurs, villes voisines, savoirs, rôles, frise, diffusions. */
.lieu-capitale, .lieu-savoirs { margin: 0 0 1rem; font-size: .88rem; color: var(--discret); }
.lc-titre { font: 700 .72rem/1.3 var(--corps); letter-spacing: .08em; text-transform: uppercase; color: var(--or); margin-inline-end: .4rem; }
[dir="rtl"] .lc-titre { letter-spacing: 0; font-size: .82rem; }
.lieu-capitale a { color: var(--texte); font-weight: 600; }
.atlas-tete .compteurs { margin-bottom: 1rem; }
.lieu-voisines { margin: .5rem 0 0; font-size: .82rem; color: var(--discret); }
.lieu-voisines a { color: var(--texte); }
.lieu-savoirs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.puce-savoir { padding: .15rem .6rem; border-radius: 99px; border: 1px solid var(--ligne); background: var(--fond); color: var(--texte); font-size: .8rem; }
.puce-savoir b { font-family: var(--chiffres); color: var(--or); font-weight: 600; margin-inline-start: .2rem; }
.role-lieu { display: inline-block; margin-inline-start: .3rem; padding: 0 .4rem; border-radius: 6px; font-size: .7rem; font-weight: 600;
  background: color-mix(in srgb, var(--or-vif) 16%, transparent); color: var(--or); vertical-align: .1em; }
.role-lieu.role-mort { background: var(--panneau); color: var(--discret); }

.frise-lieu-cadre { overflow-x: auto; direction: ltr; }
.frise-lieu { display: block; width: 100%; min-width: 680px; height: auto; }
.frise-lieu text { direction: ltr; }
.fl-grille { stroke: var(--ligne); stroke-width: 1; }
.fl-separe { stroke: var(--ligne); stroke-width: 1; stroke-dasharray: 2 3; }
.fl-axe { fill: var(--discret); font: 11px var(--chiffres); }
.fl-piste { fill: var(--or); font: 700 10.5px var(--corps); letter-spacing: .06em; text-transform: uppercase; }
.fl-etat rect { stroke: var(--carte); stroke-width: 1; }
.fl-etat-0 rect { fill: color-mix(in srgb, var(--or-vif) 38%, var(--carte)); }
.fl-etat-1 rect { fill: color-mix(in srgb, var(--or-vif) 20%, var(--carte)); }
.fl-etat text { fill: var(--texte); font: 600 11px var(--corps); pointer-events: none; }
.fl-etat:hover rect, .fl-etat:focus-visible rect { fill: var(--or-vif); }
.fl-point circle { fill: var(--or-vif); fill-opacity: .8; stroke: var(--carte); stroke-width: 1.2; }
.fl-point line { stroke: var(--or-vif); stroke-opacity: .45; stroke-width: 3; stroke-linecap: round; }
.fl-personnes circle { fill: var(--texte); fill-opacity: .7; }
.fl-personnes line { stroke: var(--texte); stroke-opacity: .25; }
.fl-point:hover circle, .fl-point:focus-visible circle { fill-opacity: 1; r: 6.5; }

.liste-diffusions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0 2rem; }
.liste-diffusions li { display: flex; align-items: baseline; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--ligne); }
.liste-diffusions .ap-date { min-width: 3.2rem; text-align: start; }
.liste-diffusions a { font-weight: 600; }

/* Maquette 31 (audit AS) : titre et boutons, colonne des fiches, carte de situation à droite. */
.lieu-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem var(--marge-page); }
.lieu-tete .lt-texte { min-width: 0; }
.lieu-tete h1 { margin: .3rem 0 .4rem; font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.15 var(--titre); }
.lieu-situation { margin: 0 0 .6rem; color: var(--discret); }
.lieu-situation .petit { font-size: .85rem; }
.lieu-grille { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.4rem; align-items: start; }
.lieu-grille.sans-carte { grid-template-columns: minmax(0, 1fr); }
.lg-gauche { display: grid; gap: 1.4rem; min-width: 0; }
.lg-carte { min-width: 0; position: sticky; inset-block-start: 1rem; }
.lg-carte .carte-lieu svg { block-size: 360px; }
.nb-fiches { font-weight: 600; }
.bt-tete h2 .nb-fiches { margin-inline-start: .5rem; }

.table-passe { inline-size: 100%; border-collapse: collapse; }
.table-passe td { padding: .55rem .6rem; border-bottom: 1px solid var(--ligne); vertical-align: baseline; }
.table-passe .ap-date { inline-size: 11rem; white-space: nowrap; font-family: var(--chiffres); color: var(--or); }
.table-passe tr.fort td { background: var(--panneau); }
.table-passe tr.fort td:first-child { border-inline-start: 4px solid var(--or-vif); }
.table-passe a { color: var(--texte); text-decoration: none; }
.table-passe a:hover b { text-decoration: underline; }
.discret { color: var(--discret); }

.bande-tenait { position: relative; block-size: 2.4rem; background: var(--panneau); border-radius: 8px; overflow: hidden; }
.bande-tenait .seg { position: absolute; inset-block: 0; min-inline-size: 3px; overflow: hidden; display: flex; align-items: center;
  padding-inline: .5rem; color: var(--texte); text-decoration: none; font: 600 .78rem/1.1 var(--corps); white-space: nowrap;
  border-inline-end: 2px solid var(--carte); }
.bande-tenait .seg-0 { background: color-mix(in srgb, var(--or-vif) 38%, var(--carte)); }
.bande-tenait .seg-1 { background: color-mix(in srgb, var(--or-vif) 20%, var(--carte)); }
.bande-tenait .seg:hover, .bande-tenait .seg:focus-visible { background: var(--or-vif); color: var(--encre); }
.bande-tenait .seg span { overflow: hidden; text-overflow: ellipsis; }
.bande-tenait small { font-weight: 400; color: var(--discret); margin-inline-start: .3rem; }
.lieu-tenait .note { margin: .5rem 0 0; }
.lieu-vides { margin: 0; padding: .6rem .9rem; border: 1px dashed var(--ligne); border-radius: 10px; color: var(--discret); font-size: .88rem; }

@media (max-width: 64rem) {
  .lieu-grille { grid-template-columns: minmax(0, 1fr); }
  .lg-carte { position: static; }
}
