﻿/* =====================================================================
   HomeBase — Design v2 (d'après maquette) — complète Pico.css
   ===================================================================== */

:root {
    --hb-accent: #2271d6;
    --hb-accent-2: #1b5cb4;
    --hb-soft: #e9f1fc;
    --hb-bg: #f4f6fb;
    --hb-card: #ffffff;
    --hb-border: #e8ecf3;
    --hb-text: #1e2b45;
    --hb-muted: #7b869a;

    --c-indispensable: #e5484d;
    --c-important: #f5a623;
    --c-assez_important: #e0b400;
    --c-bien: #22b06b;
    --c-bonus: #94a3b8;

    --hb-sidebar-w: 232px;
    --hb-topbar-h: 60px;
}

body { background: var(--hb-bg); color: var(--hb-text); }
a { color: var(--hb-accent); }

/* --- Icônes Lucide (tailles par défaut + contextes) --- */
i[data-lucide] { display: inline-flex; width: 1.05em; height: 1.05em; }
svg.lucide { width: 1.05em; height: 1.05em; vertical-align: -.16em; stroke-width: 2; flex: none; }
.hb-logo svg.lucide { width: 1.25em; height: 1.25em; color: var(--hb-accent); }
.hb-side-link .ico { width: 22px; height: 22px; stroke-width: 2; }
.hb-side-link.active .ico { color: var(--hb-accent); }
.hb-tip h4 svg.lucide { color: #f5a623; }
.hb-page-head h1 svg.lucide { width: 1.15em; height: 1.15em; color: var(--hb-accent); vertical-align: -.18em; }
.btn-primary svg.lucide { width: 1.05em; height: 1.05em; }
.hb-bell svg.lucide { width: 18px; height: 18px; }
.pcard-pop svg.lucide { width: 15px; height: 15px; vertical-align: -.15em; margin-right: .2rem; }
.pcard-menu > summary svg.lucide { width: 17px; height: 17px; }
.hb-bottomnav svg.lucide { width: 22px; height: 22px; }
.pcard-ph { color: var(--crit-color, #c4ccda); opacity: .85; }
.pcard-ph svg.lucide { width: 38px; height: 38px; stroke-width: 1.5; }

/* --- Barre de recherche avec icône --- */
.hb-search-wrap { flex: 1 1 260px; position: relative; display: flex; align-items: center; }
.hb-search-wrap svg.lucide { position: absolute; left: .75rem; width: 16px; height: 16px;
                             color: var(--hb-muted); pointer-events: none; }
.hb-search-wrap input { margin: 0; width: 100%; padding-left: 2.2rem; background: var(--hb-card);
                        border: 1px solid var(--hb-border); border-radius: .7rem; font-size: .88rem; }

/* =========================== TOP BAR =============================== */
.hb-topbar { position: sticky; top: 0; z-index: 40; height: var(--hb-topbar-h);
             background: var(--hb-card); border-bottom: 1px solid var(--hb-border);
             display: flex; align-items: center; gap: 1rem; padding: 0 1.1rem; }
.hb-logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem;
           text-decoration: none; color: var(--hb-text); white-space: nowrap; }
.hb-logo span { letter-spacing: -.2px; }
.hb-topbar-right { margin-left: auto; display: flex; align-items: center; gap: .7rem; }

.hb-foyer-switch { display: flex; align-items: center; gap: .45rem; margin: 0;
                   background: var(--hb-bg); border: 1px solid var(--hb-border); border-radius: 2rem;
                   padding: .25rem .5rem; }
.hb-foyer-switch .hb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-left: .25rem; }
.hb-foyer-switch select { margin: 0; border: 0; background: transparent; box-shadow: none;
                          padding: .1rem 1.4rem .1rem .1rem; width: auto; min-width: 120px; height: auto;
                          font-size: .85rem; font-weight: 600; color: var(--hb-text); }
.hb-bell { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hb-border);
           background: var(--hb-card); display: flex; align-items: center; justify-content: center;
           font-size: 1.05rem; text-decoration: none; color: var(--hb-muted); }
