/* Back-office V2. Valeurs reprises des variables Figma « BO Tokens » et des styles de texte « BO/… ». */

/* DM Sans variable : l'axe opsz adapte le dessin à la taille (titres plus fins et serrés que le texte courant). */
@font-face { font-family: 'DM Sans'; font-weight: 100 1000; font-display: swap; src: url('../fonts/DMSans/DMSans-Variable.woff2') format('woff2'); }

:root {
    --color-bg-page: #f8f9fa;
    --color-bg-subtle: #f8f9fa;
    --color-bg-surface: #ffffff;
    --color-border: #e9ecef;
    --color-border-strong: #dee2e6;
    --color-text-primary: #212529;
    --color-text-body: #495057;
    --color-text-secondary: #6c757d;
    --color-text-inverse: #ffffff;
    --color-brand: #e34c0d;
    --color-brand-strong: #c73f09;
    --color-brand-strong-hover: #a83507;
    --color-brand-soft: #fbede6;
    --color-chart-track: #f1f3f5;
    --color-chart-muted: #dee2e6;
    --color-success: #1e7f4f;
    --color-warning: #9a5b00;
    --color-danger: #b3261e;
    --color-neutral: #6c757d;
    --color-info: #2b5fa8;

    --radius-m: 12px;
    --radius-l: 12px;
    --color-card-border: #e9ecef;
    --radius-pill: 999px;

    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;

    --text-xs: 13px;
    --lh-xs: 18px;
    --text-s: 14px;
    --lh-s: 20px;
    --text-m: 15px;
    --lh-m: 22px;
    --text-l: 16px;
    --lh-l: 24px;

    --sidebar-width: 280px;
    --header-height: 69px;
}

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

html { background: var(--color-bg-page); }

body {
    margin: 0;
    min-width: 1280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
    color: var(--color-text-body);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: var(--text-m);
    line-height: var(--lh-m);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; font-weight: inherit; font-size: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Titres et chiffres clés en foncé ; le texte courant reste en --color-text-body. */
.bo-page-title, .bo-card-title, .bo-summary__title, .bo-auth__title, .bo-value-l, .bo-stat__value,
.bo-goal__value, .bo-amount-hero__value, .bo-finance-currency, .bo-rte__area h2, .bo-rte__area h3 { color: var(--color-text-primary); }

/* Texte */
.bo-text-secondary { color: var(--color-text-secondary); }
.bo-caption { font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); }
.bo-micro { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-strong { font-weight: 600; }
.bo-medium { font-weight: 500; }
.bo-card-title { font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -0.1px; }
.bo-value-l { font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -0.3px; }
.bo-ellipsis { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-link-brand { color: var(--color-brand-strong-hover); font-weight: 500; }
.bo-positive { color: var(--color-success); }
.bo-nowrap { white-space: nowrap; }
.bo-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Icônes : fichiers Figma appliqués en masque, la couleur suit le texte. */
.bo-icon {
    display: inline-block;
    flex-shrink: 0;
    width: var(--icon-size, 19px);
    height: var(--icon-size, 19px);
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.bo-icon[data-icon="grid"] { --icon: url('icons/grid.svg'); }
.bo-icon[data-icon="ticket"] { --icon: url('icons/ticket.svg'); }
.bo-icon[data-icon="stadium"] { --icon: url('icons/stadium.svg'); }
.bo-icon[data-icon="qr"] { --icon: url('icons/qr.svg'); }
.bo-icon[data-icon="vote"] { --icon: url('icons/vote.svg'); }
.bo-icon[data-icon="heart"] { --icon: url('icons/heart.svg'); }
.bo-icon[data-icon="store"] { --icon: url('icons/store.svg'); }
.bo-icon[data-icon="building"] { --icon: url('icons/building.svg'); }
.bo-icon[data-icon="users"] { --icon: url('icons/users.svg'); }
.bo-icon[data-icon="wallet"] { --icon: url('icons/wallet.svg'); }
.bo-icon[data-icon="card"] { --icon: url('icons/card.svg'); }
.bo-icon[data-icon="message"] { --icon: url('icons/message.svg'); }
.bo-icon[data-icon="megaphone"] { --icon: url('icons/megaphone.svg'); }
.bo-icon[data-icon="layout"] { --icon: url('icons/layout.svg'); }
.bo-icon[data-icon="shield"] { --icon: url('icons/shield.svg'); }
.bo-icon[data-icon="chevron-right"] { --icon: url('icons/chevron-right.svg'); }
.bo-icon[data-icon="chevron-down"] { --icon: url('icons/chevron-down.svg'); }
.bo-icon[data-icon="search"] { --icon: url('icons/search.svg'); }
.bo-icon[data-icon="bell"] { --icon: url('icons/bell.svg'); }
.bo-icon[data-icon="eye"] { --icon: url('icons/eye.svg'); }
.bo-icon[data-icon="eye-off"] { --icon: url('icons/eye-off.svg'); }
.bo-icon[data-icon="plus"] { --icon: url('icons/plus.svg'); }
.bo-icon[data-icon="pause"] { --icon: url('icons/pause.svg'); }
.bo-icon[data-icon="play"] { --icon: url('icons/play.svg'); }
.bo-icon[data-icon="edit"] { --icon: url('icons/edit.svg'); }
.bo-icon[data-icon="globe"] { --icon: url('icons/globe.svg'); }
.bo-icon[data-icon="arrow-left"] { --icon: url('icons/arrow-left.svg'); }
.bo-icon[data-icon="arrow-right"] { --icon: url('icons/arrow-right.svg'); }
.bo-icon[data-icon="trend"] { --icon: url('icons/trend.svg'); }
.bo-icon[data-icon="star"] { --icon: url('icons/star.svg'); }
.bo-icon[data-icon="copy"] { --icon: url('icons/copy.svg'); }
.bo-icon[data-icon="check"] { --icon: url('icons/check.svg'); }
.bo-icon[data-icon="cart"] { --icon: url('icons/cart.svg'); }
.bo-icon[data-icon="lock"] { --icon: url('icons/lock.svg'); }
.bo-icon[data-icon="x"] { --icon: url('icons/x.svg'); }
.bo-icon[data-icon="upload"] { --icon: url('icons/upload.svg'); }
.bo-icon[data-icon="send"] { --icon: url('icons/send.svg'); }
.bo-icon[data-icon="alert"] { --icon: url('icons/alert.svg'); }
.bo-icon[data-icon="calendar"] { --icon: url('icons/calendar.svg'); }
.bo-icon[data-icon="zap"] { --icon: url('icons/zap.svg'); }
.bo-icon[data-icon="clock"] { --icon: url('icons/clock.svg'); }
.bo-icon[data-icon="download"] { --icon: url('icons/download.svg'); }
.bo-icon[data-icon="image"] { --icon: url('icons/image.svg'); }

/* Éviter qu'un élément masqué reste lisible */
.bo-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Barre de progression de Turbo */
.turbo-progress-bar { height: 3px; background: var(--color-brand); }

/* Header */
.bo-header {
    display: flex;
    align-items: center;
    position: sticky; top: 0; z-index: 30;
    height: var(--header-height);
    padding: 12px 20px 12px 24px;
    background: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
}
.bo-header__logo { width: calc(var(--sidebar-width) - 24px); flex-shrink: 0; display: flex; align-items: center; height: 44px; }
.bo-header__logo img { width: 140px; height: 44px; display: block; }
.bo-header__actions { display: flex; align-items: center; gap: var(--space-12); flex-shrink: 0; margin-left: auto; }
.bo-header__search { display: flex; align-items: center; gap: var(--space-8); }
.bo-header__round {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--color-bg-page);
    border-radius: var(--radius-pill);
    --icon-size: 18px;
}
.bo-header__round:hover { background: var(--color-chart-track); }

.bo-profile { position: relative; }
.bo-profile > summary {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--color-bg-page);
    border-radius: var(--radius-pill);
    cursor: pointer;
    list-style: none;
}
.bo-profile > summary::-webkit-details-marker { display: none; }
.bo-profile__identity { display: flex; flex-direction: column; font-size: var(--text-xs); line-height: var(--lh-xs); white-space: nowrap; }
.bo-profile__identity strong { font-weight: 600; }
.bo-profile__identity span { color: var(--color-text-secondary); }
.bo-profile__menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
    min-width: 240px; padding: 8px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    box-shadow: 0 8px 24px rgba(23, 23, 26, .08);
}
.bo-profile__menu a, .bo-profile__menu button {
    display: block; width: 100%; padding: 8px 10px;
    text-align: left; background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.bo-profile__menu a:hover, .bo-profile__menu button:hover { background: var(--color-bg-page); }

/* Recherche */
.bo-search {
    width: 300px; height: 44px; padding: 0 14px;
    background: var(--color-bg-page);
    border: 1px solid transparent;
    border-radius: var(--radius-m);
    outline: 0;
    color: var(--color-text-primary);
}
.bo-search--filter { flex: 1 1 320px; max-width: 440px; width: auto; height: 40px; background: var(--color-bg-surface); border-color: var(--color-border-strong); }
.bo-search::placeholder { color: var(--color-text-secondary); opacity: 1; }
.bo-search:focus { border-color: var(--color-text-secondary); }
.bo-search-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0; padding: 0;
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    border: 0;
    border-radius: var(--radius-m);
    cursor: pointer;
    --icon-size: 18px;
}
.bo-search-btn:hover { background: var(--color-text-secondary); }
.bo-search-btn:disabled { background: var(--color-border-strong); cursor: not-allowed; }
.bo-search-btn--soft { width: 44px; height: 44px; background: var(--color-bg-page); color: var(--color-text-primary); }
.bo-search-btn--soft:hover { background: var(--color-chart-track); }

