/*
 * Design system Bee-Cases — espace client.
 *
 * Thème clair, charte conservée : le rouge #C4241C reste la couleur de marque, posé sur des
 * neutres légèrement chauds plutôt que sur le dégradé sombre de l'ancien Frontoffice.
 * Tout passe par des variables : aucune couleur en dur dans les composants.
 */

:root {
    /* Marque */
    --bc-accent: #C4241C;
    --bc-accent-hover: #A81D16;
    --bc-accent-active: #8E1913;
    --bc-accent-wash: #FBEDEC;
    --bc-accent-border: #F0C9C6;

    /* Neutres, légèrement biaisés vers le rouge de la marque */
    --bc-ground: #F6F4F3;
    --bc-surface: #FFFFFF;
    --bc-surface-sub: #F1EDEC;
    --bc-ink: #1A1617;
    --bc-ink-soft: #453C3D;
    --bc-muted: #736869;
    --bc-line: #E4DEDD;
    --bc-line-strong: #CFC5C4;

    /* Sémantique — distincte de la couleur de marque */
    --bc-ok: #1F7A4D;
    --bc-ok-wash: #E8F4ED;
    --bc-warn: #8F6207;
    --bc-warn-wash: #FBF2E0;
    --bc-info: #1C5E8F;
    --bc-info-wash: #E7F0F7;

    /* Typographie */
    --bc-font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --bc-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    /* Trame */
    --bc-radius: 6px;
    --bc-radius-sm: 4px;
    --bc-gap: 16px;
    --bc-shadow: 0 1px 2px rgba(26, 22, 23, .06), 0 1px 3px rgba(26, 22, 23, .04);
    --bc-shadow-raised: 0 4px 12px rgba(26, 22, 23, .10);

    --bc-sidebar-width: 232px;
    --bc-topbar-height: 56px;

    color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--bc-ground);
    color: var(--bc-ink);
    font-family: var(--bc-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
    letter-spacing: -.012em;
}

h1 {
    font-size: 25px;
}

h2 {
    font-size: 21px;
}

h3 {
    font-size: 17px;
}

h4 {
    font-size: 15px;
}

p {
    margin: 0;
}

a {
    color: var(--bc-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--bc-accent);
    outline-offset: 2px;
}

code,
.bc-mono {
    font-family: var(--bc-font-mono);
    font-size: .88em;
}

/* ── Boutons ──────────────────────────────────────────────────────────── */

.bc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: var(--bc-radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.bc-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.bc-btn-primary {
    background: var(--bc-accent);
    border-color: var(--bc-accent);
    color: #FFFFFF;
}

.bc-btn-primary:hover:not(:disabled) {
    background: var(--bc-accent-hover);
    border-color: var(--bc-accent-hover);
}

.bc-btn-primary:active:not(:disabled) {
    background: var(--bc-accent-active);
    border-color: var(--bc-accent-active);
}

.bc-btn-secondary {
    background: var(--bc-surface);
    border-color: var(--bc-line-strong);
    color: var(--bc-ink);
}

.bc-btn-secondary:hover:not(:disabled) {
    background: var(--bc-surface-sub);
    border-color: var(--bc-muted);
}

.bc-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--bc-ink-soft);
}

.bc-btn-ghost:hover:not(:disabled) {
    background: var(--bc-surface-sub);
    color: var(--bc-ink);
}

.bc-btn-danger {
    background: var(--bc-surface);
    border-color: var(--bc-accent-border);
    color: var(--bc-accent);
}

.bc-btn-danger:hover:not(:disabled) {
    background: var(--bc-accent-wash);
    border-color: var(--bc-accent);
}

.bc-btn-sm {
    padding: 4px 9px;
    font-size: 13px;
}

/* Un lien habillé en bouton (aller partager un casier depuis sa ligne) ne se souligne pas. */
a.bc-btn:hover {
    text-decoration: none;
}

/* ── Champs ───────────────────────────────────────────────────────────── */

.bc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bc-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--bc-ink-soft);
}

