/*
 * apps/_shared/static/css/zbs.css
 * --------------------------------
 * Composants CSS mutualisés de la marque ZeroBullshit, servis sur
 * /shared-static/css/zbs.css par TOUTES les apps ZBS (montage via
 * apps._shared.templating.mount_shared_static).
 *
 * PÉRIMÈTRE :
 * - Tokens couleur / typo ZB (miroir des enquêtes theme-blanc)
 * - Layout : skip-link, en-tête (nav-link, tool-switch)
 * - Composants : cartes, tableaux, badges, formulaires, boutons, tuiles stat
 * - Typographie éditoriale : .title-editorial, .eyebrow, .lede
 * - Impression
 *
 * NE GÈRE PAS :
 * - Le layout de page (→ Tailwind CDN, config dans templates/zbs/base.html)
 * - Les specificités d'une app (→ son propre /static/css)
 * - Les graphiques (→ Chart.js, configuré dans les templates)
 *
 * PIÈGE : les tokens couleur DOIVENT rester en phase avec
 *   front_theme_WP/brands/zerobullshit/style.css (site WP principal).
 * Toute divergence = incohérence visuelle entre le site et les outils.
 */

/* ── Tokens ZB ────────────────────────────────────────────────────────────── */
:root {
    --zb-bg:         #FAFAF8;
    --zb-mod-bg:     #F2F1ED;
    --zb-rose-300:   #E4BBD6;
    --zb-rose-500:   #C98CB7;
    --zb-rose-700:   #8E5880;
    --zb-rose-900:   #472940;
    --zb-bleu-200:   #D4F0F0;
    --zb-bleu-700:   #2D7A7A;
    --zb-noir:       #0D0D0D;
    --zb-border:     rgba(13, 13, 13, 0.09);
    --zb-border-str: rgba(13, 13, 13, 0.16);
    --zb-txt-dim:    rgba(13, 13, 13, 0.72);
    --zb-txt-muted:  rgba(13, 13, 13, 0.38);

    /* États, versions désaturées, lisibles sur fond crème */
    --zb-vert:       #2F6F4F;
    --zb-vert-bg:    #E4F0E8;
    --zb-ambre:      #8A6410;
    --zb-ambre-bg:   #F6ECD5;
    --zb-rouge:      #A33A3A;
    --zb-rouge-bg:   #F6E1E1;

    --zb-radius:     6px;
    --zb-radius-lg:  10px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1 0 auto;
}

.font-mono,
.font-mono *,
.tabular {
    font-variant-numeric: tabular-nums;
}

/* Accessibilité : anneau de focus clavier visible sur toute la marque */
*:focus-visible {
    outline: 2px solid var(--zb-rose-700);
    outline-offset: 2px;
}

/* Scrollbar discrète, accordée au fond crème */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--zb-mod-bg); }
::-webkit-scrollbar-thumb { background: var(--zb-rose-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--zb-rose-500); }

/* Accessibilité : lien d'évitement, visible uniquement au focus clavier */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 10px 16px;
    background: var(--zb-noir);
    color: #fff;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 12px;
    text-decoration: none;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ── En-tête : liens de navigation ────────────────────────────────────────── */
.nav-link {
    padding: 6px 12px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(13, 13, 13, 0.5);
    border-radius: 4px;
    transition: color .2s;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--zb-rose-700);
}

header nav a[aria-current="page"],
header nav a.active {
    color: var(--zb-rose-700);
}

/* ── En-tête : sélecteur « Nos outils » ───────────────────────────────────── */
.tool-switch {
    position: relative;
}

.tool-switch-btn {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(13, 13, 13, 0.5);
    background: none;
    border: 0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

.tool-switch-btn:hover,
.tool-switch-btn[aria-expanded="true"] {
    color: var(--zb-rose-700);
    background: var(--zb-mod-bg);
}

.tool-switch-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    min-width: 280px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
    box-shadow: 0 12px 32px rgba(13, 13, 13, 0.10);
}

.tool-switch-item {
    display: block;
    padding: 8px 10px;
    border-radius: var(--zb-radius);
    text-decoration: none;
    transition: background-color .15s;
}

.tool-switch-item:hover {
    background: var(--zb-mod-bg);
}