/* Corps */
.bo-body { flex: 1 1 auto; display: flex; align-items: stretch; }
.bo-content { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-20); background: var(--color-bg-page); }
.bo-frame { display: flex; flex-direction: column; gap: var(--space-16); }

/* Sidebar */
.bo-sidebar {
    width: var(--sidebar-width); flex-shrink: 0;
    position: sticky; top: var(--header-height); align-self: flex-start;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    display: flex; flex-direction: column; gap: var(--space-16);
    padding: 20px 16px;
    background: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    scrollbar-width: thin;
}
.bo-nav-section { display: flex; flex-direction: column; gap: 2px; }
.bo-nav-section__title { padding: 0 12px 4px; font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); }
.bo-nav-item {
    display: flex; align-items: center; gap: var(--space-12);
    height: 38px; padding: 0 12px;
    border-radius: var(--radius-m);
    cursor: pointer;
}
.bo-nav-item:hover { background: var(--color-bg-page); }
.bo-nav-item__label { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-nav-item--active { background: var(--color-brand-soft); color: var(--color-brand-strong-hover); font-weight: 600; }
.bo-nav-item--active:hover { background: var(--color-brand-soft); }
.bo-nav-item__count {
    padding: 1px 7px;
    background: var(--color-chart-track);
    border-radius: 7px;
    color: var(--color-text-primary);
    font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 600;
}
.bo-nav-item__chevron { --icon-size: 14px; color: var(--color-text-secondary); transition: transform .1s; }
.bo-nav-group > summary { list-style: none; }
.bo-nav-group > summary::-webkit-details-marker { display: none; }
.bo-nav-group[open] .bo-nav-item__chevron { transform: rotate(90deg); }
.bo-nav-group__items { display: flex; flex-direction: column; gap: 2px; padding-left: 31px; }
.bo-nav-group__items .bo-nav-item { height: 34px; }

/* Boutons */
.bo-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
    height: 44px; padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-m);
    font-size: var(--text-l); line-height: var(--lh-l); font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    --icon-size: 18px;
}
.bo-btn--s { height: 36px; padding: 0 12px; font-size: var(--text-m); line-height: var(--lh-m); }
.bo-btn--primary { background: var(--color-brand-strong); color: var(--color-text-inverse); }
.bo-btn--primary:hover { background: var(--color-brand-strong-hover); }
.bo-btn--secondary { background: var(--color-bg-surface); border-color: var(--color-border-strong); color: var(--color-text-primary); }
.bo-btn--secondary:hover { background: var(--color-bg-subtle); }
.bo-btn--dark { background: var(--color-text-primary); color: var(--color-text-inverse); }
.bo-btn--dark:hover { background: var(--color-text-secondary); }
.bo-btn--block { width: 100%; }
/* Désactivé : par manque de droit, ou par Turbo pendant l'envoi (attribut disabled sur le bouton). */
.bo-btn:disabled, .bo-btn.is-disabled { cursor: not-allowed; }
.bo-btn--primary:disabled, .bo-btn--primary.is-disabled,
.bo-btn--dark:disabled, .bo-btn--dark.is-disabled { background: var(--color-border-strong); color: var(--color-text-inverse); }
.bo-btn--secondary:disabled, .bo-btn--secondary.is-disabled { background: var(--color-bg-surface); color: var(--color-border-strong); }

.bo-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    cursor: pointer;
    --icon-size: 17px;
}
.bo-icon-btn:hover { background: var(--color-bg-subtle); }
.bo-icon-btn:disabled, .bo-icon-btn.is-disabled { color: var(--color-border-strong); cursor: not-allowed; }

/* Statuts */
.bo-badge {
    display: inline-flex; align-items: center; padding: 3px 10px; white-space: nowrap;
    font-size: var(--text-xs); line-height: 18px; font-weight: 600;
    border-radius: 999px; background: #eeeeeb; color: #55555a;
}
.bo-badge--success { background: #e3f3ea; color: #176a41; }
.bo-badge--warning { background: #fdf0da; color: #875000; }
.bo-badge--danger { background: #fbe6e4; color: var(--color-danger); }
.bo-badge--info { background: #e6eefa; color: var(--color-info); }
.bo-badge--brand { background: var(--color-brand-soft); color: var(--color-brand-strong-hover); }
.bo-mark { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; --icon-size: 14px; }
.bo-mark .bo-icon { color: var(--color-brand-strong-hover); }

/* Onglets : sur le fond de page, jamais dans une carte */
.bo-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bo-tab {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
    height: 36px; padding: 0 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-weight: 500;
    white-space: nowrap;
}
.bo-tab:hover { background: var(--color-bg-subtle); }
.bo-tab__count { font-weight: 400; color: var(--color-text-secondary); }
.bo-tab--active, .bo-tab--active:hover { background: var(--color-text-primary); border-color: var(--color-text-primary); color: var(--color-text-inverse); }
.bo-tab--active .bo-tab__count { color: var(--color-text-inverse); }

/* Carte */
.bo-card { display: flex; flex-direction: column; gap: 14px; padding: var(--space-20); background: var(--color-bg-surface); border-radius: var(--radius-l); min-width: 0; }
.bo-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
.bo-card__link { display: inline-flex; align-items: center; gap: var(--space-4); font-size: var(--text-s); line-height: var(--lh-s); font-weight: 600; color: var(--color-brand-strong-hover); white-space: nowrap; --icon-size: 14px; }
.bo-card--empty { align-items: center; gap: 10px; padding: 56px; text-align: center; }

/* Indicateur */
.bo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-16); }
.bo-stat { display: flex; flex-direction: column; background: var(--color-bg-surface); border-radius: var(--radius-l); min-width: 0; }
.bo-stat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); padding: 18px 18px 14px; }
.bo-stat__label { font-size: var(--text-l); line-height: var(--lh-l); color: var(--color-text-secondary); }
.bo-stat__value { margin-top: var(--space-4); font-size: 38px; line-height: 44px; font-weight: 500; letter-spacing: -0.5px; }
.bo-stat__pill { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; --icon-size: 21px; }
.bo-stat__pill--brand { background: var(--color-brand-strong); color: var(--color-text-inverse); }
.bo-stat__pill--dark { background: var(--color-text-primary); color: var(--color-text-inverse); }
.bo-stat__pill--soft { background: var(--color-brand-soft); color: var(--color-brand-strong-hover); }
.bo-stat__foot { display: flex; gap: var(--space-4); padding: 12px 18px; border-top: 1px solid var(--color-chart-track); color: var(--color-text-secondary); flex-wrap: wrap; }
.bo-stat__foot strong { font-weight: 600; color: var(--color-text-primary); }

