/*
    luis_housing — kit.css : polices et composants communs (chargé à la 1re ouverture d'un module)

    Rôle : @font-face (Playfair Display 500/600, Inter 400/500/600 en woff2 locaux, licences
    OFL dans web/fonts/OFL-*.txt ; « Espace fine » pour U+202F), typographie, icônes, logo,
    boutons, puces, pastilles, états vides, tableaux, cartes, barres de défilement.
    Contrats :
      - couleurs UNIQUEMENT par les jetons --h-* / --hf-* de base.css (contrastes vérifiés) ;
      - surfaces fortes (aplat bleu nuit : bandeau, bouton principal, onglet actif, en-tête de
        tableau) : textes en --hf-*, jamais --h-texte* ;
      - or #B3A68B jamais en texte sur ivoire (--h-or-texte à la place) ;
      - commandes arrondies 3/4/6 px, surfaces à angles vifs ; animations transform/opacity.
    Coût : aucun (styles).
    Petits libellés (revue du 13/10) : font-size: max(<x>em, 9px) — en 1280×720 ils tombaient à 6,5 px.
*/

/* ========================================================================== polices */

/* U+202F (espace fine des montants « 1 250 000 $ ») manque à Inter et à Playfair : servie par
   une police système, en tête des piles (--h-f-texte, --h-f-titre). */
@font-face {
    font-family: 'Espace fine';
    src: local('Segoe UI'), local('Arial'), local('Helvetica');
    unicode-range: U+202F;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/playfair-display-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url('../fonts/playfair-display-latin-600-normal.woff2') format('woff2');
}

/* ========================================================================== typographie */

.serif {
    font-family: var(--h-f-titre);
    font-variant-numeric: lining-nums;
}

.chiffres { font-variant-numeric: tabular-nums; }

.surtitre {
    font-size: max(.72em, 9px);
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--h-or-texte);
}

/* ========================================================================== icônes et logo */

.ico {
    display: inline-block;
    flex: none;
    width: 1.25em;
    height: 1.25em;
    vertical-align: -.22em;
    overflow: visible;
}

.logo { display: block; flex: none; }
.logo-couleur { height: 2.4em; width: auto; }
.logo-mono {
    height: 2.4em;
    aspect-ratio: 520 / 272;           /* en attendant les proportions lues sur l'image (ui.js) */
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

/* ========================================================================== boutons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    height: 2.5em;
    padding: 0 1.1em;
    font: inherit;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--h-r2);
    background: transparent;
    color: var(--h-texte);
    cursor: pointer;
    transition: background-color var(--h-t-court), color var(--h-t-court), border-color var(--h-t-court), opacity var(--h-t-court);
}
.btn .ico { width: 1.15em; height: 1.15em; }
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--h-nuit); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: default; }

.btn-principal { background: var(--h-nuit); color: var(--hf-texte); }
.btn-principal:hover:not(:disabled) { background: var(--h-nuit-survol); }
.btn-principal:active:not(:disabled) { background: var(--h-nuit-appui); }

.btn-secondaire { background: var(--h-plaque); border-color: var(--h-filet-fort); color: var(--h-texte); }
.btn-secondaire:hover:not(:disabled) { background: var(--h-survol); }
.btn-secondaire:active:not(:disabled) { background: var(--h-survol-fort); }

.btn-discret { color: var(--h-texte-2); }
.btn-discret:hover:not(:disabled) { background: var(--h-survol); color: var(--h-texte); }

.btn-icone { width: 2.4em; height: 2.4em; padding: 0; color: var(--h-texte-2); }
.btn-icone .ico { width: 1.3em; height: 1.3em; }
.btn-icone:hover:not(:disabled) { background: var(--h-survol); color: var(--h-texte); }

/* Sur une surface forte (aplat nuit) */
.sur-nuit .btn:focus-visible { outline-color: var(--h-or); }
.sur-nuit .btn-icone { color: var(--hf-texte-2); }
.sur-nuit .btn-icone:hover:not(:disabled) { background: var(--hf-survol); color: var(--hf-texte); }
.sur-nuit .btn-icone.actif { background: var(--hf-appui); color: var(--hf-or); }

/* ========================================================================== puces et pastilles */

.puce {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    height: 1.85em;
    padding: 0 .7em;
    font-size: max(.82em, 9px);
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    border-radius: var(--h-r1);
    background: var(--h-creux);
    color: var(--h-texte-2);
}
.puce .ico { width: 1.05em; height: 1.05em; }

/* Statuts (identiques sur listes, carte, vitrine — PLAN §5.3) */
.puce-vente, .puce-ok { background: var(--h-vert-pale); color: var(--h-vert); }
.puce-location { background: var(--h-soleil-pale); color: var(--h-texte); }
.puce-location::before {
    content: '';
    width: .55em;
    height: .55em;
    border-radius: 50%;
    background: var(--h-soleil);
    box-shadow: 0 0 0 1px var(--h-or-texte);
}
.puce-indispo { background: var(--h-creux); color: var(--h-gris-indispo); }
.puce-alerte { background: var(--h-alerte-pale); color: var(--h-alerte); }
.puce-erreur { background: var(--h-erreur-pale); color: var(--h-erreur); }
.puce-info { background: var(--h-info-pale); color: var(--h-info); }
.puce-nuit { background: var(--h-nuit); color: var(--hf-texte); }
.puce-nuit .ico { color: var(--hf-or); }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    padding: 0 .45em;
    font-size: max(.74em, 9px);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border-radius: .8em;
    background: var(--h-or);
    color: var(--h-nuit);
}

