/*
 * ByCarl Core — Dashboard CSS (espace client, moderne 2026)
 * Préfixe bc-* pour le nouveau design, bycarl-* conservé pour les modals.
 */

/* ── Variables — palette claire ByCarl (espace client, 2026) ───
 * Le reste du site bycarl.fr est en thème clair : l'espace client
 * ne doit pas jurer, donc pas de dégradés bruyants ni de thème sombre
 * ici (contrairement à l'admin Next.js / Electron).
 * ---------------------------------------------------------------- */
:root {
    /* Tokens "nommés" (référence design) */
    --bg:             #f4f5f8;
    --surface:        #ffffff;
    --surface-elevated:#fafbfc;
    --border:         #e3e5eb;
    --border-soft:    #ececef;
    --fg:             #171923;
    --fg-muted:       #6b7280;
    --fg-subtle:      #9aa0ac;
    --primary:        #FF6600;
    --secondary:      #233DFF;

    /* Alias --bc-* (utilisés dans tout dashboard.css) */
    --bc-brand:      var(--primary);
    --bc-brand-dk:   #E05500;
    --bc-brand-lt:   #FFF4EC;
    --bc-blue:       var(--secondary);
    --bc-blue-dk:    #1A2ECC;
    --bc-blue-lt:    #EEF0FF;
    --bc-text:       var(--fg);
    --bc-text-2:     var(--fg-muted);
    --bc-muted:      var(--fg-subtle);
    --bc-border:     var(--border);
    --bc-border-soft:var(--border-soft);
    --bc-bg:         var(--bg);
    --bc-white:      var(--surface);
    --bc-card:       var(--surface);
    --bc-radius:     14px;
    --bc-radius-sm:  8px;
    --bc-shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --bc-shadow:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --bc-shadow-md:  0 4px 16px rgba(0,0,0,.08);
    --bc-green:      #16A34A; --bc-green-lt:  #DCFCE7;
    --bc-orange:     var(--primary);
    --bc-amber:      #D97706; --bc-amber-lt:  #FEF3C7;
    --bc-red:        #DC2626; --bc-red-lt:    #FEE2E2;
    --bc-purple:     #7C3AED; --bc-purple-lt: #EDE9FE;
    --bc-font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bc-transition: 150ms ease;

    /* Alias --bycarl-* — consommés par invoices.css / support.css / contracts.css /
     * requests.css / downloads.css / projects.css, jamais définis avant (bug de tokens
     * préexistant : ces fichiers utilisaient des custom properties qui n'avaient jamais
     * été déclarées nulle part, donc retombaient sur des valeurs invalides). */
    --bycarl-primary:      var(--primary);
    --bycarl-primary-dark: #E05500;
    --bycarl-primary-lt:   #FFF4EC;
    --bycarl-accent:       var(--primary);
    --bycarl-text:         var(--fg);
    --bycarl-text-2:       var(--fg-muted);
    --bycarl-text-muted:   var(--fg-subtle);
    --bycarl-border:       var(--border);
    --bycarl-border-dk:    #cbd0da;
    --bycarl-bg:           var(--bg);
    --bycarl-bg-2:         var(--surface-elevated);
    --bycarl-white:        var(--surface);
    --bycarl-danger:       #DC2626;
    --bycarl-warning:      #D97706;
    --bycarl-radius:       14px;
    --bycarl-radius-sm:    8px;
    --bycarl-radius-xs:    6px;
    --bycarl-shadow:       0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --bycarl-shadow-md:    0 4px 16px rgba(0,0,0,.08);
    --bycarl-gap:          1.25rem;
    --bycarl-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bycarl-transition:   150ms ease;
}

/* ── Elementor / thème breakout ──────────────────────────────── */
.e-con:has(.bc-dash),
.e-con-inner:has(.bc-dash) {
    --container-max-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.elementor-widget-container:has(.bc-dash),
.elementor-container:has(.bc-dash),
.elementor-section:has(.bc-dash) > .elementor-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.entry-content:has(.bc-dash),
.site-content:has(.bc-dash),
.page-content:has(.bc-dash),
.wp-block-group:has(.bc-dash),
.wp-block-post-content:has(.bc-dash),
.hentry:has(.bc-dash),
article:has(.bc-dash) {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Reset scopé ─────────────────────────────────────────────── */
.bc-dash *,
.bc-dash *::before,
.bc-dash *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bc-dash h1,
.bc-dash h2,
.bc-dash h3,
.bc-dash h4 {
    font-weight: inherit;
    font-size: inherit;
}

.bc-dash ul,
.bc-dash ol { list-style: none; }

.bc-dash button { cursor: pointer; font-family: var(--bc-font); }

.bc-dash a { color: inherit; text-decoration: none; }

/* ── Root wrapper ────────────────────────────────────────────── */
.bc-dash {
    font-family: var(--bc-font);
    color: var(--bc-text);
    background: var(--bc-bg);
    min-height: 100vh;
    width: 100%;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ── Header wrap (card conteneur) ────────────────────────────── */
.bc-header-wrap {
    background: var(--bc-white);
    border-bottom: 1px solid var(--bc-border);
    box-shadow: var(--bc-shadow);
    margin-bottom: 0;
}

/* ── Header partial ──────────────────────────────────────────── */
.bc-dash-header,
.bycarl-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1500px;
    margin: 0 auto;
    padding: 1rem 2rem;
    gap: 1rem;
}

.bycarl-dash-header__identity,
.bc-dash-header__identity {
    display: flex;
    align-items: center;
    gap: .875rem;
}

.bycarl-dash-avatar-wrap,
.bc-dash-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.bycarl-dash-avatar,
.bc-dash-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: block;
    border: 2px solid var(--bc-border);
}

.bycarl-online-dot,
.bc-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: var(--bc-green);
    border-radius: 50%;
    border: 2px solid var(--bc-white);
}

.bycarl-dash-greeting,
.bc-dash-greeting {
    font-size: .9375rem;
    font-weight: 500;
    color: var(--bc-text);
}

.bycarl-dash-greeting strong,
.bc-dash-greeting strong {
    font-weight: 700;
}

.bycarl-dash-subtitle,
.bc-dash-subtitle {
    font-size: .8125rem;
    color: var(--bc-muted);
    margin-top: .1rem;
}

.bycarl-dash-header__actions,
.bc-dash-header__actions {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-shrink: 0;
}

/* ── Main content area ───────────────────────────────────────── */
.bc-main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1.75rem 2rem 4rem;
}

/* ── Page loader ─────────────────────────────────────────────── */
.bc-loader--page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.bc-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--bc-border);
    border-top-color: var(--bc-brand);
    border-radius: 50%;
    animation: bc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* will-change hints pour les animations composites */
.bc-spinner { will-change: transform; }

.bc-tab-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.bc-tab-loader .bc-spinner {
    width: 24px;
    height: 24px;
    border-width: 2.5px;
}

/* ── Nav badge renouvellement ────────────────────────────────── */
.bc-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #F59E0B;
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    line-height: 1;
    margin-left: .3rem;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(245,158,11,.4);
    animation: bc-badge-pop .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes bc-badge-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.bc-nav-badge--urgent {
    background: #EF4444;
    box-shadow: 0 1px 3px rgba(239,68,68,.4);
}

