/* V5 · PATRONS DES PAGES EXISTANTES — suite de css/v5/herite.css : les assemblages que plusieurs pages partagent avec
   leurs classes d'origine, harmonisés avec la grammaire Claude / ChatGPT et la densité Cursor. Spécificité nulle (:where) : une feuille de page
   (css/v5/pages/*.css) passe toujours devant. */

/* ================================================================== pages de type « Réglages »
   (Réglages, Extension, Abonnement, Contacts, panneaux .v4-page) : titre de page, groupes de lignes (« Forms » du kit :
   conteneur r12 au remplissage quaternaire, lignes séparées par un filet en retrait, libellé à gauche, contrôle à droite). */
:where(html.v5 .stp-tete){ margin: 0 0 20px; }
:where(html.v5 .stp-tete h2){ margin: 0 0 4px; font-size: var(--v5-t-22); font-weight: var(--v5-g-gras); line-height: var(--v5-i-22); letter-spacing: -.01em; color: var(--v5-texte); }
:where(html.v5 .stp-tete p){ margin: 0; max-width: 600px; font-size: var(--v5-t-13); line-height: 1.45; color: var(--v5-texte-2); }
:where(html.v5 .stp-groupe){ margin: 0 0 20px; }
:where(html.v5 .stp-h3){ margin: 0 12px 6px; font-size: var(--v5-t-13); font-weight: var(--v5-g-fort); line-height: 16px; letter-spacing: normal; text-transform: none; color: var(--v5-texte); }
:where(html.v5 :not(.stp-tete) + .stp-h3){ margin-top: 24px; }   /* un titre de section qui suit un tableau ou un groupe respire */
:where(html.v5 .stp-aide){ margin: 0 12px 8px; font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); }
:where(html.v5 .stp-groupe > .st-row){
  position: relative; align-items: center; justify-content: space-between; gap: 24px; box-sizing: border-box;
  min-height: 40px; margin: 0; padding: 8px 12px; border: 0; border-radius: 0; background: var(--v5-fond-groupe); box-shadow: none;
}
:where(html.v5 .stp-groupe > .st-row + .st-row)::before{ content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: var(--v5-separateur); }
:where(html.v5 .stp-groupe > .st-row:not([hidden]):not(.st-mobile):not(.st-row:not([hidden]):not(.st-mobile) ~ .st-row)){ border-radius: var(--v5-r-groupe) var(--v5-r-groupe) 0 0; }
:where(html.v5 .stp-groupe > .st-row:not([hidden]):not(.st-mobile):not(.st-row:not([hidden]):not(.st-mobile) ~ .st-row))::before{ content: none; }
:where(html.v5 .stp-groupe > .st-row:not([hidden]):not(.st-mobile):not(:has(~ .st-row:not([hidden]):not(.st-mobile)))){ border-radius: 0 0 var(--v5-r-groupe) var(--v5-r-groupe); }
:where(html.v5 .stp-groupe > .st-row:not([hidden]):not(.st-mobile):not(.st-row:not([hidden]):not(.st-mobile) ~ .st-row):not(:has(~ .st-row:not([hidden]):not(.st-mobile)))){ border-radius: var(--v5-r-groupe); }
:where(html.v5 .st-row-txt){ flex: 1; min-width: 0; }
:where(html.v5 .st-row-t){ display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--v5-t-13); font-weight: var(--v5-g-normal); line-height: 16px; color: var(--v5-texte); }
:where(html.v5 .st-row-tete .st-row-t){ font-weight: var(--v5-g-fort); }
:where(html.v5 .st-row-d){ margin: 2px 0 0; font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); }
:where(html.v5 .st-row-ctl){ align-items: center; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; max-width: 60%; }
:where(html.v5 .st-row-ctl > :is(input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], input:not([type]))){ width: 220px; flex: 0 1 220px; }
:where(html.v5 .st-row-ctl :is(button, select, input:not([type=checkbox], [type=radio], [type=range], [type=color]))){ height: var(--v5-ctrl-h); font-size: var(--v5-t-13); }
:where(html.v5 .st-row-val){ font-size: var(--v5-t-13); color: var(--v5-texte-2); font-variant-numeric: tabular-nums; }
:where(html.v5 .st-unite){ display: flex; align-items: center; gap: 6px; }
:where(html.v5 .st-unite span){ color: var(--v5-texte-2); }
/* ligne « bloc » : le contrôle (zone de texte, tableau) passe sous le libellé */
:where(html.v5 .st-row-bloc){ flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; }
:where(html.v5 .st-row-bloc .st-row-ctl){ max-width: none; justify-content: flex-start; }
:where(html.v5 .st-zone-texte){ min-height: 84px; padding: 6px 7px; font-size: var(--v5-t-13); line-height: 1.4; }
:where(html.v5 .st-zone-texte.mono){ font-family: var(--v5-police-mono); font-size: var(--v5-t-12); }
:where(html.v5 .st-row-pied){ align-items: center; justify-content: flex-end; gap: 8px; margin: 10px 0 0; flex-wrap: nowrap; }
:where(html.v5 .st-row-pied .status-line){ flex: 1; min-width: 0; margin: 0; font-size: var(--v5-t-12); color: var(--v5-texte-2); }
:where(html.v5 .status-line){ font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); }
/* choix exclusif en ligne (.vt-radio-row) = contrôle segmenté */
:where(html.v5 .st-row-ctl .vt-radio-row){ display: inline-flex; flex: none; gap: 0; height: var(--v5-ctrl-h); padding: 0; border: 0; border-radius: var(--v5-r-ctrl); background: var(--v5-bouton); }
:where(html.v5 .st-row-ctl .vt-radio-row label){ position: relative; display: inline-flex; align-items: center; flex: none; height: 100%; margin: 0; padding: 0 12px; border: 0; border-radius: var(--v5-r-ctrl); background: none; box-shadow: none; font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); cursor: default; }
:where(html.v5 .st-row-ctl .vt-radio-row label input){ position: absolute; opacity: 0; pointer-events: none; }
:where(html.v5 .st-row-ctl .vt-radio-row label:has(input:checked)){ background: var(--v5-violet); color: var(--v5-sur-violet); box-shadow: none; }
:where(html.v5 .st-row-ctl .vt-radio-row label:has(input:focus-visible)){ outline: var(--v5-focus-l) solid var(--v5-focus); }