/* ========================================================================== cartes et états vides */

.carte {
    background: var(--h-plaque);
    border: 1px solid var(--h-filet);
}

.vide {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 38em;
    margin: 0 auto;
    padding: 2.6em 2em;
    text-align: center;
}

.vide-cercle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.6em;
    height: 4.6em;
    border-radius: 50%;
    color: var(--h-nuit);
    background: var(--h-plaque);
    border: 1px solid var(--h-or);
    box-shadow: 0 0 0 .5em var(--h-fond), 0 0 0 calc(.5em + 1px) var(--h-or-clair);
}
.vide-cercle .ico { width: 2em; height: 2em; }

.vide-surtitre {
    margin-top: 1.8em;
    font-size: max(.72em, 9px);
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--h-or-texte);
}

.vide-titre {
    margin-top: .35em;
    font-family: var(--h-f-titre);
    font-weight: 600;
    font-size: 1.6em;
    line-height: 1.2;
    font-variant-numeric: lining-nums;
    color: var(--h-texte);
}

.vide-texte {
    margin: .7em 0 0;
    line-height: 1.55;
    color: var(--h-texte-2);
}

/* ========================================================================== tableaux */

.tableau-boite {
    background: var(--h-plaque);
    border: 1px solid var(--h-filet);
    overflow: hidden;
}

.tableau {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

/* En-têtes : aplat bleu nuit, capitales espacées (~10,5 px en 1080p) */
.tableau th {
    padding: .95em 1.25em;
    text-align: left;
    font-size: max(.74em, 9px);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--h-nuit);
    color: var(--hf-texte);
}

.tableau td {
    padding: .85em 1.25em;
    border-top: 1px solid var(--h-filet-doux);
    color: var(--h-texte);
}

.tableau-vide td {
    padding: 2.4em 1em;
    text-align: center;
    color: var(--h-texte-3);
    border-top: 0;
}

/* ========================================================================== défilement */

.defile { overflow: auto; overscroll-behavior: contain; }
.defile::-webkit-scrollbar { width: .55em; height: .55em; }
.defile::-webkit-scrollbar-track { background: transparent; }
.defile::-webkit-scrollbar-thumb { background: var(--h-filet); border-radius: .3em; }
.defile::-webkit-scrollbar-thumb:hover { background: var(--h-filet-fort); }

/* ========================================================================== extension phase 1 */
/* Champs, interrupteurs, cases, segments, listes déroulantes maison, menus et modales (ui.js).
   Paires de contraste : toutes déjà vérifiées par contrastes.py (fond / plaque / creux / nuit). */