/* Divers */
.bo-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; background: var(--color-text-primary); color: var(--color-text-inverse); border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 600; }
.bo-thumb { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; background: var(--color-brand-soft); color: var(--color-brand-strong-hover); border-radius: var(--radius-m); --icon-size: 20px; }
.bo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bo-thumb--cover { width: auto; aspect-ratio: 5 / 3; }
.bo-thumb--contain { background: var(--color-bg-surface); border: 1px solid var(--color-chart-track); color: var(--color-text-secondary); }
.bo-thumb--contain img { padding: 4px; object-fit: contain; background: var(--color-bg-surface); }
.bo-thumb--l { width: 72px; height: 72px; border-radius: 20px; --icon-size: 33px; }
.bo-date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 56px; flex-shrink: 0; background: var(--color-brand-soft); border-radius: var(--radius-m); white-space: nowrap; }
.bo-date-chip strong { font-size: var(--text-l); line-height: var(--lh-l); font-weight: 600; }
.bo-date-chip span { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-progress { display: block; height: 6px; overflow: hidden; background: var(--color-chart-track); border-radius: 3px; }
.bo-progress__value { display: block; height: 6px; background: var(--color-brand); border-radius: 3px; }

/* Champs */
.bo-select { position: relative; display: inline-flex; flex-shrink: 0; min-width: 0; }
.bo-select--block { display: flex; width: 100%; }
.bo-select select { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.bo-select__trigger {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-8);
    width: 100%; height: 40px; max-width: 240px; padding: 0 12px 0 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-m);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.bo-select--block .bo-select__trigger { max-width: none; height: 44px; }
.bo-select__trigger:hover, .bo-select--open .bo-select__trigger { background: var(--color-bg-subtle); }
.bo-select__trigger:disabled { color: var(--color-border-strong); cursor: not-allowed; }
.bo-select__value { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bo-select__value--placeholder { color: var(--color-text-primary); }
.bo-select--block .bo-select__value { font-weight: 400; }
.bo-select--block .bo-select__value--placeholder { color: var(--color-text-secondary); }
.bo-select__trigger .bo-icon { --icon-size: 16px; color: var(--color-text-secondary); transition: transform .1s; }
.bo-select--open .bo-select__trigger .bo-icon { transform: rotate(180deg); }
.bo-select__panel {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
    min-width: 100%; width: max-content; max-width: 380px; padding: 8px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    box-shadow: 0 8px 24px rgba(23, 23, 26, .1);
}
.bo-select--block .bo-select__panel { left: 0; right: auto; width: 100%; max-width: none; }
.bo-select__panel[hidden] { display: none; }
.bo-select__search {
    width: 100%; height: 38px; margin-bottom: 6px; padding: 0 12px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    outline: 0;
}
.bo-select__search:focus { border-color: var(--color-text-secondary); }
.bo-select__list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.bo-select__option {
    display: block; width: 100%; padding: 8px 10px;
    background: none; border: 0; border-radius: 8px;
    text-align: left; cursor: pointer;
}
.bo-select__option:hover, .bo-select__option--active { background: var(--color-bg-page); }
.bo-select__option--selected { color: var(--color-brand-strong-hover); font-weight: 600; }
.bo-select__option[hidden] { display: none; }
.bo-select__option:disabled, .bo-select__option:disabled:hover { background: none; color: var(--color-border-strong); cursor: not-allowed; }
.bo-select__empty { padding: 8px 10px; color: var(--color-text-secondary); }
.bo-field { display: flex; flex-direction: column; gap: 6px; }
.bo-field label { font-weight: 500; }
.bo-field input {
    height: 44px; width: 100%; padding: 0 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-m);
}
.bo-field input:focus { outline: 2px solid var(--color-border-strong); outline-offset: 0; }
.bo-checkbox { width: 18px; height: 18px; margin: 0; accent-color: var(--color-brand-strong); border-radius: 5px; cursor: pointer; }

/* Tableau */
.bo-table-wrap { border: 1px solid var(--color-chart-track); border-radius: 14px; overflow: hidden; }
.bo-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bo-table th {
    padding: 10px 6px;
    background: var(--color-bg-subtle);
    font-size: var(--text-s); line-height: var(--lh-s); font-weight: 400;
    color: var(--color-text-secondary);
    text-align: left;
    white-space: nowrap;
}
.bo-table td { padding: 8px 6px; border-top: 1px solid var(--color-chart-track); vertical-align: middle; }
.bo-table th:first-child, .bo-table td:first-child { padding-left: 14px; }
.bo-table th:last-child, .bo-table td:last-child { padding-right: 14px; }
.bo-table .bo-num { text-align: right; }
.bo-table__sort { display: inline-flex; align-items: center; gap: 2px; }
.bo-table__sort:hover { color: var(--color-text-primary); }
.bo-table__sort--active { color: var(--color-text-primary); font-weight: 500; }
.bo-table__sort .bo-icon { --icon-size: 12px; }
.bo-table__sort--asc .bo-icon { transform: rotate(180deg); }
.bo-table__title { display: flex; align-items: center; gap: var(--space-12); min-width: 0; }
.bo-table__title > div { min-width: 0; flex: 1 1 0; }
.bo-table__actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Pagination */
.bo-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.bo-pagination__pages { display: flex; gap: var(--space-4); }
.bo-page {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 6px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-weight: 500;
}
.bo-page:hover { background: var(--color-bg-subtle); }
.bo-page--active, .bo-page--active:hover { background: var(--color-text-primary); border-color: var(--color-text-primary); color: var(--color-text-inverse); }
.bo-page--off { color: var(--color-border-strong); pointer-events: none; }
.bo-page--gap { border: 0; background: none; pointer-events: none; }

/* Filtres : une carte à part, au-dessus de la carte de la liste */
.bo-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); padding: 16px var(--space-20); background: var(--color-bg-surface); border-radius: var(--radius-l); }
.bo-filters__space { flex: 1 1 0; }
.bo-filters__reset { padding: 0 6px; color: var(--color-text-secondary); text-decoration: underline; white-space: nowrap; font-size: var(--text-s); }
.bo-filters__reset:hover { color: var(--color-text-primary); }

