﻿/* ── Variables ── */
:root {
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #2563eb;
    --sidebar-active-bg: rgba(37,99,235,.15);
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-hint: #94a3b8;
    --blue: #2563eb;
    --green: #16a34a;
    --orange: #ea580c;
    --red: #dc2626;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ── Layout ── */
.bp-body {
    background: var(--bg);
    min-height: 100vh;
}

.bp-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.bp-sidebar {
    width: 220px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.bp-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
}

.bp-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bp-brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.bp-brand-sub {
    font-size: 11px;
    color: var(--sidebar-text);
}

.bp-nav {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bp-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    transition: all .15s;
}

    .bp-nav-item:hover {
        background: rgba(255,255,255,.06);
        color: #e2e8f0;
    }

    .bp-nav-item.active {
        background: var(--sidebar-active-bg);
        color: #fff;
        font-weight: 500;
    }

        .bp-nav-item.active svg {
            color: var(--blue);
        }

.bp-sidebar-footer {
    padding: 12px 16px 20px;
}

.bp-version-badge {
    background: rgba(255,255,255,.06);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.bp-version-title {
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
}

.bp-version-sub {
    font-size: 11px;
    color: var(--sidebar-text);
    margin-top: 2px;
}

/* ── Main ── */
.bp-main {
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
}

/* ── Page header ── */
.bp-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.bp-page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp-page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.bp-page-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.bp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #334155;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── KPI row ── */
.bp-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.bp-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: center;
}

.bp-kpi-value {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

.bp-kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Colors ── */
.bp-color-green {
    color: var(--green);
}

.bp-color-blue {
    color: var(--blue);
}

.bp-color-orange {
    color: var(--orange);
}

.bp-color-red {
    color: var(--red);
}

/* ── Tabs ── */
.bp-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bp-tab {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface);
    transition: all .15s;
}

    .bp-tab.active {
        background: var(--blue);
        color: #fff;
        border-color: var(--blue);
        font-weight: 500;
    }

.bp-tab-panel {
    display: none;
}

    .bp-tab-panel.active {
        display: block;
    }

/* ── Card ── */
.bp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

    .bp-card + .bp-card {
        margin-top: 16px;
    }

/* ── List items ── */
.bp-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

    .bp-list-item:last-child {
        border-bottom: none;
    }

.bp-list-item-body {
    flex: 1;
    min-width: 0;
}

.bp-list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.bp-list-item-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.bp-list-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.bp-sep {
    color: var(--text-hint);
}

.bp-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Status dots ── */
.bp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bp-dot-green {
    background: var(--green);
}

.bp-dot-blue {
    background: var(--blue);
}

.bp-dot-orange {
    background: var(--orange);
}

.bp-dot-red {
    background: var(--red);
}

/* ── Status badges ── */
.bp-status-badge, .bp-badge {
    font-size: 11.5px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.bp-badge-green, .bp-badge-Normal {
    background: #dcfce7;
    color: #15803d;
}

.bp-badge-blue, .bp-badge-EnAvance {
    background: #dbeafe;
    color: #1d4ed8;
}

.bp-badge-orange, .bp-badge-Attention,
.bp-badge-EnRetard {
    background: #ffedd5;
    color: #c2410c;
}

.bp-badge-red, .bp-badge-Bloque {
    background: #fee2e2;
    color: #b91c1c;
}

.bp-badge-Critique {
    background: #fee2e2;
    color: #b91c1c;
}

/* ── Progress bar ── */
.bp-progress-bar {
    background: #e2e8f0;
    border-radius: 4px;
    height: 5px;
}

.bp-progress-fill {
    height: 5px;
    border-radius: 4px;
    transition: width .4s;
}

.bp-progress-blue, .bp-progress-Normal {
    background: var(--blue);
}

.bp-progress-orange, .bp-progress-Attention {
    background: var(--orange);
}

.bp-progress-red, .bp-progress-Critique {
    background: var(--red);
}

/* ── Budget row ── */
.bp-budget-row {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

    .bp-budget-row:last-child {
        border-bottom: none;
    }

.bp-budget-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.bp-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .bp-progress-wrap .bp-progress-bar {
        flex: 1;
    }

.bp-budget-pct {
    font-size: 12px;
    font-weight: 500;
    min-width: 36px;
    text-align: right;
}

/* ── Chantiers grid ── */
.bp-chantiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.bp-chantier-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color .15s;
    display: block;
}

    .bp-chantier-card:hover {
        border-color: var(--blue);
    }

.bp-chantier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bp-chantier-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
}

.bp-chantier-nom {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.bp-chantier-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.bp-chantier-progress-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.bp-chantier-progress-label {
    flex: 1;
}

.bp-chantier-budget {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ── Formulaires ── */
.bp-form-group {
    margin-bottom: 18px;
}

.bp-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.bp-input, .bp-textarea, .bp-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface);
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}

    .bp-input:focus, .bp-textarea:focus {
        border-color: var(--blue);
    }

.bp-input-readonly {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

/* ── Segment buttons ── */
.bp-segment {
    display: flex;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.bp-seg-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border-right: 1px solid var(--border);
    transition: all .15s;
}

    .bp-seg-btn:last-child {
        border-right: none;
    }

    .bp-seg-btn.active {
        background: var(--blue);
        color: #fff;
    }

    .bp-seg-btn.bp-seg-green.active {
        background: var(--green);
        color: #fff;
    }

/* ── Counter ── */
.bp-counter-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bp-counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 20px;
    font-weight: 300;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-counter-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.bp-counter-val {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
}

.bp-counter-prev {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Upload ── */
.bp-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color .15s;
}

    .bp-upload-zone:hover {
        border-color: var(--blue);
    }

.bp-upload-text {
    font-size: 13px;
    font-weight: 500;
}

.bp-upload-hint {
    font-size: 11px;
}

.bp-upload-input {
    display: none;
}

/* ── Buttons ── */
.bp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
}

.bp-btn-primary {
    background: var(--blue);
    color: #fff;
}

    .bp-btn-primary:hover {
        background: #1d4ed8;
    }

.bp-btn-success {
    background: #16a34a;
    color: #fff;
}

    .bp-btn-success:hover {
        background: #15803d;
    }

.bp-btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    background: var(--surface);
}

    .bp-btn-outline:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