.k-entree {
    width: 100%;
    height: 2.5em;
    padding: 0 .8em;
    font: inherit;
    color: var(--h-texte);
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r2);
    outline: none;
    -webkit-user-select: text;
    user-select: text;
    transition: border-color var(--h-t-court), box-shadow var(--h-t-court);
}
.k-entree::placeholder { color: var(--h-texte-3); opacity: 1; text-transform: none; }
.k-entree:focus { border-color: var(--h-nuit); box-shadow: 0 0 0 1px var(--h-nuit); }
.k-entree:disabled { opacity: .55; }
.k-entree::-webkit-search-cancel-button { -webkit-appearance: none; }
.en-erreur .k-entree, .k-entree.en-erreur { border-color: var(--h-erreur); box-shadow: 0 0 0 1px var(--h-erreur); }

.k-recherche {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}
.k-recherche > .ico {
    position: absolute;
    left: .75em;
    width: 1.1em;
    height: 1.1em;
    color: var(--h-texte-3);
    pointer-events: none;
}
.k-recherche .k-entree { padding-left: 2.35em; }

.k-champ { display: flex; flex-direction: column; gap: .35em; min-width: 0; }
.k-champ-etiquette {
    font-size: max(.8em, 9px);
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--h-texte-2);
}
.k-champ-aide { font-size: max(.8em, 9px); line-height: 1.45; color: var(--h-texte-3); }
.k-champ-erreur {
    display: flex;
    align-items: flex-start;
    gap: .4em;
    font-size: max(.82em, 9px);
    font-weight: 500;
    line-height: 1.4;
    color: var(--h-erreur);
}

/* Interrupteur */
.k-inter {
    display: inline-flex;
    align-items: center;
    gap: .65em;
    padding: 0;
    font: inherit;
    color: var(--h-texte);
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}
.k-inter:disabled { opacity: .45; cursor: default; }
.k-inter:focus { outline: none; }
.k-inter:focus-visible .k-inter-piste { outline: 2px solid var(--h-nuit); outline-offset: 2px; }
.k-inter-piste {
    position: relative;
    flex: none;
    width: 2.6em;
    height: 1.45em;
    border-radius: .75em;
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    transition: background-color var(--h-t-court), border-color var(--h-t-court);
}
.k-inter-bouton {
    position: absolute;
    top: .15em;
    left: .15em;
    width: 1.05em;
    height: 1.05em;
    border-radius: 50%;
    background: var(--h-texte-3);
    transition: transform var(--h-t-court) var(--h-courbe), background-color var(--h-t-court);
}
.k-inter[aria-checked="true"] .k-inter-piste { background: var(--h-nuit); border-color: var(--h-nuit); }
.k-inter[aria-checked="true"] .k-inter-bouton { background: var(--hf-texte); transform: translateX(1.15em); }

/* Case à cocher */
.k-case {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.35em;
    height: 1.35em;
    padding: 0;
    color: transparent;
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r1);
    cursor: pointer;
}
.k-case .ico { width: 1.15em; height: 1.15em; }
.k-case[aria-checked="true"] { background: var(--h-nuit); border-color: var(--h-nuit); color: var(--hf-texte); }
.k-case.mixte[aria-checked="true"] { background: var(--h-nuit-pale); border-color: var(--h-filet-fort); color: var(--h-texte-2); }
.k-case:disabled { opacity: .4; cursor: default; }
.k-case:focus { outline: none; }
.k-case:focus-visible { outline: 2px solid var(--h-nuit); outline-offset: 2px; }

/* Segment (choix exclusif) */
.k-segment {
    display: inline-flex;
    padding: .2em;
    gap: .2em;
    background: var(--h-creux);
    border: 1px solid var(--h-filet);
    border-radius: var(--h-r3);
}
.k-segment-choix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    height: 2.15em;
    padding: 0 1em;
    font: inherit;
    font-weight: 500;
    color: var(--h-texte-2);
    background: transparent;
    border: 0;
    border-radius: var(--h-r2);
    cursor: pointer;
    white-space: nowrap;
}
.k-segment-choix .ico { width: 1.1em; height: 1.1em; }
.k-segment-choix:hover:not(:disabled) { background: var(--h-survol); color: var(--h-texte); }
.k-segment-choix[aria-checked="true"] { background: var(--h-nuit); color: var(--hf-texte); }
.k-segment-choix[aria-checked="true"] .ico { color: var(--hf-or); }
.k-segment-choix:disabled { opacity: .45; cursor: default; }
.k-segment-choix:focus { outline: none; }
.k-segment-choix:focus-visible { outline: 2px solid var(--h-nuit); outline-offset: 1px; }