.bc-input,
.bc-select,
.bc-textarea {
    width: 100%;
    padding: 7px 11px;
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius-sm);
    background: var(--bc-surface);
    color: var(--bc-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.bc-input:focus,
.bc-select:focus,
.bc-textarea:focus {
    outline: none;
    border-color: var(--bc-accent);
    box-shadow: 0 0 0 3px var(--bc-accent-wash);
}

.bc-input::placeholder {
    color: var(--bc-muted);
}

.bc-hint {
    font-size: 12.5px;
    color: var(--bc-muted);
}

/* ── Surfaces ─────────────────────────────────────────────────────────── */

.bc-panel {
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
}

.bc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bc-line);
}

.bc-panel-body {
    padding: 18px;
}

/* ── Tableaux ─────────────────────────────────────────────────────────── */

.bc-table-scroll {
    overflow-x: auto;
}

.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bc-table th {
    text-align: left;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bc-muted);
    border-bottom: 1px solid var(--bc-line-strong);
    white-space: nowrap;
}

.bc-table td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--bc-line);
    vertical-align: middle;
}

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

.bc-table tbody tr:hover td {
    background: var(--bc-surface-sub);
}

.bc-num {
    font-variant-numeric: tabular-nums;
}

/* ── Pastilles d'état ─────────────────────────────────────────────────── */

.bc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}

.bc-chip-neutral {
    background: var(--bc-surface-sub);
    border-color: var(--bc-line-strong);
    color: var(--bc-ink-soft);
}

.bc-chip-ok {
    background: var(--bc-ok-wash);
    border-color: var(--bc-ok);
    color: var(--bc-ok);
}

.bc-chip-warn {
    background: var(--bc-warn-wash);
    border-color: var(--bc-warn);
    color: var(--bc-warn);
}

.bc-chip-info {
    background: var(--bc-info-wash);
    border-color: var(--bc-info);
    color: var(--bc-info);
}

.bc-chip-accent {
    background: var(--bc-accent-wash);
    border-color: var(--bc-accent-border);
    color: var(--bc-accent-active);
}

/* ── Mise en page applicative ─────────────────────────────────────────── */

.bc-shell {
    display: grid;
    grid-template-columns: var(--bc-sidebar-width) 1fr;
    min-height: 100vh;
}

.bc-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--bc-surface);
    border-right: 1px solid var(--bc-line);
}

.bc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--bc-topbar-height);
    padding: 0 18px;
    border-bottom: 1px solid var(--bc-line);
}

.bc-brand img {
    display: block;
    height: 40px;
    margin: auto;
    cursor: pointer;
    border-radius: var(--bc-radius-sm);
}

.bc-brand-mark {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--bc-radius-sm);
    background: var(--bc-accent);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    flex: none;
}

.bc-brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

/* Choix de l'espace, pour Bee-Cases : exploitation du parc ou vue d'un client. */
.bc-space-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin: 12px 10px 0;
    padding: 3px;
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    background: var(--bc-surface-sub);
}

.bc-space-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 8px;
    border-radius: var(--bc-radius-sm);
    color: var(--bc-muted);
    font-size: 13px;
    font-weight: 600;
}

.bc-space-option:hover {
    color: var(--bc-ink);
    text-decoration: none;
}

.bc-space-option.active {
    background: var(--bc-surface);
    color: var(--bc-accent-active);
    box-shadow: var(--bc-shadow);
}

.bc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    flex: 1;
}

.bc-nav-section {
    padding: 14px 8px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bc-muted);
}

.bc-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--bc-radius-sm);
    color: var(--bc-ink-soft);
    font-size: 14px;
    font-weight: 500;
}

.bc-nav-link:hover {
    background: var(--bc-surface-sub);
    color: var(--bc-ink);
    text-decoration: none;
}

.bc-nav-link.active {
    background: var(--bc-accent-wash);
    color: var(--bc-accent-active);
}

.bc-nav-link .bc-nav-icon {
    width: 17px;
    text-align: center;
    flex: none;
    opacity: .85;
}

.bc-sidebar-foot {
    padding: 12px 10px;
    border-top: 1px solid var(--bc-line);
}

.bc-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--bc-topbar-height);
    padding: 0 24px;
    background: var(--bc-surface);
    border-bottom: 1px solid var(--bc-line);
}

.bc-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.bc-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bc-page-head p {
    color: var(--bc-muted);
    font-size: 14px;
    max-width: 70ch;
}

/* ── Utilitaires de trame ─────────────────────────────────────────────── */

.bc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bc-stack {
    display: flex;
    flex-direction: column;
    gap: var(--bc-gap);
}