/* Modale : attribut popover natif, sans script */
.bo-modal {
    width: 520px; max-width: calc(100vw - 32px);
    padding: 24px;
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    border: 0;
    border-radius: var(--radius-l);
    box-shadow: 0 24px 64px rgba(23, 23, 26, .24);
}
.bo-modal::backdrop { background: rgba(23, 23, 26, .45); }
.bo-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-16); }
.bo-modal__close { padding: 0; background: none; border: 0; cursor: pointer; color: var(--color-text-secondary); --icon-size: 20px; }
.bo-modal__body { display: flex; flex-direction: column; gap: var(--space-16); }
.bo-modal__foot { display: flex; justify-content: flex-end; gap: var(--space-8); margin-top: 24px; }

/* Messages flash */
.bo-flashes { position: fixed; top: calc(var(--header-height) + 12px); right: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-8); pointer-events: none; }
.bo-flash {
    display: flex; align-items: center; gap: 10px;
    max-width: 560px; padding: 12px 16px;
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-m);
    font-weight: 500;
    --icon-size: 16px;
    animation: bo-flash-out .3s ease-in 6s forwards;
}
.bo-flash--error { background: var(--color-danger); animation-delay: 12s; }
.bo-flash--warning { background: var(--color-warning); animation-delay: 12s; }
@keyframes bo-flash-out { to { opacity: 0; visibility: hidden; } }

/* Tableau de bord */
.bo-dash-row { display: grid; gap: var(--space-16); }
/* Deux tiers, un tiers : mêmes bords de colonnes que la rangée de trois cartes. */
.bo-dash-row--trend, .bo-dash-row--recent { grid-template-columns: calc((100% - 2 * var(--space-16)) * 2 / 3 + var(--space-16)) minmax(0, 1fr); }
.bo-dash-row--recent > :only-child { grid-column: 1 / -1; }
.bo-dash-row--live { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bo-dash-block { display: block; min-height: 120px; background: var(--color-bg-surface); border-radius: var(--radius-l); }
.bo-dash-block[complete], .bo-dash-block--stats { background: none; }
.bo-dash-block--stats { min-height: 147px; }
.bo-dash-block > .bo-card { height: 100%; }

.bo-chart { display: flex; gap: var(--space-8); }
.bo-chart__y { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; width: 38px; height: 210px; margin-top: 26px; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-chart__area { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bo-chart__bars { display: flex; align-items: flex-end; gap: 6px; height: 210px; margin-top: 26px; }
.bo-chart__col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.bo-chart__bar { position: relative; width: 100%; min-height: 2px; background: var(--color-chart-muted); border-radius: 4px 4px 0 0; }
.bo-chart__col--peak .bo-chart__bar { background: var(--color-brand); }
.bo-chart__tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: 3px 8px; background: var(--color-brand-strong); color: var(--color-text-inverse); border-radius: 8px; font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 600; white-space: nowrap; }
.bo-chart__x { display: flex; gap: 6px; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-chart__x span { flex: 1 1 0; min-width: 0; text-align: center; }
.bo-chart__avg { display: flex; align-items: center; gap: var(--space-8); font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); --icon-size: 14px; }

.bo-split { display: flex; gap: 3px; height: 26px; padding: 4px; border: 1px solid var(--color-chart-track); border-radius: 10px; }
.bo-split > span { height: 16px; border-radius: 5px; min-width: 3px; }
.bo-legend { display: flex; align-items: center; gap: var(--space-8); }
.bo-legend__dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.bo-legend__label { flex: 1 1 0; min-width: 0; }
.bo-tone-tickets { background: var(--color-brand); }
.bo-tone-votes { background: var(--color-text-primary); }
.bo-tone-donations { background: var(--color-chart-muted); }
.bo-rows { display: flex; flex-direction: column; gap: var(--space-8); }
.bo-rows__row { display: flex; align-items: center; gap: var(--space-8); font-size: var(--text-s); line-height: var(--lh-s); }
.bo-rows__row > span:first-child { flex: 1 1 0; min-width: 0; color: var(--color-text-secondary); }

.bo-live-event { display: flex; gap: var(--space-12); }
.bo-live-event > .bo-live-line { flex: 1 1 0; }
.bo-live-list { display: flex; flex-direction: column; gap: var(--space-20); }
.bo-live-line { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bo-live-progress { display: flex; align-items: center; gap: 10px; }
.bo-live-progress .bo-progress { flex: 0 1 160px; }
.bo-live-item__line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-8); }

.bo-feed { display: flex; flex-direction: column; gap: 14px; }
.bo-feed__item { display: flex; gap: var(--space-12); }
.bo-feed__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; background: var(--color-bg-page); border-radius: 10px; --icon-size: 16px; }

/* Fiche */
.bo-summary { display: flex; align-items: center; gap: var(--space-16); padding: var(--space-20); background: var(--color-bg-surface); border-radius: var(--radius-l); }
.bo-summary__info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.bo-summary__title { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.3px; }
.bo-summary__marks { display: flex; flex-wrap: wrap; gap: 14px; }
.bo-sheet { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-16); align-items: start; }
.bo-sheet__col { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; }
.bo-settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-12); }
.bo-setting { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-8); padding: var(--space-12); border: 1px solid var(--color-chart-track); border-radius: var(--radius-m); }
.bo-setting form, .bo-setting .bo-btn { width: 100%; }
.bo-date-head { display: flex; align-items: center; gap: var(--space-12); }
.bo-date-head__info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bo-actions { display: flex; flex-direction: column; gap: 10px; }
.bo-actions form { display: block; }
.bo-info { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 16px 0; border-top: 1px solid var(--color-chart-track); }
.bo-info > span:first-child { color: var(--color-text-secondary); flex-shrink: 0; }
.bo-info > :last-child { text-align: right; min-width: 0; }
.bo-public-link { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--color-chart-track); }
.bo-public-link__box { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--color-bg-page); border-radius: 10px; font-size: var(--text-s); line-height: var(--lh-s); }
.bo-public-link__box a { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-copy { padding: 0; background: none; border: 0; cursor: pointer; --icon-size: 15px; }

/* Formulaires */
.bo-form { display: flex; flex-direction: column; gap: var(--space-16); }
.bo-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); }
.bo-form__foot { display: flex; justify-content: flex-end; gap: var(--space-8); }
.bo-field textarea, .bo-field input[type="file"] {
    width: 100%; padding: 10px 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-m);
}
.bo-field textarea { min-height: 120px; resize: vertical; }
.bo-field__help { font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-field--error input, .bo-field--error textarea, .bo-field__error { border-color: var(--color-danger); color: var(--color-danger); }

/* Encadré d'information ou d'alerte dans une carte */
.bo-note { padding: 12px 14px; background: var(--color-bg-page); border-radius: var(--radius-m); color: var(--color-text-secondary); }
.bo-note--warning { background: #fdf3e3; color: var(--color-warning); }
.bo-note--danger { background: #fbeae9; color: var(--color-danger); }

/* Montant affiché en deux lignes dans une colonne, ou séries de valeurs libellées */
.bo-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-12); }
.bo-kv > div { padding: var(--space-12); border: 1px solid var(--color-chart-track); border-radius: var(--radius-m); }


/* Montant ou pourcentage : l'unité est dans le champ */
.bo-input-unit { position: relative; }
.bo-input-unit input:has(+ .bo-input-unit__label) { padding-right: 72px; }
.bo-input-unit__label { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--color-text-secondary); font-weight: 500; pointer-events: none; }