/* Liste déroulante maison */
.k-liste {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .6em;
    min-width: 0;
    height: 2.5em;
    padding: 0 .65em 0 .8em;
    font: inherit;
    color: var(--h-texte);
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r2);
    cursor: pointer;
    text-align: left;
}
.k-liste:hover { background: var(--h-survol); }
.k-liste:focus { outline: none; }
.k-liste:focus-visible, .k-liste[aria-expanded="true"] { border-color: var(--h-nuit); box-shadow: 0 0 0 1px var(--h-nuit); }
.k-liste-texte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-liste-chevron { width: 1.05em; height: 1.05em; color: var(--h-texte-3); }

/* Menu surgissant (couche). Revue du 18/10 : AU-DESSUS de tout (fenêtres z 30-50, modales z 50, carte
   Leaflet z 800-900) : la liste d'une fenêtre ne s'ouvre plus jamais derrière elle. */
.k-menu {
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-width: 13em;
    max-height: 22em;
    padding: .35em;
    overflow: auto;
    background: var(--h-plaque);
    border: 1px solid var(--h-filet);
    border-top: 2px solid var(--h-or);
    border-radius: var(--h-r2);
    box-shadow: var(--h-ombre-flottante);
    animation: k-menu-entree var(--h-t-court) var(--h-courbe) both;
}
@keyframes k-menu-entree {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}
.k-menu-el {
    display: flex;
    align-items: center;
    gap: .65em;
    width: 100%;
    min-height: 2.3em;
    padding: .35em .7em;
    font: inherit;
    text-align: left;
    color: var(--h-texte);
    background: transparent;
    border: 0;
    border-radius: var(--h-r1);
    cursor: pointer;
}
.k-menu-el .ico { width: 1.15em; height: 1.15em; color: var(--h-texte-2); }
.k-menu-el:hover:not(:disabled), .k-menu-el:focus { background: var(--h-survol); outline: none; }
.k-menu-el:disabled { cursor: default; }
.k-menu-el:disabled .k-menu-texte { color: var(--h-texte-3); }
.k-menu-el.danger .k-menu-texte, .k-menu-el.danger .ico { color: var(--h-erreur); }
.k-menu-coche { display: inline-flex; width: 1.15em; flex: none; color: var(--h-nuit); }
.k-menu-textes { display: flex; flex-direction: column; min-width: 0; }
.k-menu-texte { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-menu-note { font-size: max(.78em, 9px); color: var(--h-texte-3); }
.k-menu-sep { height: 1px; margin: .3em .2em; background: var(--h-filet-doux); }
.k-menu { overscroll-behavior: contain; }
.k-menu::-webkit-scrollbar { width: 6px; }
.k-menu::-webkit-scrollbar-thumb { background: var(--h-filet-fort); border-radius: var(--h-r1); }
.k-liste-menu .k-menu-el[aria-checked="true"] .k-menu-texte { color: var(--h-nuit); font-weight: 600; }

/* Curseur dessiné (revue du 18/10 : intensité des lumières). Piste nuit remplie jusqu'à la valeur (--k-pct),
   pouce ivoire cerclé de nuit ; bornes en petit texte sous la piste. */
.k-curseur { display: flex; flex-direction: column; gap: .35em; min-width: 0; }
.k-curseur-tete { display: flex; align-items: baseline; justify-content: space-between; gap: .8em; }
.k-curseur-etiquette { font-size: max(.8em, 9px); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--h-texte-2); }
.k-curseur-valeur { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--h-nuit); }
.k-curseur-piste {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 1.6em;
    margin: 0;
    background: transparent;
    cursor: pointer;
}
.k-curseur-piste:focus { outline: none; }
.k-curseur-piste::-webkit-slider-runnable-track {
    height: .45em;
    border-radius: var(--h-r1);
    background: linear-gradient(to right, var(--h-nuit) 0, var(--h-nuit) var(--k-pct, 50%), var(--h-filet) var(--k-pct, 50%), var(--h-filet) 100%);
}
.k-curseur-piste::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.15em;
    height: 1.15em;
    margin-top: -.35em;
    border-radius: 50%;
    background: var(--h-plaque);
    border: 2px solid var(--h-nuit);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.k-curseur-piste:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--h-survol), 0 1px 3px rgba(0, 0, 0, .25); }