.bp-btn-full {
    width: 100%;
    justify-content: center;
}

.bp-btn-lg {
    padding: 14px 18px;
    font-size: 15px;
}

.bp-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface);
}

    .bp-btn-icon:hover {
        background: var(--bg);
    }

/* ── Alerts ── */
.bp-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}

.bp-alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.bp-alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── Mobile card ── */
.bp-mobile-card {
    margin-bottom: 90px;
}

    .bp-mobile-card .bp-form-group:not(:last-child) {
        margin-bottom: 20px;
    }

/* ── Bottom navigation (mobile) ── */
.bp-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    padding: 8px 0 env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.bp-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    color: var(--text-hint);
    font-size: 10.5px;
    font-weight: 500;
}

    .bp-bnav-item.active {
        color: var(--blue);
    }

    .bp-bnav-item svg {
        width: 22px;
        height: 22px;
    }

/* ── Login ── */
.bp-login-body {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bp-login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 400px;
}

.bp-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.bp-login-icon {
    width: 44px;
    height: 44px;
    background: var(--blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-login-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.bp-login-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.bp-login-hint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

    .bp-login-hint code {
        background: var(--bg);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 11px;
        color: var(--blue);
    }

/* ── Finance ── */
.bp-finance-kpi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.bp-finance-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    margin-bottom: 12px;
}

.bp-finance-kpi-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.bp-finance-kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.bp-finance-kpi-badge {
    font-size: 11px;
    color: var(--green);
    font-weight: 500;
}

/* ── Empty state ── */
.bp-empty {
    padding: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Pointage ── */
.bp-pointage-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.bp-pointage-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.bp-pointage-kpi-val {
    font-size: 26px;
    font-weight: 600;
}

.bp-pointage-kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.bp-tech-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.bp-pointage-actions {
    display: flex;
    gap: 6px;
}

.bp-point-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface);
    transition: all .15s;
}

    .bp-point-btn:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

    .bp-point-btn.present {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
    }

    .bp-point-btn.absent {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
    }

    .bp-point-btn.retard {
        background: var(--orange);
        border-color: var(--orange);
        color: #fff;
    }