/* Champ image : aperçu et champ fichier visible */
.bo-image-preview { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-m); }
.bo-image-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bo-image-preview img[hidden] { display: none; }
.bo-image-preview__empty { display: none; align-items: center; gap: var(--space-8); color: var(--color-text-secondary); font-size: var(--text-xs); }
.bo-image-preview[data-empty] .bo-image-preview__empty { display: inline-flex; }
.bo-image-preview--cover { width: 100%; max-width: 360px; aspect-ratio: 5 / 3; }
.bo-image-preview--square { width: 160px; aspect-ratio: 1; }
.bo-image-preview--wide { width: 100%; max-width: 520px; aspect-ratio: 16 / 7; }
.bo-image-preview--contain { width: 160px; aspect-ratio: 1; background: var(--color-bg-surface); }
.bo-image-preview--contain img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.bo-image-preview--document { width: 100%; max-width: 240px; aspect-ratio: 4 / 3; }
.bo-image-preview--document img { object-fit: contain; }
.bo-image-preview--document[data-empty] { display: none; }
.bo-field input[type="file"] { height: auto; padding: 8px; cursor: pointer; }
.bo-field input[type="file"]::file-selector-button {
    margin-right: 12px; padding: 7px 14px; cursor: pointer; font: inherit; font-weight: 500;
    color: var(--color-text-primary); background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-m);
}
.bo-field input[type="file"]::file-selector-button:hover { background: var(--color-bg-subtle); }

/* Éditeur de texte riche */
bo-rich-text { display: block; }
.bo-rte { border: 1px solid var(--color-border-strong); border-radius: var(--radius-m); background: var(--color-bg-surface); overflow: hidden; }
.bo-rte:focus-within { outline: 2px solid var(--color-border-strong); }
.bo-rte__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; background: var(--color-bg-subtle); border-bottom: 1px solid var(--color-border); }
.bo-rte__sep { width: 1px; height: 20px; margin: 0 6px; background: var(--color-border-strong); }
.bo-rte__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; color: var(--color-text-primary); background: none; border: 0; border-radius: 8px; cursor: pointer; font-size: var(--text-s); font-weight: 500; }
.bo-rte__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bo-rte__btn:hover { background: var(--color-chart-track); }
.bo-rte__btn[aria-pressed="true"] { color: var(--color-brand-strong-hover); background: var(--color-brand-soft); }
.bo-rte__panel { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); padding: 8px; background: var(--color-bg-subtle); border-bottom: 1px solid var(--color-border); }
.bo-rte__panel[hidden] { display: none; }
.bo-rte__panel input { flex: 1 1 180px; height: 36px; padding: 0 10px; background: var(--color-bg-surface); border: 1px solid var(--color-border-strong); border-radius: 8px; }
.bo-rte__error { padding: 8px 12px; color: var(--color-danger); background: #fbe6e4; font-size: var(--text-xs); }
.bo-rte__error[hidden] { display: none; }
.bo-rte__area { min-height: 240px; max-height: 520px; padding: 14px 16px; overflow-y: auto; resize: vertical; outline: none; overflow-wrap: anywhere; }
.bo-rte--campaign .bo-rte__area { max-width: 538px; margin: 0 auto; box-sizing: content-box; }
.bo-rte__area > * + * { margin-top: 10px; }
.bo-rte__area h2 { font-size: 22px; line-height: 30px; font-weight: 600; }
.bo-rte__area h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
.bo-rte__area ul { list-style: disc; padding-left: 24px; }
.bo-rte__area ol { list-style: decimal; padding-left: 24px; }
.bo-rte__area a:not([style]) { color: var(--color-brand-strong); text-decoration: underline; }
.bo-rte__area img { max-width: 100%; height: auto; }

/* Collectes : avancement de la fiche, aperçu de la modification */
.bo-goal__head { display: flex; align-items: baseline; gap: var(--space-12); }
.bo-goal__value { font-size: 38px; line-height: 44px; font-weight: 500; letter-spacing: -0.5px; }
.bo-goal__facts { display: flex; flex-wrap: wrap; gap: var(--space-12) 32px; }

/* Génération, StadePass, points de vente */
.bo-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bo-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bo-card--row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-12); }
.bo-row-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.bo-row-actions form { display: block; }
.bo-chart--dense .bo-chart__bars, .bo-chart--dense .bo-chart__x { gap: 2px; }
.bo-chart--dense .bo-chart__x span { overflow: visible; white-space: nowrap; }
.bo-check-row { display: flex; align-items: center; gap: var(--space-8); cursor: pointer; }
bo-check-list { display: flex; flex-direction: column; gap: var(--space-8); }
bo-check-list .bo-search { flex: none; width: 100%; max-width: none; }
.bo-check-list__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px var(--space-12); max-height: 260px; overflow-y: auto; padding: var(--space-12); border: 1px solid var(--color-chart-track); border-radius: var(--radius-m); }
.bo-check-list__tools { display: flex; gap: var(--space-12); }
.bo-check-list__tools button { padding: 0; background: none; border: 0; color: var(--color-brand-strong-hover); font-size: var(--text-s); cursor: pointer; }
form:has(input[name="allEvents"]:checked) bo-check-list { display: none; }
.bo-rows-list { display: flex; flex-direction: column; }
.bo-rows-list__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 14px 0; border-top: 1px solid var(--color-chart-track); }
.bo-rows-list__row > div { min-width: 0; }
.bo-kv__value { font-size: var(--text-l); line-height: var(--lh-l); font-weight: 600; margin-top: 2px; }

/* Fiche événement : participants, codes promo, modification */
.bo-icon[data-icon="repeat"] { --icon: url('icons/repeat.svg'); }
.bo-icon[data-icon="download"] { --icon: url('icons/download.svg'); }
.bo-field__label { font-weight: 500; }
.bo-form__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bo-checks { display: flex; flex-direction: column; gap: 10px; }
.bo-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bo-table tfoot td { font-weight: 500; vertical-align: top; }