.k-curseur-bornes { display: flex; justify-content: space-between; font-size: max(.78em, 9px); color: var(--h-texte-3); }

/* Modale (couche) dans l'écran de la tablette */
.k-voile {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
    background: var(--h-voile-modale);
    animation: k-voile-entree var(--h-t-moyen) ease-out both;
}
@keyframes k-voile-entree {
    from { opacity: 0; }
    to { opacity: 1; }
}
.k-modale {
    display: flex;
    flex-direction: column;
    gap: .55em;
    width: 30em;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 1.6em 1.7em 1.4em;
    overflow: hidden;
    background: var(--h-plaque);
    border: 1px solid var(--h-filet);
    border-top: 3px solid var(--h-nuit);
    box-shadow: var(--h-ombre-flottante);
    animation: k-modale-entree var(--h-t-long) var(--h-courbe) both;
}
.k-modale.large { width: 44em; }
@keyframes k-modale-entree {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: none; }
}
.k-modale-titre {
    font-weight: 600;
    font-size: 1.45em;
    line-height: 1.2;
    color: var(--h-texte);
}
.k-modale-texte { margin: 0; line-height: 1.5; color: var(--h-texte-2); }
.k-modale-corps { display: flex; flex-direction: column; gap: .8em; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.k-modale-pied { flex: none; }
.k-modale-corps:empty { display: none; }
.k-modale-pied {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6em;
    margin-top: .8em;
    padding-top: 1em;
    border-top: 1px solid var(--h-filet-doux);
}
.btn-danger { background: var(--h-erreur); color: var(--hf-texte); }
.btn-danger:hover:not(:disabled) { background: var(--h-erreur); filter: brightness(.92); }

.k-copie { position: fixed; left: -9999px; top: 0; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
    .k-menu, .k-voile, .k-modale { animation: none; }
    .k-inter-piste, .k-inter-bouton, .k-entree { transition: none; }
}

/* ========================================================================== extension phase 3 */
/* Choix du compte « Banque / Espèces » avec les soldes (js/modules/paiement.js) : fenêtre Offre et confirmations
   d'achat de la tablette du propriétaire. Carte choisie : fond --h-nuit-pale, cadre --h-nuit (≥ 3 sur --h-plaque).
   Paires (contrastes.py, liste PHASE 3) : --h-texte-2 / --h-alerte sur --h-nuit-pale et --h-plaque, --hf-or sur
   --h-nuit (pastille de l'icône choisie). Aucun fond de survol sous le texte d'alerte (--h-alerte sur --h-survol
   tomberait sous 4,5). */

.pa-comptes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5em, 1fr));
    gap: .55em;
}
.pa-compte {
    display: flex;
    align-items: center;
    gap: .7em;
    min-width: 0;
    padding: .65em .75em;
    font: inherit;
    text-align: left;
    color: var(--h-texte);
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r3);
    cursor: pointer;
    transition: border-color var(--h-t-court), box-shadow var(--h-t-court);
}
.pa-compte:hover { border-color: var(--h-nuit); }
.pa-compte:focus { outline: none; }
.pa-compte:focus-visible { outline: 2px solid var(--h-nuit); outline-offset: 2px; }
.pa-compte[aria-checked="true"] { background: var(--h-nuit-pale); border-color: var(--h-nuit); box-shadow: 0 0 0 1px var(--h-nuit); }
.pa-compte-icone {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    color: var(--h-nuit);
    background: var(--h-fond);
    border: 1px solid var(--h-or);
}
.pa-compte-icone .ico { width: 1.15em; height: 1.15em; }
.pa-compte[aria-checked="true"] .pa-compte-icone { color: var(--hf-or); background: var(--h-nuit); border-color: var(--h-nuit); }
.pa-compte-textes { display: flex; flex: 1; flex-direction: column; gap: .1em; min-width: 0; }
.pa-compte-nom { font-weight: 600; }
/* Solde : l'étiquette peut passer au-dessus, le MONTANT n'est jamais coupé (intégration du 14/10 : « 2 500 0… »). */
.pa-compte-solde { font-size: max(.84em, 9px); color: var(--h-texte-2); line-height: 1.3; }
.pa-solde-montant { white-space: nowrap; }
.pa-compte-alerte {
    display: flex;
    align-items: center;
    gap: .3em;
    font-size: max(.8em, 9px);
    font-weight: 600;
    color: var(--h-alerte);
}
.pa-compte-alerte .ico { width: 1em; height: 1em; }
.pa-compte-coche {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.45em;
    height: 1.45em;
    color: transparent;
    border: 1px solid var(--h-filet-fort);
    border-radius: 50%;
}
.pa-compte-coche .ico { width: 1em; height: 1em; }
.pa-compte[aria-checked="true"] .pa-compte-coche { color: var(--hf-texte); background: var(--h-nuit); border-color: var(--h-nuit); }
.pa-aucun { font-size: max(.88em, 9px); color: var(--h-texte-3); }