.tool-switch-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--zb-noir);
}

.tool-switch-blurb {
    display: block;
    font-size: 11px;
    color: var(--zb-txt-muted);
    margin-top: 1px;
}

/* ── En-tête : recherche (opt-in, apps à search_action) ───────────────────── */
/* Le panneau de résultats est en position absolue SOUS le champ : l'en-tête ne
   change jamais de hauteur quand des résultats arrivent (sinon toute la page
   sursaute à chaque frappe). Le JS vit dans /shared-static/js/zb-search.js. */
.zb-search {
    position: relative;
    display: none;
}

/* Sous 900 px, le champ céderait la place au logo et à la nav mobile : on ne
   l'affiche qu'à partir de là. La page de recherche reste atteignable par son
   URL et par son propre champ, la recherche n'est donc jamais perdue. */
@media (min-width: 900px) {
    .zb-search {
        display: block;
    }
}

.zb-search__input {
    width: 220px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 13px;
    color: var(--zb-noir);
    background: #fff;
    border: 1px solid var(--zb-border-str);
    border-radius: var(--zb-radius);
    transition: border-color .2s, width .2s;
}

.zb-search__input:focus {
    width: 280px;
}

.zb-search__input::placeholder {
    color: var(--zb-txt-muted);
}

.zb-search__results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    width: 340px;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--zb-border-str);
    border-radius: var(--zb-radius-lg);
    box-shadow: 0 8px 24px rgba(13, 13, 13, 0.10);
}

.zb-search__item {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border-bottom: 1px solid var(--zb-border);
}

.zb-search__item:last-child {
    border-bottom: 0;
}

/* .is-active = navigation clavier (↑ ↓). Même rendu que le survol, pour que le
   clavier et la souris ne racontent pas deux histoires différentes. */
.zb-search__item:hover,
.zb-search__item.is-active {
    background: var(--zb-mod-bg);
}

.zb-search__nom {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--zb-noir);
}

.zb-search__meta {
    display: block;
    font-size: 11px;
    color: var(--zb-txt-muted);
    margin-top: 1px;
}

.zb-search__empty {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--zb-txt-muted);
}

/* ── Typographie éditoriale ───────────────────────────────────────────────── */
.title-editorial {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--zb-noir);
}

.title-editorial em {
    font-style: italic;
    color: var(--zb-rose-700);
}

.eyebrow {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zb-rose-700);
}

.lede {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--zb-txt-dim);
}

/* Cartouche de page, bandeau titre au-dessus du contenu */
.page-header {
    border-bottom: 1px solid var(--zb-border);
    background: var(--zb-bg);
}

.page-header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 40px 16px 32px;
}

/* ── Cartes ───────────────────────────────────────────────────────────────── */
.zb-card {
    background: #fff;
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
    padding: 20px 22px;
}

.zb-card-flat {
    background: var(--zb-mod-bg);
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
    padding: 20px 22px;
}

.zb-card-title {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zb-rose-700);
    margin-bottom: 10px;
}

/* Tuile de statistique (compteurs de tête de page) */
.zb-stat {
    background: #fff;
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
    padding: 18px 20px;
}

.zb-stat-value {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--zb-noir);
    font-variant-numeric: tabular-nums;
}

/* PIÈGE ACCESSIBILITÉ (07/08/2026) : ce libellé était en `--zb-txt-muted`
   (noir à 38 %), soit un contraste MESURÉ de 2,52:1 sur fond blanc, très en
   dessous du seuil WCAG AA (4,5:1 pour du petit texte), et c'est le texte le
   moins lisible d'une page alors qu'il DIT CE QUE COMPTE le chiffre à côté.
   `--zb-txt-dim` (72 %) donne 7,94:1 sans rien changer d'autre.
   Ne pas y remettre `--zb-txt-muted` : ce token reste légitime pour du
   décor (placeholders, séparateurs), pas pour un libellé porteur de sens. */
.zb-stat-label {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-txt-dim);
    margin-top: 6px;
}