/* ================================================================== listes d'origine (js/liste-cl.js) : l'anneau de focus se trace à l'intérieur de la ligne */
:where(html.v5 .cl-ligne){ --v5-focus-decalage: -3px; }

/* ================================================================== tableaux et listes d'origine : vue en liste du Finder
   lignes arrondies (r8) sans filet, une ligne sur deux légèrement teintée, survol discret, ligne choisie neutre,
   en-tête de colonnes en petits libellés (11, demi-gras) sous un filet. Concernés : Annonces (.an-ligne), Achats (.ac-ligne),
   listes de js/liste-cl.js (.cl-ligne), Articles (.article-item sur PC). */
:where(html.v5 :is(.an-ligne, .ac-ligne, .cl-ligne)){ border-bottom: 0; border-radius: var(--v5-r-sel); box-shadow: none; --v5-focus-decalage: -3px; }
:where(html.v5 .an-ligne:not(.an-entete):nth-child(odd), html.v5 .cl-liste > :is(.ac-ligne, .cl-ligne):nth-child(even)){ background: var(--v5-rempli-4); }
/* pas d'effet au survol sur une ligne (demande de Lucas du 10/10) : comme dans le Finder, seule la sélection change son fond */
:where(html.v5 :is(.an-ligne, .ac-ligne, .cl-ligne):is(.sel, [aria-selected="true"])){ background: var(--v5-presse); }
:where(html.v5 :is(.an-ligne, .ac-ligne):focus-visible){ box-shadow: none; }
/* texte tertiaire d'une ligne en état (survol, choisie) : remonté d'un cran pour garder le contraste sur le fond d'état */
:where(html.v5 :is(.an-ligne, .ac-ligne, .cl-ligne, .article-item, .aj-ligne):is(.sel, .selected, [aria-selected="true"])){ --v5-texte-3: var(--v5-texte-2); --text-tertiary: var(--v5-texte-2); --text-faint: var(--v5-texte-2); --text-muted: var(--v5-texte-2); }
/* catégorie d'une ligne (« Lien », « Fiche »…) : une valeur compacte → pastille neutre, sans le point séparateur de l'ancienne mise en page. */
/* « Lien » / « Fiche » : un mot gris, sans capsule (15/10, Lucas : plus de pastilles) */
:where(html.v5 .cl-type){ display: inline-flex; align-items: center; box-sizing: border-box; min-width: 44px; height: 16px; margin-right: 10px; padding: 0; border-radius: 0; background: none; color: var(--v5-texte-3); font-size: var(--v5-t-11); font-weight: var(--v5-g-moyen); line-height: 1; vertical-align: 1px; }
:where(html.v5 .cl-etape .cl-sep){ display: none; }
/* la pastille d'état se cale à gauche de sa colonne au lieu de s'étirer sur toute sa largeur */
:where(html.v5 .cl-ligne--compacte .cl-etat){ justify-self: start; }
:where(html.v5 .an-entete){ min-height: 26px; border-radius: 0; background: var(--v5-fond); box-shadow: inset 0 calc(-1 * var(--v5-trait-fort)) 0 var(--v5-separateur); }
:where(html.v5 .an-col){ font-size: var(--v5-t-11); font-weight: var(--v5-g-fort); color: var(--v5-texte-2); cursor: default; }
:where(html.v5 .an-col.actif){ color: var(--v5-texte); }
:where(html.v5 :is(.an-titre img, .an-titre .an-vide, .ac-ligne img, .ac-vide, .cl-vign, .cl-vign img)){ border-radius: var(--v5-r-mini); }
:where(html.v5 .an-titre span){ font-weight: var(--v5-g-normal); }
:where(html.v5 :is(.an-num, .an-prix)){ font-variant-numeric: tabular-nums; }
:where(html.v5 .an-etat){ font-size: var(--v5-t-12); color: var(--v5-texte-2); }
:where(html.v5 .an-etat)::before{ width: 8px; height: 8px; }
:where(html.v5 .an-etat--ligne)::before{ background: var(--v5-vert); }
:where(html.v5 .an-etat--vendu)::before{ background: var(--v5-texte-2); }
:where(html.v5 .an-etat--retiree)::before{ background: var(--v5-gris); }
/* Articles : en-tête de colonnes et lignes (même vue en liste) */
:where(html.v5 .article-table-head){ min-height: 26px; padding-bottom: 6px; border: 0; box-shadow: inset 0 calc(-1 * var(--v5-trait-fort)) 0 var(--v5-separateur); }
:where(html.v5 .article-table-head span){ font-size: var(--v5-t-11); font-weight: var(--v5-g-fort); letter-spacing: normal; text-transform: none; color: var(--v5-texte-2); }
:where(html.v5 #article-list .article-item){ border: 0; border-radius: var(--v5-r-sel); background: none; box-shadow: none; }
:where(html.v5 #article-list .article-item:nth-child(even)){ background: var(--v5-rempli-4); }
:where(html.v5 #article-list .article-item.selected){ background: var(--v5-presse); }
:where(html.v5 #article-list .empty){ border: 0; border-radius: var(--v5-r-groupe); background: var(--v5-fond-groupe); }
/* bouton « retour » des sous-écrans : inutile sur ordinateur (‹ › de la barre d'outils) */
:where(html.v5 #view-contacts > .view-header){ display: none; }
/* barre de sélection flottante d'Articles : capsule opaque neutre, nombre à gauche, actions à droite */
:where(html.v5 :is(.selection-bar, .selection-bar.glass)){
  gap: 8px; padding: 6px 8px 6px 16px; border: 0; border-radius: var(--v5-r-menu);
  background: var(--v5-surface-elevee); box-shadow: var(--v5-ombre-popover); color: var(--v5-texte);
}
:where(html.v5 .selection-bar-top span){ padding-right: 8px; margin-right: 0; border-right: 1px solid var(--v5-rempli-1); font-size: var(--v5-t-13); font-weight: var(--v5-g-fort); }
:where(html.v5 .selection-bar :is(button.ghost, button.danger-ghost)){ border-radius: var(--v5-r-bouton); }
/* titre d'une section de liste : libellé demi-gras + compteur discret */
:where(html.v5 .cl-section-tete){ padding: 0 0 6px; }   /* 02/11 : le titre d'un groupe au bord gauche de la page, comme le grand titre (il était 8 px plus à droite) */
:where(html.v5 .cl-section-tete b){ font-size: var(--v5-t-13); font-weight: var(--v5-g-fort); color: var(--v5-texte); text-transform: none; letter-spacing: normal; }
:where(html.v5 .cl-section-tete span){ font-size: var(--v5-t-12); color: var(--v5-texte-3); font-variant-numeric: tabular-nums; }
/* ligne de chiffres en tête de page (.vt-stats-bar) : valeur en demi-gras, libellé secondaire */
:where(html.v5 .vt-stats-bar .num){ font-weight: var(--v5-g-fort); color: var(--v5-texte); font-variant-numeric: tabular-nums; }
:where(html.v5 .vt-stats-bar .lbl2){ color: var(--v5-texte-2); }

/* Achats à trier (17/10, js/achats.js) : une ligne par achat (case, vignette, titre, prix), puis « Importer la sélection » */
:where(html.v5 .ach-trier){ margin-bottom: 14px; padding: 12px 14px; }
:where(html.v5 .ach-trier-tete){ display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
:where(html.v5 .ach-trier-tete .status-line){ margin: 0; }
:where(html.v5 .ach-trier-liste){ display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
:where(html.v5 .ach-trier-ligne){ display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 2px; border-bottom: var(--v5-trait) solid var(--v5-separateur); cursor: default; }
:where(html.v5 .ach-trier-ligne img, html.v5 .ach-trier-ligne .vt-achat-noimg){ width: 34px; height: 34px; flex: none; border-radius: var(--v5-r-mini); object-fit: cover; }
:where(html.v5 .ach-trier-txt){ display: flex; flex-direction: column; flex: 1; min-width: 0; }
:where(html.v5 .ach-trier-txt b){ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--v5-t-13); font-weight: var(--v5-g-moyen); }
:where(html.v5 .ach-trier-txt small){ font-size: var(--v5-t-12); color: var(--v5-texte-2); }
:where(html.v5 .ach-trier-prix){ flex: none; font-variant-numeric: tabular-nums; font-size: var(--v5-t-13); }
:where(html.v5 .ach-trier-pied){ display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