.bc-grid {
    display: grid;
    gap: var(--bc-gap);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.bc-empty {
    padding: 32px 18px;
    text-align: center;
    color: var(--bc-muted);
    font-size: 14px;
}

/* ── Repère d'environnement ───────────────────────────────────────────── */

.bc-env {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bc-warn-wash);
    border: 1px solid var(--bc-warn);
    color: var(--bc-warn);
    font-size: 12px;
    font-weight: 600;
}

/* ── Étroit ───────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .bc-shell {
        grid-template-columns: 1fr;
    }

    .bc-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--bc-line);
    }

    .bc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
    }

    .bc-nav-section,
    .bc-sidebar-foot {
        display: none;
    }

    .bc-content {
        padding: 16px;
    }

    .bc-topbar {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ── Connexion et démarrage ───────────────────────────────────────────── */

.bc-login {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.bc-login-card {
    width: 100%;
    max-width: 400px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bc-login-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bc-login-head h1 {
    font-size: 19px;
}

.bc-login-head p {
    font-size: 13.5px;
    color: var(--bc-muted);
}

.bc-login-card .bc-btn-primary {
    width: 100%;
    padding-block: 9px;
}

.bc-login-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.bc-code {
    font-family: var(--bc-font-mono);
    font-size: 20px;
    letter-spacing: .3em;
    text-align: center;
}

.bc-login-error,
.bc-login-notice {
    font-size: 13.5px;
    padding: 9px 12px;
    border-radius: var(--bc-radius-sm);
    border: 1px solid;
}

.bc-login-error {
    background: var(--bc-accent-wash);
    border-color: var(--bc-accent-border);
    color: var(--bc-accent-active);
}

.bc-login-notice {
    background: var(--bc-ok-wash);
    border-color: var(--bc-ok);
    color: var(--bc-ok);
}

.bc-boot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 60vh;
    color: var(--bc-muted);
    font-size: 14px;
}

.bc-boot-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--bc-line-strong);
    border-top-color: var(--bc-accent);
    border-radius: 50%;
    animation: bc-spin .7s linear infinite;
}

@keyframes bc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Identité en barre haute ──────────────────────────────────────────── */

.bc-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.bc-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bc-accent-wash);
    border: 1px solid var(--bc-accent-border);
    color: var(--bc-accent-active);
    font-size: 11.5px;
    font-weight: 700;
    flex: none;
}

.bc-identity-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.bc-identity-name {
    font-size: 13.5px;
    font-weight: 500;
}

.bc-identity-customer {
    font-size: 12px;
    color: var(--bc-muted);
}

.bc-search {
    width: auto;
    min-width: 220px;
}

/* Pagination sous une liste servie page par page. */
.bc-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-top: 1px solid var(--bc-line);
}

.bc-pager-size {
    padding-block: 4px;
    font-size: 13px;
}

/* Clients d'une personne, chacun suivi de ses ruches (écran Tous les utilisateurs). */
.bc-org-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-org-list li {
    display: flex;
    flex-direction: column;
}

/* Liste déroulante posée dans une rangée de filtres, à la largeur de son contenu. */
.bc-select-inline {
    width: auto;
    min-width: 140px;
}

@media (max-width: 560px) {
    .bc-search,
    .bc-select-inline {
        min-width: 0;
        width: 100%;
    }
}

/* ── Indicateurs du tableau de bord ───────────────────────────────────── */

.bc-stats {
    display: grid;
    gap: var(--bc-gap);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.bc-stat {
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-stat-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bc-muted);
}

.bc-stat-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.bc-stat-value-sm {
    font-size: 22px;
}

.bc-stat-unit {
    font-size: 17px;
    font-weight: 500;
    color: var(--bc-muted);
    margin-left: 2px;
}

.bc-stat-hint {
    font-size: 12.5px;
    color: var(--bc-muted);
}

.bc-meter {
    height: 5px;
    border-radius: 999px;
    background: var(--bc-surface-sub);
    border: 1px solid var(--bc-line);
    overflow: hidden;
}

.bc-meter-fill {
    display: block;
    height: 100%;
    background: var(--bc-accent);
}

/* ── Invitation et actions de ligne ───────────────────────────────────── */