.hb-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--hb-accent); color: #fff;
             display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem;
             text-decoration: none; letter-spacing: .3px; }

/* =========================== SHELL / SIDEBAR ====================== */
.hb-shell { display: flex; align-items: flex-start; }
.hb-sidebar { width: var(--hb-sidebar-w); flex: none; position: sticky; top: var(--hb-topbar-h);
              height: calc(100vh - var(--hb-topbar-h)); background: var(--hb-card);
              border-right: 1px solid var(--hb-border); padding: 1rem .75rem; display: flex;
              flex-direction: column; gap: .25rem; overflow-y: auto; }
.hb-side-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: .7rem;
                text-decoration: none; color: var(--hb-text); font-size: .9rem; font-weight: 500; }
.hb-side-link .ico { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.hb-side-link:hover { background: var(--hb-bg); }
.hb-side-link.active { background: var(--hb-soft); color: var(--hb-accent); font-weight: 700; }
.hb-side-badge { margin-left: auto; background: var(--hb-soft); color: var(--hb-accent); font-size: .72rem;
                 font-weight: 700; border-radius: 1rem; padding: .05rem .5rem; }
.hb-side-link.active .hb-side-badge { background: var(--hb-accent); color: #fff; }

.hb-tip { margin-top: 1rem; background: linear-gradient(160deg, var(--hb-soft), #f3f7fd);
          border: 1px solid var(--hb-border); border-radius: .9rem; padding: .85rem; }
.hb-tip h4 { margin: 0 0 .3rem; font-size: .82rem; display: flex; align-items: center; gap: .35rem; }
.hb-tip p { margin: 0; font-size: .76rem; color: var(--hb-muted); line-height: 1.35; }
.hb-side-sep { margin-top: auto; }
.hb-side-foot { display: flex; flex-direction: column; gap: .1rem; padding-top: .5rem; }

/* =========================== MAIN ================================= */
.hb-main { flex: 1 1 auto; min-width: 0; padding: 1.5rem 1.75rem 3rem; }

/* Page head : titre + badge + sous-titre + action */
.hb-page-head { display: flex; align-items: flex-start; justify-content: space-between;
                gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hb-page-head h1 { margin: 0; font-size: 1.4rem; display: flex; align-items: center; gap: .5rem; }
.hb-page-head h2 { margin: 0; font-size: 1.15rem; }
.hb-count-badge { background: color-mix(in srgb, var(--hb-accent) 10%, transparent); color: var(--hb-accent);
                  font-size: .64rem; font-weight: 700; border-radius: 999px; padding: .14rem .6rem;
                  vertical-align: middle; }
.hb-subtitle { margin: .25rem 0 0; color: var(--hb-muted); font-size: .85rem; }

.btn-primary { background: var(--hb-accent); color: #fff; border: 0; border-radius: .7rem;
               padding: .6rem 1rem; font-size: .88rem; font-weight: 600; text-decoration: none;
               display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; margin: 0; white-space: nowrap; }
.btn-primary:hover { background: var(--hb-accent-2); }

/* =========================== TOOLBAR ============================== */
.hb-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.hb-toolbar .hb-search { flex: 1 1 260px; margin: 0; background: var(--hb-card); border: 1px solid var(--hb-border);
                         border-radius: .7rem; font-size: .88rem; }
.hb-toolbar select { margin: 0; width: auto; flex: 0 0 auto; background: var(--hb-card);
                     border: 1px solid var(--hb-border); border-radius: .7rem; font-size: .85rem; font-weight: 600;
                     color: var(--hb-text); padding: .5rem 2rem .5rem .8rem; }

/* =========================== CARTES STOCK (pcard) ================= */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
           gap: .85rem; align-items: start; }
.pcard { position: relative; background: var(--hb-card); border: 1px solid var(--hb-border);
         border-radius: 1rem; padding: .7rem .7rem .8rem; display: flex; flex-direction: column;
         align-items: center; text-align: center; transition: box-shadow .12s ease, border-color .12s ease; }
.pcard:hover { box-shadow: 0 6px 18px rgba(30,43,69,.08); }
/* criticité discrète : petit point coloré dans le coin (pseudo-élément, aucun élément HTML) */
.pcard::after { content: ""; position: absolute; bottom: .55rem; right: .6rem; width: 9px; height: 9px;
                border-radius: 50%; background: var(--crit-color, transparent); }
.pcard-top { position: absolute; top: .5rem; left: .55rem; right: .55rem; display: flex;
             align-items: center; justify-content: space-between; }
.pcard-bm { border: 0; background: transparent; padding: 0; cursor: pointer; line-height: 0; color: var(--hb-muted); }
.pcard-bm svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pcard-bm.is-active { color: var(--hb-accent); }
.pcard-bm.is-active svg { fill: var(--hb-accent); stroke: var(--hb-accent); }
.pcard-bm:disabled { opacity: .4; }

.pcard-menu { position: relative; }
.pcard-menu > summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer;
                        color: var(--hb-muted); line-height: 1; padding: 0 .1rem; background: none; border: 0; }
.pcard-menu > summary::-webkit-details-marker { display: none; }
.pcard-menu > summary::marker { content: ""; }
.pcard-menu > summary::after { display: none !important; content: none !important; }   /* supprime le chevron Pico */
.pcard-menu[open] > summary { color: var(--hb-accent); }
.pcard-pop { position: absolute; top: 1.4rem; right: 0; z-index: 10; background: var(--hb-card);
             border: 1px solid var(--hb-border); border-radius: .6rem; box-shadow: 0 8px 22px rgba(30,43,69,.14);
             min-width: 130px; padding: .25rem; text-align: left; }
.pcard-pop a, .pcard-pop button { display: block; width: 100%; text-align: left; background: transparent;
             border: 0; border-radius: .4rem; padding: .4rem .55rem; font-size: .82rem; color: var(--hb-text);
             text-decoration: none; cursor: pointer; margin: 0; }
.pcard-pop a:hover, .pcard-pop button:hover { background: var(--hb-bg); }
.pcard-pop .danger { color: #d33; }

.pcard-thumb { width: 86px; height: 86px; margin: .4rem 0 .3rem; padding: 16px; box-sizing: border-box;
               display: flex; align-items: center; justify-content: center; font-size: 40px;
               border-radius: 50%;
               background: color-mix(in srgb, var(--crit-color, #94a3b8) 7%, transparent); }
.pcard-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pcard-name { font-weight: 700; font-size: .84rem; line-height: 1.15; min-height: 2.2em;
              display: flex; align-items: center; justify-content: center; }
.pcard-unit { font-size: .7rem; color: var(--hb-muted); margin-top: .1rem; }
.pcard-crit { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600;
              margin-top: .5rem; color: var(--crit-color, var(--hb-muted)); }
.pcard-crit .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crit-color, var(--hb-muted)); }

/* Quantité (− valeur +) — signes dessinés en CSS, parfaitement centrés */
.hb-qty { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .3rem; }
.hb-qty-btn { position: relative; width: 24px; height: 24px; border-radius: 50%; margin: 0;
              border: 1px solid var(--hb-border); background: var(--hb-card); color: var(--hb-muted);
              font-size: 0; padding: 0; cursor: pointer; transition: all .1s ease; }
.hb-qty-btn::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
                      width: 10px; height: 1.6px; background: currentColor; border-radius: 2px; }
.hb-qty-btn.plus::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
                          width: 1.6px; height: 10px; background: currentColor; border-radius: 2px; }
.hb-qty-btn:hover { border-color: var(--hb-accent); color: var(--hb-accent); background: var(--hb-soft); }
.hb-qty-btn:disabled { opacity: .4; cursor: default; }
.hb-qty-val { min-width: 2ch; text-align: center; font-weight: 800; font-size: .82rem; color: var(--hb-accent);
              font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--hb-accent) 10%, transparent);
              border-radius: 999px; padding: .1rem .5rem; }