/* ── Rapports bureau ── */
.bp-rapport-card {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

    .bp-rapport-card:last-child {
        border-bottom: none;
    }

.bp-rapport-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.bp-rapport-title {
    font-size: 14px;
    font-weight: 600;
}

.bp-rapport-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bp-rapport-note {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    gap: 8px;
}

.bp-rapport-photos {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.bp-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
}

/* ── Responsive mobile ── */
@media (max-width: 768px) {
    .bp-sidebar {
        display: none;
    }

    .bp-main {
        padding: 16px;
    }

    .bp-kpi-row, .bp-pointage-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .bp-finance-kpi {
        grid-template-columns: 1fr;
    }

    .bp-chantiers-grid {
        grid-template-columns: 1fr;
    }

    .bp-page-title {
        font-size: 18px;
    }

    .bp-mobile-header {
        margin-bottom: 16px;
    }
}

/* ── Table ── */
.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .bp-table thead tr {
        border-bottom: 1.5px solid var(--border);
    }

    .bp-table th {
        padding: 10px 20px;
        text-align: left;
        font-size: 12px;
        font-weight: 500;
        color: var(--text-secondary);
    }

    .bp-table td {
        padding: 12px 20px;
        border-bottom: 1px solid var(--border);
        color: var(--text-primary);
    }

    .bp-table tbody tr:last-child td {
        border-bottom: none;
    }

    .bp-table tbody tr:hover {
        background: var(--bg);
    }

.bp-td-right {
    text-align: right;
}

.bp-td-center {
    text-align: center;
}

.bp-table tfoot td {
    padding: 12px 20px;
    font-size: 13px;
}

/* ── Équipes grid ── */
.bp-equipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.bp-technicien-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: border-color .15s;
}

    .bp-technicien-card:hover {
        border-color: var(--blue);
    }

