/* Pages de ville et de région (src/villes.php) : en-tête de ville et titres de partie dans la grille des boîtes.
   La teinte de la ville arrive par --vt (attribut style posé par le serveur). Thème clair d'abord ; les couleurs de
   fond et de texte suivent les variables du site. */
.vt { --vt: #2f6f94; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 6px 28px; align-items: center;
  margin: 8px 0 6px; padding: 14px 20px 14px; border: 1px solid var(--bord, #dfe5ea); border-top: 3px solid var(--vt);
  border-radius: 12px; background: var(--carte, #fff); }
@supports (background: color-mix(in srgb, red 5%, white)) {
  .vt { background: linear-gradient(180deg, color-mix(in srgb, var(--vt) 6%, var(--carte, #fff)) 0%, var(--carte, #fff) 70%); }
}
.vt-txt { min-width: 0; }
.vt-situ { margin: 0; color: var(--vt); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.vt-devise { margin: 4px 0 12px; color: var(--texte, #25313b); font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 23px; line-height: 1.25; }
.vt-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-nav a { display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 11px; border: 1px solid var(--bord, #dfe5ea);
  border-radius: 8px; background: var(--carte, #fff); color: var(--texte, #25313b); text-decoration: none; line-height: 1.3; }
.vt-nav a:hover, .vt-nav a:focus-visible { border-color: var(--vt); color: var(--vt); }
.vt-nav-t { font-size: 14.5px; font-weight: 600; }
.vt-nav-n { color: var(--texte-doux, #5a6a75); font-size: 12px; white-space: nowrap; }
.vt-aussi { margin: 10px 0 0; color: var(--texte-doux, #5a6a75); font-size: 13px; line-height: 1.6; }
.vt-aussi > span:first-child { margin-right: 4px; }
.vt-aussi a { color: var(--vt); text-decoration: none; white-space: nowrap; }
.vt-aussi a:hover { text-decoration: underline; }
.vt-motif { display: block; width: 100%; height: auto; max-height: 132px; color: var(--vt); opacity: .9; }

/* Titre de partie : pleine largeur dans la grille, avant la première boîte de la partie. */
.vt-partie { --vt: #2f6f94; grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; min-width: 0; margin: 16px 0 10px;
  padding: 0 2px 6px; border-bottom: 2px solid var(--vt); scroll-margin-top: 76px; }
.vt-partie:first-child { margin-top: 2px; }
.vt-partie h2 { margin: 0; color: var(--vt); font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 600; line-height: 1.2; }
.vt-partie-n { color: var(--texte-doux, #5a6a75); font-size: 12.5px; white-space: nowrap; }
.vt-haut { margin-left: auto; color: var(--texte-doux, #5a6a75); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.vt-haut:hover { color: var(--vt); text-decoration: underline; }
/* Grille tassée (interets.js : rangées de 2 px) : le titre occupe une hauteur fixe de 30 rangées. */
.it-grille.it-tasse > .vt-partie { box-sizing: border-box; height: 46px; margin: 14px 0 0; grid-row-end: span 30; align-self: start; }
.it-grille.it-tasse > .vt-partie:first-child { margin-top: 0; height: 46px; grid-row-end: span 24; }

.vt-dans { margin: 10px 0 0; color: var(--texte-doux, #5a6a75); font-size: 13px; line-height: 1.6; }
.vt-dans > span:first-child { margin-right: 4px; }
.vt-dans a { color: var(--vt); font-weight: 600; text-decoration: none; white-space: nowrap; }
.vt-dans a:hover { text-decoration: underline; }
.vt-dans + .vt-aussi { margin-top: 2px; }

/* Départements, arrondissements, villes et communes voisines d'un lieu : des cases denses, juste sous l'en-tête. */
.vt-lieux { --vt: #2f6f94; margin: 0 0 8px; }
.vt-groupe { margin: 10px 0 0; }
.vt-groupe-t { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; color: var(--vt);
  font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 600; line-height: 1.2; }
.vt-groupe-t span { color: var(--texte-doux, #5a6a75); font-family: inherit; font-size: 12.5px; font-weight: 400; }
.vt-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.vt-case { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 7px 10px 7px; border: 1px solid var(--bord, #dfe5ea);
  border-left: 3px solid var(--vt); border-radius: 8px; background: var(--carte, #fff); color: var(--texte, #25313b);
  text-decoration: none; line-height: 1.3; }
a.vt-case:hover, a.vt-case:focus-visible { border-color: var(--vt); box-shadow: 0 1px 4px rgba(20, 40, 60, .08); }
a.vt-case:hover .vt-case-nom, a.vt-case:focus-visible .vt-case-nom { color: var(--vt); }
.vt-case-nom { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.vt-case-num { margin-right: 6px; color: var(--vt); font-variant-numeric: tabular-nums; font-weight: 600; }
.vt-case-sous { overflow: hidden; color: var(--texte-doux, #5a6a75); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vt-case-n { color: var(--vt); font-size: 12px; white-space: nowrap; }
.vt-case-sans { border-left-color: var(--bord, #dfe5ea); background: transparent; color: var(--texte-doux, #5a6a75); }
.vt-case-sans .vt-case-nom { font-weight: 500; }
.vt-case-sans .vt-case-num { color: inherit; }

@media (max-width: 699px) {
  .vt { grid-template-columns: minmax(0, 1fr); padding: 10px 12px 12px; gap: 2px; }
  .vt-motif { order: -1; max-height: 74px; margin: 0 auto 2px; }
  .vt-devise { font-size: 18px; margin-bottom: 10px; }
  .vt-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
  .vt-nav a { flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 8px; min-width: 0; }
  .vt-nav-t { font-size: 14px; }
  .vt-nav-n { font-size: 11px; white-space: normal; }
  .vt-partie { gap: 8px; }
  .vt-partie h2 { font-size: 19px; }
  .vt-partie-n { font-size: 11.5px; }
  .vt-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .vt-case { padding: 6px 8px; }
  .vt-case-nom { font-size: 14px; }
  .vt-groupe-t { font-size: 17px; }
}
@media print { .vt-motif, .vt-haut { display: none; } }