.bc-invite-grid {
    display: grid;
    gap: var(--bc-gap);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bc-invite-hint {
    margin-top: 10px;
}

.bc-invite-actions {
    margin-top: 14px;
}

.bc-role-select {
    width: auto;
    min-width: 150px;
    padding-block: 4px;
    font-size: 13px;
}

.bc-actions {
    gap: 6px;
    flex-wrap: nowrap;
}

.bc-error-detail {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: var(--bc-surface-sub);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-sm);
    font-family: var(--bc-font-mono);
    font-size: 12.5px;
    color: var(--bc-ink-soft);
    white-space: pre-wrap;
    overflow-x: auto;
}

/* ── Fiche utilisateur ────────────────────────────────────────────────── */

.bc-detail-grid {
    display: grid;
    gap: var(--bc-gap);
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: start;
}

.bc-identity-lg {
    gap: 14px;
}

.bc-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.bc-identity-link {
    color: inherit;
    text-decoration: none;
}

.bc-identity-link:hover {
    text-decoration: none;
}

.bc-identity-link:hover .bc-identity-name {
    color: var(--bc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Matrice des accès ────────────────────────────────────────────────── */

.bc-matrix th,
.bc-matrix td {
    vertical-align: middle;
}

.bc-matrix-corner {
    min-width: 180px;
}

/* Les noms de casiers sont courts et nombreux : la colonne reste étroite. */
.bc-matrix-head {
    text-align: center;
    min-width: 68px;
    font-size: 11.5px;
}

.bc-matrix-row-head {
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-size: 14px;
    color: var(--bc-ink);
    font-weight: 600;
    border-right: 1px solid var(--bc-line);
}

.bc-matrix-cell {
    text-align: center;
    padding-inline: 6px;
}

.bc-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--bc-accent);
    cursor: pointer;
}

.bc-checkbox:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.bc-linklike {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--bc-accent);
    cursor: pointer;
    text-align: left;
}

.bc-linklike:disabled {
    color: var(--bc-ink);
    cursor: default;
}

.bc-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

/* Échéance d'une règle : jour, heure et minutes sur une ligne. */
.bc-schedule {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.bc-panel-flag {
    border-left: 3px solid var(--bc-warn);
}

.bc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 14px;
}

.bc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.bc-check input[type="checkbox"] {
    accent-color: var(--bc-accent);
    width: 15px;
    height: 15px;
}

.bc-member-list {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.bc-member {
    padding: 7px 9px;
    border-radius: var(--bc-radius-sm);
}

.bc-member:hover {
    background: var(--bc-surface-sub);
}

/* ── Sélecteur de client ──────────────────────────────────────────────── */

.bc-picker {
    position: relative;
}

.bc-picker-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius-sm);
    background: var(--bc-surface);
    color: var(--bc-ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    max-width: 260px;
}

.bc-picker-trigger:hover {
    background: var(--bc-surface-sub);
}

.bc-picker-trigger>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-picker-caret {
    font-size: 10px;
    color: var(--bc-muted);
}

.bc-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: 290px;
    max-width: calc(100vw - 32px);
    padding: 10px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow-raised);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bc-picker-search {
    font-size: 13.5px;
}

.bc-picker-hint {
    margin: 0;
}

.bc-picker-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 280px;
    overflow-y: auto;
}

.bc-picker-option {
    text-align: left;
    padding: 7px 9px;
    border: 0;
    border-radius: var(--bc-radius-sm);
    background: transparent;
    color: var(--bc-ink);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
}

.bc-picker-option:hover {
    background: var(--bc-surface-sub);
}

.bc-picker-option.active {
    background: var(--bc-accent-wash);
    color: var(--bc-accent-active);
    font-weight: 600;
}

.bc-picker-error {
    font-size: 12.5px;
    color: var(--bc-accent-active);
    margin: 0;
}

.bc-picker-left {
    right: auto;
    left: 0;
}

/* Ruche examinée par un écran Bee-Cases, choisie parmi tout le parc. */
.bc-fleet-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bc-fleet-picker .bc-select {
    max-width: 320px;
}

.bc-picker-tag {
    margin-left: 7px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bc-surface-sub);
    border: 1px solid var(--bc-line-strong);
    color: var(--bc-muted);
    font-size: 10.5px;
    font-weight: 600;
}

/* ── Confirmation en bulle ────────────────────────────────────────────── */

