/* ---------- Velia mini tiles (tiles.py / tiles.js), shared by the Ville pages and the Actus page ----------
   Square tiles of the same size, frame, radius, paper and ink line: wireframe map, weather (flips to 3 days),
   grèves (hidden unless a strike is found). The context sets --tile and --tgap. */
.tiles{display:flex;gap:var(--tgap,8px);flex:none}
.tile,.tile-slot{box-sizing:border-box;width:var(--tile,72px);height:var(--tile,72px);flex:none}
.tile{position:relative;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--mute);transition:border-color .2s}
.tile[hidden]{display:none}
.inset{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:2px;padding:6px 6px 4px}
.inset:hover{border-color:var(--ink);color:var(--ink)}
.inset svg{width:100%;flex:1 1 0;min-height:0;display:block}
.inset path{fill:none;stroke:var(--ink);vector-effect:non-scaling-stroke;stroke-linejoin:round}
.inset .c{stroke-width:.9}.inset .b{stroke-width:.6;stroke-dasharray:2 2;opacity:.3}
.inset .o{fill:var(--ink);opacity:.25}.inset .p{fill:var(--acc)}.inset .h{fill:var(--acc);opacity:.2}
.inset .mono{font-size:11px}
.tile:focus-visible,.wx-face:focus-visible,.wx-x:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ---------- weather tile (data/weather.json, same origin; Open-Meteo CC BY 4.0) ---------- */
.wx{container-type:size;opacity:0;transition:opacity .4s var(--ease);perspective:600px}
.wx.in{opacity:1}
.wx:hover,.wx.flip{border-color:rgba(42,26,18,.35)}
.wx-face{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:7cqw 7cqw 4px;border-radius:7px;background:var(--surface);color:var(--ink);backface-visibility:hidden;-webkit-backface-visibility:hidden;transition:transform .55s var(--io),visibility 0s .28s}
.wx-front{width:100%;border:0;margin:0;font:inherit;text-align:left;cursor:pointer}
.wx-back{transform:rotateY(180deg);visibility:hidden}
.wx.flip .wx-front{transform:rotateY(-180deg);visibility:hidden}
.wx.flip .wx-back{transform:rotateY(0);visibility:visible}
.wx-top{display:flex;align-items:flex-start;justify-content:space-between;gap:2px}
.wx-top .wx-i{width:36cqw;height:36cqw;flex:none;margin:-2cqw 0 0 -2cqw}
.wx-t{font-family:var(--serif);font-size:min(28cqw,32px);line-height:1;letter-spacing:-.03em}
.wx-l{font-size:max(11px,10.5cqw);line-height:1.15;color:var(--ink-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wx-cap{display:flex;align-items:baseline;justify-content:space-between;gap:4px;font-family:var(--mono);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--mute);white-space:nowrap}
.wx-mm{letter-spacing:0;text-transform:none;color:var(--ink-2)}
.wx-i{fill:none;stroke:currentColor;stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.wx-i .sun{stroke:var(--acc)}
.wx-back ol{list-style:none;display:flex;flex-direction:column;gap:max(1px,1.5cqh)}
.wx-back li{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:max(2px,3cqw);font-family:var(--mono);font-size:max(11px,8.6cqw);line-height:1.2;color:var(--ink-2);white-space:nowrap}
.wx-back li .d{text-transform:uppercase;letter-spacing:0;color:var(--mute);min-width:2.2em}
.wx-back li .wx-i{width:max(12px,13cqw);height:max(12px,13cqw)}
.wx-back li b{font-weight:500;text-align:right;color:var(--ink)}
.wx-bh{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.wx-bf{display:flex;align-items:center;justify-content:space-between;gap:2px;font-size:max(11px,7.6cqw);line-height:1}
.wx-bf a{min-width:0;overflow:hidden;text-overflow:clip;color:var(--mute);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.wx-x{display:grid;place-items:center;flex:none;width:max(14px,15cqw);height:max(14px,15cqw);margin:0 -2px 0 0;border:0;border-radius:4px;background:transparent;color:var(--ink-2);cursor:pointer;padding:0}
.wx-x svg{width:max(7px,8cqw);height:max(7px,8cqw);fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
@container (max-width:100px){.wx-cap .wx-k,.wx-bh,.wx-back .dg{display:none}.wx-cap{justify-content:flex-start}}
/* mini tiles (Actus banners): temperature + min/max only, 3 days without icons */
@container (max-width:66px){.wx-bf a,.wx-back li .wx-i{display:none}.wx-face{padding:5px 5px 3px}.wx-back li{grid-template-columns:auto 1fr;letter-spacing:-.04em}.wx-bf{justify-content:flex-end}.wx-back ol{gap:0}.wx-top .wx-i{display:none}}
/* room for the description + min/max: below these tile heights the 2-line label and the min/max row would overlap,
   so the min/max row (also on the back) gives way; the label (the useful words) stays. 11 px floor everywhere. */
@container (max-height:69px){.wx-front .wx-cap{display:none}}
@media (prefers-reduced-motion:reduce){.wx-face{transform:none!important}.wx-back{opacity:0}.wx.flip .wx-back{opacity:1}.wx.flip .wx-front{opacity:0}.wx,.tile{transition:none}}

/* ---------- grèves tile (data/daily-brief.json, theme 'greves'): red = en cours, orange = annoncée ----------
   The asterisk is decorative (aria-hidden); the status is always written. Text colours >= 4.5:1 on the paper. */
.gv{container-type:size;display:block;color:var(--ink);text-decoration:none;--gv:#b3261e;--gv-ink:#a3221b;line-height:1.1}
.gv-in{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:7cqw 7cqw 5cqw;border-radius:7px}
.gv.next{--gv:#c97a12;--gv-ink:#8a5200}
.gv:hover{border-color:var(--gv)}
.gv-r1,.gv-r2{display:flex;align-items:flex-start;justify-content:space-between;gap:2px}
.gv-a{width:max(12px,22cqw);height:max(12px,22cqw);flex:none;fill:none;stroke:var(--gv);stroke-width:2.2;stroke-linecap:round}
.gv-d,.gv-n{font-family:var(--mono);font-size:max(11px,9.5cqw);letter-spacing:0;color:var(--gv-ink);white-space:nowrap}
.gv-n{color:var(--ink-2)}
.gv-t{font-family:var(--serif);font-size:min(22cqw,26px);letter-spacing:-.02em;line-height:1}
.gv-s{font-size:max(11px,10.5cqw);font-weight:600;color:var(--gv-ink);white-space:nowrap}
.gv-c{font-family:var(--mono);font-size:max(11px,8.6cqw);line-height:1.15;color:var(--ink-2);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.gv-c .s,.gv-c .xs,.gv-dm{display:none}
@container (max-width:88px){.gv-c.be .l{display:none}.gv-c.be .s{display:inline}}
@container (max-width:66px){.has-d .gv-r1 .gv-d,.has-d .gv-c{display:none}.has-d .gv-dm{display:block;font-family:var(--mono);font-size:11px;color:var(--gv-ink);white-space:nowrap}.gv-in{padding:4px 4px 3px}.gv-c.be .s{display:none}.gv-c.be .xs{display:inline}.gv-c{-webkit-line-clamp:1}.gv-s{letter-spacing:-.01em}}
/* target of a strike tile inside the brief: visible landing cue, no motion */
[data-bi]{scroll-margin-top:calc(var(--nav-h,76px) + var(--ql-h,0px) + var(--fb-h,0px) + 16px)}
.vt-hl{outline:2px solid var(--gv-hl,#b3261e);outline-offset:2px;border-radius:4px}
@media (forced-colors:active){.gv-a{stroke:CanvasText}.tile{border-color:CanvasText}}

/* ---------- brief du jour tile (data/daily-brief.json): Aujourd'hui = En cours (rust bar), À venir (blue bar),
   'Rien de notable' (green). Same frame and paper as the other tiles; counts in serif ink, labels ink-2. ---------- */
.bf{container-type:size;display:block;color:var(--ink);text-decoration:none;line-height:1.1}
.bf:hover{border-color:rgba(42,26,18,.45)}
.bf-in{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:7cqw 7cqw 6cqw;border-radius:7px}
.bf-r1{display:flex;align-items:flex-start;justify-content:space-between;gap:2px}
.bf-i{width:max(13px,24cqw);height:max(13px,24cqw);flex:none;margin:-1cqw 0 0 -1cqw;fill:none;stroke:var(--ink);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.bf-k{font-family:var(--mono);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--mute);white-space:nowrap}
.bf-l{display:flex;align-items:baseline;justify-content:space-between;gap:2px;border-left:2px solid var(--bf,#b4532a);padding-left:max(3px,4cqw);white-space:nowrap}
.bf-l.next{--bf:#3c7aa0}
.bf-lb{font-size:max(11px,10.5cqw);color:var(--ink-2);overflow:hidden}
.bf-lb .s{display:none}
.bf-n{font-family:var(--serif);font-weight:400;font-size:min(19cqw,22px);line-height:.95;letter-spacing:-.02em;color:var(--ink)}
.bf-l.z .bf-n{color:var(--mute)}
.bf-calm{border-left:2px solid #4f8a67;padding-left:max(3px,4cqw);font-size:max(11px,11cqw);font-weight:600;line-height:1.12;color:#2f5d46}
.bf.calm:hover{border-color:#4f8a67}
@container (max-width:104px){.bf-lb .f{display:none}.bf-lb .s{display:inline}}
@container (max-width:66px){.bf-in{padding:4px 4px 3px}.bf-k{display:none}.bf-lb{letter-spacing:-.02em}.bf-n{font-size:13px}.bf-l{padding-left:2px}.bf-calm{padding-left:3px}}
@container (max-width:52px){.bf-k{display:none}}
@media (forced-colors:active){.bf-i{stroke:CanvasText}.bf-l,.bf-calm{border-left-color:CanvasText}}

/* ---------- translucent variant (tiles on a banner image: Actus city blocks, home city cards) ----------
   Apple-style material: paper + blur over the image. Ink-only tiles (map, weather) alpha .62 keeps ink >= 7:1 on the
   darkest blurred banner point (contrast_banners.py); tiles carrying coloured status text (grèves, brief) use .88. */
.vt-glass .tile{background:rgba(251,248,242,.62);-webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);border:1px solid rgba(255,255,255,.5);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 0 0 .5px rgba(42,26,18,.1)}
.vt-glass .gv,.vt-glass .bf{background:rgba(251,248,242,.88)}
.vt-glass .wx-face,.vt-glass .gv-in,.vt-glass .bf-in{background:transparent}
.vt-glass .tile,.vt-glass .inset .mono,.vt-glass .wx-cap,.vt-glass .wx-mm,.vt-glass .wx-back li,.vt-glass .wx-back li .d,.vt-glass .gv-c,.vt-glass .gv-n,.vt-glass .bf-k,.vt-glass .bf-lb{color:var(--ink)}
.vt-glass .inset:hover,.vt-glass .wx:hover,.vt-glass .bf:hover{border-color:rgba(255,255,255,.9)}
.vt-glass .inset{padding:4px 4px 3px}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.vt-glass .tile{background:rgba(251,248,242,.92)}}
@media (prefers-reduced-transparency:reduce){.vt-glass .tile{background:var(--surface);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media (forced-colors:active){.vt-glass .tile{background:Canvas;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:CanvasText}}

/* ---------- city banner with 4 tiles (Actus city blocks + home city cards), responsive by its OWN width ----------
   >= 520 px : name bottom-left, tiles 60 px on the right, 88 px high
   420-519 px: tiles 52 px, 72 px high
   < 420 px  : name top-left, label top-right, tiles 56 px (or a quarter of the width) bottom-right, 106 px high
   The tiles row is in the flow (it gives the banner its height) and reserves the width of 4 tiles; the map is first, so
   tiles appearing later never move it. */
.vt-ban{position:relative;container-type:inline-size;min-height:68px;background:#3b2116;overflow:hidden;--tile:76px;--tgap:6px}
.vt-ban>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.vt-ban::after{content:"";position:absolute;inset:0;background:rgba(30,18,12,.34);pointer-events:none}
.vt-ban.noimg::after{display:none}
.vt-ban .tiles{position:relative;z-index:2;width:calc(4 * var(--tile) + 3 * var(--tgap));margin:12px 12px 12px auto;justify-content:flex-start}
.vt-bname{position:absolute;left:16px;bottom:11px;z-index:1;display:flex;align-items:center;gap:8px;margin:0;max-width:calc(100% - 4 * var(--tile) - 3 * var(--tgap) - 44px);color:#fbf6ee;font-family:var(--serif);font-weight:400;font-size:clamp(24px,2.4vw,30px);line-height:1.02;letter-spacing:-.02em;text-shadow:0 1px 10px rgba(0,0,0,.45)}
/* "Illustration générée": 11 px on a solid pill (legible on any banner) */
.vt-ill{position:absolute;left:12px;top:9px;z-index:1;padding:2px 7px;border-radius:999px;background:rgba(22,13,8,.74);font-family:var(--mono);font-size:11px;line-height:1.3;letter-spacing:.03em;text-transform:uppercase;color:#fbf6ee}
/* < 560 px wide: name and label on top (darker band behind them), tiles (76 px, or a quarter of the width) along the
   bottom right */
@container (max-width:559px){.vt-ban .tiles{--tile:min(76px,calc((100cqw - 38px) / 4));margin:46px 10px 10px auto}
  .vt-ban::after{background:linear-gradient(180deg,rgba(22,13,8,.66) 0,rgba(22,13,8,.6) 42px,rgba(30,18,12,.3) 64px)}
  .vt-bname{top:9px;bottom:auto;left:12px;max-width:calc(100% - 24px - 190px);font-size:23px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  .vt-ill{top:11px;left:auto;right:12px}}
@container (max-width:300px){.vt-bname{max-width:calc(100% - 24px);font-size:20px}.vt-ill{top:auto;bottom:calc(var(--tile) + 16px)}}

/* ---------- home city card (tiles.city_card_html / VT.renderCityCard) and grid (tiles.city_cards_section) ---------- */
.vcc-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:14px}
@media (min-width:700px){.vcc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){.vcc-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.vcc{position:relative;border-radius:12px;overflow:hidden;border:1px solid var(--line);background:#3b2116}
.vcc .vt-ban{border-radius:11px}
.vcc-a{position:absolute;inset:0;z-index:1;border-radius:11px}        /* the whole card is the link, tiles (z 2) stay above */
.vcc-a:focus-visible{outline:2px solid #fbf6ee;outline-offset:-4px;box-shadow:inset 0 0 0 5px var(--ink)}
.vcc .vt-bname,.vcc .vt-ill{pointer-events:none}
.vcc:has(.vcc-a:hover) .vt-bname{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.vcc .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* home city cards = large tiles: 88 px (or a quarter of the card), every tile text >= 12 px, name + label on top */
.vcc .vt-ban .tiles{--tile:min(88px,calc((100cqw - 38px) / 4));--tgap:6px;margin:46px 10px 10px auto}
.vcc .vt-ban::after{background:linear-gradient(180deg,rgba(22,13,8,.66) 0,rgba(22,13,8,.6) 42px,rgba(30,18,12,.3) 64px)}
.vcc .vt-bname{top:10px;bottom:auto;left:12px;display:block;max-width:calc(100% - 24px - 190px);font-size:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vcc .vt-ill{top:11px;left:auto;right:12px;font-size:12px}
.vcc .tile .mono,.vcc .bf-k,.vcc .bf-lb,.vcc .bf-calm,.vcc .wx-cap,.vcc .wx-mm,.vcc .wx-l,.vcc .wx-bh,.vcc .wx-bf,.vcc .wx-back li,
.vcc .gv-d,.vcc .gv-n,.vcc .gv-s,.vcc .gv-c,.vcc .gv-dm{font-size:12px;letter-spacing:0}
.vcc .bf-n{font-size:20px}
.vcc .wx-t{font-size:22px}.vcc .gv-t{font-size:min(22px,23cqw)}
@container (max-height:81px){.vcc .wx-front .wx-cap{display:none}}
@media (max-width:600px){.vcc .wx-front .wx-mm{display:none}}   /* phones: 2-line label + min/max do not fit at 12 px */

/* city card legibility (88 px tiles, text >= 12 px, label pill, top band): tiles.css .vcc (shared since v4) */
/* v5: country with the city name ('Barcelone · Espagne', tiles.city_card_html countries=...): on its own line under the
   name at every width (13 px sans, same light ink), so a web-font swap of the name never moves it (CLS 0); taller dark
   top band, tiles pushed down; the ' · ' separator stays in the text for AT (visually hidden). */
#pl-citycards .vcc .vt-bname{display:block;overflow:visible;text-overflow:clip;white-space:normal}
#pl-citycards .vt-bn{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#pl-citycards .vt-bc{display:block;margin-top:4px;font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:.01em;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pl-citycards .vt-bs{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:pre}
/* very narrow cards (320 px phones): the label goes under the tiles, the name and country get the whole top band */
@container (max-width:340px){
  #pl-citycards .vcc .vt-bname{max-width:calc(100% - 24px)}
  #pl-citycards .vcc .vt-ill{top:auto;bottom:9px;left:12px;right:auto}
  #pl-citycards .vcc .vt-ban .tiles{margin-bottom:36px}}
/* ---------- v6 (David 2026-11-05): strike pill on the banner, 'La ville' tile, AI note ---------- */
/* strike pill: where the 'Illustration générée' pill was (top right), opaque paper, same colours as the grèves tile
   (red #a3221b en cours; orange text #8a5200 + asterisk #c97a12 annoncée), 12 px, links to Actus grèves */
#pl-citycards .vt-gp{position:absolute;z-index:3;top:7px;right:12px;display:flex;flex-direction:column;align-items:flex-start;max-width:176px;padding:2px 9px 3px 8px;border-radius:8px;background:#fbf8f2;color:#a3221b;text-decoration:none;font-size:12px;line-height:1.2;box-shadow:0 1px 6px rgba(0,0,0,.25)}
#pl-citycards .vt-gp[hidden]{display:none}
#pl-citycards .vt-gp.next{color:#8a5200}
#pl-citycards .gp-a{position:absolute;left:8px;top:4px;width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
#pl-citycards .vt-gp.next .gp-a{stroke:#c97a12}
#pl-citycards .gp-t{padding-left:15px;font-weight:600;white-space:nowrap}
#pl-citycards .gp-l{max-width:100%;padding-left:15px;font-family:var(--mono);letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pl-citycards .vt-gp:hover .gp-t,#pl-citycards .vt-gp:focus-visible .gp-t{text-decoration:underline;text-underline-offset:2px}
#pl-citycards .vt-gp:focus-visible{outline:2px solid #fbf6ee;outline-offset:2px}
#pl-citycards .vcc:has(.vt-gp:not([hidden])) .vt-bname{max-width:calc(100% - 24px - 190px)}
@container (max-width:340px){
  #pl-citycards .vt-gp{top:auto;bottom:9px;left:12px;right:12px;max-width:none;flex-direction:row;align-items:baseline;gap:6px;padding:3px 9px}
  #pl-citycards .vt-gp .gp-a{top:6px;left:9px}
  #pl-citycards .vt-gp .gp-l{padding-left:0;min-width:0}
  #pl-citycards .vcc:has(.vt-gp:not([hidden])) .vt-ban .tiles{margin-bottom:36px}
  #pl-citycards .vcc:has(.vt-gp:not([hidden])) .vt-bname{max-width:calc(100% - 24px)}}
/* 'La ville' tile: kicker + up to 3 lines (guide complet, carnets, récits); medium text >= 76 px tiles, short below */
#pl-citycards .vl{container-type:size;display:block;background:rgba(251,248,242,.88);color:var(--ink);text-decoration:none}
#pl-citycards .vl-in{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:6px 6px 5px;border-radius:7px}
#pl-citycards .vl-k{font-size:12px;line-height:1.1;letter-spacing:0;text-transform:uppercase;color:var(--ink)}
#pl-citycards .vl-u{display:flex;flex-direction:column;gap:1px;font-size:12px;line-height:1.08;letter-spacing:-.01em}
#pl-citycards .vl-r b{font-weight:700}
#pl-citycards .vl-g{font-weight:600;color:#1d4d33}
#pl-citycards .vl .s{display:none}
#pl-citycards .vl:hover{border-color:var(--ink)}
#pl-citycards .vl:hover .vl-k{text-decoration:underline;text-underline-offset:2px}
#pl-citycards .vl-r{white-space:nowrap}
#pl-citycards .vl-g .m{white-space:normal}
#pl-citycards .vl-in{padding:5px}
#pl-citycards .vl-u{gap:0}
@container (max-width:69px){#pl-citycards .vl .m{display:none}#pl-citycards .vl .s{display:inline}#pl-citycards .vl-in{padding:5px 4px 4px}#pl-citycards .vl-u{letter-spacing:-.02em}#pl-citycards .vl-g .s{letter-spacing:-.04em}}
@container (max-height:69px){#pl-citycards .vl.n3 .vl-k{display:none}}