/*
 * La phrase sous le chiffre : COMMENT il est calculé, sur quelle fenêtre.
 * Règle 13 de CLAUDE.md, un KPI sans son mode de calcul n'est pas vérifiable.
 *
 * POURQUOI ELLE EST ICI ET PLUS EN UTILITAIRES : la macro l'habillait avec des
 * classes Tailwind (`text-xs text-zb-noir/60`). Un composant du socle dont une
 * partie dépend d'une feuille EXTERNE se dégrade à moitié le jour où celle-ci
 * ne charge pas : le chiffre reste petit et le détail passe en corps de texte,
 * ce qui inverse la hiérarchie de lecture. Constaté au rendu le 21/08/2026.
 */
.zb-stat-detail {
    font-size: 12px;
    line-height: 1.45;
    color: var(--zb-txt-dim);
    margin-top: 8px;
}

/*
 * Déclinaisons SÉMANTIQUES de la tuile, ajoutées le 21/08/2026.
 *
 * POURQUOI ELLES ENTRENT DANS LE SOCLE : `.zb-stat` existait, mais sans moyen
 * de dire « ce chiffre est une bonne nouvelle » ou « celui-là est un
 * problème ». Chaque page le faisait donc à sa façon, en collant une couleur
 * utilitaire sur le chiffre et en réinventant le fond et la bordure autour.
 * Relevé avant ce lot sur frenchtech : 48 gros chiffres écrits à la main dans
 * 20 gabarits, contre UN SEUL gabarit qui appelait `.zb-stat`.
 *
 * Aucune couleur nouvelle : ce sont les jetons sémantiques du fichier, ceux
 * qui servent déjà aux badges et aux encarts.
 */
.zb-stat.est-vert  { background: var(--zb-vert-bg);  border-color: rgba(47, 111, 79, 0.30); }
.zb-stat.est-rouge { background: var(--zb-rouge-bg); border-color: rgba(163, 58, 58, 0.30); }
.zb-stat.est-ambre { background: var(--zb-ambre-bg); border-color: rgba(138, 100, 16, 0.30); }
.zb-stat.est-vert  .zb-stat-value { color: var(--zb-vert); }
.zb-stat.est-rouge .zb-stat-value { color: var(--zb-rouge); }
.zb-stat.est-ambre .zb-stat-value { color: var(--zb-ambre); }
.zb-stat.est-vert  .zb-stat-label { color: var(--zb-vert); }
.zb-stat.est-rouge .zb-stat-label { color: var(--zb-rouge); }
.zb-stat.est-ambre .zb-stat-label { color: var(--zb-ambre); }

/*
 * QUAND IL N'Y A RIEN À AFFICHER.
 *
 * C'est le moment où le lecteur a le plus besoin qu'on lui explique ce qui
 * manque, et c'était le bloc le moins soigné du site : quinze gabarits, quinze
 * versions, chacune avec son émoji et son ton.
 *
 * PAS D'ÉMOJI dans le composant : une loupe ou une boîte aux lettres ne dit
 * rien de plus que la phrase en dessous, et le rendu change d'une plateforme à
 * l'autre. Une marque typographique de la palette tient ce rôle sans dépendre
 * du jeu d'émojis du lecteur.
 */
.zb-vide {
    text-align: center;
    padding: 44px 20px;
    color: var(--zb-txt-muted);
    background: #fff;
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
}
.zb-vide-marque {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--zb-rose-300);
}
.zb-vide-titre { font-weight: 600; color: var(--zb-txt-dim); margin-top: 10px; }
.zb-vide-detail { font-size: 13px; margin-top: 4px; }

/*
 * PUCE DE SÉLECTION, un seul état actif pour tout le site.
 *
 * Relevé avant ce lot : CINQ habillages différents pour dire « cette puce est
 * cochée » (noir 13 fois, rose 4, rouge 2, noir/85 2, vert 1). Un lecteur qui
 * passait d'une page à l'autre devait réapprendre à chaque fois ce que veut
 * dire une puce pleine.
 *
 * LE SENS EST PORTÉ PAR LE LIBELLÉ ET LE COMPTEUR, jamais par la couleur du
 * fond : un état d'interface (« coché ») et une sémantique métier (« grave »)
 * ne doivent pas se dire avec le même signal, sinon le rouge devient
 * indéchiffrable. Arbitré le 21/08/2026.
 */