/* ── Bannière renouvellement contrat ─────────────────────────── */
.bc-renewal-banner {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border: none;
    border-left: 3px solid #F59E0B;
    border-radius: 12px;
    padding: 1.125rem 1.375rem;
    margin-bottom: 1.75rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(245,158,11,.1), 0 4px 16px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .15s;
}
.bc-renewal-banner:hover {
    box-shadow: 0 2px 8px rgba(245,158,11,.18), 0 6px 20px rgba(0,0,0,.06);
    transform: translateY(-1px);
}
.bc-renewal-banner--inline { cursor: default; }
.bc-renewal-banner--inline:hover { box-shadow: 0 1px 4px rgba(245,158,11,.1), 0 4px 16px rgba(0,0,0,.04); transform: none; }
.bc-renewal-banner__icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.bc-renewal-banner__body { flex: 1; min-width: 0; }
.bc-renewal-banner__title { font-weight: 700; color: #B45309; margin: 0 0 .75rem; font-size: .9375rem; letter-spacing: -.01em; }
.bc-renewal-banner__hint { font-size: .8rem; color: #92400E; margin: .75rem 0 0; opacity: .8; }
.bc-renewal-banner__footer { display: flex; justify-content: flex-end; margin-top: .875rem; }
.bc-renewal-banner__cta { display: inline-flex; align-items: center; gap: .3rem; font-size: .8125rem; font-weight: 600; color: #D97706; cursor: pointer; }
.bc-renewal-row__pdf { font-size: .75rem; padding: .2rem .6rem; border-color: #F59E0B; color: #B45309; }
.bc-renewal-row__pdf:hover { background: #FEF3C7; }
.bc-renewal-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .45rem .75rem;
    margin-bottom: .375rem;
    background: rgba(255,255,255,.65);
    border-radius: 8px;
    font-size: .875rem;
    flex-wrap: wrap;
}
.bc-renewal-row:last-of-type { margin-bottom: 0; }
.bc-renewal-row__title { font-weight: 600; color: #1E293B; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-renewal-row__date { color: #94A3B8; font-size: .8rem; white-space: nowrap; }
.bc-renewal-badge { padding: .2rem .55rem; border-radius: 6px; font-size: .75rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.bc-renewal-row__top { display: flex; align-items: center; gap: .875rem; flex-wrap: wrap; width: 100%; }
.bc-renewal-row__top .bc-btn { margin-left: auto; flex-shrink: 0; }
.bc-renewal-row { flex-wrap: wrap; }
.bc-renew-inline { flex: 0 0 100%; width: 100%; margin-top: .75rem; padding: 1.25rem 1.5rem; background: #fff; border-radius: 10px; border: 1px solid #E5E7EB; box-sizing: border-box; }
.bc-renew-inline .bc-sign-pad-wrap { margin-top: .75rem; }
.bc-renew-inline .bc-sign-canvas { width: 100%; height: 160px; border: 1px solid #E5E7EB; border-radius: 8px; display: block; }

/* ── Stats bar ───────────────────────────────────────────────── */
.bc-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.bc-stat {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    padding: 1.125rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .875rem;
}

.bc-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--bc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.bc-stat__icon--projects {
    background: var(--bc-blue-lt);
}

.bc-stat__icon--requests {
    background: var(--bc-brand-lt);
}

.bc-stat__icon--tickets {
    background: var(--bc-purple-lt);
}

.bc-stat__icon--contracts {
    background: #FEF3C7;
}

.bc-stat__icon--renewal {
    background: #FEF3C7;
}

.bc-renewal-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .6rem;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.bc-stat--alert {
    border-color: #F59E0B;
    background: #FFFBEB;
}
.bc-stat--alert:hover {
    border-color: #D97706;
    box-shadow: var(--bc-shadow-md);
    transform: translateY(-1px);
}

.bc-stat__body {
    min-width: 0;
}

.bc-stat__num {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--bc-text);
    line-height: 1.1;
}

.bc-stat__label {
    font-size: .8125rem;
    color: var(--bc-muted);
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Section title ───────────────────────────────────────────── */
.bc-section {
    margin-top: 1.75rem;
}

.bc-section__title {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bc-muted);
    margin-bottom: .875rem;
}

/* ── Badges ──────────────────────────────────────────────────── */
.bc-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 99px;
    white-space: nowrap;
}

.bc-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Project statuses */
.bc-badge--active    { background: var(--bc-blue-lt);   color: var(--bc-blue); }
.bc-badge--pending   { background: var(--bc-bg);         color: var(--bc-muted); border: 1px solid var(--bc-border); }
.bc-badge--completed { background: var(--bc-green-lt);  color: var(--bc-green); }
.bc-badge--paused    { background: var(--bc-amber-lt);  color: var(--bc-amber); }
.bc-badge--cancelled { background: var(--bc-red-lt);    color: var(--bc-red); }
.bc-badge--archived  { background: var(--bc-bg);         color: var(--bc-muted); }

/* Request statuses */
.bc-badge--new         { background: var(--bc-brand-lt); color: var(--bc-brand); }
.bc-badge--in_progress { background: var(--bc-blue-lt);  color: var(--bc-blue); }
.bc-badge--done        { background: var(--bc-green-lt); color: var(--bc-green); }
.bc-badge--refused     { background: var(--bc-red-lt);   color: var(--bc-red); }

/* Ticket statuses */
.bc-badge--open        { background: var(--bc-brand-lt); color: var(--bc-brand); }
.bc-badge--waiting     { background: var(--bc-amber-lt); color: var(--bc-amber); }
.bc-badge--resolved    { background: var(--bc-green-lt); color: var(--bc-green); }
.bc-badge--closed      { background: var(--bc-bg);        color: var(--bc-muted); }

/* Invoice statuses */
.bc-badge--draft       { background: var(--bc-bg);        color: var(--bc-muted); border: 1px solid var(--bc-border); }
.bc-badge--sent        { background: var(--bc-blue-lt);   color: var(--bc-blue); }
.bc-badge--paid        { background: var(--bc-green-lt);  color: var(--bc-green); }
.bc-badge--overdue     { background: var(--bc-red-lt);    color: var(--bc-red); }

/* Type chip */
.bc-type {
    font-size: .75rem;
    color: var(--bc-text-2);
    background: var(--bc-bg);
    border: 1px solid var(--bc-border);
    padding: .15rem .5rem;
    border-radius: var(--bc-radius-sm);
    white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.bc-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: var(--bc-radius-sm);
    font-size: .875rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all var(--bc-transition);
    cursor: pointer;
    font-family: var(--bc-font);
    line-height: 1.4;
    white-space: nowrap;
}

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

.bc-btn--primary:hover {
    background: var(--bc-brand-dk);
    border-color: var(--bc-brand-dk);
}

.bc-btn--outline {
    background: transparent;
    color: var(--bc-brand);
    border-color: var(--bc-brand);
    text-decoration: none;
}
.bc-btn--outline:hover {
    background: var(--bc-brand);
    color: #fff;
}
.bc-btn--ghost {
    background: transparent;
    color: var(--bc-text-2);
    border-color: var(--bc-border);
}

.bc-btn--ghost:hover {
    background: var(--bc-bg);
    color: var(--bc-text);
}

.bc-btn--sm {
    padding: .3rem .7rem;
    font-size: .8125rem;
}

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

/* ── Project cards (overview) ────────────────────────────────── */
.bc-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bc-project-card {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
    transition: box-shadow var(--bc-transition);
}

.bc-project-card:hover {
    box-shadow: var(--bc-shadow-md);
}

.bc-project-card__head {
    padding: 1.125rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

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

.bc-project-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bc-text);
    line-height: 1.3;
}

.bc-project-card__desc {
    font-size: .8125rem;
    color: var(--bc-muted);
    margin-top: .2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-project-card__badges {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-shrink: 0;
}

/* ── Progress strip ──────────────────────────────────────────── */
.bc-progress-strip {
    height: 4px;
    background: var(--bc-brand);
    width: 100%;
}

.bc-progress-fill {
    height: 100%;
    background: var(--bc-brand);
    transition: width 600ms ease;
    border-radius: 0 2px 2px 0;
}

/* ── Sub-projects grid ───────────────────────────────────────── */
.bc-subprojects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    padding: .875rem 1rem 1rem;
    background: var(--bc-bg);
    border-top: 1px solid var(--bc-border);
}

.bc-subproject {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    padding: .875rem 1rem;
    cursor: pointer;
    transition: all var(--bc-transition);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.bc-subproject:hover {
    border-color: var(--bc-brand);
    box-shadow: 0 0 0 3px var(--bc-brand-lt);
}

.bc-subproject:focus {
    outline: none;
    border-color: var(--bc-brand);
    box-shadow: 0 0 0 3px var(--bc-brand-lt);
}

.bc-subproject__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.bc-subproject__name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--bc-text);
    line-height: 1.35;
    min-width: 0;
    flex: 1;
}

.bc-subproject__desc {
    font-size: .75rem;
    color: var(--bc-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.bc-subproject__counts {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.bc-count-chip {
    font-size: .75rem;
    color: var(--bc-text-2);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.bc-subproject__footer {
    border-top: 1px solid var(--bc-border);
    margin-top: auto;
    padding-top: .5rem;
}

.bc-subproject__cta {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bc-brand);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: gap var(--bc-transition);
}

.bc-subproject:hover .bc-subproject__cta {
    gap: .5rem;
}

/* Standalone project card (sans sous-projets) */
.bc-standalone-card {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--bc-transition);
}

.bc-standalone-card:hover {
    border-color: var(--bc-brand);
    box-shadow: var(--bc-shadow-md);
}

.bc-standalone-card__inner {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.bc-standalone-card__name {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--bc-text);
}

.bc-standalone-card__desc {
    font-size: .8125rem;
    color: var(--bc-muted);
    margin-top: .15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-standalone-card__right {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.bc-standalone-card__counts {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.bc-standalone-card__cta {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bc-brand);
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* ── Activity section ────────────────────────────────────────── */
.bc-activity-card {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
}

.bc-activity-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .875rem 1.125rem;
    border-bottom: 1px solid var(--bc-border);
    transition: background var(--bc-transition);
}

.bc-activity-row:last-child {
    border-bottom: none;
}

.bc-activity-row:hover {
    background: var(--bc-bg);
}

.bc-activity-row__content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

.bc-activity-row__subject {
    font-size: .875rem;
    font-weight: 500;
    color: var(--bc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-activity-row__project {
    font-size: .75rem;
    color: var(--bc-muted);
}

.bc-activity-row__badges {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-shrink: 0;
}

.bc-activity-row__meta {
    font-size: .75rem;
    color: var(--bc-muted);
    white-space: nowrap;
}

.bc-activity-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--bc-muted);
    font-size: .875rem;
}

/* ── Project detail view ─────────────────────────────────────── */
.bc-detail {
    animation: bc-slide-in 220ms ease;
    will-change: opacity, transform;
}

@keyframes bc-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bc-detail__hero {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.bc-detail__hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bc-brand);
    opacity: .2;
}

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

.bc-detail__name {
    font-size: 1.1875rem;
    font-weight: 800;
    color: var(--bc-text);
    line-height: 1.25;
}

.bc-detail__desc {
    font-size: .875rem;
    color: var(--bc-text-2);
    margin-top: .375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-detail__hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    flex-shrink: 0;
}

.bc-detail__pct {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--bc-brand);
}

/* ── Detail tabs ─────────────────────────────────────────────── */
.bc-detail__tabs {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
    overflow: hidden;
}

.bc-detail__tabs-nav {
    display: flex;
    align-items: center;
    overflow-x: auto;
    border-bottom: 1px solid var(--bc-border);
    padding: 0 .25rem;
    gap: .125rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.bc-detail__tabs-nav::-webkit-scrollbar { display: none; }

.bc-detail__tabs-nav::-webkit-scrollbar { display: none; }

.bc-detail__tab-btn {
    display: inline-flex;
    align-items: center;
    padding: .75rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--bc-text-2);
    border: none;
    background: transparent;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--bc-transition);
    margin-bottom: -1px;
    border-radius: 0;
    font-family: var(--bc-font);
}

.bc-detail__tab-btn:hover {
    color: var(--bc-text);
    background: var(--bc-bg);
}

.bc-detail__tab-btn.is-active {
    color: var(--bc-brand);
    border-bottom-color: var(--bc-brand);
    font-weight: 600;
}

.bc-detail__tab-body {
    padding: 1.25rem;
    min-height: 180px;
}

/* ── Tab content common elements ─────────────────────────────── */
.bc-tab-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.bc-empty-tab {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--bc-muted);
    font-size: .9rem;
}

/* ── Table ───────────────────────────────────────────────────── */
.bc-table-wrap {
    overflow-x: auto;
    border-radius: var(--bc-radius-sm);
    border: 1px solid var(--bc-border);
}

.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.bc-table thead {
    background: var(--bc-bg);
}

.bc-table th {
    padding: .625rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bc-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--bc-border);
}

.bc-table td {
    padding: .75rem 1rem;
    color: var(--bc-text);
    border-bottom: 1px solid var(--bc-border);
    vertical-align: middle;
}

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

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

.bc-dl-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: var(--bc-brand);
    font-weight: 600;
}

.bc-dl-link:hover {
    text-decoration: underline;
}

/* ── Contracts list ──────────────────────────────────────────── */
.bc-list {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.bc-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .875rem 1rem;
    background: var(--bc-bg);
    border-radius: var(--bc-radius-sm);
    border: 1px solid var(--bc-border);
}

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

.bc-list-row__title {
    font-weight: 600;
    font-size: .875rem;
    color: var(--bc-text);
}

.bc-list-row__date {
    font-size: .75rem;
    color: var(--bc-muted);
    margin-top: .15rem;
    display: block;
}

.bc-list-row__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* ── Files grid ──────────────────────────────────────────────── */
.bc-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

.bc-file-card {
    background: var(--bc-bg);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
    align-items: flex-start;
    transition: border-color var(--bc-transition);
}

.bc-file-card:hover {
    border-color: var(--bc-brand);
}

.bc-file-card__icon {
    width: 40px;
    height: 40px;
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bc-brand);
}

.bc-file-card__info {
    min-width: 0;
    width: 100%;
}

.bc-file-card__name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--bc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.bc-file-card__size {
    font-size: .75rem;
    color: var(--bc-muted);
    display: block;
    margin-top: .1rem;
}

.bc-file-card__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .25rem;
}

.bc-file-card__desc {
    font-size: .75rem;
    color: var(--bc-muted);
    display: block;
    margin-top: .3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Grouped sections ────────────────────────────────────────── */
.bc-section-group {
    margin-bottom: 2rem;
}

.bc-section-group__title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bc-muted);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ── Support / tickets ───────────────────────────────────────── */
.bc-ticket-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.bc-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .875rem;
    padding: .875rem 1rem;
    background: var(--bc-bg);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    cursor: pointer;
    transition: all var(--bc-transition);
}

.bc-ticket-row:hover {
    border-color: var(--bc-brand);
    background: var(--bc-white);
    box-shadow: var(--bc-shadow);
}

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