/* E-votes : choix de la catégorie sur la fiche, boutons d'en-tête de carte, aperçu de couverture */
.bo-choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-12); }
.bo-choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px; border: 1px solid var(--color-chart-track); border-radius: var(--radius-m); }
.bo-choice-card > .bo-ellipsis { max-width: 100%; }
.bo-choice-card:hover { border-color: var(--color-border-strong); }
.bo-choice-card--active, .bo-choice-card--active:hover { background: var(--color-brand-soft); border-color: transparent; }
.bo-choice-card--active > .bo-medium { color: var(--color-brand-strong); }
.bo-card__tools { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.bo-field input:disabled { background: var(--color-bg-subtle); color: var(--color-text-secondary); cursor: not-allowed; }

/* Paiements et versements */
.bo-break { overflow-wrap: anywhere; }
.bo-payment-unverified { display: block; margin-top: 4px; }
.bo-verdict { display: flex; align-items: flex-start; gap: var(--space-12); padding: var(--space-20); background: var(--color-bg-surface); border-radius: var(--radius-l); }
.bo-verdict > .bo-icon { flex-shrink: 0; margin-top: 2px; --icon-size: 24px; }
.bo-verdict__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bo-verdict > form, .bo-verdict > .bo-btn { flex-shrink: 0; }
.bo-verdict--anomaly { background: #fdf3e3; }
.bo-verdict--anomaly > .bo-icon { color: var(--color-warning); }
.bo-verdict--ok > .bo-icon { color: var(--color-success); }
.bo-verdict--anomaly .bo-note--warning { padding: 0; background: none; }
.bo-facts { display: flex; flex-wrap: wrap; gap: var(--space-16) 32px; }
.bo-facts > div { min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bo-table tr.is-missing td { background: #fdf3e3; }
.bo-table tr.is-short td { background: #fbeae9; }
.bo-note__list { margin: 6px 0; padding-left: 18px; }
.bo-disclosure { padding: 12px 14px; border: 1px solid var(--color-chart-track); border-radius: var(--radius-m); }
.bo-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); cursor: pointer; font-weight: 500; list-style: none; }
.bo-disclosure summary::-webkit-details-marker { display: none; }
.bo-disclosure[open] summary .bo-link-brand { visibility: hidden; }
.bo-disclosure pre { margin: var(--space-12) 0 0; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-xs); line-height: var(--lh-xs); }
.bo-amount-hero { display: flex; flex-direction: column; gap: 4px; padding: var(--space-16); background: var(--color-bg-page); border-radius: var(--radius-m); }
.bo-amount-hero__value { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -0.3px; }

/* Messages */
/* Comme une messagerie : la page ne défile pas, la liste et le message défilent chacun de leur côté. */
.bo-content:has(.bo-messages) { height: calc(100vh - var(--header-height)); overflow: hidden; }
.bo-frame:has(> .bo-messages) { flex: 1 1 0; min-height: 0; }
.bo-messages { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--space-16); }
.bo-messages > * { min-height: 0; overflow-y: auto; }
.bo-messages__list { display: flex; flex-direction: column; padding: var(--space-12); overflow: hidden; }
.bo-messages__list .bo-pagination { flex-shrink: 0; padding-top: var(--space-12); }
.bo-message-rows { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.bo-message-row { display: flex; align-items: center; gap: var(--space-12); padding: 10px; border-radius: var(--radius-m); }
.bo-message-row:hover { background: var(--color-bg-subtle); }
.bo-message-row--active, .bo-message-row--active:hover { background: var(--color-brand-soft); }
.bo-message-row__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.bo-message-row--unread .bo-medium { font-weight: 600; }
.bo-message-row__meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bo-message-row__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-brand); }
.bo-message__head { display: flex; align-items: center; gap: var(--space-12); }
.bo-message__who { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.bo-message__bubble { display: flex; flex-direction: column; gap: var(--space-8); padding: 14px 16px; background: var(--color-bg-page); border-radius: var(--radius-m); overflow-wrap: anywhere; }
.bo-message__bubble--reply { background: var(--color-brand-soft); }
.bo-message__reply { display: flex; flex-direction: column; gap: 6px; }

/* Marketing */
.bo-note--surface { background: var(--color-bg-surface); }
.bo-field textarea { font: inherit; }
.bo-tab--off { color: var(--color-border-strong); cursor: not-allowed; }
.bo-tab--off:hover { background: var(--color-bg-surface); }
.bo-audience-count { display: flex; flex-direction: column; gap: 2px; }
.bo-mail-preview { padding: var(--space-16); background: var(--color-bg-page); border-radius: var(--radius-m); }
.bo-mail-preview__box { margin: 0 auto; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); overflow: hidden; }
.bo-mail-preview--mobile .bo-mail-preview__box { max-width: 380px; }
.bo-mail-preview__head { display: flex; flex-direction: column; gap: var(--space-4); padding: 14px 16px; overflow-wrap: anywhere; }
.bo-mail-preview__frame { display: block; width: 100%; height: 620px; border: 0; border-top: 1px solid var(--color-chart-track); }
.bo-timeline { display: flex; flex-direction: column; gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.bo-timeline__step { position: relative; padding-left: 24px; color: var(--color-text-secondary); }
.bo-timeline__step::before { content: ''; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border: 2px solid var(--color-border-strong); border-radius: 50%; background: var(--color-bg-surface); }
.bo-timeline__step--done { color: var(--color-text-primary); }
.bo-timeline__step--done::before { border-color: var(--color-success); background: var(--color-success); }

/* Choix multiple : même aspect que Bo:Select */
.bo-multi details { width: 100%; }
.bo-multi summary { list-style: none; cursor: pointer; }
.bo-multi summary::-webkit-details-marker { display: none; }
.bo-multi .bo-select__panel { position: absolute; }
.bo-multi__option { display: flex; align-items: center; gap: var(--space-8); }
.bo-field .bo-multi__option input { flex-shrink: 0; width: 18px; height: 18px; padding: 0; }
.bo-field .bo-multi input.bo-select__search { height: 38px; padding: 0 12px; border-radius: 10px; }

/* Organisateurs et clients : commissions à trois valeurs, informations en deux colonnes, modale haute */
.bo-settings--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bo-info-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-20); }
.bo-info-columns .bo-info { padding: 12px 0; }
.bo-modal { max-height: calc(100vh - 48px); overflow-y: auto; }

/* Contenu du site, réglages, compte */
.bo-icon[data-icon="trash"] { --icon: url('icons/trash.svg'); }
.bo-icon[data-icon="sliders"] { --icon: url('icons/sliders.svg'); }
.bo-icon[data-icon="arrow-up"] { --icon: url('icons/arrow-up.svg'); }
.bo-icon[data-icon="arrow-down"] { --icon: url('icons/arrow-down.svg'); }
.bo-order { display: flex; align-items: center; gap: 6px; }
.bo-order__number { min-width: 22px; }
.bo-check { display: flex; align-items: center; gap: var(--space-8); cursor: pointer; }
.bo-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-8); }
.bo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bo-chips--end { justify-content: flex-end; }
.bo-chip { padding: 2px 10px; background: var(--color-bg-page); border-radius: 999px; font-size: var(--text-xs); line-height: var(--lh-xs); }
.bo-break { overflow-wrap: anywhere; }
.bo-slide-target { display: none; }
form:has(select[name="slide[targetType]"] option[value="event"]:checked) .bo-slide-target--event,
form:has(select[name="slide[targetType]"] option[value="poll"]:checked) .bo-slide-target--poll,
form:has(select[name="slide[targetType]"] option[value="fund"]:checked) .bo-slide-target--fund { display: flex; }
form:has(input[name="admin[allCountries]"]:checked) .bo-admin-countries { display: none; }
.bo-matrix__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8); }
.bo-matrix__tools { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.bo-matrix__group { display: flex; align-items: center; gap: var(--space-8); padding: 10px 0; cursor: pointer; list-style: none; }
.bo-matrix__group::-webkit-details-marker { display: none; }
.bo-matrix__group > .bo-btn { margin-left: auto; }
.bo-matrix[open] > .bo-matrix__group > .bo-icon { transform: rotate(90deg); }
.bo-matrix .bo-table { table-layout: fixed; }
.bo-matrix__cell { width: 104px; text-align: center; }
.bo-auth { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 100vh; padding: var(--space-16); background: var(--color-bg-page); }
.bo-auth__card { display: flex; flex-direction: column; gap: var(--space-16); width: 420px; max-width: 100%; padding: 32px; background: var(--color-bg-surface); border-radius: var(--radius-l); }
.bo-auth__logo { display: block; width: 140px; height: auto; }
.bo-auth__title { font-size: 22px; line-height: 28px; font-weight: 600; }
.bo-auth__rules { margin: 6px 0 0; padding-left: 18px; font-size: var(--text-s); line-height: var(--lh-s); }
.bo-legal-content { overflow-wrap: anywhere; }
.bo-legal-content p, .bo-legal-content ul, .bo-legal-content ol { margin: 0 0 12px; }

/* Recettes et soldes */
.bo-icon[data-icon="dollar"] { --icon: url('icons/dollar.svg'); }
.bo-amount-plus { color: var(--color-success); }
.bo-amount-minus { color: var(--color-danger); }
.bo-amount-due { color: var(--color-brand-strong); }
.bo-finance-currency { font-size: var(--text-l); line-height: var(--lh-l); font-weight: 600; }
.bo-balance__note { padding-bottom: 12px; margin-top: -8px; }
.bo-table[data-amounts] { table-layout: auto; }
.bo-table[data-amounts] th { white-space: normal; vertical-align: bottom; }
.bo-table[data-amounts] td > .bo-caption, .bo-activity-title { display: block; }
.bo-modal:has(.bo-assign-field) { overflow: visible; }
.bo-balance__actions { display: flex; flex-direction: column; gap: var(--space-8); }
.bo-status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

/* En-tête de page : fil d'Ariane, titre, description */
.bo-page-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bo-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); }
.bo-breadcrumb > * + *::before { content: '›'; margin-right: 8px; color: var(--color-border-strong); }
.bo-breadcrumb a:hover { color: var(--color-text-primary); text-decoration: underline; }
.bo-breadcrumb [aria-current="page"] { color: var(--color-text-primary); font-weight: 500; }
.bo-page-title { font-size: 26px; line-height: 34px; font-weight: 500; letter-spacing: -0.4px; }
.bo-title-link:hover { color: var(--color-brand-strong-hover); text-decoration: underline; }