.zb-puce {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: var(--zb-txt-dim);
    border: 1px solid var(--zb-border-str);
    transition: border-color 0.2s, color 0.2s;
}
.zb-puce:hover { border-color: var(--zb-rose-500); color: var(--zb-rose-700); }
.zb-puce.est-actif {
    background: var(--zb-rose-700);
    color: #fff;
    border-color: var(--zb-rose-700);
}
.zb-puces { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zb-puces-titre {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-txt-dim);
}

/*
 * BARRE DE FILTRES. Les champs restent propres à chaque page, l'habillage non :
 * espacement, alignement sur la ligne de base, place des boutons.
 *
 * QUAND L'UTILISER PLUTÔT QUE DES PUCES (arbitré le 21/08/2026) : le formulaire
 * quand les valeurs sont nombreuses (un secteur se choisit dans une liste de
 * trente), les puces quand elles sont quatre ou cinq. Les deux coexistent, mais
 * chacune pour une raison.
 */
.zb-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

/*
 * EN-TÊTE DE PAGE : surtitre, titre, sous-titre, phrase d'introduction chiffrée.
 * Le motif était recopié dans une vingtaine de gabarits, donc il dérivait.
 */
.zb-surtitre {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-rose-700);
    margin-bottom: 6px;
}
.zb-titre-page {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

/* ── Tableaux ─────────────────────────────────────────────────────────────── */
table {
    border-spacing: 0;
}

.zb-table {
    width: 100%;
    background: #fff;
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-lg);
    overflow: hidden;
}

.zb-table thead th {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-txt-muted);
    text-align: left;
    padding: 12px 16px;
    background: var(--zb-mod-bg);
    border-bottom: 1px solid var(--zb-border);
    white-space: nowrap;
}

.zb-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--zb-border);
    font-size: 14px;
    color: var(--zb-txt-dim);
}

.zb-table tbody tr:last-child td {
    border-bottom: 0;
}

.zb-table tbody tr:hover td {
    background: var(--zb-mod-bg);
    transition: background-color 0.1s ease;
}

.zb-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── En-tête de colonne TRIABLE ────────────────────────────────────────────
 * Un tableau se trie par sa barre de titres, pas par un menu « Trier par »
 * posé au milieu des filtres : c'est là que le lecteur regarde, et la flèche
 * y dit le sens courant sans qu'il ait à le déduire.
 *
 * PIÈGE : le padding passe de la cellule au LIEN. Sans ça, la zone cliquable
 * se réduit au texte et les 12px autour ne répondent pas au clic, un en-tête
 * qui a l'air d'un bouton et n'en est un qu'au pixel près.
 *
 * La flèche reste TOUJOURS rendue (↕ sur les colonnes inactives) : si elle
 * n'apparaissait qu'au tri actif, la largeur de la colonne sauterait à chaque
 * clic et tout le tableau se décalerait.
 */
/*
 * TABLEAU PLAT, pour un tableau QUI VIT DÉJÀ DANS UNE CARTE.
 *
 * POURQUOI UNE VARIANTE PLUTÔT QUE `.zb-table` PARTOUT : `.zb-table` porte son
 * propre cadre (fond blanc, bord arrondi, ombre au survol) parce qu'il est
 * conçu pour être posé sur le fond de page. Le mettre dans une carte emboîte
 * deux cadres et deux fonds blancs, ce qui se voit tout de suite.
 *
 * CE QUI EST UNIFIÉ, ET C'EST L'ESSENTIEL : la typographie des en-têtes (DM
 * Mono capitales espacées), l'alignement des nombres, le survol de ligne. Le
 * chrome diffère parce que le CONTEXTE diffère ; le reste est identique, et
 * c'est ce qui fait qu'on lit les deux de la même façon.
 *
 * Relevé avant ce lot : 8 tableaux en carte, chacun avec ses en-têtes en gras
 * bas de casse, dans 3 gabarits (fiche entreprise, fiche personne, levées).
 */
.zb-table-flat {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.zb-table-flat thead th {
    text-align: left;
    padding: 0 0 8px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--zb-txt-dim);
    font-weight: 500;
    border-bottom: 1px solid var(--zb-border);
    white-space: nowrap;
}
.zb-table-flat tbody td {
    padding: 8px 0;
    border-bottom: 1px solid var(--zb-border);
    vertical-align: middle;
}
.zb-table-flat tbody tr:last-child td { border-bottom: 0; }
.zb-table-flat .num { text-align: right; font-variant-numeric: tabular-nums; }