/*
 * Question posée à gauche de son bouton, sur une seule ligne : elle tient dans la hauteur d'une
 * rangée de tableau, dont le défilement horizontal rognerait ce qui dépasse en hauteur.
 */
.bc-popconfirm-anchor {
    position: relative;
    display: inline-flex;
}

/* Fond invisible : un clic ailleurs referme la bulle au lieu d'agir sur la page. */
.bc-popconfirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.bc-popconfirm {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    z-index: 41;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 12px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow-raised);
    white-space: nowrap;
    animation: bc-modal-fade .12s ease-out;
}

/* Pointe tournée vers le bouton qui a posé la question. */
.bc-popconfirm::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -5px;
    width: 10px;
    height: 10px;
    background: var(--bc-surface);
    border-top: 1px solid var(--bc-line-strong);
    border-right: 1px solid var(--bc-line-strong);
    transform: translateY(-50%) rotate(45deg);
}

.bc-popconfirm-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--bc-ink);
}

/* ── Filtres d'activité ───────────────────────────────────────────────── */

.bc-filters {
    display: grid;
    gap: var(--bc-gap);
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

/* ── Fiche de faits ───────────────────────────────────────────────────── */

.bc-facts {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bc-facts>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bc-facts dt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bc-muted);
}

.bc-facts dd {
    margin: 0;
    font-size: 14.5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bc-date-input {
    width: auto;
    min-width: 140px;
    padding-block: 4px;
    font-size: 13px;
}

/* ── Bandeau d'attention du tableau de bord ──────────────────────────── */

.bc-attention {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bc-attention-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.bc-attention-list {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.bc-attention-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bc-recipients {
    margin-top: 16px;
}
/* Journaux techniques : du texte brut, qu'on lit sans le reformater. La largeur est bornée par
   un défilement propre plutôt que par un retour à la ligne qui casserait l'alignement des traces. */
.bc-log {
    margin: 0;
    padding: 12px 14px;
    max-height: 480px;
    overflow: auto;
    background: var(--bc-surface-sunken, #f5f5f7);
    border: 1px solid var(--bc-border, #e2e2e6);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre;
    tab-size: 4;
}

/* ── Modale ───────────────────────────────────────────────────────────── */

/* La page ne défile plus derrière une modale ouverte. */
body:has(.bc-modal-backdrop) {
    overflow: hidden;
}

.bc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 16px 16px;
    background: rgba(26, 22, 23, .45);
    overflow-y: auto;
    animation: bc-modal-fade .12s ease-out;
}

.bc-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 8vh - 16px);
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    box-shadow: 0 12px 40px rgba(26, 22, 23, .22);
    outline: none;
}

.bc-modal-wide {
    max-width: 880px;
}

.bc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bc-line);
}

.bc-modal-head h3 {
    margin: 0;
}

.bc-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--bc-radius-sm);
    background: transparent;
    color: var(--bc-muted);
    font-size: 16px;
    cursor: pointer;
}

.bc-modal-close:hover:not(:disabled) {
    background: var(--bc-surface-sub);
    color: var(--bc-ink);
}

.bc-modal-close:disabled {
    opacity: .4;
    cursor: default;
}

.bc-modal-message {
    margin: 14px 18px 0;
}

/* Le contenu défile seul : l'en-tête et sa croix restent à portée. */
.bc-modal-content {
    overflow-y: auto;
}

/* Barre de recherche en tête de modale, là où elle se trouvait dans l'en-tête du panneau. */
.bc-modal-toolbar {
    padding: 14px 18px 0;
}

.bc-modal-toolbar .bc-search {
    flex: 1;
    min-width: 0;
}

@keyframes bc-modal-fade {
    from {
        opacity: 0;
    }
}

@media (max-width: 560px) {
    .bc-modal-backdrop {
        padding: 16px;
    }

    .bc-modal {
        max-height: calc(100vh - 32px);
    }
}

/* ── Assistant pas à pas (partage d'un casier) ────────────────────────── */

/*
 * Une question par étape, le fil d'étapes en tête et les boutons Précédent / Suivant au pied,
 * toujours visibles : le pied reste collé en bas du contenu de la modale quand celui-ci défile.
 */

.bc-steps {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 14px 18px 0;
    list-style: none;
}

.bc-step {
    flex: 1;
    min-width: 0;
}