@media (prefers-reduced-motion: reduce) {
    .pa-compte { transition: none; }
}

/* ========================================================================== extension phase 4 */
/* Échéances (js/modules/echeances.js) : jauge des charges impayées « 2 / 4 » et lignes du loyer (retard, perte des
   clés, préavis), communes à la tablette du propriétaire et à la tablette de l'agence. Posées sur --h-plaque (cartes)
   ou --h-soleil-pale (bloc Loyer du propriétaire). Paires (WCAG, calculées comme outils/nui/contrastes.py) :
   --h-erreur sur --h-plaque 6,20 / --h-fond 5,84 / --h-soleil-pale 5,16 / --h-erreur-pale 5,02 / --h-nuit-pale 5,14 ;
   --h-alerte sur --h-plaque 5,52 / --h-soleil-pale 4,59 / --h-nuit-pale 4,57 (JAMAIS sur --h-erreur-pale : 4,46, ni sur
   --h-survol : 4,33) ; --h-texte-3 sur --h-plaque 5,68 / --h-soleil-pale 4,73 ; cases de la jauge (composants ≥ 3) :
   --h-nuit 14,26 et --h-erreur 6,20 sur --h-plaque, case vide cernée de --h-filet-fort 3,77. Rouge dès la LIMITE (la
   prochaine impayée sanctionne) : la phrase et l'icône le disent aussi (pas seulement la teinte). */

.ec-jauge { display: flex; flex-direction: column; gap: .4em; min-width: 0; }
.ec-jauge-tete { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; }
.ec-jauge-titre {
    font-size: max(.74em, 9px);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--h-texte-2);
}
.ec-jauge-valeur { white-space: nowrap; color: var(--h-texte); }
.ec-jauge-n { font-family: var(--h-f-titre); font-weight: 600; font-size: 1.55em; line-height: 1; }
.ec-jauge-sur { font-size: max(.9em, 9px); color: var(--h-texte-2); }
.ec-jauge-barre { display: flex; gap: .25em; height: .7em; }
.ec-case {
    flex: 1;
    min-width: .5em;
    background: var(--h-creux);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r1);
}
.ec-case.pleine { background: var(--h-nuit); border-color: var(--h-nuit); }
.ec-jauge.etat-limite .ec-case.pleine, .ec-jauge.etat-sanction .ec-case.pleine { background: var(--h-erreur); border-color: var(--h-erreur); }
.ec-jauge.etat-limite .ec-jauge-n, .ec-jauge.etat-sanction .ec-jauge-n { color: var(--h-erreur); }
.ec-jauge-etat {
    display: flex;
    align-items: flex-start;
    gap: .35em;
    margin: 0;
    font-size: max(.8em, 9px);
    line-height: 1.4;
    color: var(--h-texte-2);
}
.ec-jauge-etat .ico { flex: none; width: 1.1em; height: 1.1em; margin-top: .05em; }
.ec-jauge.etat-limite .ec-jauge-etat, .ec-jauge.etat-sanction .ec-jauge-etat { font-weight: 600; color: var(--h-erreur); }
.ec-jauge-regle { margin: 0; font-size: max(.74em, 9px); line-height: 1.45; color: var(--h-texte-3); }
.ec-jauge.compacte .ec-jauge-n { font-size: 1.35em; }