/* Résumé d'une fiche : deux lignes, le titre puis le statut et les autres informations */
.bo-summary__info { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.bo-summary__info > .bo-summary__title { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-summary__info > .bo-summary__marks { grid-row: 2; grid-column: 1; flex-wrap: nowrap; align-items: center; gap: var(--space-8); white-space: nowrap; }
.bo-summary__info > .bo-text-secondary { grid-row: 2; grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-summary__info:not(:has(> .bo-summary__marks)) > .bo-text-secondary { grid-column: 1 / -1; }

/* Un seul design pour l'admin et le Pro : vignettes, résumés de fiche, lignes d'informations, menu */
.bo-thumb, .bo-thumb--l { border-radius: 8px; }
.bo-summary .bo-thumb--cover { width: 120px; }
.bo-summary__info { min-width: 0; }
.bo-summary__title { overflow-wrap: anywhere; }
.bo-info { padding: 12px 0; }
.bo-stat { display: flex; flex-direction: column; }
.bo-stat__top { flex: 1 1 auto; }
.bo-nav-item { height: 40px; font-size: var(--text-l); line-height: var(--lh-l); --icon-size: 22px; }
.bo-nav-item__chevron { --icon-size: 16px; }
/* Trait entre les informations d'une ligne */
.bo-sep { display: inline-block; width: 1px; height: .9em; margin: 0 4px; vertical-align: -.1em; background: var(--color-border-strong); }

/* Champ image et sélecteur de date, admin et Pro */
.bo-icon[data-icon="minus"] { --icon: url('/professional/v2/icons/minus.svg'); }
.pro-pos-period bo-date-field { width: 190px; }
/* Champ image : aperçu à gauche, image attendue et bouton à droite */
.bo-upload__body { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--space-20); }
.bo-upload__drop { flex: 1 1 280px; font-weight: 400; cursor: pointer; transition: border-color .12s, background-color .12s; }
.bo-upload--square .bo-upload__drop, .bo-upload--contain .bo-upload__drop { flex: 0 0 160px; }
.bo-upload--document .bo-upload__drop { flex: 0 0 240px; }
.bo-upload--wide .bo-upload__drop { flex: 1 1 100%; max-width: none; }
.bo-upload__drop[data-empty] { border-style: dashed; border-color: var(--color-border-strong); }
.bo-upload__drop:hover, .bo-upload__drop[data-dragging] { border-color: var(--color-brand); }
.bo-upload__drop[data-dragging] { background: var(--color-brand-soft); }
.bo-upload .bo-image-preview__empty { flex-direction: column; gap: var(--space-8); padding: var(--space-12); text-align: center; }
.bo-upload__side { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-16); }
.bo-upload__specs { display: flex; flex-direction: column; margin: 0; }
.bo-upload__specs > div { display: flex; justify-content: space-between; gap: var(--space-12); padding: 9px 0; border-bottom: 1px solid var(--color-chart-track); font-size: var(--text-s); line-height: var(--lh-s); }
.bo-upload__specs > div:first-child { padding-top: 0; }
.bo-upload__specs dt { color: var(--color-text-secondary); }
.bo-upload__specs dd { margin: 0; font-weight: 500; text-align: right; }
.bo-upload__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-12); min-width: 0; }
.bo-upload__file { flex: 1 1 140px; min-width: 0; font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); }
.bo-upload__file[hidden] { display: none; }
/* Masqué sans display: none, pour que le navigateur puisse toujours signaler un champ obligatoire vide. */
.bo-field input.bo-upload__input, input.bo-upload__input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.bo-upload__button { font-weight: 500; cursor: pointer; }
input.bo-upload__input:focus-visible ~ .bo-upload__button, .pro-logo:has(input.bo-upload__input:focus-visible) .pro-logo__info .bo-upload__button { outline: 2px solid var(--color-text-primary); outline-offset: 2px; }
.bo-upload__change { display: none; }
.bo-upload:not(:has([data-image-preview][data-empty])) .bo-upload__choose { display: none; }
.bo-upload:not(:has([data-image-preview][data-empty])) .bo-upload__change { display: inline; }
.bo-modal .bo-upload__side { flex-basis: 200px; }
/* Sélecteur de date et d'heure */
bo-date-field.bo-select input { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
bo-date-field { min-height: 44px; }
.bo-date__trigger { justify-content: flex-start; }
.bo-date__trigger .bo-select__value { font-variant-numeric: tabular-nums; }
/* En modale, deux champs côte à côte : le plus long libellé doit tenir en entier. */
.bo-modal .bo-date__trigger { gap: 6px; padding-inline: 10px; font-size: var(--text-s); }
.bo-modal .bo-date__trigger .bo-icon { --icon-size: 16px; }
.bo-date__trigger .bo-icon { --icon-size: 18px; }
.bo-date__trigger:disabled .bo-select__value { color: var(--color-text-secondary); }
.bo-date--compact { min-height: 40px; }
.bo-date--compact .bo-date__trigger { height: 40px; }
.bo-date__panel {
    position: fixed; inset: auto; margin: 0; width: 328px; padding: var(--space-16); overflow: visible;
    background: var(--color-bg-surface); color: var(--color-text-primary);
    border: 1px solid var(--color-border); border-radius: var(--radius-l);
    box-shadow: 0 12px 32px rgba(23, 23, 26, .16);
}
.bo-date__panel:popover-open { display: flex; flex-direction: column; gap: var(--space-8); }
.bo-date__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.bo-date__title { font-weight: 600; text-transform: capitalize; }
.bo-date__nav { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: none; border: 0; border-radius: 10px; cursor: pointer; --icon-size: 16px; }
.bo-date__nav:hover { background: var(--color-bg-page); }
.bo-date__nav--previous .bo-icon { transform: rotate(180deg); }
.bo-date__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.bo-date__weekdays span { text-align: center; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-date__day { height: 38px; padding: 0; background: none; border: 1px solid transparent; border-radius: 10px; font-size: var(--text-s); cursor: pointer; }
.bo-date__day:hover:not(:disabled) { background: var(--color-bg-page); }
.bo-date__day[aria-current="date"] { border-color: var(--color-border-strong); font-weight: 600; }
.bo-date__day[aria-pressed="true"], .bo-date__day[aria-pressed="true"]:hover { background: var(--color-brand-strong); border-color: var(--color-brand-strong); color: var(--color-text-inverse); font-weight: 600; }
.bo-date__day:disabled { color: var(--color-border-strong); cursor: not-allowed; }
.bo-date__day:focus-visible, .bo-date__nav:focus-visible, .bo-date__minute:focus-visible, .bo-date__link:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: 1px; }
.bo-date__time { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px var(--space-8); align-items: center; padding-top: var(--space-12); border-top: 1px solid var(--color-chart-track); }
.bo-date__caption { font-size: var(--text-s); line-height: var(--lh-s); color: var(--color-text-secondary); }
.bo-date__zone { grid-column: 1 / -1; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-date__hour .bo-select__trigger { height: 40px; }
/* La liste des heures s'ouvre vers le haut : le panneau est en bas du calendrier. */
.bo-date__hour .bo-select__panel { top: auto; bottom: calc(100% + 4px); }
.bo-date__hour .bo-select__list { max-height: 220px; }
.bo-date__minutes { display: flex; gap: 2px; padding: 2px; background: var(--color-bg-page); border-radius: 10px; }
.bo-date__minute { flex: 1 1 0; min-width: 0; height: 36px; padding: 0; background: none; border: 0; border-radius: 8px; font-size: var(--text-s); cursor: pointer; }
.bo-date__minute:hover { background: var(--color-chart-track); }
.bo-date__minute[aria-pressed="true"], .bo-date__minute[aria-pressed="true"]:hover { background: var(--color-text-primary); color: var(--color-text-inverse); font-weight: 600; }
.bo-date__foot { display: flex; align-items: center; gap: var(--space-12); padding-top: var(--space-4); }
.bo-date__link { padding: 4px 0; background: none; border: 0; color: var(--color-brand-strong-hover); font-size: var(--text-s); font-weight: 500; cursor: pointer; }
.bo-date__link:hover { text-decoration: underline; }
.bo-date__done { margin-left: auto; }
.bo-date--compact { width: 190px; }

/* Cartes et onglets : rayon de 12 px, même bordure */
.bo-card, .bo-stat, .bo-summary, .bo-filters, .bo-verdict, .bo-auth__card { border: 1px solid var(--color-card-border); }
.bo-table-wrap { border-color: var(--color-card-border); border-radius: var(--radius-m); }
.bo-tab { border-color: var(--color-card-border); border-radius: var(--radius-m); }
.bo-tab--active, .bo-tab--active:hover { border-color: var(--color-text-primary); }
.bo-stat__pill { border-radius: var(--radius-m); }

/* Tableaux : plus d'air. Listes d'événements, de votes et de collectes : encore plus, et une vignette plus grande. */
.bo-table th { padding-left: 8px; padding-right: 8px; }
.bo-table td { padding: 12px 8px; }
.bo-table th:first-child, .bo-table td:first-child { padding-left: 14px; }
.bo-table th:last-child, .bo-table td:last-child { padding-right: 14px; }
.bo-table[data-list="activity"] td { padding-top: 16px; padding-bottom: 16px; }
.bo-table[data-list="activity"] .bo-thumb--cover { height: 58px; }
.bo-table[data-list="activity"] .bo-table__title { gap: var(--space-16); }
.bo-table[data-list="activity"] .bo-table__title > div { display: flex; flex-direction: column; gap: var(--space-4); }
.bo-table[data-list="activity"] .bo-title-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }

/* Mot de passe : bouton pour afficher la saisie */
bo-password-field { position: relative; display: block; }
bo-password-field input { padding-right: 48px; }
bo-password-field:not(:defined) .bo-password__toggle { display: none; }
.bo-password__toggle { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: var(--radius-m); color: var(--color-text-secondary); cursor: pointer; --icon-size: 18px; }
.bo-password__toggle:hover { color: var(--color-text-primary); }
.bo-password__toggle:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: -2px; }
.bo-date__minute:disabled { color: var(--color-border-strong); cursor: not-allowed; }
.bo-date__minute:disabled:hover { background: none; }
.bo-date__link:disabled { color: var(--color-border-strong); cursor: not-allowed; }