.bc-step-button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 3px solid var(--bc-line);
    background: transparent;
    color: var(--bc-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.bc-step-button:disabled {
    cursor: default;
}

.bc-step-button:hover:not(:disabled) .bc-step-label {
    color: var(--bc-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bc-step-num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--bc-line-strong);
    border-radius: 50%;
    background: var(--bc-surface);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bc-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-step.is-done .bc-step-button {
    border-bottom-color: var(--bc-accent-border);
    color: var(--bc-ink-soft);
}

.bc-step.is-done .bc-step-num {
    border-color: var(--bc-accent-border);
    background: var(--bc-accent-wash);
    color: var(--bc-accent-active);
    font-size: 10px;
}

.bc-step.is-current .bc-step-button {
    border-bottom-color: var(--bc-accent);
    color: var(--bc-ink);
    font-weight: 600;
}

.bc-step.is-current .bc-step-num {
    border-color: var(--bc-accent);
    background: var(--bc-accent);
    color: #fff;
}

.bc-wizard-body {
    display: flex;
    flex-direction: column;
    gap: var(--bc-gap);
    padding: 18px;
}

.bc-wizard-question {
    font-size: 16px;
}

.bc-wizard-custom {
    max-width: 260px;
}

.bc-wizard-note {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bc-wizard-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--bc-line);
    background: var(--bc-surface);
    border-radius: 0 0 var(--bc-radius) var(--bc-radius);
}

/* Le chargement tient dans la modale, sans la hauteur d'écran du démarrage de l'application. */
.bc-modal .bc-boot {
    min-height: 180px;
}

/* Choix d'un élément parmi d'autres : casier, type de destinataire, utilisateur. */
.bc-pick-grid,
.bc-choice-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.bc-pick-grid {
    max-height: 340px;
    overflow-y: auto;
    padding: 2px;
}

.bc-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bc-pick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 13px;
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius);
    background: var(--bc-surface);
    color: var(--bc-ink);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

.bc-pick:hover:not(.is-selected) {
    border-color: var(--bc-muted);
    background: var(--bc-surface-sub);
}

.bc-pick.is-selected {
    border-color: var(--bc-accent);
    background: var(--bc-accent-wash);
    box-shadow: inset 0 0 0 1px var(--bc-accent);
}

.bc-pick-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.bc-pick-sub {
    font-size: 12.5px;
    color: var(--bc-muted);
}

.bc-choice-icon {
    font-size: 18px;
    color: var(--bc-muted);
}

.bc-pick.is-selected .bc-choice-icon {
    color: var(--bc-accent);
}

/* Liste d'utilisateurs : une ligne chacun, nom puis adresse. */
.bc-pick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 2px;
}

.bc-pick-row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-block: 8px;
}

/* Valeurs toutes faites (durée, nombre d'ouvertures), qui passent à la ligne sur mobile. */
.bc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bc-preset {
    padding: 6px 14px;
    border: 1px solid var(--bc-line-strong);
    border-radius: 999px;
    background: var(--bc-surface);
    color: var(--bc-ink-soft);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
}

.bc-preset:hover:not([aria-pressed="true"]) {
    background: var(--bc-surface-sub);
}

.bc-preset[aria-pressed="true"] {
    border-color: var(--bc-accent);
    background: var(--bc-accent-wash);
    color: var(--bc-accent-active);
    font-weight: 600;
}

/* Récapitulatif : libellé, valeur, et de quoi revenir sur l'étape concernée. */
.bc-recap {
    margin: 0;
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
}

.bc-recap-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.bc-recap-row + .bc-recap-row {
    border-top: 1px solid var(--bc-line);
}

.bc-recap dt {
    font-size: 13px;
    font-weight: 500;
    color: var(--bc-muted);
}

.bc-recap dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.bc-recap dd .bc-chip {
    margin-left: 6px;
}

/* Écran de fin : ce qui est parti, et le lien à transmettre soi-même au besoin. */
.bc-wizard-done {
    align-items: center;
    text-align: center;
}

.bc-wizard-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bc-ok-wash);
    color: var(--bc-ok);
    font-size: 22px;
}

.bc-wizard-done-text {
    font-size: 15px;
    font-weight: 500;
}

.bc-wizard-link {
    width: 100%;
    max-width: 560px;
    text-align: left;
}

.bc-wizard-link .bc-row {
    flex-wrap: nowrap;
}