.bc-ticket-row__subject {
    font-size: .875rem;
    font-weight: 600;
    color: var(--bc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.bc-ticket-row__meta {
    font-size: .75rem;
    color: var(--bc-muted);
    margin-top: .15rem;
    display: block;
}

.bc-ticket-row__badges {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-shrink: 0;
}

.bc-ticket-row__arrow {
    color: var(--bc-muted);
    transition: transform var(--bc-transition);
}

.bc-ticket-row:hover .bc-ticket-row__arrow {
    transform: translateX(3px);
    color: var(--bc-brand);
}

/* ── Ticket thread ───────────────────────────────────────────── */
.bc-thread-wrap {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.bc-thread {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: 420px;
    overflow-y: auto;
    padding: .875rem;
    background: var(--bc-bg);
    border-radius: var(--bc-radius-sm);
    border: 1px solid var(--bc-border);
}

.bc-reply-form {
    background: var(--bc-bg);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    padding: .875rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.bc-reply-form__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .625rem;
}

/* Keep old bubble styles for ticket-thread.php partial */
.bycarl-bubble {
    display: flex;
    align-items: flex-end;
    gap: .625rem;
}

.bycarl-bubble--mine {
    flex-direction: row-reverse;
}

.bycarl-bubble__content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.bycarl-bubble__text {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: 10px;
    padding: .625rem .875rem;
    font-size: .875rem;
    color: var(--bc-text);
    line-height: 1.5;
}

.bycarl-bubble--mine .bycarl-bubble__text {
    background: var(--bc-brand);
    color: #fff;
    border-color: var(--bc-brand);
}

.bycarl-bubble__time {
    font-size: .6875rem;
    color: var(--bc-muted);
    padding: 0 .25rem;
}

.bycarl-bubble--mine .bycarl-bubble__time {
    text-align: right;
}

.bycarl-bubble__avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
}

/* ── Empty overview state ────────────────────────────────────── */
.bc-empty-overview {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--bc-muted);
}

.bc-empty-overview svg {
    margin-bottom: 1rem;
    opacity: .4;
}

.bc-empty-overview h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bc-text);
    margin-bottom: .5rem;
}

.bc-empty-overview p {
    font-size: .875rem;
    margin-bottom: 1.25rem;
}

/* ── Inputs / Forms (modals compatibilité) ───────────────────── */
.bycarl-field {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}

.bycarl-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bc-text-2);
}

.bycarl-input {
    width: 100%;
    padding: .5625rem .75rem;
    border: 1.5px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    font-size: .875rem;
    font-family: var(--bc-font);
    color: var(--bc-text);
    background: var(--bc-white);
    transition: border-color var(--bc-transition), box-shadow var(--bc-transition);
    outline: none;
    appearance: none;
}

.bycarl-input:focus {
    border-color: var(--bc-brand);
    box-shadow: 0 0 0 3px var(--bc-brand-lt);
}

.bycarl-textarea {
    resize: vertical;
    min-height: 90px;
}

.bycarl-field-feedback {
    font-size: .8125rem;
    padding: .5rem .75rem;
    border-radius: var(--bc-radius-sm);
    font-weight: 500;
}

.bycarl-field-feedback--success {
    background: var(--bc-green-lt);
    color: var(--bc-green);
}

.bycarl-field-feedback--error {
    background: var(--bc-red-lt);
    color: var(--bc-red);
}

/* ── Modals ──────────────────────────────────────────────────── */
.bycarl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
}

.bycarl-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.bycarl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    cursor: pointer;
}

.bycarl-modal-box {
    position: relative;
    background: var(--bc-white);
    border-radius: var(--bc-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateY(8px);
    transition: transform 200ms ease;
}

.bycarl-modal-overlay.is-open .bycarl-modal-box {
    transform: translateY(0);
}

.bycarl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.375rem;
    border-bottom: 1px solid var(--bc-border);
}

.bycarl-modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bc-text);
}

.bycarl-modal-close {
    background: none;
    border: none;
    color: var(--bc-muted);
    cursor: pointer;
    padding: .25rem;
    border-radius: 6px;
    transition: background var(--bc-transition), color var(--bc-transition);
}

.bycarl-modal-close:hover {
    background: var(--bc-bg);
    color: var(--bc-text);
}

.bycarl-modal-body {
    padding: 1.25rem 1.375rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.bycarl-modal-project-name {
    font-size: .8125rem;
    color: var(--bc-text-2);
    background: var(--bc-brand-lt);
    border: 1px solid #ffdec0;
    border-radius: var(--bc-radius-sm);
    padding: .5rem .75rem;
    font-weight: 600;
}

.bycarl-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .625rem;
    padding: 1rem 1.375rem;
    border-top: 1px solid var(--bc-border);
}

/* Modal open: body scroll lock */
body.bycarl-modal-open {
    overflow: hidden;
}

/* Compat bc-btn inside modals */
.bycarl-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: var(--bc-radius-sm);
    font-size: .875rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all var(--bc-transition);
    cursor: pointer;
    font-family: var(--bc-font);
    line-height: 1.4;
}

.bycarl-btn--primary {
    background: var(--bc-brand);
    color: #fff;
    border-color: var(--bc-brand);
}

.bycarl-btn--primary:hover {
    background: var(--bc-brand-dk);
    border-color: var(--bc-brand-dk);
}

.bycarl-btn--ghost {
    background: transparent;
    color: var(--bc-text-2);
    border-color: var(--bc-border);
}

.bycarl-btn--ghost:hover {
    background: var(--bc-bg);
    color: var(--bc-text);
}

.bycarl-btn--sm {
    padding: .3rem .7rem;
    font-size: .8125rem;
}

.bycarl-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .bc-main {
        padding: 1.25rem 1.5rem 3rem;
    }
}

@media (max-width: 768px) {
    .bc-main {
        padding: 1rem 1rem 3rem;
    }

    .bc-dash-header,
    .bycarl-dash-header {
        padding: .875rem 1rem;
    }

    .bc-stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .bc-subprojects {
        grid-template-columns: 1fr;
    }

    .bc-project-card__head {
        flex-wrap: wrap;
    }

    .bc-detail__hero {
        flex-direction: column;
    }

    .bc-detail__hero-right {
        align-items: flex-start;
        flex-direction: row;
    }

    .bc-files-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bycarl-modal-overlay {
        padding: .5rem;
        align-items: flex-end;
    }

    .bycarl-modal-box {
        max-width: 100%;
        border-radius: var(--bc-radius) var(--bc-radius) 0 0;
        max-height: 92vh;
    }

    .bc-activity-row {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .bc-activity-row__badges {
        flex-wrap: wrap;
    }
}

/* Factures — synthèse et lecture progressive */
.bc-invoice-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 0 0 1.6rem;
}

.bc-invoice-overview article {
    padding: 1.05rem 1.15rem;
    border: 1px solid #e2e5ed;
    border-radius: 14px;
    background: #fff;
}