.bp-technicien-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bp-tech-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-technicien-nom {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.bp-technicien-role {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 12px;
}

.bp-technicien-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bp-technicien-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Chantier detail ── */
.bp-chantier-detail-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

    .bp-chantier-detail-kpi .bp-kpi-card {
        text-align: center;
    }

    .bp-chantier-detail-kpi .bp-kpi-value {
        font-size: 26px;
        font-weight: 700;
        color: var(--text-primary);
    }

.bp-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bp-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

    .bp-task-row:last-child {
        border-bottom: none;
    }

.bp-task-name {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.bp-task-statut {
    font-size: 11px;
    color: var(--text-secondary);
}

.bp-task-pct {
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
    min-width: 36px;
    text-align: right;
}

/* ── Responsive complémentaire ── */
@media (max-width: 768px) {
    .bp-two-col {
        grid-template-columns: 1fr;
    }

    .bp-chantier-detail-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .bp-equipes-grid {
        grid-template-columns: 1fr;
    }

    .bp-table {
        font-size: 12px;
    }

        .bp-table th, .bp-table td {
            padding: 10px 12px;
        }
}

/* ── Détail chantier ── */
.bp-shortcut-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all .15s;
    text-decoration: none;
    width: 100%;
}

    .bp-shortcut-link:hover {
        border-color: var(--blue);
        color: var(--blue);
        background: #eff6ff;
    }

    .bp-shortcut-link svg {
        flex-shrink: 0;
    }

.bp-photo-placeholder {
    aspect-ratio: 1;
    background: var(--bg);
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
}

/* ── Tâche row ── */
.bp-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .bp-task-row + .bp-task-row {
        border-top: 1px solid var(--border);
    }

.bp-task-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.bp-task-statut {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.bp-task-pct {
    font-size: 13px;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

/* ── Créer chantier ── */
.bp-creer-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.bp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.bp-required {
    color: var(--red);
    margin-left: 2px;
}

.bp-field-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.bp-empty-inline {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}

.bp-budget-shortcut {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    cursor: pointer;
    transition: all .15s;
}

    .bp-budget-shortcut:hover {
        border-color: var(--blue);
        color: var(--blue);
        background: #eff6ff;
    }

.bp-recap-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

    .bp-recap-row:last-child {
        border-bottom: none;
    }

    .bp-recap-row span:first-child {
        flex-shrink: 0;
    }

    .bp-recap-row span:last-child {
        text-align: right;
        word-break: break-word;
        max-width: 180px;
    }

/* ── Responsive ── */
@media (max-width: 900px) {
    .bp-creer-layout {
        grid-template-columns: 1fr;
    }
}


/* ── Membres équipe ── */
.bp-membre-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .12s;
    border: 1.5px solid transparent;
    margin-bottom: 4px;
    background: var(--surface);
    border-color: var(--border);
}

    .bp-membre-row:hover {
        background: #f8fafc;
        border-color: var(--blue);
    }

    .bp-membre-row.selected {
        background: #eff6ff;
        border-color: var(--blue);
    }

    .bp-membre-row input[type="checkbox"] {
        display: none;
    }

.bp-membre-check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .12s;
}

.bp-membre-row.selected .bp-membre-check-icon {
    background: var(--blue);
    border-color: var(--blue);
}

    .bp-membre-row.selected .bp-membre-check-icon svg path {
        stroke: white;
    }

.bp-membre-row:not(.selected) .bp-membre-check-icon svg {
    display: none;
}




/* ── Tâches interactives ── */
.bp-tache-row {
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}

    .bp-tache-row:last-child {
        border-bottom: none;
    }

.bp-tache-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    transition: background .12s;
}

    .bp-tache-header:hover {
        background: var(--bg);
    }

.bp-tache-row.open .bp-tache-header {
    background: var(--bg);
}

.bp-tache-nom {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.bp-tache-row.open .bp-tache-chevron {
    transform: rotate(180deg);
}

.bp-quick-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    cursor: pointer;
    transition: all .12s;
}

    .bp-quick-btn:hover {
        border-color: var(--blue);
        color: var(--blue);
        background: #eff6ff;
    }

.bp-quick-btn-success {
    border-color: #bbf7d0;
    color: var(--green);
    background: #f0fdf4;
}

    .bp-quick-btn-success:hover {
        background: var(--green);
        color: #fff;
        border-color: var(--green);
    }




/* ── Équipes dépliables ── */
.bp-equipe-row {
    border-bottom: 1px solid var(--border);
}

    .bp-equipe-row:last-child {
        border-bottom: none;
    }

.bp-equipe-header:hover {
    background: var(--bg);
}

.bp-equipe-row.open .bp-equipe-header {
    background: var(--bg);
}

.bp-equipe-row.open #equipe-chevron-\* {
    transform: rotate(180deg);
}



/*salaire*//**/

/* ── Salaires ── */
.bp-salaire-row {
    border-bottom: 1px solid var(--border);
}

    .bp-salaire-row:last-child {
        border-bottom: none;
    }

    .bp-salaire-row.open > div:first-child {
        background: var(--bg);
    }






/* ── Sélecteur chantier mobile ── */
.bp-chantier-select-item:hover {
    border-color: var(--blue) !important;
    background: #f8faff !important;
}

.bp-chantier-select-item.selected {
    border-color: var(--blue);
    background: #eff6ff;
}


/* ── Sidebar footer layout ── */
.bp-sidebar-footer {
    padding: 16px;
    margin-top: auto;
}


/* Dans site.css ou _Layout.cshtml */
.bp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

    .bp-modal-overlay.actif {
        display: flex;
    }