.bc-wizard-link .bc-input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 560px) {
    /* Sur mobile, le fil ne garde que les numéros, sauf pour l'étape courante qui prend la place. */
    .bc-step-label {
        display: none;
    }

    .bc-step.is-current {
        flex: 3;
    }

    .bc-step.is-current .bc-step-label {
        display: inline;
    }

    .bc-recap-row {
        grid-template-columns: 1fr auto;
    }

    .bc-recap dt {
        grid-column: 1 / -1;
    }
}

/* ── Reines (Journaux, ruches V2) ─────────────────────────────────────── */

.bc-reine + .bc-reine {
    border-top: 1px solid var(--bc-line);
}

.bc-reine-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bc-reine-head h4 {
    margin: 0 0 2px;
    font-size: 15px;
}

/* ── Vue « ruches » du parc ───────────────────────────────────────────── */

/*
 * Mur de supervision : l'état de chaque ruche d'un coup d'œil, sur le modèle de la page de statut
 * Adviser. L'état se lit aussi dans le texte : la couleur ne le porte jamais seule.
 */

.bc-segment {
    display: inline-flex;
    border: 1px solid var(--bc-line-strong);
    border-radius: var(--bc-radius-sm);
    background: var(--bc-surface);
    overflow: hidden;
}

.bc-segment button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border: 0;
    background: transparent;
    color: var(--bc-ink-soft);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
}

.bc-segment button + button {
    border-left: 1px solid var(--bc-line-strong);
}

.bc-segment button:hover:not([aria-pressed="true"]) {
    background: var(--bc-surface-sub);
}

.bc-segment button[aria-pressed="true"] {
    background: var(--bc-accent-wash);
    color: var(--bc-accent-active);
    font-weight: 600;
}

.bc-wall {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bc-wall-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 14px 18px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
}

.bc-wall-overview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.bc-wall-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.bc-wall-status.is-up {
    background: var(--bc-ok-wash);
    color: var(--bc-ok);
}

.bc-wall-status.is-warning {
    background: var(--bc-warn-wash);
    color: var(--bc-warn);
}

.bc-wall-status.is-down {
    background: var(--bc-accent);
    color: #fff;
}

.bc-wall-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

.bc-wall-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    animation: bc-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}

.bc-wall-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bc-wall-counter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 2px 11px;
    border-radius: 999px;
    border: 1px solid var(--bc-line-strong);
    background: var(--bc-surface-sub);
    color: var(--bc-ink-soft);
    font-size: 13px;
}

.bc-wall-counter::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bc-line-strong);
}

.bc-wall-counter b {
    color: var(--bc-ink);
    font-weight: 700;
}

.bc-wall-counter.is-up::before { background: var(--bc-ok); }
.bc-wall-counter.is-down::before { background: var(--bc-accent); }
.bc-wall-counter.is-warning::before { background: var(--bc-warn); }
.bc-wall-counter.is-zero { opacity: .55; }

.bc-wall-refresh {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--bc-muted);
}

.bc-wall-refresh.is-lost {
    padding: 2px 11px;
    border: 1px solid var(--bc-warn);
    border-radius: 999px;
    background: var(--bc-warn-wash);
    color: var(--bc-warn);
    font-weight: 600;
}

.bc-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bc-ok);
    animation: bc-blink 2s ease-in-out infinite;
}

@keyframes bc-ping {
    75%, 100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes bc-blink {
    50% {
        opacity: .3;
    }
}

/* Groupes de tuiles : un canal, ou un client. */

.bc-wall-group-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--bc-line-strong);
}

.bc-wall-group-head h3 {
    font-size: 16px;
}

.bc-wall-group-tally {
    margin-left: auto;
    font-size: 13px;
    color: var(--bc-muted);
}

.bc-tiles {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

/*
   La cellule d'une tuile : la tuile et son tooltip. Le tooltip est à côté de la tuile et non dedans,
   car elle coupe ce qui déborde (overflow) et estompe une ruche désactivée (opacité).
*/

.bc-tile-cell {
    position: relative;
    display: flex;
}

.bc-tile-cell > .bc-tile {
    flex: 1;
    min-width: 0;
}

/* Au-dessus des tuiles voisines, qui sont positionnées elles aussi. */
.bc-tile-cell:hover,
.bc-tile-cell:focus-within {
    z-index: 20;
}

.bc-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 9px 12px;
    background: var(--bc-ink);
    color: var(--bc-surface);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow-raised);
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
}