.zb-table thead th.zb-th-tri {
    padding: 0;
}

.zb-table thead th.zb-th-tri > a {
    display: block;
    padding: 12px 16px;
    color: inherit;
    text-decoration: none;
    text-align: inherit;
    transition: color 0.1s ease, background-color 0.1s ease;
}

.zb-table thead th.zb-th-tri > a:hover {
    color: var(--zb-rose-700);
    /* Rose de la charte à 10 %, l'en-tête est DÉJÀ sur --zb-mod-bg, un survol
       repris de ce token ne se verrait pas. Il n'existe pas de --zb-rose-100. */
    background: rgba(201, 140, 183, 0.12);
}

.zb-table thead th.zb-th-tri .fleche {
    margin-left: 6px;
    opacity: 0.3;
}

.zb-table thead th.zb-th-tri.est-actif > a {
    color: var(--zb-rose-700);
}

.zb-table thead th.zb-th-tri.est-actif .fleche {
    opacity: 1;
}

/* Conteneur scrollable : un tableau large ne doit jamais élargir la page */
.zb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Badges d'état ────────────────────────────────────────────────────────── */
.zb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    white-space: nowrap;
}

.zb-badge-neutre  { background: var(--zb-mod-bg);   color: var(--zb-txt-dim); }
.zb-badge-succes  { background: var(--zb-vert-bg);  color: var(--zb-vert); }
.zb-badge-attente { background: var(--zb-ambre-bg); color: var(--zb-ambre); }
.zb-badge-alerte  { background: var(--zb-rouge-bg); color: var(--zb-rouge); }
.zb-badge-info    { background: var(--zb-bleu-200); color: var(--zb-bleu-700); }
.zb-badge-marque  { background: var(--zb-rose-300); color: var(--zb-rose-900); }

/* ── Formulaires ──────────────────────────────────────────────────────────── */
.zb-label {
    display: block;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-txt-muted);
    margin-bottom: 6px;
}

.zb-input,
.zb-select {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--zb-noir);
    background: #fff;
    border: 1px solid var(--zb-border-str);
    border-radius: var(--zb-radius);
    transition: border-color .2s, box-shadow .2s;
}

.zb-hint {
    font-size: 11px;
    color: var(--zb-txt-muted);
    margin-top: 4px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(142, 88, 128, 0.18) !important;
    border-color: var(--zb-rose-700) !important;
}

/* Chevron rose sur les select (l'apparence native casse la charte) */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238E5880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

input[type="range"] {
    accent-color: var(--zb-rose-700);
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.zb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--zb-noir);
    border-radius: var(--zb-radius);
    background: var(--zb-noir);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.zb-btn:hover {
    background: var(--zb-rose-900);
    border-color: var(--zb-rose-900);
}

.zb-btn-ghost {
    background: transparent;
    color: var(--zb-noir);
    border-color: var(--zb-border-str);
}

.zb-btn-ghost:hover {
    background: var(--zb-mod-bg);
    color: var(--zb-rose-700);
    border-color: var(--zb-rose-700);
}

.zb-btn:disabled,
.zb-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Onglets (mortgage_calculator, next_tracker) */
.zb-tab {
    padding: 10px 16px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--zb-txt-muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.zb-tab:hover {
    color: var(--zb-rose-700);
}

.zb-tab.active,
.zb-tab[aria-selected="true"] {
    color: var(--zb-noir);
    border-bottom-color: var(--zb-rose-700);
}

/* ── Liens de contenu ─────────────────────────────────────────────────────── */
.zb-link {
    color: var(--zb-rose-700);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color .2s;
}

.zb-link:hover {
    color: var(--zb-noir);
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.zb-fade-in {
    animation: fadeInUp 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Impression ───────────────────────────────────────────────────────────── */
@media print {
    header,
    footer,
    .tool-switch,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 11pt;
        color: #000;
        background: #fff;
    }

    .zb-card,
    .zb-table {
        border-color: #ccc;
        box-shadow: none;
    }

    table {
        font-size: 10pt;
    }
}