/* Infobulles des barres du tableau de bord */
.bo-chart--hover .bo-chart__col { position: relative; }
.bo-chart--hover .bo-chart__col:hover .bo-chart__bar { background: var(--color-brand); }
.bo-chart--hover .bo-chart__bars:hover .bo-chart__tip { visibility: hidden; }
.bo-chart__hover, .bo-split__hover {
    display: none; position: absolute; z-index: 5; bottom: calc(100% + 8px);
    padding: 8px 10px; border-radius: 8px; white-space: nowrap;
    background: var(--color-text-primary); color: var(--color-text-inverse);
    font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: 400;
    pointer-events: none;
}
.bo-chart__hover { left: 50%; transform: translateX(-50%); bottom: 100%; }
.bo-chart__hover strong, .bo-chart__hover span { display: block; }
.bo-chart__col:nth-child(-n+3) .bo-chart__hover { left: 0; transform: none; }
.bo-chart__col:nth-last-child(-n+3) .bo-chart__hover { left: auto; right: 0; transform: none; }
.bo-chart__col:hover .bo-chart__hover { display: block; }
.bo-split > span { position: relative; }
.bo-split > span:hover { filter: brightness(.92); }
.bo-split__hover { left: 0; }
.bo-split > span:last-child .bo-split__hover { left: auto; right: 0; }
.bo-split > span:hover .bo-split__hover { display: block; }

/* Fiche organisateur en attente : la décision en tête, boutons à droite (dessous sur téléphone). */
.bo-company-decision { align-items: center; }
.bo-company-decision .bo-facts { margin-top: 6px; }
.bo-company-decision__actions { flex-shrink: 0; display: flex; flex-direction: column; gap: var(--space-8); }
@media (max-width: 767px) {
    .bo-company-decision { flex-wrap: wrap; }
    .bo-company-decision__actions { flex-basis: 100%; flex-direction: row; }
    .bo-company-decision__actions .bo-btn { flex: 1 1 0; justify-content: center; }
}

/* Fiche organisateur : présentation en texte riche, informations sur une colonne sur téléphone. */
.bo-company-presentation { color: var(--color-text-body); line-height: 1.6; overflow-wrap: anywhere; }
.bo-company-presentation > :first-child { margin-top: 0; }
.bo-company-presentation > :last-child { margin-bottom: 0; }
.bo-company-presentation p { margin: 0 0 10px; }
@media (max-width: 767px) { .bo-info-columns { grid-template-columns: minmax(0, 1fr); } }

/* Aperçu d'une notification push (réglage du rappel, modification d'un événement) */
.bo-push-preview { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--color-bg-page); border: 1px solid var(--color-chart-track); border-radius: var(--radius-l); }
.bo-push-preview__head { display: flex; justify-content: space-between; gap: var(--space-8); font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--color-text-secondary); }
.bo-push-preview__app { display: inline-flex; align-items: center; gap: 6px; --icon-size: 14px; }
.bo-push-preview__title { font-weight: 600; overflow-wrap: anywhere; }
.bo-push-preview__body { font-size: var(--text-s); line-height: var(--lh-s); white-space: pre-line; overflow-wrap: anywhere; }