/* Une courte pause avant l'apparition : traverser le mur à la souris ne fait pas clignoter les bulles. */
.bc-tile-cell:hover > .bc-tooltip,
.bc-tile-cell:focus-within > .bc-tooltip {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .12s ease .3s, transform .12s ease .3s, visibility 0s linear .3s;
}

.bc-tooltip ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bc-tooltip li + li {
    margin-top: 2px;
}

.bc-tooltip-foot {
    margin: 7px 0 0;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
    .bc-tooltip,
    .bc-tile-cell:hover > .bc-tooltip,
    .bc-tile-cell:focus-within > .bc-tooltip {
        transition: none;
        transform: none;
    }
}

/* Une tuile : le nom, l'état, l'autre axe de regroupement, la dernière communication. */

.bc-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px 11px 18px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
}

.bc-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--bc-line-strong);
}

.bc-tile.is-up::before { background: var(--bc-ok); }
.bc-tile.is-unstable::before,
.bc-tile.is-unknown::before { background: var(--bc-warn); }

.bc-tile.is-down {
    border-color: var(--bc-accent-border);
    background: var(--bc-accent-wash);
}

.bc-tile.is-down::before { background: var(--bc-accent); }

.bc-tile.is-disabled {
    opacity: .65;
}

.bc-tile.is-openable {
    cursor: pointer;
}

.bc-tile.is-openable:hover {
    box-shadow: var(--bc-shadow-raised);
}

.bc-tile-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.bc-tile-name {
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bc-ink);
    text-align: left;
    overflow-wrap: anywhere;
}

button.bc-tile-name {
    cursor: pointer;
}

button.bc-tile-name:hover:not(:disabled) {
    color: var(--bc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

button.bc-tile-name:disabled {
    cursor: default;
}

.bc-tile-state {
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.bc-tile.is-up .bc-tile-state { color: var(--bc-ok); }
.bc-tile.is-down .bc-tile-state { color: var(--bc-accent-active); }
.bc-tile.is-unstable .bc-tile-state,
.bc-tile.is-unknown .bc-tile-state { color: var(--bc-warn); }
.bc-tile.is-disabled .bc-tile-state { color: var(--bc-muted); }

.bc-tile-sub {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.bc-tile-hint {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-tile-age {
    flex-shrink: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 12.5px;
    color: var(--bc-muted);
    white-space: nowrap;
}

.bc-tile-age i {
    font-size: 11px;
}

.bc-tile.is-down .bc-tile-age {
    color: var(--bc-accent-active);
    font-weight: 600;
}

.bc-tile-note {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--bc-muted);
}

.bc-tile-note i {
    font-size: 11px;
}

.bc-tile.is-down .bc-tile-note {
    color: var(--bc-accent-active);
}

/* ── Frise d'un objet (page Objets) ──────────────────────────────────── */

.bc-timeline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.bc-timeline-stat {
    background: var(--bc-surface-sub);
    border-radius: var(--bc-radius);
    padding: 10px 12px;
}

.bc-timeline-stat dt {
    color: var(--bc-muted);
    font-size: 12px;
}

.bc-timeline-stat dd {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 600;
}

.bc-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Le trait qui relie les points. */
.bc-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--bc-line);
}

.bc-timeline-item {
    position: relative;
    padding: 0 0 18px 32px;
}

.bc-timeline-item:last-child {
    padding-bottom: 0;
}

.bc-timeline-dot {
    position: absolute;
    left: 0;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bc-surface);
    box-shadow: 0 0 0 1px var(--bc-line-strong);
    background: var(--bc-muted);
}

.bc-timeline-dot-ongoing { background: var(--bc-info); }
.bc-timeline-dot-taken { background: var(--bc-warn); }
.bc-timeline-dot-returned { background: var(--bc-ok); }
.bc-timeline-dot-lost { background: var(--bc-accent); }
.bc-timeline-dot-created { background: var(--bc-muted); }

.bc-timeline-when {
    color: var(--bc-muted);
    font-size: 12px;
}

.bc-timeline-title {
    font-weight: 600;
}

.bc-timeline-meta {
    color: var(--bc-ink-soft);
    font-size: 13px;
}

.bc-timeline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