.ec-ligne {
    display: flex;
    align-items: flex-start;
    gap: .4em;
    font-size: max(.8em, 9px);
    line-height: 1.4;
    color: var(--h-texte-2);
}
.ec-ligne .ico { flex: none; width: 1.05em; height: 1.05em; margin-top: .1em; }
.ec-ligne.alerte { font-weight: 600; color: var(--h-alerte); }
.ec-ligne.erreur { font-weight: 600; color: var(--h-erreur); }

/* ========================================================================== extension phase 5 */
/* Boîte photo commune (js/photos.js, cadre()) : liste et fiche de l'agent, onglet Photos, étape 17, tablette du
   propriétaire, fenêtre Offre, vitrine du PNJ. Pictogramme du type de bien (or sur dégradé bleu nuit, décor) tant que
   la photo manque ou est refusée ; image posée PAR-DESSUS à son arrivée (fondu d'entrée unique de 180 ms, coupé en
   mouvement réduit). Aucun texte posé sur l'image ici (les pastilles des modules ont leur propre fond opaque).
   Choix par RECHERCHE (ui.js, choixRecherche) : propositions sur --h-plaque, choisi sur --h-nuit-pale (paires de
   base.css : --h-texte / --h-texte-2 sur --h-nuit-pale, --h-texte-3 sur --h-plaque). */

.h-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    color: var(--hf-or);
    background: linear-gradient(160deg, var(--h-nuit-survol) 0%, var(--h-nuit) 55%, var(--h-nuit-appui) 100%);
}
.h-photo-motif {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.h-photo-motif .ico { width: 34%; height: 34%; max-width: 4.2em; max-height: 4.2em; stroke-width: 1.2; }
.h-photo-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--h-t-moyen) var(--h-courbe);
}
.h-photo.chargee .h-photo-img { opacity: 1; }
.h-photo.chargee .h-photo-motif { visibility: hidden; }

.k-choix { position: relative; display: flex; flex-direction: column; gap: .35em; min-width: 0; }
.k-choix-propositions {
    display: flex;
    flex-direction: column;
    max-height: 12.5em;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--h-plaque);
    border: 1px solid var(--h-filet-fort);
    border-radius: var(--h-r2);
    box-shadow: var(--h-ombre-flottante);
}
.k-choix-propositions[hidden] { display: none; }
.k-choix-proposition {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6em;
    min-height: 2.2em;
    padding: .35em .7em;
    font: inherit;
    text-align: left;
    color: var(--h-texte);
    background: none;
    border: 0;
    border-bottom: 1px solid var(--h-filet-doux);
    cursor: pointer;
}
.k-choix-proposition:last-child { border-bottom: 0; }
.k-choix-proposition:hover, .k-choix-proposition:focus-visible { background: var(--h-nuit-pale); outline: none; }
.k-choix-proposition .k-choix-note { font-size: max(.78em, 9px); color: var(--h-texte-2); }
.k-choix-rien { padding: .55em .7em; font-size: max(.84em, 9px); color: var(--h-texte-3); }
.k-choix-choisi {
    display: flex;
    align-items: center;
    gap: .5em;
    min-height: 2.4em;
    padding: .3em .3em .3em .7em;
    color: var(--h-texte);
    background: var(--h-nuit-pale);
    border: 1px solid var(--h-nuit);
    border-radius: var(--h-r2);
}
.k-choix-choisi > .ico { flex: none; width: 1.05em; height: 1.05em; color: var(--h-or-texte); }
.k-choix-valeur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.k-choix-choisi .btn-icone { width: 1.9em; height: 1.9em; }

@media (prefers-reduced-motion: reduce) {
    .h-photo-img { transition: none; }
}