.bc-invoice-overview span,
.bc-invoice-overview small { display: block; color: #778097; font-size: .7rem; }
.bc-invoice-overview strong { display: block; margin: .3rem 0 .2rem; color: #121a3a; font-size: 1.35rem; }
.bc-invoice-overview .is-paid { background: #f5fcf7; border-color: #d8f1df; }
.bc-invoice-overview .is-due { background: #fff8f4; border-color: #ffd9c7; }
.bc-invoice-overview .is-due strong { color: #f45b17; }

.bc-invoice-fold {
    margin: 0 0 .75rem;
    overflow: hidden;
    border: 1px solid #e2e5ed;
    border-radius: 14px;
    background: #fff;
}

.bc-invoice-fold > summary { list-style: none; cursor: pointer; }
.bc-invoice-fold > summary::-webkit-details-marker { display: none; }
.bc-invoice-fold .bycarl-invoice-contract__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 90px 20px;
    align-items: center;
    gap: 1rem;
    padding: .95rem 1.1rem;
    border: 0;
    background: #f8f9fd;
}
.bc-invoice-fold__count { display: block; margin-top: .2rem; color: #838ba0; font-size: .67rem; }
.bc-invoice-fold__money { text-align: right; }
.bc-invoice-fold__money strong,
.bc-invoice-fold__money span { display: block; }
.bc-invoice-fold__money strong { color: #121a3a; font-size: .88rem; }
.bc-invoice-fold__money span { margin-top: .12rem; color: #7b8498; font-size: .65rem; }
.bc-invoice-fold__progress { height: 4px; overflow: hidden; border-radius: 99px; background: #e6e9f1; }
.bc-invoice-fold__progress span { display: block; height: 100%; border-radius: inherit; background: #35b968; }
.bc-invoice-fold__chevron { color: #70798f; transition: transform .2s ease; }
.bc-invoice-fold[open] .bc-invoice-fold__chevron { transform: rotate(180deg); }

.bc-invoice-list { padding: 0 1rem; }
.bc-invoice-row-card {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 150px 100px 92px 72px;
    align-items: center;
    gap: 1rem;
    min-height: 72px;
    padding: .8rem .15rem;
    border-bottom: 1px solid #eceef4;
    cursor: pointer;
}
.bc-invoice-row-card:last-child { border-bottom: 0; }
.bc-invoice-row-card:hover { background: #fafbfe; }
.bc-invoice-row-card:focus-visible { outline: 2px solid #233dff; outline-offset: -2px; }
.bc-invoice-row-card__identity > strong { display: block; color: #121a3a; font-size: .82rem; }
.bc-invoice-row-card__identity .bc-inv-line { display: inline; color: #7b8498; font-size: .67rem; }
.bc-invoice-row-card__identity .bc-inv-line + .bc-inv-line:before { content: ' · '; }
.bc-invoice-row-card__meta { display: flex; align-items: center; gap: .5rem; color: #737c92; font-size: .7rem; }
.bc-invoice-row-card__amount { color: #121a3a; font-size: .8rem; text-align: right; }
.bc-invoice-row-card__status,
.bc-invoice-row-card__action { text-align: right; }

@media (max-width: 900px) {
    .bc-invoice-row-card { grid-template-columns: minmax(220px, 1fr) 130px 90px 80px; }
    .bc-invoice-row-card__action { grid-column: 4; }
}

@media (max-width: 680px) {
    .bc-invoice-overview { grid-template-columns: 1fr; }
    .bc-invoice-fold .bycarl-invoice-contract__summary { grid-template-columns: minmax(0, 1fr) auto 18px; }
    .bc-invoice-fold__progress { display: none; }
    .bc-invoice-row-card { grid-template-columns: 1fr auto; gap: .45rem 1rem; padding: .9rem .15rem; }
    .bc-invoice-row-card__identity { grid-column: 1 / -1; }
    .bc-invoice-row-card__meta { grid-column: 1; }
    .bc-invoice-row-card__amount { grid-column: 2; grid-row: 2; }
    .bc-invoice-row-card__status { text-align: left; }
    .bc-invoice-row-card__action { grid-column: 2; text-align: right; }
}

/* Projets — cartes unifiées */
.bc-project-v2 {
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid #e4e7f0;
    border-radius:18px;
    background:#fff;
    box-shadow:0 1px 2px rgba(24,34,76,.04);
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bc-project-v2:hover { transform:translateY(-3px); border-color:#c9d0df; box-shadow:0 20px 40px rgba(24,34,76,.1); }

.bc-project-v2__top { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:1.3rem 1.3rem 0; }
.bc-project-v2__eyebrow { display:inline-flex; align-items:center; gap:.4rem; color:#8891a6; font-size:.68rem; font-weight:750; letter-spacing:.07em; text-transform:uppercase; }
.bc-project-v2__eyebrow i { width:6px; height:6px; flex:none; border-radius:50%; background:#233dff; }
.bc-project-v2--done .bc-project-v2__eyebrow i { background:#17ab63; }
.bc-project-v2--pending .bc-project-v2__eyebrow i { background:#e08a1c; }

.bc-project-v2__intro { padding:.75rem 1.3rem 1.15rem; cursor:pointer; }
.bc-project-v2__intro h3 { margin:0; color:#10152b; font-size:1.2rem; font-weight:800; letter-spacing:-.02em; line-height:1.3; }
.bc-project-v2__intro p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:.4rem 0 0; color:#6b7389; font-size:.825rem; line-height:1.5; }

.bc-project-v2__progress { margin:0 1.3rem; padding:.9rem 0; border-top:1px solid #eef0f5; }
.bc-project-v2__progress-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:.5rem; }
.bc-project-v2__progress-head span { color:#8891a6; font-size:.72rem; font-weight:600; }
.bc-project-v2__progress-head strong { color:#233dff; font-size:.85rem; font-weight:800; }
.bc-project-v2--done .bc-project-v2__progress-head strong { color:#17ab63; }
.bc-project-v2__bar { height:6px; overflow:hidden; border-radius:99px; background:#eef0f6; }
.bc-project-v2__bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#233dff,#6a7bff); transition:width .3s ease; }
.bc-project-v2--done .bc-project-v2__bar i { background:linear-gradient(90deg,#17ab63,#3fcf8e); }

.bc-project-v2__chips { display:flex; flex-wrap:wrap; gap:.4rem; margin:0 1.3rem .95rem; }
.bc-project-v2__chip { display:inline-flex; align-items:center; gap:.35rem; padding:.3rem .6rem; border-radius:999px; background:#f4f5f9; color:#6b7389; font-size:.7rem; font-weight:700; }
.bc-project-v2__chip.is-active { background:#eef0ff; color:#233dff; }
.bc-pv2-ic { width:11px; height:11px; flex:none; opacity:.75; }
.bc-pv2-ic--step { -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11'/%3E%3C/svg%3E") center/contain no-repeat; background:currentColor; }
.bc-pv2-ic--req { -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E") center/contain no-repeat; background:currentColor; }
.bc-pv2-ic--tkt { -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10a2 2 0 002-2 2 2 0 00-2-2V4a2 2 0 012-2h14a2 2 0 012 2v2a2 2 0 100 4v2a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10a2 2 0 002-2 2 2 0 00-2-2V4a2 2 0 012-2h14a2 2 0 012 2v2a2 2 0 100 4v2a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E") center/contain no-repeat; background:currentColor; }

.bc-project-v2__stages { flex:1; margin:0 1.3rem; padding:.15rem 0 .5rem; border-top:1px solid #eef0f5; }
.bc-project-v2__stage { display:flex; align-items:center; justify-content:space-between; gap:.6rem; width:100%; padding:.65rem 0; border:0; border-bottom:1px solid #f1f2f7; background:transparent; color:#10152b; text-align:left; cursor:pointer; }
.bc-project-v2__stage:last-child { border-bottom:0; }
.bc-project-v2__stage:hover strong { color:#233dff; }
.bc-project-v2__stage > span { display:flex; align-items:center; gap:.6rem; min-width:0; }
.bc-project-v2__stage i { width:8px; height:8px; flex:0 0 8px; border:2px solid #233dff; border-radius:50%; background:#fff; }
.bc-project-v2__stage i.is-done { border-color:#17ab63; background:#17ab63; box-shadow:0 0 0 3px #e4f7ec; }
.bc-project-v2__stage strong { overflow:hidden; font-size:.78rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.bc-project-v2__stage small { color:#9099ad; font-size:.68rem; }
.bc-project-v2__stage--single { cursor:default; }
.bc-project-v2__stage--single:hover strong { color:inherit; }

.bc-project-v2 footer { display:flex; align-items:center; gap:.6rem; padding:1rem 1.3rem; border-top:1px solid #eef0f5; background:#fafbfd; }
.bc-project-v2 footer button { border:0; border-radius:10px; font-family:inherit; font-size:.8rem; font-weight:750; cursor:pointer; transition:background .15s, color .15s; }
.bc-project-v2__open { flex:1; display:flex; align-items:center; justify-content:center; gap:.4rem; padding:.65rem .8rem; background:#233dff; color:#fff; }
.bc-project-v2__open:hover { background:#1a2ecc; }
.bc-project-v2__request { padding:.65rem .85rem !important; background:#fff !important; color:#e75312 !important; border:1px solid #f0d9ca !important; }
.bc-project-v2__request:hover { background:#fff4ec !important; }

@media (max-width: 640px) {
    .bc-project-v2 footer { flex-direction:column-reverse; align-items:stretch; }
    .bc-project-v2 footer button { justify-content:center; text-align:center; }
}

@media (max-width: 480px) {
    .bc-stats-bar {
        grid-template-columns: 1fr;
    }

    .bc-detail__tabs-nav {
        padding: 0;
    }

    .bc-detail__tab-btn {
        padding: .625rem .75rem;
        font-size: .8125rem;
    }

    .bc-files-grid {
        grid-template-columns: 1fr;
    }

    .bc-table th,
    .bc-table td {
        padding: .5rem .75rem;
    }
}

/* ── Quick links (Contrat / Facture / Téléchargement) ────────── */
.bc-project-quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .625rem;
    padding: .875rem 1rem 1rem;
    background: var(--bc-bg);
    border-top: 1px solid var(--bc-border);
}

.bc-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: .875rem .5rem;
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    cursor: pointer;
    transition: all var(--bc-transition);
    font-family: var(--bc-font);
    font-size: .75rem;
    font-weight: 600;
    color: var(--bc-text-2);
}

.bc-quick-link:hover {
    border-color: var(--bc-brand);
    color: var(--bc-brand);
    box-shadow: 0 0 0 3px var(--bc-brand-lt);
}

.bc-quick-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.bc-quick-link__icon--contracts { background: var(--bc-purple-lt); color: var(--bc-purple); }
.bc-quick-link__icon--billing   { background: var(--bc-green-lt);  color: var(--bc-green);  }
.bc-quick-link__icon--files     { background: var(--bc-blue-lt);   color: var(--bc-blue);   }

.bc-quick-link__icon svg { stroke: currentColor; }

.bc-quick-link__label {
    text-align: center;
    line-height: 1.2;
}

/* ══════════════════════════════════════════════════════════════
   Section Services
   ══════════════════════════════════════════════════════════════ */

.bc-services-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.bc-svc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1rem;
    background: var(--bc-card);
    border: 1px solid var(--bc-border);
    border-radius: 10px;
    transition: box-shadow .15s;
}
.bc-svc-item:hover { box-shadow: var(--bc-shadow-sm); }

.bc-svc-item--alert {
    border-left: 3px solid var(--bc-orange);
    background: #FFFBF0;
}

.bc-svc-item__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bc-blue-lt);
    color: var(--bc-blue);
}

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

.bc-svc-item__name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--bc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-svc-item__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .2rem;
    font-size: .78rem;
    color: var(--bc-text-2);
}

.bc-svc-item__amount {
    font-weight: 600;
    color: var(--bc-brand);
}

.bc-svc-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .25rem;
    flex-shrink: 0;
}

.bc-svc-days {
    font-size: .72rem;
    font-weight: 700;
}

.bc-svc-item__date {
    font-size: .75rem;
    color: var(--bc-text-2);
    white-space: nowrap;
}

/* Alert dot on section title */
.bc-section__alert-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bc-orange, #F59E0B);
    margin-left: .4rem;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   Navigation principale client
   ══════════════════════════════════════════════════════════════ */

.bc-dash-nav {
    display: flex;
    align-items: center;
    padding: 1rem 2rem .25rem;
    background: var(--bc-white);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Onglets en pilules — conteneur pilule (spec 2026) */
.bc-dash-nav__pills,
.bc-dash-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
}
.bc-dash-nav {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 3px;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}

.bc-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--bc-text-2);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.bc-nav-btn:hover {
    background: var(--bc-brand-lt);
    color: var(--bc-brand);
}
.bc-nav-btn.is-active {
    background: var(--bc-brand);
    color: #fff;
    font-weight: 600;
}

/* Page title */
.bc-page-title {
    margin-bottom: 1.25rem;
}
.bc-page-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bc-text);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.bc-page-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* Service item full (page dédiée) */
.bc-svc-item--full {
    padding: 1rem 1.25rem;
}
.bc-svc-item__desc {
    font-size: .8rem;
    color: var(--bc-text-2);
    margin-top: .15rem;
}

/* Forfait / bundle */
.bc-svc-item--bundle {
    border-left: 3px solid var(--bc-brand, #FF6600);
}
.bc-svc-bundle-count {
    font-size: .7rem;
    font-weight: 500;
    color: var(--bc-muted);
    background: var(--bc-bg);
    border: 1px solid var(--bc-border);
    border-radius: 20px;
    padding: .1rem .5rem;
    margin-left: .5rem;
    vertical-align: middle;
}
.bc-svc-toggle {
    margin-top: .5rem;
    padding: .2rem .5rem !important;
}
.bc-svc-toggle svg {
    transition: transform .2s ease;
}

/* Composants d'un forfait */
.bc-svc-components {
    border: 1px solid var(--bc-border);
    border-top: none;
    border-radius: 0 0 var(--bc-radius) var(--bc-radius);
    background: #fafafa;
    padding: .5rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .75rem;
}
.bc-svc-component {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .82rem;
    padding: .35rem .5rem;
    border-radius: var(--bc-radius-sm, 6px);
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
}
.bc-svc-component__icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.bc-svc-component__name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.bc-svc-component__desc {
    color: var(--bc-muted);
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.bc-svc-component__amount {
    font-weight: 600;
    color: var(--bc-muted);
    font-size: .78rem;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .bc-dash-nav { padding: .5rem .75rem; }
    .bc-nav-btn span { display: none; }
    .bc-nav-btn { padding: .5rem .6rem; }
}

/* ══════════════════════════════════════════════════════════════
   Redesign 2026 — Charte ByCarl : Orange #FF6600 | Bleu #233DFF
   Thème clair sobre (le reste de bycarl.fr est clair — l'espace
   client ne doit pas jurer avec le header réel du thème WP).
   ══════════════════════════════════════════════════════════════ */

/* ── Header — barre claire simple, pas de header alternatif ───
 * Ce bandeau (avatar + salutation + CTA) est un contenu de PAGE qui
 * s'affiche SOUS le vrai header du thème WordPress — il reste donc
 * sobre et clair, il ne cherche pas à se substituer au header réel
 * du site (logo ByCarl, nav, bouton pilule "Espace client"). */
.bc-header-wrap {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
}

.bc-dash .bycarl-dash-header,
.bc-dash .bc-dash-header {
    padding: 1.125rem 2rem;
}

.bc-dash .bycarl-dash-greeting,
.bc-dash .bc-dash-greeting {
    color: var(--fg) !important;
}
.bc-dash .bycarl-dash-subtitle,
.bc-dash .bc-dash-subtitle {
    color: var(--fg-muted) !important;
}
.bc-dash .bycarl-dash-greeting strong,
.bc-dash .bc-dash-greeting strong {
    color: var(--fg) !important;
}

.bc-dash .bycarl-dash-avatar,
.bc-dash .bc-dash-avatar {
    border: 2px solid var(--border);
}
.bc-dash .bycarl-online-dot,
.bc-dash .bc-online-dot {
    background: #22C55E;
    border-color: var(--surface);
}

/* ── Bouton primaire partout — orange ByCarl, pilule ─────────── */
.bc-dash .bc-btn--primary,
.bc-dash .bycarl-btn--primary {
    background: var(--bc-brand) !important;
    border-color: var(--bc-brand) !important;
    color: #fff !important;
}
.bc-dash .bc-btn--primary:hover,
.bc-dash .bycarl-btn--primary:hover {
    background: var(--bc-brand-dk) !important;
    border-color: var(--bc-brand-dk) !important;
}

/* ── Progress bar / strip — orange ──────────────────────────── */
.bc-progress-fill {
    background: var(--bc-brand) !important;
}

/* ── Liens "Voir tout" et actions — couleur brand ────────────── */
.bc-section__action,
.bc-view-more {
    color: var(--bc-brand) !important;
}

/* ── Icônes services — cohérence bleue ──────────────────────── */
.bc-svc-item__icon {
    background: var(--bc-blue-lt) !important;
    color: var(--bc-blue) !important;
}
.bc-svc-item--alert {
    border-left-color: var(--bc-brand) !important;
}

/* ── Badges "new" / "open" — orange brand ────────────────────── */
.bc-badge--new  { background: var(--bc-brand-lt) !important; color: var(--bc-brand) !important; }
.bc-badge--open { background: var(--bc-brand-lt) !important; color: var(--bc-brand) !important; }
.bc-badge--active { background: var(--bc-blue-lt) !important; color: var(--bc-blue) !important; }
.bc-badge--in_progress { background: var(--bc-blue-lt) !important; color: var(--bc-blue) !important; }

/* ── Modal overlay — boutons charte ─────────────────────────── */
.bycarl-btn--primary {
    background: var(--bc-brand) !important;
    border-color: var(--bc-brand) !important;
    color: #fff !important;
}
.bycarl-btn--primary:hover {
    background: var(--bc-brand-dk) !important;
    border-color: var(--bc-brand-dk) !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bc-stats-bar { grid-template-columns: 1fr !important; }
    .bc-dash .bycarl-dash-header,
    .bc-dash .bc-dash-header { padding: .875rem 1rem; }
    .bc-dash-nav { padding: .5rem 1rem !important; }
}

/* ── Cadre principal autour du contenu ───────────────────────── */
.bc-dash {
    padding: 1.5rem;
    background: var(--bc-bg);
}

.bc-dash-frame {
    background: var(--bc-white);
    border: 1px solid var(--bc-border);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.03);
    overflow: hidden;
    max-width: 1500px;
    margin: 0 auto;
}

/* Le header s'étend pleine largeur dans le cadre */
.bc-dash-frame .bc-header-wrap {
    border-radius: 0 !important;
}

.bc-dash-frame .bc-main {
    max-width: 100% !important;
    padding: 1.75rem 2rem 2.5rem !important;
}

@media (max-width: 768px) {
    .bc-dash { padding: .75rem; }
    .bc-dash-frame { border-radius: 12px; }
    .bc-dash-frame .bc-main { padding: 1.25rem 1rem 2rem !important; }
}

/* ══════════════════════════════════════════════════════════════
   Grille bento — vue d'ensemble (tuiles de tailles variées)
   ══════════════════════════════════════════════════════════════ */
.bc-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.bc-bento-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.375rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

/* Tuile héro — "Bonjour {prénom}", span 2 colonnes, dégradé + glow discrets */
.bc-bento-tile--hero {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--surface) 55%, rgba(255,102,0,.09) 100%);
    justify-content: center;
    gap: .625rem;
}
.bc-bento-tile--hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,102,0,.16) 0%, rgba(255,102,0,0) 70%);
    pointer-events: none;
}
.bc-bento-tile--hero .bc-bento-hero__greeting {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--fg);
    position: relative;
    z-index: 1;
}
.bc-bento-tile--hero .bc-bento-hero__greeting strong { color: var(--primary); }
.bc-bento-tile--hero .bc-bento-hero__subtitle {
    font-size: .875rem;
    color: var(--fg-muted);
    position: relative;
    z-index: 1;
}
.bc-bento-tile--hero .bc-bento-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
    position: relative;
    z-index: 1;
}

/* Tuile chip compteur (dans le héro) */
.bc-bento-chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .3rem .7rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--fg-muted);
}
.bc-bento-chip strong { color: var(--fg); font-weight: 700; }

/* Tuile standard (factures, tickets…) */
.bc-bento-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.bc-bento-tile__title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fg-subtle);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.bc-bento-tile__more {
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary);
}

.bc-bento-tile__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

/* Tuile "montant / chiffre" compacte */
.bc-bento-tile--figure {
    justify-content: center;
    align-items: flex-start;
}
.bc-bento-tile--figure .bc-bento-figure__value {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--fg);
    line-height: 1.1;
}
.bc-bento-tile--figure .bc-bento-figure__hint {
    font-size: .8125rem;
    color: var(--fg-muted);
}
.bc-bento-tile--figure.bc-bento-tile--alert .bc-bento-figure__value { color: var(--primary); }
.bc-bento-tile--figure.bc-bento-tile--alert {
    border-color: rgba(255,102,0,.35);
    background: linear-gradient(135deg, var(--surface) 70%, rgba(255,102,0,.06) 100%);
}

/* Mini-liste factures/tickets dans une tuile */
.bc-bento-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.bc-bento-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .625rem;
    padding: .5rem .625rem;
    background: var(--surface-elevated);
    border-radius: 12px;
    font-size: .8125rem;
}
.bc-bento-list__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fg);
    font-weight: 500;
}
.bc-bento-list__empty {
    font-size: .8125rem;
    color: var(--fg-muted);
    padding: .5rem 0;
}

/* Tuile action rapide — bordure pointillée, icône centrée, cliquable */
.bc-bento-tile--action {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .625rem;
    border: 1.5px dashed var(--border);
    background: var(--surface-elevated);
    cursor: pointer;
    font-family: var(--bc-font);
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
}
.bc-bento-tile--action:hover {
    border-color: var(--primary);
    background: var(--bc-brand-lt);
}
.bc-bento-tile--action .bc-bento-action__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--bc-brand-lt);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bc-bento-tile--action:hover .bc-bento-action__icon {
    background: var(--primary);
    color: #fff;
}
.bc-bento-tile--action .bc-bento-action__label {
    font-size: .875rem;
    font-weight: 700;
    color: var(--fg);
}
.bc-bento-tile--action .bc-bento-action__hint {
    font-size: .75rem;
    color: var(--fg-muted);
}

.bc-bento-tile:hover:not(.bc-bento-tile--hero) {
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .bc-bento { grid-template-columns: repeat(2, 1fr); }
    .bc-bento-tile--hero { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 600px) {
    .bc-bento { grid-template-columns: 1fr; }
    .bc-bento-tile--hero { grid-column: span 1; }
}

.bc-table__row--clickable { cursor: pointer; }
.bc-table__row--clickable:hover { background: rgba(255,102,0,.04); }
.bc-detail-header { display:flex; align-items:center; gap:1rem; margin-bottom:1.5rem; }
.bc-detail-title { font-size:1.25rem; font-weight:700; color:var(--bc-text); margin:0; }
.bc-invoice-card { background:#fff; border-radius:12px; padding:1.5rem; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.bc-invoice-meta { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1rem; }
.bc-invoice-meta > div { display:flex; flex-direction:column; gap:.25rem; }
.bc-label { font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; color:#888; font-weight:600; }
.bc-invoice-notes { font-size:.85rem; color:#666; margin:.75rem 0; padding:.75rem; background:#f9f9f9; border-radius:8px; }
.bc-invoice-actions { margin-top:1.25rem; }
.bc-text-muted { color:#999; }
.bc-text-sm { font-size:.85rem; }

.bc-tag { display:inline-block; font-size:.75rem; font-weight:500; padding:.2rem .6rem; border-radius:6px; background:rgba(35,61,255,.08); color:#233DFF; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; }
.bc-tag--sm { font-size:.7rem; padding:.15rem .45rem; }

/* ── Factures — groupes projet/contrat (espace client) ──────── */
.bycarl-invoice-project { margin-bottom:1.5rem; }
.bycarl-invoice-project__header { display:flex; align-items:center; gap:.5rem; font-size:.8125rem; font-weight:600; color:#64748b; text-transform:uppercase; letter-spacing:.05em; margin-bottom:.75rem; padding-bottom:.5rem; border-bottom:2px solid #e2e8f0; }
.bycarl-invoice-contract { margin-bottom:1rem; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
.bycarl-invoice-contract__summary { padding:.875rem 1rem; background:#fefce8; border-bottom:1px solid #fef08a; }
.bycarl-invoice-contract__amounts { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.bycarl-invoice-contract__label { font-size:.75rem; font-weight:600; color:#92400e; }
.bycarl-invoice-contract__total { font-size:1rem; font-weight:700; color:#1e293b; }
.bc-progress-bar--client { height:8px; background:#e2e8f0; border-radius:99px; overflow:hidden; margin-bottom:.375rem; }
.bc-progress-bar--client .bc-progress-bar__fill { height:100%; background:linear-gradient(90deg,#46b450,#22c55e); border-radius:99px; transition:width .4s; }
.bycarl-invoice-contract__progress-label { display:flex; gap:.75rem; font-size:.75rem; flex-wrap:wrap; }
.bycarl-table-wrap { overflow-x:auto; }

/* ── Factures — header projet meta ─────────────────────────── */
.bc-proj-meta { margin-left:auto; font-size:.75rem; color:#94a3b8; font-weight:400; }

.bc-inv-desc { display:block; font-size:.72rem; color:#94a3b8; font-weight:400; margin-top:.1rem; }

.bc-inv-line { display:block; font-size:.72rem; color:#64748b; margin-top:.2rem; }
.bc-inv-line em { color:#94a3b8; font-style:normal; }
.bc-inv-discount { display:block; font-size:.72rem; color:#d97706; margin-top:.2rem; font-weight:500; }

/* ── Modal unifié ────────────────────────────────────────────── */
.bycarl-modal-box--unified { max-width:560px; padding:0; overflow:hidden; }
.bc-modal-step { padding:0; }
.bc-modal-header-icon { width:40px; height:40px; border-radius:var(--bc-radius-sm); background:#EDE9FE; color:#7C3AED; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.bc-modal-subtitle { margin:0; font-size:.8125rem; color:var(--bc-muted); }
.bc-modal-type-icon { font-size:1.25rem; }
#bc-modal-form-title-wrap { display:flex; align-items:center; gap:.75rem; flex:1 1 0; min-width:0; }
#bc-modal-form-title-wrap > div { display:flex; flex-direction:column; gap:.15rem; }

/* Liste de sélection type */
.bc-modal-type-list { display:flex; flex-direction:column; gap:.5rem; padding:1.25rem 1.5rem 1.5rem; }
.bc-type-row { display:flex; align-items:center; gap:1rem; padding:.875rem 1rem; background:var(--bc-white); border:1.5px solid var(--bc-border); border-radius:var(--bc-radius); cursor:pointer; text-align:left; transition:border-color .15s, box-shadow .15s, background .15s; width:100%; }
.bc-type-row:hover { border-color:#FF6600; box-shadow:0 0 0 3px rgba(255,102,0,.07); background:#FFFBF8; }
.bc-type-row:hover .bc-type-row__arrow { color:#FF6600; transform:translateX(2px); }
.bc-type-row__icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.bc-type-row__icon--nouveau   { background:#EDE9FE; color:#7C3AED; }
.bc-type-row__icon--evolution { background:#FEF3C7; color:#D97706; }
.bc-type-row__icon--support   { background:#FEE2E2; color:#DC2626; }
.bc-type-row__icon--infos     { background:#DBEAFE; color:#2563EB; }
.bc-type-row__body { display:flex; flex-direction:column; gap:.2rem; flex:1 1 0; min-width:0; }
.bc-type-row__body strong { font-size:.9rem; color:#1E293B; font-weight:600; }
.bc-type-row__body span { font-size:.8rem; color:#64748B; line-height:1.4; }
.bc-type-row__arrow { color:#CBD5E1; flex-shrink:0; transition:color .15s, transform .15s; }

/* Priorité radio */
.bc-priority-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.5rem; }
.bc-priority-option { display:flex; align-items:center; justify-content:center; padding:.5rem .25rem; border:1.5px solid var(--bc-border); border-radius:var(--bc-radius-sm); cursor:pointer; font-size:.8rem; transition:border-color .15s, background .15s; }
.bc-priority-option input { display:none; }
.bc-priority-option--selected { border-color:#FF6600; background:rgba(255,102,0,.06); font-weight:600; }
.bc-priority-option:hover { border-color:#9CA3AF; }

/* Feedback */
.bc-feedback--success { background:#D1FAE5; color:#065F46; }
.bc-feedback--error   { background:#FEE2E2; color:#991B1B; }

/* ── Liste demandes unifiée ──────────────────────────────────── */
.bc-page-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1.25rem; }
.bc-filter-group { display:flex; gap:.5rem; flex-wrap:wrap; }
.bc-filter-btn { padding:.35rem .875rem; border:1.5px solid var(--bc-border); border-radius:999px; background:var(--bc-white); font-size:.8rem; cursor:pointer; color:#64748B; transition:all .15s; }
.bc-filter-btn:hover { border-color:#FF6600; color:#FF6600; }
.bc-filter-btn.is-active { border-color:#FF6600; background:#FF6600; color:#fff; font-weight:600; }

.bc-req-list { display:flex; flex-direction:column; gap:.5rem; }
.bc-req-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.875rem 1.125rem; background:var(--bc-white); border:1px solid var(--bc-border); border-radius:var(--bc-radius); cursor:pointer; transition:box-shadow .15s, transform .1s; }
.bc-req-row:hover { box-shadow:0 4px 16px rgba(0,0,0,.1); transform:translateY(-1px); }
.bc-req-row__left { display:flex; align-items:center; gap:.875rem; flex:1 1 0; min-width:0; }
.bc-req-row__info { display:flex; flex-direction:column; gap:.2rem; min-width:0; }
.bc-req-row__subject { font-weight:600; font-size:.9rem; color:#1E293B; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bc-req-row__project { font-size:.775rem; color:#64748B; }
.bc-req-row__right { display:flex; align-items:center; gap:.625rem; flex-shrink:0; }
.bc-req-row__date { font-size:.775rem; color:#94A3B8; }

.bc-req-type-badge { display:inline-flex; align-items:center; gap:.3rem; padding:.2rem .65rem; border-radius:999px; font-size:.75rem; font-weight:600; white-space:nowrap; flex-shrink:0; }

.bc-priority-chip { display:inline-block; padding:.2rem .6rem; border-radius:999px; font-size:.75rem; font-weight:600; }
.bc-priority-chip--low    { background:#F0FDF4; color:#15803D; }
.bc-priority-chip--normal { background:#EFF6FF; color:#1D4ED8; }
.bc-priority-chip--high   { background:#FFF7ED; color:#C2410C; }
.bc-priority-chip--urgent { background:#FEF2F2; color:#B91C1C; }

.bc-empty-requests { text-align:center; padding:3.5rem 1rem; color:#64748B; }
.bc-empty-requests__icon { font-size:3rem; margin-bottom:1rem; }
.bc-empty-requests h3 { font-size:1rem; color:#1E293B; margin:0 0 .5rem; }
.bc-empty-requests p { font-size:.875rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width:600px) {
    .bc-modal-type-list { padding:1rem; }
    .bc-priority-grid { grid-template-columns:1fr 1fr; }
    .bc-req-row { flex-wrap:wrap; }
    .bc-req-row__right { width:100%; justify-content:flex-start; }
}

/* Champ nom signataire (lecture seule) */
.bc-signer-name[readonly] {
    background: var(--bc-bg-2, #f9fafb);
    color: var(--bc-text, #111827);
    cursor: default;
    border-color: var(--bc-border, #e5e7eb);
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   Studio éditorial — vue d'ensemble 2026
   Le cadre reste à cheval sur le hero du site ; seul son contenu
   adopte une composition éditoriale plus généreuse.
   ══════════════════════════════════════════════════════════════ */
.bc-dash-frame {
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(28, 31, 73, .12), 0 2px 10px rgba(28, 31, 73, .05);
}

.bc-header-wrap {
    background: #fffdf9 !important;
}

.bc-dash .bycarl-dash-header {
    min-height: 78px;
    padding: 1rem 2.25rem;
}

.bc-dash-nav {
    padding: .35rem 2.25rem !important;
    border-bottom: 1px solid #e9e7e2 !important;
    background: #fffdf9 !important;
    gap: .2rem;
}

.bc-dash .bc-nav-btn {
    border-radius: 0;
    border-bottom: 2px solid transparent;
    padding: .75rem .8rem;
}

.bc-dash .bc-nav-btn.is-active {
    background: transparent !important;
    color: var(--bc-brand) !important;
    border-bottom-color: var(--bc-brand);
}

.bc-dash-frame .bc-main {
    background: #fffdf9;
    padding: 0 2.25rem 2.75rem !important;
}

.bc-studio {
    color: #121a3a;
}

.bc-studio button {
    font: inherit;
}

.bc-studio-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    align-items: end;
    gap: 3rem;
    padding: 3.25rem 1.25rem 2.5rem;
}

.bc-studio-kicker,
.bc-studio-ledger__head > span {
    display: block;
    color: #526184;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.bc-studio-intro h2 {
    margin: .65rem 0 0;
    color: #111a3d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.65rem, 4vw, 4.85rem);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: .96;
}

.bc-studio-intro h2 span {
    color: #303c64;
}

.bc-studio-intro__note {
    border-left: 1px solid #d8d5ce;
    padding: .25rem 0 .25rem 1.5rem;
}

.bc-studio-intro__note p {
    margin: 0 0 .8rem;
    color: #66718e;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.55;
}

.bc-studio-intro__note span {
    color: var(--bc-brand);
    font-size: .78rem;
    font-weight: 700;
}

.bc-studio-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(360px, .92fr);
    min-height: 390px;
    border: 1px solid #e6e3dc;
    overflow: hidden;
}

.bc-studio-project {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 390px;
    padding: 3rem;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(145deg, #1529a8 0%, #233dff 62%, #10247c 100%);
}

.bc-studio-project::before,
.bc-studio-project::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.bc-studio-project::before {
    width: 520px;
    height: 520px;
    right: -190px;
    top: -230px;
    border: 90px solid rgba(255,255,255,.09);
    border-radius: 48% 52% 60% 40%;
    transform: rotate(24deg);
}

.bc-studio-project::after {
    right: 8%;
    bottom: 18%;
    width: 90px;
    height: 90px;
    background: var(--bc-brand);
    border-radius: 50%;
    opacity: .92;
}

.bc-studio-project > * {
    position: relative;
    z-index: 1;
}

.bc-studio-project .bc-studio-kicker {
    color: rgba(255,255,255,.72);
}

.bc-studio-project h3 {
    max-width: 740px;
    margin: .9rem 0 1rem;
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 3vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.02;
}

.bc-studio-project p {
    max-width: 620px;
    margin: 0;
    color: rgba(255,255,255,.8);
    font-size: .95rem;
    line-height: 1.65;
}

.bc-studio-project__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 620px;
    margin-top: 2.25rem;
}

.bc-studio-project__footer span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #fff;
    font-size: .82rem;
    font-weight: 750;
}

.bc-studio-project__footer strong {
    font-size: 1.25rem;
}

.bc-studio-progress {
    max-width: 620px;
    height: 3px;
    margin-top: .7rem;
    background: rgba(255,255,255,.25);
}

.bc-studio-progress span {
    display: block;
    height: 100%;
    background: var(--bc-brand);
}

.bc-studio-stage {
    display: flex;
    flex-direction: column;
    padding: 3rem;
    background: #fbf9f4;
}

.bc-studio-stage h3 {
    margin: .75rem 0 1.5rem;
    color: #131c3e;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.65rem, 2.2vw, 2.55rem);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.08;
}

.bc-studio-milestones {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem 1.15rem;
    margin: 0;
    padding: 0 0 1.5rem;
    list-style: none;
    border-bottom: 1px solid #dedbd3;
}

.bc-studio-milestone {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #8b91a3;
    font-size: .72rem;
}

.bc-studio-milestone__dot {
    width: 9px;
    height: 9px;
    border: 1px solid #adb3c2;
    border-radius: 50%;
    background: transparent;
}

.bc-studio-milestone.is-done,
.bc-studio-milestone.is-current {
    color: #16224b;
    font-weight: 700;
}

.bc-studio-milestone.is-done .bc-studio-milestone__dot {
    border-color: #22a875;
    background: #22a875;
}

.bc-studio-milestone.is-current .bc-studio-milestone__dot {
    border: 3px solid #fff;
    outline: 2px solid #233dff;
    background: #233dff;
}

.bc-studio-next {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.bc-studio-next > span {
    color: #7c849a;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.bc-studio-next > strong {
    color: #152047;
    font-size: 1rem;
}

.bc-studio-action,
.bc-studio-support > button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .65rem;
    padding: .7rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--bc-brand);
    color: #fff;
    font-size: .75rem;
    font-weight: 750;
    cursor: pointer;
}

.bc-studio-ledger {
    display: grid;
    grid-template-columns: 1fr 1fr .78fr;
    border-right: 1px solid #e6e3dc;
    border-bottom: 1px solid #e6e3dc;
    border-left: 1px solid #e6e3dc;
}

.bc-studio-ledger > section {
    min-width: 0;
    padding: 1.6rem;
    border-right: 1px solid #e6e3dc;
}

.bc-studio-ledger > section:last-child {
    border-right: 0;
}

.bc-studio-ledger__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.bc-studio-ledger__head button {
    border: 0;
    background: transparent;
    color: var(--bc-brand);
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
}

.bc-studio-line {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .72rem 0;
    border: 0;
    border-bottom: 1px solid #ece9e2;
    background: transparent;
    color: #172042;
    text-align: left;
    cursor: pointer;
}

.bc-studio-line:last-child {
    border-bottom: 0;
}

.bc-studio-line__mark {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--bc-brand);
}

.bc-studio-line__mark--document {
    border-radius: 2px;
    background: #233dff;
}

.bc-studio-line__copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    gap: .18rem;
}

.bc-studio-line__copy strong {
    overflow: hidden;
    font-size: .79rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-studio-line__copy small,
.bc-studio-line time {
    color: #9096a7;
    font-size: .67rem;
}

.bc-studio-support {
    background: #fff7f0;
}

.bc-studio-support > strong {
    display: block;
    margin-top: 1.25rem;
    color: #172042;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 500;
}

.bc-studio-support > p,
.bc-studio-empty {
    color: #747d95;
    font-size: .76rem;
    line-height: 1.5;
}

.bc-studio + .bc-renewal-banner,
.bc-studio ~ .bc-section {
    margin-top: 2rem;
}

@media (max-width: 1100px) {
    .bc-studio-feature { grid-template-columns: 1fr; }
    .bc-studio-stage { min-height: 330px; }
    .bc-studio-ledger { grid-template-columns: 1fr 1fr; }
    .bc-studio-support { grid-column: 1 / -1; border-top: 1px solid #e6e3dc; }
}

@media (max-width: 768px) {
    .bc-dash .bycarl-dash-header { padding: .8rem 1rem; }
    .bc-dash-nav { padding: .3rem 1rem !important; overflow-x: auto; }
    .bc-dash-frame .bc-main { padding: 0 1rem 1.5rem !important; }
    .bc-studio-intro { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem .25rem 1.5rem; }
    .bc-studio-intro h2 { font-size: clamp(2.25rem, 12vw, 3.2rem); }
    .bc-studio-intro__note { display: none; }
    .bc-studio-feature { min-height: 0; }
    .bc-studio-project { min-height: 360px; padding: 2rem 1.5rem; }
    .bc-studio-project::after { width: 58px; height: 58px; }
    .bc-studio-stage { min-height: 360px; padding: 2rem 1.5rem; }
    .bc-studio-ledger { grid-template-columns: 1fr; }
    .bc-studio-ledger > section { border-right: 0; border-bottom: 1px solid #e6e3dc; }
    .bc-studio-support { grid-column: auto; border-top: 0; }
}

@media (max-width: 480px) {
    .bc-dash { padding: .5rem; }
    .bc-dash-frame { border-radius: 14px; }
    .bc-dash .bycarl-dash-header__identity { min-width: 0; }
    .bc-dash .bycarl-dash-subtitle { display: none; }
    .bc-dash .bycarl-btn--primary { padding: .65rem .75rem; font-size: .72rem; }
    .bc-dash .bycarl-btn--primary svg { display: none; }
    .bc-studio-project__footer { align-items: flex-end; }
    .bc-studio-line time { display: none; }
}

/* Studio compact : le hero de la page porte déjà le message principal. */
.bc-dash-frame .bc-header-wrap {
    display: none;
}

.bc-dash-nav {
    display: flex;
    align-items: center;
    min-height: 66px;
    padding: .45rem 1.5rem !important;
    overflow-x: auto;
    border-bottom: 1px solid #e7e9f0 !important;
    background: #fff !important;
    scrollbar-width: none;
}

.bc-dash-nav::-webkit-scrollbar {
    display: none;
}

.bc-nav-request {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-left: auto;
    padding: .7rem 1rem;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: var(--bc-brand);
    color: #fff;
    font-size: .75rem;
    font-weight: 750;
    cursor: pointer;
}

.bc-dash-frame .bc-main {
    padding: 0 1.5rem 1.5rem !important;
}

.bc-studio-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    min-height: 112px;
    padding: 1.35rem .25rem 1.2rem;
}

.bc-studio-intro h2 {
    margin: .35rem 0 0;
    font-family: var(--bc-font);
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.bc-studio-intro h2 span {
    color: #65708b;
    font-weight: 500;
}

.bc-studio-intro__note {
    max-width: 390px;
    margin: 0;
    padding: 0;
    border: 0;
    color: #737c92;
    font-family: var(--bc-font);
    font-size: .78rem;
    line-height: 1.45;
    text-align: right;
}

.bc-studio-feature {
    min-height: 295px;
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, .8fr);
}

.bc-studio-project {
    min-height: 295px;
    padding: 2rem 2.25rem;
}

.bc-studio-project h3,
.bc-studio-stage h3 {
    font-family: var(--bc-font);
}

.bc-studio-project h3 {
    margin: .55rem 0 .65rem;
    font-size: clamp(1.65rem, 2.4vw, 2.65rem);
    font-weight: 700;
    line-height: 1.04;
}

.bc-studio-project p {
    font-size: .82rem;
    line-height: 1.5;
}

.bc-studio-project__footer {
    margin-top: 1.35rem;
}

.bc-studio-stage {
    min-height: 295px;
    padding: 2rem;
}

.bc-studio-stage h3 {
    margin: .55rem 0 1rem;
    font-size: clamp(1.35rem, 1.8vw, 1.9rem);
    font-weight: 700;
}

.bc-studio-milestones {
    padding-bottom: 1rem;
}

.bc-studio-next {
    padding-top: 1rem;
}

.bc-studio-ledger > section {
    padding: 1.25rem;
}

.bc-studio-support > strong {
    margin-top: .8rem;
    font-family: var(--bc-font);
    font-size: 1rem;
    font-weight: 700;
}

.bc-studio + .bc-renewal-banner {
    margin-top: 1rem;
}

.bc-studio-empty-project {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 230px;
    padding: 2.25rem;
    border: 1px solid #e6e3dc;
    background: linear-gradient(120deg, #f5f7ff, #fff7f0);
}

.bc-studio-empty-project h3 {
    margin: .55rem 0;
    color: #121a3a;
    font-size: 1.8rem;
}

.bc-studio-empty-project p {
    max-width: 560px;
    margin: 0;
    color: #69738c;
    font-size: .85rem;
}

@media (max-width: 1100px) {
    .bc-nav-request { margin-left: .5rem; }
    .bc-studio-feature { grid-template-columns: 1fr; }
    .bc-studio-stage { min-height: 250px; }
}

@media (max-width: 768px) {
    .bc-dash-nav { min-height: 58px; padding: .35rem .75rem !important; }
    .bc-nav-request { padding: .62rem .8rem; }
    .bc-dash-frame .bc-main { padding: 0 .8rem 1rem !important; }
    .bc-studio-intro { display: block; min-height: 0; padding: 1.25rem .2rem; }
    .bc-studio-intro h2 { font-size: 1.45rem; }
    .bc-studio-intro__note { display: none; }
    .bc-studio-project { min-height: 280px; padding: 1.5rem; }
    .bc-studio-stage { min-height: 270px; padding: 1.5rem; }
}

@media (max-width: 520px) {
    .bc-nav-request { font-size: 0; }
    .bc-nav-request span { font-size: 1.1rem; }
}

/* ══════════════════════════════════════════════════════════════
   Système éditorial partagé par tous les onglets
   ══════════════════════════════════════════════════════════════ */
.bc-dash-nav {
    width: 100%;
    max-width: none;
    border-width: 0 0 1px !important;
    border-radius: 20px 20px 0 0;
}

.bc-nav-request {
    margin-left: auto !important;
}

.bc-dash[data-active-tab]:not([data-active-tab="home"]) .bc-main {
    padding: 1.6rem 1.5rem 2rem !important;
}

.bc-page-title {
    margin: 0 0 1.35rem;
    padding: 0 .15rem 1.15rem;
    border-bottom: 1px solid #e7e9f0;
}

.bc-page-title__kicker {
    display: block;
    margin-bottom: .35rem;
    color: #69738c;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.bc-page-title__line {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.bc-page-title h2 {
    margin: 0;
    color: #121a3a;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 750;
    letter-spacing: -.03em;
}

.bc-page-title__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 .55rem;
    border-radius: 999px;
    background: #eef1ff;
    color: #233dff;
    font-size: .75rem;
    font-weight: 800;
}

.bc-page-title p {
    margin: .35rem 0 0;
    color: #747d95;
    font-size: .78rem;
}

.bc-projects-grid,
.bc-entity-grid,
.bc-files-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.bc-project-card,
.bc-standalone-card,
.bc-file-card,
.bc-req-row,
.bycarl-invoice-contract {
    border: 1px solid #e2e5ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

.bc-project-card,
.bc-standalone-card {
    overflow: hidden;
}

.bc-project-card:hover,
.bc-standalone-card:hover,
.bc-file-card:hover,
.bc-req-row:hover {
    border-color: #c8cede;
    box-shadow: 0 10px 28px rgba(30, 40, 84, .07);
    transform: translateY(-1px);
}

.bc-project-card__head,
.bc-standalone-card__inner {
    min-height: 112px;
    padding: 1.35rem !important;
    background: #fff;
}

.bc-project-card__name,
.bc-standalone-card__name {
    color: #121a3a;
    font-size: 1.05rem;
    font-weight: 750;
}

.bc-project-card__desc,
.bc-standalone-card__desc {
    max-width: 620px;
    color: #778097;
    font-size: .76rem;
    line-height: 1.5;
}

.bc-project-card .bc-progress-strip,
.bc-standalone-card .bc-progress-strip {
    height: 3px;
    background: #edf0f7;
}

.bc-subprojects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    background: #fafbfe;
}

.bc-subproject {
    min-height: 122px;
    padding: 1.15rem 1.35rem;
    border: 0;
    border-top: 1px solid #e7e9f0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.bc-subproject:hover {
    background: #fff;
    box-shadow: none;
    transform: none;
}

.bc-service-summary {
    margin: -.55rem 0 1rem;
    color: #69738c;
    font-size: .78rem;
}

.bc-req-list {
    gap: .65rem;
}

.bc-req-row {
    min-height: 72px;
    padding: .9rem 1.1rem;
}

.bc-filter-group {
    gap: .35rem;
}

.bc-filter-btn {
    padding: .42rem .8rem;
    border-color: #dfe3ec;
    border-radius: 8px;
    background: #fff;
}

.bc-filter-btn.is-active {
    border-color: #233dff;
    background: #eef1ff;
    color: #233dff;
}

.bc-section-group {
    margin-bottom: 1.5rem;
}

.bc-section-group__title,
.bycarl-invoice-project__header {
    margin-bottom: .8rem;
    padding: 0 0 .65rem;
    border-bottom: 1px solid #e1e5ee;
    color: #58637e;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bc-file-card {
    min-height: 92px;
    padding: 1rem;
}

.bc-table-wrap {
    overflow: hidden;
    border: 1px solid #e2e5ed;
    border-radius: 14px;
    background: #fff;
}

.bc-table th {
    background: #f7f8fc;
    color: #68728a;
    font-size: .67rem;
    letter-spacing: .1em;
}

.bc-table td {
    border-color: #eceef4;
}

.bycarl-invoice-project {
    margin-bottom: 1.5rem;
}

.bycarl-invoice-contract {
    margin-bottom: .8rem;
}

.bycarl-invoice-contract__summary {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #eceef4;
    background: #f8f9fd;
}

.bc-empty-tab,
.bc-empty-overview,
.bc-empty-requests {
    padding: 3rem 1.5rem;
    border: 1px dashed #d8dce7;
    border-radius: 14px;
    background: #fafbfe;
    text-align: center;
}

@media (max-width: 960px) {
    .bc-projects-grid,
    .bc-entity-grid,
    .bc-files-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .bc-dash[data-active-tab]:not([data-active-tab="home"]) .bc-main { padding: 1.2rem .8rem 1.5rem !important; }
    .bc-page-title { margin-bottom: 1rem; }
    .bc-req-row { align-items: flex-start; flex-direction: column; }
    .bc-req-row__right { width: 100%; flex-wrap: wrap; }
}

/* ── Modal : détail d'une demande ou d'un ticket ─────────────────── */
.bycarl-modal-box--detail { max-width: 600px; }
.bycarl-modal-box--detail .bycarl-modal-header h3 { font-size: 1.05rem; line-height: 1.3; }
.bycarl-modal-box--detail .bc-modal-subtitle { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; }

.bc-detail-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.bc-detail-meta__chip { padding: .3rem .6rem; border-radius: 999px; background: var(--bc-bg); color: var(--bc-text-2); font-size: .72rem; font-weight: 700; }

.bc-detail-block { padding: .9rem 1rem; border: 1px solid var(--bc-border); border-radius: var(--bc-radius-sm); background: var(--bc-white); }
.bc-detail-block--response { background: var(--bc-brand-lt); border-color: #ffdec0; }
.bc-detail-block__label { display: block; margin-bottom: .4rem; color: var(--bc-muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.bc-detail-block--response .bc-detail-block__label { color: var(--bc-brand-dk); }
.bc-detail-block__text { margin: 0; color: var(--bc-text); font-size: .875rem; line-height: 1.6; white-space: pre-line; }
.bc-detail-waiting { margin: 0; padding: .7rem .9rem; border-radius: var(--bc-radius-sm); background: var(--bc-bg); color: var(--bc-muted); font-size: .82rem; }
.bc-detail-closed-note { margin: 0; padding: .7rem .9rem; border-radius: var(--bc-radius-sm); background: var(--bc-bg); color: var(--bc-muted); font-size: .82rem; }
.bc-thread--modal { max-height: 340px; }

@media (max-width: 640px) {
    .bycarl-modal-box--detail { max-width: 100%; }
}

/* Le fil d'un ticket (ticket-thread.php) est conçu pour une page autonome : sa propre en-tête
   (titre + bouton « Retour ») et son propre formulaire de réponse font doublon une fois inséré
   dans l'onglet « Demandes » du tableau de bord ou dans la modale de détail (toutes deux ont déjà
   leur en-tête et leur propre zone de réponse). Masqués uniquement dans ce contexte : le flux
   autonome (onglet support historique, jamais branché) n'utilise pas la classe .bc-thread.
*/
.bc-thread .bycarl-thread { border: 0; border-radius: 0; box-shadow: none; }
.bc-thread .bycarl-thread__header,
.bc-thread .bycarl-thread__reply,
.bc-thread .bycarl-thread__closed-notice { display: none; }
.bc-thread .bycarl-thread__messages { max-height: none; padding: 0; overflow: visible; }
.bc-thread .bycarl-bubble__avatar img { width: 32px; height: 32px; }

/* ── Modal détail demande : fil de suivi + actions ───────────────── */
.bc-detail-thread { display: flex; flex-direction: column; gap: .6rem; max-height: 260px; overflow-y: auto; }
.bc-detail-thread[hidden] { display: none; }
.bc-detail-bubble { display: flex; align-items: flex-end; gap: .5rem; max-width: 85%; }
.bc-detail-bubble--mine { align-self: flex-end; flex-direction: row-reverse; }
.bc-detail-bubble--theirs { align-self: flex-start; }
.bc-detail-bubble__avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; object-fit: cover; }
.bc-detail-bubble__content { display: flex; flex-direction: column; gap: .15rem; }
.bc-detail-bubble__author { font-size: .68rem; font-weight: 700; color: var(--bc-muted); margin-left: .25rem; }
.bc-detail-bubble__text { padding: .5rem .8rem; border-radius: .9rem; font-size: .83rem; line-height: 1.5; word-break: break-word; }
.bc-detail-bubble--theirs .bc-detail-bubble__text { background: var(--bc-white); border: 1px solid var(--bc-border); border-bottom-left-radius: .25rem; color: var(--bc-text); }
.bc-detail-bubble--mine .bc-detail-bubble__text { background: var(--bc-brand); color: #fff; border-bottom-right-radius: .25rem; }
.bc-detail-bubble__time { font-size: .65rem; color: var(--bc-muted); padding: 0 .3rem; opacity: .8; }
.bc-detail-bubble--mine .bc-detail-bubble__time { text-align: right; }

.bc-detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

@media (max-width: 480px) {
    .bc-detail-actions { justify-content: stretch; }
    .bc-detail-actions .bc-btn { flex: 1; justify-content: center; }
}

/* ── Bouton secondaire dans l'espace client ─────────────────────────────────
   site-pages.css impose `.bycarl-btn { color:#fff!important }` (boutons des pages
   vitrines, sur fond sombre) : sans ce correctif, « Annuler » est blanc sur blanc. */
.bc-dash .bycarl-btn--ghost { color: var(--bc-text-2) !important; }
.bc-dash .bycarl-btn--ghost:hover { color: var(--bc-text) !important; }

/* ── Pièces jointes : sélecteur (public/js/attachments.js) ──────────────── */
.bc-attach { display: flex; flex-direction: column; gap: .5rem; }
.bc-reply-form .bc-attach { margin-top: .5rem; }
.bc-attach__drop {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
    padding: .6rem .75rem; border: 1px dashed var(--bc-border); border-radius: var(--bc-radius-sm);
    background: var(--bc-bg); transition: border-color var(--bc-transition), background var(--bc-transition);
}
.bc-attach__drop.is-dragover { border-color: var(--bc-brand); background: var(--bc-brand-lt); }
.bc-attach__btn {
    display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem;
    border: 1px solid var(--bc-border); border-radius: 999px; background: var(--bc-white);
    color: var(--bc-text); font-size: .8rem; font-weight: 600; cursor: pointer;
}
.bc-attach__btn:hover { border-color: var(--bc-brand); color: var(--bc-brand); }
.bc-attach__hint { color: var(--bc-muted); font-size: .75rem; }
.bc-attach__list { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.bc-attach__item {
    display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem;
    border: 1px solid var(--bc-border); border-radius: var(--bc-radius-sm); background: var(--bc-white);
}
.bc-attach__thumb { width: 40px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; background: var(--bc-bg); }
.bc-attach__thumb--file { display: inline-flex; align-items: center; justify-content: center; color: var(--bc-text-2); }
.bc-attach__name { flex: 1; min-width: 0; overflow: hidden; color: var(--bc-text); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.bc-attach__size { flex: none; color: var(--bc-muted); font-size: .75rem; }
.bc-attach__remove {
    flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent;
    color: var(--bc-text-2); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.bc-attach__remove:hover { background: var(--bc-red-lt); color: var(--bc-red); }
.bc-attach__error { margin: 0; color: var(--bc-red); font-size: .78rem; }

/* ── Pièces jointes : affichage dans les fils (Support\Attachment::renderList) ── */
.bc-attachments { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.bc-attachment {
    display: inline-flex; align-items: center; gap: .35rem; max-width: 100%;
    border: 1px solid var(--bc-border); border-radius: var(--bc-radius-sm); background: var(--bc-white);
    color: var(--bc-text); font-size: .78rem; text-decoration: none;
}
.bc-attachment--file { padding: .35rem .6rem; }
.bc-attachment--file:hover { border-color: var(--bc-brand); color: var(--bc-brand); }
.bc-attachment--image { overflow: hidden; padding: 0; }
.bc-attachment--image img { display: block; width: 120px; height: 90px; object-fit: cover; }
.bc-attachment--image:hover { border-color: var(--bc-brand); }
.bc-attachment__name { overflow: hidden; max-width: 180px; text-overflow: ellipsis; white-space: nowrap; }
.bc-attachment__size { color: var(--bc-muted); }
.bycarl-bubble--mine .bc-attachments,
.bc-detail-bubble--mine .bc-attachments { justify-content: flex-end; }

/* ── Suivi des réponses (Support\SupportActivity) ───────────────────────── */
.bc-activity-chip {
    display: inline-block; padding: .2rem .6rem; border-radius: 999px;
    background: var(--bc-amber-lt); color: var(--bc-amber); font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.bc-activity-chip--unread { background: var(--bc-brand-lt); color: var(--bc-brand-dk); }
.bc-table-row--link { cursor: pointer; }
.bc-table-row--link:hover td { background: var(--bc-bg); }
.bc-detail-closed-note .bc-btn { margin-left: .5rem; vertical-align: middle; }

/* ── Mon compte ─────────────────────────────────────────────────────────── */
/* Poussé à droite de la navigation, à côté de « Nouvelle demande » (l'en-tête est masqué par le design). */
.bc-nav-btn--account { margin-left: auto; }
.bc-dash-nav .bc-nav-btn--account + .bc-nav-request { margin-left: .5rem; }
.bc-account { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.bc-account__card { padding: 1.25rem; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); background: var(--bc-card); }
.bc-account__card h3 { margin: 0 0 .875rem; font-size: 1rem; }
.bc-account__list { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; font-size: .875rem; }
.bc-account__list dt { color: var(--bc-text-2); }
.bc-account__list dd { margin: 0; overflow-wrap: anywhere; color: var(--bc-text); }
.bc-account__hint { margin: .875rem 0 0; color: var(--bc-muted); font-size: .8rem; line-height: 1.5; }
.bc-account__form { display: flex; flex-direction: column; gap: .4rem; }
.bc-account__form .bycarl-input { margin-bottom: .5rem; }
.bc-account__form .bycarl-btn { align-self: flex-start; margin-top: .25rem; }
.bc-account__muted { color: var(--bc-muted); font-weight: 400; }
.bc-dash .bc-account__link { display: inline-block; margin: .25rem 0 1rem; color: var(--bc-brand) !important; font-size: .875rem; text-decoration: underline; }
