:root {
    --navy: #1a2744; --navy2: #243358; --navy3: #2e3f6e;
    --red: #c0392b; --red2: #a93226; --red-bg: #fceae8;
    --gold: #d4a843; --gold2: #b8922e;
    --bg: #f4f5f7; --bg2: #fff; --bg3: #eef0f4;
    --text: #1a1a2e; --text2: #4a4a6a; --text3: #8888aa;
    --border: #dde0ea; --border2: #c5c9d8;
    --green: #27ae60; --green-bg: #eafaf1;
    --orange: #e67e22; --orange-bg: #fef6ec;
    --blue-bg: #eaf2fb; --blue: #2980b9;
    --radius: 10px; --radius-sm: 6px;
    --shadow: 0 2px 12px rgba(26,39,68,0.09);
    --font: -apple-system, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

h1 { font-size: 1.4rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.05rem; margin: 1.75rem 0 0.75rem; color: var(--navy); }
h2:first-child { margin-top: 0; }

a { color: var(--navy3); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App layout ──
   Le châssis (sidebar, topbar, onglets OR récents) reste figé à l'écran :
   #content est la seule zone qui défile, pour que le menu, les onglets et
   les barres de recherche restent toujours visibles. */
#app { display: flex; height: 100vh; }
#sidebar { width: 230px; min-width: 230px; background: var(--navy); display: flex; flex-direction: column; overflow-y: auto; }
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
#topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
#content { flex: 1; padding: 20px 24px 40px; min-width: 0; overflow-y: auto; }

/* ── Sidebar ── */
.brand { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.brand-logo { display: flex; align-items: center; gap: 8px; }
.brand-icon { width: 32px; height: 32px; background: var(--gold); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { color: rgba(255,255,255,0.45); font-size: 11px; }

.nav-section { padding: 10px 0 4px; }
.nav-label { color: rgba(255,255,255,0.35); font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 6px 16px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: rgba(255,255,255,0.7); cursor: pointer; transition: all .15s; font-size: 13px; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255,255,255,0.12); color: #fff; border-left-color: var(--gold); }
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }

/* ── Topbar ── */
.topbar-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.topbar-right form { display: inline; }

/* ── Auth screen (login, no sidebar) ── */
#content.auth-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-card { width: 100%; max-width: 380px; }

/* ── Cards ── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 700; color: var(--text); }
.card-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.card-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent; transition: all .15s;
    background: var(--navy); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--navy2); text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy2); }
.btn-danger { background: var(--bg2); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-secondary, .btn-outline { background: transparent; border-color: var(--border2); color: var(--text2); }
.btn-secondary:hover, .btn-outline:hover { background: var(--bg3); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Forms ── */
form.inline-step { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
form.inline-step select,
form.inline-step input[type="text"],
form.inline-step input[type="number"],
form.inline-step input[type="date"] {
    font-size: 13px; padding: 6px 9px; border: 1px solid var(--border2); border-radius: var(--radius-sm);
    font-family: var(--font); color: var(--text); background: var(--bg2);
}
form.inline-step select:focus,
form.inline-step input:focus { outline: none; border-color: var(--navy3); }
form.inline-step button { font-size: 12px; padding: 6px 12px; cursor: pointer; border-radius: var(--radius-sm); border: none; background: var(--navy); color: #fff; font-weight: 600; }
form.inline-step button:hover { background: var(--navy2); }

.form-stacked { max-width: 420px; margin-top: 1rem; }
.form-stacked .field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.form-stacked label { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; }
.form-stacked input, .form-stacked select, .form-stacked textarea {
    padding: 8px 10px; font-size: 14px; font-family: var(--font); color: var(--text);
    border: 1px solid var(--border2); border-radius: var(--radius-sm); background: var(--bg2);
}
.form-stacked input:focus, .form-stacked select:focus, .form-stacked textarea:focus { outline: none; border-color: var(--navy3); }
.form-stacked button {
    padding: 8px 18px; font-size: 14px; cursor: pointer; border: none; border-radius: var(--radius-sm);
    background: var(--navy); color: #fff; font-weight: 600;
}
.form-stacked button:hover { background: var(--navy2); }

/* ── Tables ──
   .table-scroll est le conteneur qui défile (horizontalement ET
   verticalement, hauteur plafonnée à l'espace visible restant) : c'est
   dedans que les en-têtes de colonnes (th) restent figés en haut pendant
   le défilement d'un long tableau. */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: var(--bg2);
    white-space: nowrap;
}
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
th { background: var(--bg3); color: var(--text2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
tbody tr:hover td { background: var(--blue-bg); }

.table-scroll {
    overflow: auto;
    max-height: calc(100vh - 260px);
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.table-scroll table { border: none; }
.table-scroll thead th, .table-scroll th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--border);
}

/* ── Colonnes redimensionnables (glisser le bord droit d'un en-tête) ──
   Le th est déjà position:sticky (voir plus haut), ce qui suffit à servir de
   repère de positionnement pour la poignée en position:absolute. */
table.resizable th, table.resizable td { overflow: hidden; text-overflow: ellipsis; }
.col-resize-handle {
    position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
    cursor: col-resize; z-index: 3;
}
.col-resize-handle:hover, .col-resize-handle:active { background: rgba(212, 168, 67, 0.5); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-a_faire { background: var(--bg3); color: var(--text2); }
.badge-en_cours { background: #fdf6e3; color: var(--gold2); }
.badge-fait { background: var(--green-bg); color: #1a6e39; }
.badge-bloque { background: var(--red-bg); color: var(--red2); }
.badge-filter {
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
}
.badge-filter:hover { background: var(--bg2); }
.badge-filter-active { background: var(--gold); color: #1a2744; border-color: var(--gold); }

/* ── Progress bar ── */
.progress-bar { background: var(--border); border-radius: 4px; height: 7px; width: 120px; overflow: hidden; display: inline-block; vertical-align: middle; }
.progress-bar-fill { background: var(--gold); height: 100%; }

/* ── Stat cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin: 0.5rem 0 1.5rem; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.stat-card-warning { border-color: var(--red); background: var(--red-bg); }
.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--text3); margin-top: 0.2rem; }

/* ── Photos ── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.photo-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem; text-align: center; }
.photo-card img { width: 100%; height: 120px; object-fit: contain; border-radius: 4px; display: block; background: var(--bg3); }
.photo-card form { margin-top: 0.4rem; }
.photo-card-badges { display: flex; flex-direction: column; gap: 3px; margin-bottom: 4px; min-height: 1px; }
.photo-card-actions { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.4rem; }
.photo-card-actions form { margin-top: 0; }
.photo-card-actions button { width: 100%; font-size: 11px; }
.badge-cover { background: var(--gold); color: #1a2744; }

/* ── Misc ── */
.actions-bar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.actions-bar form { display: inline; }

.breadcrumb { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--text3); }

.hint { font-size: 0.82rem; color: var(--text3); margin-top: 0.75rem; line-height: 1.5; }

.link-button { background: none; border: none; color: var(--navy3); text-decoration: underline; cursor: pointer; font-size: 0.85rem; padding: 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

.flash-list { margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.flash { padding: 9px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; border: 1px solid; }
.flash-error { background: var(--red-bg); border-color: #f3b8b1; color: var(--red2); }
.flash-success { background: var(--green-bg); border-color: #a9dfbf; color: #1a6e39; }
.flash-warning { background: var(--orange-bg); border-color: #fad7a0; color: #784212; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── OR header ── */
.order-hd { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.order-hd-main { flex: 1; min-width: 260px; }
.order-hd-id { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.order-hd-num { font-size: 24px; font-weight: 900; color: var(--navy); letter-spacing: -0.5px; }
.order-hd-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--text2); }
.order-hd-meta strong { color: var(--text); font-weight: 600; }
.order-hd-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.order-hd-progress { display: flex; align-items: center; gap: 8px; }
.order-hd-pct { font-size: 18px; font-weight: 700; color: var(--navy); text-align: right; }
.order-hd-pct-label { font-size: 11px; color: var(--text3); text-align: right; }

/* ── Lock button ── */
.lock-btn { min-width: 46px; border-radius: 8px !important; font-size: 15px !important; padding: 6px 12px !important; font-weight: 700; border: 2px solid transparent !important; }
.lock-btn.is-locked { background: #fee2e2 !important; color: #b91c1c !important; border-color: #fca5a5 !important; }
.lock-btn.is-locked:hover { background: #fecaca !important; }
.lock-btn.is-unlocked { background: #dcfce7 !important; color: #15803d !important; border-color: #86efac !important; }
.lock-btn.is-unlocked:hover { background: #bbf7d0 !important; }
.lock-label { font-size: 12px; font-weight: 700; }

/* ── Checklist (étapes) ── */
.steps-grid { display: flex; flex-direction: column; gap: 6px; }
.step-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg2); transition: all .15s; flex-wrap: wrap; }
.step-row:hover { border-color: var(--border2); }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.step-num.fait { background: var(--green); border-color: var(--green); color: #fff; }
.step-num.en_cours { background: var(--gold); border-color: var(--gold); color: #fff; }
.step-num.bloque { background: var(--red); border-color: var(--red); color: #fff; }
.step-label { flex: 1; font-size: 13px; font-weight: 500; min-width: 160px; }
.step-who { font-size: 11px; color: var(--text3); background: var(--bg3); padding: 2px 8px; border-radius: 10px; }
.step-date { font-size: 11px; color: var(--text3); min-width: 70px; text-align: right; }
.step-status-sel { font-size: 12px; border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px; background: var(--bg2); cursor: pointer; }

/* ── Fiche produit (modèle) ── */
.det-wrap { max-width: 900px; }
.det-topbar { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.det-title-block { flex: 1; }
.det-title { font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.det-ref { font-size: 11px; color: var(--text3); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.det-sku-badge { background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.det-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.det-hero { width: 100%; max-height: 360px; object-fit: contain; border-radius: var(--radius); margin-bottom: 16px; background: var(--bg3); display: block; }
.det-hero-wrap { position: relative; }
.det-hero-wrap .det-hero { margin-bottom: 16px; }
.det-hero-reset { position: absolute; top: 10px; right: 10px; margin: 0; }
.det-hero-reset button { font-size: 11px; opacity: 0.85; }
img.zoomable { cursor: zoom-in; }
.photo-zoom-overlay {
    position: fixed; display: none; max-width: 320px; max-height: 320px;
    border: 2px solid var(--bg2); border-radius: 8px; box-shadow: var(--shadow);
    z-index: 999; pointer-events: none; background: var(--bg2); object-fit: contain;
}

.fc { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.fc-title { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.fg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ff { display: flex; flex-direction: column; gap: 3px; }
.ff label { font-size: 10px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; }
.ff-val { font-size: 13px; color: var(--text); }

.col-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.col-section-hd { display: flex; align-items: center; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); gap: 8px; flex-wrap: wrap; }
.col-section-title { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; flex: 1; }
.col-tbl-wrap { overflow: auto; width: 100%; max-height: calc(100vh - 260px); }
table.col-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 0; display: table; white-space: normal; border: none; }
.col-tbl-wrap .col-tbl th { position: sticky; top: 0; z-index: 2; }
.col-tbl th { text-align: left; padding: 6px 8px; background: var(--bg3); color: var(--text2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.col-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.col-tbl tr:hover td { background: var(--blue-bg); }
.col-thumb { width: 48px; height: 36px; object-fit: contain; border-radius: 4px; display: block; background: var(--bg3); }
.col-thumb-ph { width: 48px; height: 36px; border-radius: 4px; background: var(--bg3); border: 1px dashed var(--border2); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text3); }
/* Miniatures plus grandes pour le module Statistiques (pilotage, récap,
   classement) où repérer visuellement une monture importe davantage. */
.col-thumb-lg { width: 160px; height: 120px; object-fit: contain; border-radius: 8px; display: block; background: var(--bg3); }
.col-thumb-lg-ph { width: 160px; height: 120px; border-radius: 8px; background: var(--bg3); border: 1px dashed var(--border2); display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--text3); }
.add-row-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px dashed var(--border2); border-radius: 5px; background: transparent; cursor: pointer; color: var(--text3); font-size: 11px; transition: all .15s; margin-top: 8px; text-decoration: none; }
.add-row-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--bg3); text-decoration: none; }

/* ── Palmarès (dashboard Statistiques) ── */
.palmares-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.palmares-row { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; }
.palmares-rank-1 { border-color: var(--gold); background: linear-gradient(90deg, rgba(212,168,67,.12), var(--bg2) 40%); }
.palmares-rank-2 { border-color: #b8bec9; background: linear-gradient(90deg, rgba(184,190,201,.16), var(--bg2) 40%); }
.palmares-rank-3 { border-color: #c68a54; background: linear-gradient(90deg, rgba(198,138,84,.14), var(--bg2) 40%); }
.palmares-medal { width: 34px; flex-shrink: 0; text-align: center; font-size: 20px; font-weight: 700; color: var(--text3); }
.palmares-photo { flex-shrink: 0; }
.palmares-photo img { width: 64px; height: 48px; object-fit: contain; border-radius: 6px; background: var(--bg3); display: block; }
.palmares-photo .col-thumb-lg-ph { width: 64px; height: 48px; font-size: 18px; }
.palmares-info { flex: 1; min-width: 0; }
.palmares-ref { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palmares-color { margin: 1px 0 6px; }
.palmares-bar-bg { background: var(--bg3); border-radius: 4px; height: 8px; overflow: hidden; }
.palmares-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; }
.palmares-metrics { display: flex; gap: 18px; flex-shrink: 0; }
.palmares-ventes, .palmares-stock { text-align: center; font-size: 20px; font-weight: 700; color: var(--text); min-width: 64px; }
.palmares-stock { color: var(--text3); font-size: 16px; }
.palmares-metric-label { display: block; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text3); }

.or-section, .pi-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.pi-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg3); border-radius: var(--radius-sm); }
.pi-file-name { font-weight: 600; }

/* ── Sub-tabs within one OR (Suivi étapes / Références / PL / ...) ── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin: 0.5rem 0 1.25rem; overflow-x: auto;
        position: sticky; top: 0; z-index: 5; background: var(--bg2); }
.tab { padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--text3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .15s; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text2); text-decoration: none; }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 700; }
.tab-count { background: var(--bg3); color: var(--text2); font-size: 10px; padding: 1px 5px; border-radius: 8px; margin-left: 4px; }
.tab.active .tab-count { background: var(--blue-bg); color: var(--navy); }

/* ── Sub-tabs du module Statistiques (Pilotage / Récap / Critique / ...) ── */
.app-tabs-bar { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin: 0.5rem 0 1.25rem; overflow-x: auto;
                position: sticky; top: 0; z-index: 5; background: var(--bg2); }
.app-tab { padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--text3); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .15s; white-space: nowrap; text-decoration: none; }
.app-tab:hover { color: var(--text2); text-decoration: none; }
.app-tab.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 700; }

/* ── Barres de recherche/filtre figées en haut de la zone de contenu, pour
   rester accessibles pendant le défilement d'un long tableau ── */
.list-toolbar { position: sticky; top: 0; z-index: 4; background: var(--bg2); padding-top: 6px; padding-bottom: 6px; }
.list-toolbar-stacked { position: sticky; top: 46px; z-index: 4; background: var(--bg2); padding-top: 10px; padding-bottom: 6px; }

/* ── Barre recherche + ajout combinée (catalogue montures) : deux zones
   visuellement distinctes (icône + couleur) plutôt que deux formulaires
   qui se ressemblent. ── */
.list-toolbar-row { position: sticky; top: 0; z-index: 4; background: var(--bg2); padding: 8px 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }
.toolbar-divider { width: 1px; align-self: stretch; background: var(--border); min-height: 28px; }
.toolbar-add { background: var(--gold-bg, #fdf6e6); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 6px 10px; }
form.inline-step .btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; }
form.inline-step .btn-gold:hover { background: var(--gold2); color: #fff; }

/* ── Top strip: recently viewed OR, browser-tab style ── */
.tabs-strip { display: flex; align-items: flex-end; gap: 2px; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 8px 16px 0; overflow-x: auto; flex-shrink: 0; }
.tabs-strip-tab { display: flex; align-items: center; gap: 6px; border-radius: 7px 7px 0 0; font-size: 12px; font-weight: 600; border: 1px solid transparent; border-bottom: none; background: transparent; color: var(--text3); white-space: nowrap; transition: all .12s; }
.tabs-strip-tab a { display: flex; align-items: center; gap: 6px; padding: 7px 4px 8px 12px; color: inherit; text-decoration: none; }
.tabs-strip-tab:hover { background: var(--bg3); color: var(--text2); }
.tabs-strip-tab.active { background: var(--bg); color: var(--text); border-color: var(--border); }
.tabs-strip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tabs-strip-tab form { display: flex; }
.tabs-strip-close { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--text3); opacity: .5; padding: 4px 10px 4px 2px; border-radius: 4px; line-height: 1; }
.tabs-strip-close:hover { opacity: 1; background: var(--border2); color: var(--text); }
.tabs-strip-tab[draggable="true"] { cursor: grab; }
.tabs-strip-tab.dragging { opacity: .4; cursor: grabbing; }

/* ── Catalogue montures : grille produit (façon site e-commerce) ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin: 1rem 0; }
.product-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card-link { display: block; color: inherit; text-decoration: none; }
.product-card-link:hover { text-decoration: none; }
.product-card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg3); display: block; }
.product-card-photo-ph { width: 100%; aspect-ratio: 4 / 3; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 42px; color: var(--text3); }
.product-card-body { padding: 10px 12px 12px; }
.product-card-ref { font-weight: 700; font-size: 13px; color: var(--text); }
.product-card-nom { font-size: 12px; color: var(--text2); margin-top: 2px; min-height: 15px; }
.product-card-cat { display: inline-block; margin-top: 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 10px; background: var(--bg3); color: var(--text2); }
.product-card-edit { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.92); border-radius: 6px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; box-shadow: var(--shadow); }
.product-card-editform { padding: 12px; }