/* =========================== TUILES génériques (courses / inventaire) */
.hb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem;
            align-items: start; }
.hb-tile { position: relative; background: var(--hb-card); border: 1px solid var(--hb-border);
           border-radius: 1rem; padding: .95rem .7rem .8rem; text-align: center; display: flex;
           flex-direction: column; align-items: center; gap: .35rem; transition: box-shadow .1s ease; }
.hb-tile:hover { box-shadow: 0 6px 18px rgba(30,43,69,.08); }
.hb-tile.is-low { border-color: #f0b37e; }
.hb-tile-edit { position: absolute; top: .4rem; right: .5rem; text-decoration: none; font-size: .8rem; opacity: .4; }
.hb-tile-edit:hover { opacity: 1; }
.hb-cart-toggle { position: absolute; top: .4rem; left: .45rem; width: 28px; height: 28px; border-radius: 50%;
                  border: 1.5px solid var(--hb-border); background: transparent; cursor: pointer; font-size: .8rem;
                  line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
                  filter: grayscale(1); opacity: .5; transition: all .12s ease; }
.hb-cart-toggle:hover { opacity: 1; filter: none; border-color: var(--hb-accent); }
.hb-cart-toggle.is-active { background: #f5a623; border-color: #f5a623; filter: none; opacity: 1; }
.hb-tile-ico { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; font-size: 42px; }
.hb-tile-ico img { width: 58px; height: 58px; object-fit: contain; }
.hb-tile-name { font-weight: 700; font-size: .82rem; line-height: 1.15; }
.hb-tile-cat { font-size: .72rem; color: var(--hb-muted); }
.hb-tile--crit::after { content: ""; position: absolute; bottom: .5rem; right: .55rem; width: 9px; height: 9px;
                        border-radius: 50%; background: var(--crit-color, transparent); }
.hb-tile--sl::after { top: .5rem; bottom: auto; }
.hb-done-btn { margin: .35rem 0 0; padding: .4rem .8rem; width: 100%; font-size: .82rem; background: #22b06b;
               border: 0; color: #fff; border-radius: .6rem; cursor: pointer; font-weight: 600; }
.hb-done-btn:hover { background: #1c9a5d; }
.hb-done-btn:disabled { opacity: .5; cursor: default; }

/* Inventaire (photo) */
.hb-tile-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: .7rem; overflow: hidden;
                 background: var(--hb-soft); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.hb-tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.hb-tile-meta { font-size: .76rem; color: var(--hb-muted); }
.hb-tile-price { font-weight: 700; color: var(--hb-accent); }
.hb-tile--inv { text-align: left; align-items: stretch; }
.hb-tile--inv .hb-tile-name { text-align: left; }

/* =========================== DASHBOARD ============================ */
.hb-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
           padding: 1.1rem 1.3rem; border-radius: 1rem; margin-bottom: 1.4rem; background: var(--hb-card);
           border: 1px solid var(--hb-border); }
.hb-hero-left { display: flex; align-items: center; gap: .9rem; }
.hb-hero-left h1 { margin: 0; font-size: 1.25rem; }
.hb-hero-dot { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.hb-hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.hb-card { background: var(--hb-card); border: 1px solid var(--hb-border); border-radius: 1rem;
           padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; display: block; transition: box-shadow .1s; }
.hb-card:hover { box-shadow: 0 6px 18px rgba(30,43,69,.08); }
.hb-card h3 { margin: 0 0 .3rem; font-size: .95rem; }
.hb-card .hb-big { font-size: 1.9rem; font-weight: 800; color: var(--hb-accent); }
.hb-stat { display: flex; align-items: center; gap: .9rem; }
.hb-stat-ico { font-size: 1.7rem; width: 2.8rem; height: 2.8rem; border-radius: .8rem; flex: none;
               display: flex; align-items: center; justify-content: center; background: var(--hb-soft); }
.hb-stat.is-alert { border-color: #f0a35e; }
.hb-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.hb-chip { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: inherit;
           background: var(--hb-card); border: 1px solid var(--hb-border); border-radius: 2rem;
           padding: .3rem .8rem .3rem .35rem; font-size: .85rem; }
.hb-chip:hover { border-color: var(--hb-accent); }
.hb-chip img { width: 26px; height: 26px; object-fit: contain; }
.hb-chip-ico { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.hb-chip-more { background: var(--hb-accent); color: #fff; padding: .3rem .9rem; font-weight: 600; }

/* =========================== DIVERS ============================== */
.hb-flash { padding: .7rem 1rem; border-radius: .6rem; margin-bottom: 1rem; font-size: .9rem; }
.hb-flash-success { background: #e6f4ea; color: #1e5631; border: 1px solid #b7e0c4; }
.hb-flash-error   { background: #fdecec; color: #8a1f1f; border: 1px solid #f4b8b8; }
.hb-flash-info    { background: var(--hb-soft); color: #1c4e80; border: 1px solid #bcd6f2; }

.hb-table { width: 100%; }
.hb-actions { display: flex; gap: .4rem; }
.hb-actions a, .hb-actions button { padding: .3rem .6rem; font-size: .82rem; margin: 0; }
.hb-att-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: .5rem; border: 1px solid var(--hb-border); display: block; }
.hb-stock-ico-lg { width: 64px; height: 64px; object-fit: contain; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 1rem; font-size: .78rem; font-weight: 600; }
.crit-indispensable   { background:#e5484d; color:#fff; }
.crit-important       { background:#f5a623; color:#3a2600; }
.crit-assez_important { background:#e0b400; color:#3a2f00; }
.crit-bien            { background:#22b06b; color:#04301c; }
.crit-bonus           { background:#94a3b8; color:#fff; }

/* Auth / foyers */
.hb-auth { max-width: 380px; margin: 8vh auto 0; background: var(--hb-card); padding: 1.5rem;
           border: 1px solid var(--hb-border); border-radius: 1rem; }
.hb-auth h1 { text-align: center; }
/* Case « Rester connecté » */
.hb-remember { display: flex; align-items: center; gap: .55rem; font-weight: 400;
               cursor: pointer; margin: 0 0 1rem; }
.hb-remember input[type=checkbox] { width: 1.25em; height: 1.25em; margin: 0; flex: 0 0 auto; }
.hb-foyer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1rem; }
.hb-foyer-btn { border: 2px solid var(--hb-border); border-radius: .9rem; padding: 1.5rem 1rem; text-align: center;
                text-decoration: none; color: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer;
                background: var(--hb-card); width: 100%; }
.hb-foyer-btn:hover { border-color: var(--hb-accent); }
.hb-foyer-swatch { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto .6rem; }

.hb-muted { color: var(--hb-muted); }
.hb-inline-form { display: inline; margin: 0; }
.text-right { text-align: right; }
.hb-footer { display: none; }

/* =========================== MOBILE ============================== */
.hb-bottomnav { display: none; }
@media (max-width: 860px) {
    .hb-sidebar { display: none; }
    .hb-main { padding: 1.1rem 1rem 5rem; }
    .hb-bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
                    background: var(--hb-card); border-top: 1px solid var(--hb-border);
                    box-shadow: 0 -2px 10px rgba(0,0,0,.06); padding: .25rem 0 env(safe-area-inset-bottom,.25rem); }
    .hb-bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem;
                      text-decoration: none; color: var(--hb-muted); padding: .3rem 0; font-size: .9rem; }
    .hb-bottomnav a span { font-size: 1.3rem; line-height: 1; }
    .hb-bottomnav a small { font-size: .66rem; }
    .hb-bottomnav a.active { color: var(--hb-accent); font-weight: 600; }
}
@media (max-width: 480px) {
    .hb-grid, .hb-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
    .hb-toolbar select { flex: 1 1 auto; }
    .hb-topbar-right .hb-foyer-switch select { min-width: 90px; }
}

/* ======================= TICKETS DE CAISSE ======================= */
.hb-receipts { margin: 1rem 0 1.4rem; }
.hb-receipts-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.hb-receipts-head h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: .4rem; }
.hb-receipts-head h2 svg.lucide { width: 1.05em; height: 1.05em; color: var(--hb-accent); }

#hb-import-form { background: var(--hb-card); border: 1px solid var(--hb-border); border-radius: .9rem;
                  padding: 1rem; margin-bottom: .9rem; }
.hb-import-drop { display: flex; align-items: center; justify-content: center; gap: .5rem; text-align: center;
                  border: 2px dashed var(--hb-border); border-radius: .8rem; padding: 1.1rem; cursor: pointer;
                  color: var(--hb-muted); }
.hb-import-drop:hover { border-color: var(--hb-accent); color: var(--hb-accent); }
.hb-import-drop input[type=file] { display: none; }
.hb-import-drop-txt { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.hb-import-actions { display: flex; align-items: center; gap: .7rem; margin-top: .8rem; flex-wrap: wrap; }
#hb-import-submit { display: inline-flex; align-items: center; gap: .4rem; background: var(--hb-accent); color: #fff;
                    border: 0; border-radius: .6rem; padding: .55rem .9rem; font-weight: 700; cursor: pointer; }
#hb-import-submit:disabled { opacity: .5; cursor: default; }
.hb-import-hint { font-size: .8rem; }

.hb-receipt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.hb-receipt-card { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-decoration: none;
                   color: inherit; background: var(--hb-card); border: 1px solid var(--hb-border);
                   border-radius: .8rem; padding: .6rem; }
.hb-receipt-card:hover { border-color: var(--hb-accent); }
.hb-receipt-card img { width: 100%; height: 90px; object-fit: cover; border-radius: .5rem; background: var(--hb-bg); }
.hb-receipt-noimg { width: 100%; height: 90px; display: flex; align-items: center; justify-content: center;
                    border-radius: .5rem; background: var(--hb-bg); color: var(--hb-muted); }
.hb-receipt-store { font-weight: 700; font-size: .82rem; text-align: center; line-height: 1.1; }
.hb-receipt-meta { font-size: .72rem; color: var(--hb-muted); }

/* Le reçu façon ticket papier */
.hb-ticket-wrap { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: flex-start; }
.ticket { flex: 0 0 340px; max-width: 100%; background: #fff; color: #1e2b45;
          font-family: "Courier New", ui-monospace, monospace; padding: 1.2rem 1.3rem; border-radius: .4rem;
          box-shadow: 0 8px 30px rgba(30,43,69,.14); }
.ticket-head { text-align: center; }
.ticket-store { font-size: 1.15rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.ticket-date { font-size: .8rem; color: #5a6577; margin-top: .15rem; }
.ticket-sep { border-top: 1px dashed #b9c0cc; margin: .7rem 0; }
.ticket-row { display: flex; justify-content: space-between; gap: .6rem; padding: .18rem 0; font-size: .86rem; }
.ticket-row-main { display: flex; flex-direction: column; }
.ticket-detail { font-size: .72rem; color: #5a6577; }
.ticket-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; padding-top: .2rem; }
.ticket-empty { text-align: center; color: #5a6577; padding: .6rem 0; font-size: .85rem; }
.ticket-foot { text-align: center; color: #8a93a3; font-size: .7rem; margin-top: .8rem; }

.hb-ticket-side { flex: 1 1 200px; display: flex; flex-direction: column; gap: .8rem; }
.hb-ticket-photo { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.hb-ticket-photo img { width: 100%; max-width: 360px; border-radius: .6rem; border: 1px solid var(--hb-border); }
.hb-ticket-del { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; background: transparent;
                 color: #d33; border: 1px solid #e3b4b4; border-radius: .6rem; padding: .5rem .8rem; cursor: pointer; }
.hb-ticket-del:hover { background: #fdecec; }

/* Overlay pendant l'analyse IA */
#hb-import-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15,17,21,.55);
                     display: flex; align-items: center; justify-content: center; }
.hb-import-overlay-box { background: var(--hb-card); border-radius: 1rem; padding: 2rem 2.4rem; text-align: center;
                         max-width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.hb-import-overlay-box p { margin: .8rem 0 .2rem; font-weight: 700; }
.hb-spinner { width: 42px; height: 42px; margin: 0 auto; border-radius: 50%;
              border: 4px solid var(--hb-border); border-top-color: var(--hb-accent); animation: hb-spin .8s linear infinite; }
@keyframes hb-spin { to { transform: rotate(360deg); } }

