/* =========================================================
   ALPHÉA SUITE — CENTRE DE COMMANDEMENT PREMIUM+++
   ========================================================= */

.alphea-command-center,
.alphea-command-center * {
    box-sizing: border-box;
}

.alphea-command-center {
    --command-blue: #2563eb;
    --command-blue-dark: #1d4ed8;
    --command-navy: #07111f;
    --command-red: #dc2626;
    --command-orange: #d97706;
    --command-green: #059669;
    --command-purple: #7c3aed;
    --command-cyan: #0284c7;

    width: 100%;
    padding-bottom: 30px;
    color: var(--alphea-text);
}

.alphea-command-center svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* HERO */

.command-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 27px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 29px;
    color: #fff;
    background:
        radial-gradient(
            circle at 94% 5%,
            rgba(37, 99, 235, .37),
            transparent 35%
        ),
        radial-gradient(
            circle at 5% 120%,
            rgba(124, 58, 237, .22),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #07111f,
            #0d1729 53%,
            #172554
        );
    box-shadow:
        0 28px 80px rgba(15, 23, 42, .22),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.command-hero::after {
    content: "";
    position: absolute;
    top: -220px;
    right: -140px;
    width: 470px;
    height: 470px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 50%;
    box-shadow:
        0 0 0 55px rgba(255, 255, 255, .022),
        0 0 0 110px rgba(255, 255, 255, .014);
    pointer-events: none;
}

.command-hero-main {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.command-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .56);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.command-eyebrow i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow:
        0 0 0 6px rgba(56, 189, 248, .12),
        0 0 18px rgba(56, 189, 248, .7);
}

.command-hero h1 {
    max-width: 730px;
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 4vw, 47px);
    font-weight: 950;
    line-height: 1.02;
    letter-spacing: -.058em;
}

.command-hero h1 span {
    color: #93c5fd;
}

.command-hero p {
    max-width: 670px;
    margin: 11px 0 0;
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
    line-height: 1.6;
}

.command-back-dashboard {
    position: relative;
    z-index: 2;
    display: inline-flex;
    min-height: 40px;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .07);
    font-size: 8px;
    font-weight: 900;
    text-decoration: none;
    backdrop-filter: blur(12px);
}

.command-back-dashboard:hover {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.command-back-dashboard svg {
    width: 15px;
    height: 15px;
}

.command-hero-metrics {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 23px;
}

.command-metric {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 4px 10px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .095);
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, .05);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease;
}

.command-metric:hover,
.command-metric.is-active {
    border-color: rgba(147, 197, 253, .28);
    background: rgba(255, 255, 255, .09);
    transform: translateY(-2px);
}

.command-metric.is-danger {
    background: rgba(220, 38, 38, .09);
}

.command-metric.is-warning {
    background: rgba(217, 119, 6, .08);
}

.command-metric small {
    color: rgba(255, 255, 255, .47);
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.command-metric strong {
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.04em;
}

.command-metric > span {
    grid-column: 1 / -1;
    overflow: hidden;
    color: rgba(255, 255, 255, .57);
    font-size: 7px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* TOOLBAR */

.command-toolbar {
    display: grid;
    min-height: 66px;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--alphea-border);
    border-radius: 19px;
    background: var(--alphea-card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
}

.command-search {
    display: grid;
    height: 44px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--alphea-border);
    border-radius: 13px;
    color: #8a99ac;
    background: rgba(148, 163, 184, .025);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.command-search:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .07);
}

.command-search input {
    width: 100%;
    height: 40px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    color: var(--alphea-text);
    background: transparent !important;
    font-family: inherit;
    font-size: 10px;
    font-weight: 750;
    box-shadow: none !important;
}

.command-search input::placeholder {
    color: #94a3b8;
}

.command-search kbd,
.command-footer kbd {
    display: inline-grid;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    place-items: center;
    border: 1px solid var(--alphea-border);
    border-radius: 6px;
    color: var(--alphea-muted);
    background: rgba(148, 163, 184, .06);
    font-family: inherit;
    font-size: 7px;
    font-weight: 900;
}

.command-view-toggle {
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--alphea-border);
    border-radius: 11px;
    background: rgba(148, 163, 184, .04);
}

.command-view-toggle button {
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: var(--alphea-muted);
    background: transparent;
    font-family: inherit;
    font-size: 7px;
    font-weight: 900;
    cursor: pointer;
}

.command-view-toggle button.is-active {
    color: var(--command-blue-dark);
    background: var(--alphea-card);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .07);
}

/* WORKSPACE */

.command-workspace {
    display: grid;
    grid-template-columns:
        210px
        minmax(430px, 1fr)
        minmax(280px, 340px);
    gap: 12px;
    align-items: start;
}

.command-sidebar,
.command-feed,
.command-detail-panel {
    border: 1px solid var(--alphea-border);
    border-radius: 21px;
    background: var(--alphea-card);
    box-shadow: 0 14px 40px rgba(15, 23, 42, .045);
}

.command-sidebar {
    position: sticky;
    top: 110px;
    overflow: hidden;
}

.command-filter-group {
    padding: 15px;
    border-bottom: 1px solid var(--alphea-border);
}

.command-filter-group header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
}

.command-filter-group header > span {
    color: var(--alphea-muted);
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.command-filter-group header button {
    padding: 0;
    border: 0;
    color: var(--command-blue);
    background: transparent;
    font-family: inherit;
    font-size: 6px;
    font-weight: 900;
    cursor: pointer;
}

.command-filter-group > button {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 0 8px;
    border: 0;
    border-radius: 10px;
    color: var(--alphea-muted);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.command-filter-group > button:hover,
.command-filter-group > button.is-active {
    color: var(--alphea-text);
    background: rgba(37, 99, 235, .055);
}

.command-filter-group > button > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    font-size: 7px;
    font-weight: 850;
}

.command-filter-group > button strong {
    min-width: 23px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--alphea-muted);
    background: rgba(148, 163, 184, .09);
    font-size: 7px;
    line-height: 21px;
    text-align: center;
}

.command-filter-group i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #94a3b8;
}

.command-filter-group i.is-danger {
    background: #ef4444;
}

.command-filter-group i.is-warning {
    background: #f59e0b;
}

.command-filter-group i.is-blue {
    background: #3b82f6;
}

.command-filter-group i.is-green {
    background: #10b981;
}

.command-filter-group i.is-task {
    background: #2563eb;
}

.command-filter-group i.is-deadline {
    background: #d97706;
}

.command-filter-group i.is-sinistre {
    background: #dc2626;
}

.command-filter-group i.is-travaux {
    background: #7c3aed;
}

.command-filter-group i.is-anomalie {
    background: #0284c7;
}

.command-productivity {
    padding: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(37, 99, 235, .045),
            rgba(124, 58, 237, .035)
        );
}

.command-productivity-icon {
    display: grid;
    width: 35px;
    height: 35px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 11px;
    color: #7c3aed;
    background: rgba(124, 58, 237, .09);
}

.command-productivity-icon svg {
    width: 17px;
    height: 17px;
}

.command-productivity > strong {
    display: block;
    font-size: 8px;
    font-weight: 950;
}

.command-productivity p {
    margin: 6px 0 10px;
    color: var(--alphea-muted);
    font-size: 7px;
    line-height: 1.5;
}

.command-productivity > span:last-child {
    color: var(--alphea-muted);
    font-size: 7px;
    font-weight: 800;
}

.command-productivity b {
    color: var(--command-purple);
}

/* FEED */

.command-feed {
    min-width: 0;
    overflow: hidden;
}

.command-feed-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 19px;
    border-bottom: 1px solid var(--alphea-border);
}

.command-feed-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--command-blue);
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.command-feed-header h2 {
    margin: 0;
    color: var(--alphea-text);
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -.035em;
}

.command-feed-header p {
    margin: 5px 0 0;
    color: var(--alphea-muted);
    font-size: 8px;
    line-height: 1.5;
}

.command-result-count {
    display: inline-flex;
    min-height: 30px;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
    border: 1px solid rgba(37, 99, 235, .11);
    border-radius: 999px;
    color: var(--command-blue-dark);
    background: rgba(37, 99, 235, .055);
    font-size: 7px;
    font-weight: 850;
}

.command-action-list {
    display: grid;
    gap: 6px;
    padding: 10px;
}

.command-action {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns:
        26px
        41px
        minmax(0, 1fr)
        auto
        58px;
    gap: 9px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--alphea-border);
    border-radius: 14px;
    background: rgba(148, 163, 184, .016);
    outline: none;
    cursor: pointer;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
}

.command-action:hover,
.command-action:focus,
.command-action.is-selected {
    z-index: 2;
    border-color: rgba(37, 99, 235, .24);
    background: rgba(37, 99, 235, .028);
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(15, 23, 42, .05);
}

.command-action.is-pinned::before {
    content: "";
    position: absolute;
    top: -1px;
    right: 19px;
    width: 22px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: #7c3aed;
}

.command-action[hidden] {
    display: none !important;
}

.command-rank {
    color: #a4afbd;
    font-size: 7px;
    font-weight: 950;
    text-align: center;
}

.command-action-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #2563eb;
    background: rgba(37, 99, 235, .08);
}

.command-action-icon svg {
    width: 19px;
    height: 19px;
}

.command-action-icon.is-deadline {
    color: #d97706;
    background: rgba(217, 119, 6, .08);
}

.command-action-icon.is-sinistre {
    color: #dc2626;
    background: rgba(220, 38, 38, .08);
}

.command-action-icon.is-travaux {
    color: #7c3aed;
    background: rgba(124, 58, 237, .08);
}

.command-action-icon.is-anomalie {
    color: #0284c7;
    background: rgba(14, 165, 233, .08);
}

.command-action.is-danger
.command-action-icon {
    color: #dc2626;
    background: rgba(220, 38, 38, .085);
}

.command-action-main {
    min-width: 0;
}

.command-action-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.command-type {
    color: var(--command-blue);
    font-size: 6px;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.command-date {
    color: var(--alphea-muted);
    font-size: 6px;
    font-weight: 850;
}

.command-date.is-late {
    color: #dc2626;
}

.command-action-main > strong {
    display: block;
    overflow: hidden;
    color: var(--alphea-text);
    font-size: 9px;
    font-weight: 950;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-action-main > p {
    overflow: hidden;
    margin: 3px 0 0;
    color: var(--alphea-muted);
    font-size: 7px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-action-meta {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    overflow: hidden;
}

.command-action-meta > span {
    overflow: hidden;
    color: #8b98aa;
    font-size: 6px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-action-badges {
    display: flex;
    max-width: 115px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.command-badge {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    padding: 0 6px;
    border-radius: 7px;
    color: #475569;
    background: rgba(100, 116, 139, .08);
    font-size: 6px;
    font-weight: 900;
    white-space: nowrap;
}

.command-badge.is-danger {
    color: #b91c1c;
    background: rgba(220, 38, 38, .09);
}

.command-badge.is-warning {
    color: #b45309;
    background: rgba(217, 119, 6, .09);
}

.command-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.command-action-buttons button {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid var(--alphea-border);
    border-radius: 9px;
    color: #8290a3;
    background: var(--alphea-card);
    cursor: pointer;
}

.command-action-buttons button:hover,
.command-action-buttons
.command-pin-button.is-active {
    color: var(--command-blue);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.command-action-buttons
.command-pin-button.is-active {
    color: #7c3aed;
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.command-action-buttons svg {
    width: 14px;
    height: 14px;
}

/* COMPACT VIEW */

.alphea-command-center.is-compact
.command-action {
    grid-template-columns:
        22px
        34px
        minmax(0, 1fr)
        auto
        58px;
    min-height: 55px;
    padding: 7px 9px;
}

.alphea-command-center.is-compact
.command-action-icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
}

.alphea-command-center.is-compact
.command-action-main > p,
.alphea-command-center.is-compact
.command-action-meta {
    display: none;
}

/* DETAIL PANEL */

.command-detail-panel {
    position: sticky;
    top: 110px;
    min-height: 440px;
    overflow: hidden;
}

.command-detail-placeholder {
    display: flex;
    min-height: 440px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
}

.command-detail-placeholder > span {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    place-items: center;
    border: 1px solid var(--alphea-border);
    border-radius: 17px;
    color: var(--command-blue);
    background: rgba(37, 99, 235, .06);
}

.command-detail-placeholder strong {
    color: var(--alphea-text);
    font-size: 10px;
    font-weight: 950;
}

.command-detail-placeholder p {
    max-width: 245px;
    margin: 6px 0 0;
    color: var(--alphea-muted);
    font-size: 7px;
    line-height: 1.55;
}

.command-detail-content {
    padding: 17px;
}

.command-detail-content[hidden] {
    display: none !important;
}

.command-detail-content > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 17px;
}

.command-detail-type {
    color: var(--command-blue);
    font-size: 7px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.command-detail-content > header button {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid var(--alphea-border);
    border-radius: 9px;
    color: var(--alphea-muted);
    background: transparent;
    cursor: pointer;
}

.command-detail-content > header svg {
    width: 15px;
    height: 15px;
}

.command-detail-heading {
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--alphea-border);
}

.command-detail-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    color: var(--command-blue);
    background: rgba(37, 99, 235, .08);
}

.command-detail-heading h2 {
    margin: 0;
    color: var(--alphea-text);
    font-size: 16px;
    font-weight: 950;
    line-height: 1.18;
    letter-spacing: -.035em;
}

.command-detail-heading div > span {
    display: block;
    margin-top: 5px;
    color: var(--alphea-muted);
    font-size: 7px;
    font-weight: 800;
}

.command-detail-description {
    padding: 16px 0;
    border-bottom: 1px solid var(--alphea-border);
}

.command-detail-description > span {
    color: var(--alphea-muted);
    font-size: 6px;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.command-detail-description p {
    margin: 7px 0 0;
    color: var(--alphea-text);
    font-size: 8px;
    line-height: 1.6;
    white-space: pre-line;
}

.command-detail-data {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px 0;
}

.command-detail-data > div {
    display: grid;
    grid-template-columns: 83px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 0;
}

.command-detail-data dt {
    color: var(--alphea-muted);
    font-size: 7px;
    font-weight: 800;
}

.command-detail-data dd {
    overflow: hidden;
    margin: 0;
    color: var(--alphea-text);
    font-size: 7px;
    font-weight: 850;
    text-align: right;
    text-overflow: ellipsis;
}

.command-detail-actions {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.command-detail-actions a,
.command-detail-actions button {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--alphea-border);
    border-radius: 12px;
    color: var(--alphea-text);
    background: transparent;
    font-family: inherit;
    font-size: 8px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.command-detail-actions a.is-primary {
    border-color: #1d4ed8;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1e40af
        );
    box-shadow: 0 9px 20px rgba(37, 99, 235, .18);
}

.command-detail-actions svg {
    width: 15px;
    height: 15px;
}

.command-detail-note {
    margin-top: 15px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .09);
    border-radius: 13px;
    background: rgba(37, 99, 235, .035);
}

.command-detail-note strong {
    display: block;
    color: var(--command-blue-dark);
    font-size: 7px;
    font-weight: 950;
}

.command-detail-note p {
    margin: 5px 0 0;
    color: var(--alphea-muted);
    font-size: 6px;
    line-height: 1.55;
}

/* EMPTY */

.command-empty {
    display: flex;
    min-height: 370px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.command-empty[hidden] {
    display: none !important;
}

.command-empty > span {
    display: grid;
    width: 53px;
    height: 53px;
    margin-bottom: 13px;
    place-items: center;
    border: 1px solid var(--alphea-border);
    border-radius: 17px;
    color: var(--alphea-muted);
    background: rgba(148, 163, 184, .045);
}

.command-empty strong {
    color: var(--alphea-text);
    font-size: 10px;
    font-weight: 950;
}

.command-empty p {
    margin: 6px 0 13px;
    color: var(--alphea-muted);
    font-size: 7px;
}

.command-empty button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: var(--command-blue-dark);
    background: #eff6ff;
    font-family: inherit;
    font-size: 7px;
    font-weight: 900;
    cursor: pointer;
}

/* FOOTER */

.command-footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 8px 4px 0;
    color: var(--alphea-muted);
    font-size: 6px;
    font-weight: 750;
}

.command-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* DARK */

html[data-alphea-theme="dark"]
.command-action-buttons button {
    background: rgba(255, 255, 255, .025);
}

html[data-alphea-theme="dark"]
.command-action-buttons
.command-pin-button.is-active {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, .25);
    background: rgba(124, 58, 237, .12);
}

html[data-alphea-theme="dark"]
.command-action-buttons button:hover {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, .25);
    background: rgba(37, 99, 235, .10);
}

/* RESPONSIVE */

@media (max-width: 1450px) {
    .command-workspace {
        grid-template-columns:
            190px
            minmax(420px, 1fr)
            290px;
    }
}

@media (max-width: 1180px) {
    .command-workspace {
        grid-template-columns:
            190px
            minmax(0, 1fr);
    }

    .command-detail-panel {
        position: fixed;
        top: 84px;
        right: 18px;
        bottom: 18px;
        z-index: 10000;
        display: none;
        width: min(350px, calc(100vw - 36px));
        min-height: 0;
        overflow-y: auto;
        box-shadow: 0 28px 80px rgba(15, 23, 42, .25);
    }

    .command-detail-panel.is-mobile-visible {
        display: block;
    }

    .command-detail-placeholder {
        display: none;
    }
}

@media (max-width: 860px) {
    .command-hero-main {
        flex-direction: column;
    }

    .command-hero-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .command-workspace {
        grid-template-columns: 1fr;
    }

    .command-sidebar {
        position: static;
    }

    .command-filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .command-filter-group header {
        width: 100%;
    }

    .command-filter-group > button {
        width: auto;
        min-height: 32px;
        flex: 1 1 130px;
        border: 1px solid var(--alphea-border);
    }

    .command-productivity {
        display: none;
    }

    .command-action {
        grid-template-columns:
            36px
            minmax(0, 1fr)
            54px;
    }

    .command-rank,
    .command-action-badges {
        display: none;
    }
}

@media (max-width: 620px) {
    .command-hero {
        padding: 21px;
        border-radius: 23px;
    }

    .command-hero-metrics {
        grid-template-columns: 1fr;
    }

    .command-toolbar {
        grid-template-columns: 1fr;
    }

    .command-view-toggle {
        display: none;
    }

    .command-action {
        grid-template-columns:
            34px
            minmax(0, 1fr)
            29px;
        padding: 8px;
    }

    .command-action-icon {
        width: 34px;
        height: 34px;
    }

    .command-pin-button {
        display: none !important;
    }

    .command-action-buttons {
        display: block;
    }

    .command-action-meta {
        display: none;
    }

    .command-footer {
        justify-content: center;
    }

    .command-footer span:not(:first-child) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .alphea-command-center *,
    .alphea-command-center *::before,
    .alphea-command-center *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* =========================================================
   ALPHÉA — FINITION PREMIUM++++
   ========================================================= */

/* Sixième indicateur exécutif */

.command-hero-metrics {
    grid-template-columns:
        repeat(5, minmax(0, 1fr))
        minmax(190px, 1.15fr);
}

.command-health-metric {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid rgba(147, 197, 253, .18);
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, .17),
            rgba(124, 58, 237, .11)
        );
    backdrop-filter: blur(14px);
}

.command-health-ring {
    position: relative;
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-content: center;
    border: 4px solid rgba(255, 255, 255, .12);
    border-top-color: #93c5fd;
    border-right-color: #60a5fa;
    border-radius: 50%;
    color: #fff;
    text-align: center;
    box-shadow:
        inset 0 0 18px rgba(37, 99, 235, .14),
        0 0 22px rgba(37, 99, 235, .12);
}

.command-health-ring strong {
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
}

.command-health-ring small {
    margin-top: 1px;
    color: rgba(255, 255, 255, .46);
    font-size: 5px;
    font-weight: 900;
}

.command-health-copy {
    display: block;
    min-width: 0;
}

.command-health-copy > small {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .46);
    font-size: 6px;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.command-health-copy > strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 8px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-health-copy > span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, .50);
    font-size: 6px;
    font-weight: 750;
}

/* Relief et identité des cartes */

.command-action {
    overflow: hidden;
    padding-left: 14px;
}

.command-action::after {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #94a3b8;
    opacity: .85;
}

.command-action[data-module="task"]::after {
    background: #2563eb;
}

.command-action[data-module="deadline"]::after {
    background: #f59e0b;
}

.command-action[data-module="sinistre"]::after {
    background: #ef4444;
}

.command-action[data-module="travaux"]::after {
    background: #8b5cf6;
}

.command-action[data-module="anomalie"]::after {
    background: #06b6d4;
}

.command-action.is-selected {
    border-color: rgba(37, 99, 235, .35);
    background:
        linear-gradient(
            90deg,
            rgba(37, 99, 235, .055),
            rgba(37, 99, 235, .018)
        );
    box-shadow:
        0 12px 28px rgba(15, 23, 42, .075),
        inset 0 0 0 1px rgba(37, 99, 235, .035);
}

.command-action.is-selected::after {
    width: 4px;
    box-shadow: 0 0 12px currentColor;
}

.command-action:hover .command-action-icon,
.command-action.is-selected .command-action-icon {
    transform: scale(1.04);
}

.command-action-icon {
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.command-action.is-selected .command-action-icon {
    box-shadow: 0 7px 17px rgba(15, 23, 42, .08);
}

/* Score de vigilance */

.command-score {
    display: grid;
    min-width: 40px;
    min-height: 33px;
    place-content: center;
    border: 1px solid rgba(100, 116, 139, .10);
    border-radius: 10px;
    color: #475569;
    background: rgba(100, 116, 139, .055);
    text-align: center;
}

.command-score small {
    display: block;
    margin-bottom: 1px;
    font-size: 4.5px;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.command-score strong {
    display: block;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
}

.command-score.is-danger {
    border-color: rgba(220, 38, 38, .12);
    color: #b91c1c;
    background: rgba(220, 38, 38, .075);
}

.command-score.is-warning {
    border-color: rgba(217, 119, 6, .12);
    color: #b45309;
    background: rgba(217, 119, 6, .075);
}

/* Panneau de détail immédiatement opérationnel */

.command-detail-panel {
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.command-detail-panel.has-selection {
    border-color: rgba(37, 99, 235, .16);
    box-shadow:
        0 18px 48px rgba(15, 23, 42, .075),
        inset 0 1px 0 rgba(255, 255, 255, .25);
}

.command-detail-score {
    display: inline-flex !important;
    width: fit-content;
    align-items: baseline;
    gap: 3px;
    margin-top: 7px !important;
    padding: 5px 7px;
    border: 1px solid rgba(220, 38, 38, .10);
    border-radius: 8px;
    color: #b91c1c !important;
    background: rgba(220, 38, 38, .055);
    font-size: 6px !important;
    font-weight: 850 !important;
}

.command-detail-score strong {
    color: inherit;
    font-size: 9px;
    font-weight: 950;
}

.command-detail-description p:empty::before {
    content: "Aucune description complémentaire n’a été renseignée.";
    color: var(--alphea-muted);
}

.command-detail-data > div {
    border-bottom: 1px solid rgba(148, 163, 184, .08);
}

.command-detail-data > div:last-child {
    border-bottom: 0;
}

/* Sidebar plus lisible */

.command-filter-group > button.is-active {
    box-shadow: inset 3px 0 0 #2563eb;
}

.command-filter-group > button[data-command-module].is-active {
    color: #1d4ed8;
    background:
        linear-gradient(
            90deg,
            rgba(37, 99, 235, .075),
            rgba(37, 99, 235, .025)
        );
}

.command-filter-group > button[data-command-module].is-active strong {
    color: #1d4ed8;
    background: rgba(37, 99, 235, .10);
}

/* Barre de recherche moins vide */

.command-search::after {
    content: "Recherche temps réel";
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 7px;
    border-radius: 7px;
    color: #64748b;
    background: rgba(148, 163, 184, .07);
    font-size: 5.5px;
    font-weight: 850;
    white-space: nowrap;
}

.command-search {
    grid-template-columns:
        22px
        minmax(0, 1fr)
        auto
        auto;
}

/* Mode compact */

.alphea-command-center.is-compact
.command-score {
    min-width: 35px;
    min-height: 28px;
}

.alphea-command-center.is-compact
.command-score small {
    display: none;
}

/* Responsive */

@media (max-width: 1500px) {
    .command-hero-metrics {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

    .command-health-metric {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 860px) {
    .command-hero-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .command-health-metric {
        grid-column: 1 / -1;
    }

    .command-search::after {
        display: none;
    }

    .command-search {
        grid-template-columns:
            22px
            minmax(0, 1fr)
            auto;
    }
}

@media (max-width: 620px) {
    .command-action-badges {
        display: none;
    }

    .command-health-metric {
        justify-content: flex-start;
    }
}

/* ALPHEA VISUAL COMFORT START */

/* =========================================================
   ALPHÉA — MODE CONFORT VISUEL
   Centre de commandement
   ========================================================= */

.alphea-command-center {
    font-size: 15px;
}

/* Hero */

.command-eyebrow {
    font-size: 12px !important;
    letter-spacing: .11em;
}

.command-hero h1 {
    font-size: clamp(39px, 4vw, 55px);
    line-height: 1.06;
}

.command-hero p {
    max-width: 760px;
    font-size: 15px !important;
    line-height: 1.55;
}

.command-back-dashboard {
    min-height: 46px;
    padding: 0 17px;
    font-size: 13px !important;
}

.command-back-dashboard svg {
    width: 18px;
    height: 18px;
}

/* KPI du Hero */

.command-metric {
    min-height: 86px;
    padding: 16px;
}

.command-metric small {
    font-size: 11px !important;
    letter-spacing: .075em;
}

.command-metric strong {
    font-size: 29px;
}

.command-metric > span {
    font-size: 12px !important;
    line-height: 1.35;
}

/* Indice de vigilance */

.command-health-ring {
    width: 64px;
    height: 64px;
}

.command-health-ring strong {
    font-size: 21px;
}

.command-health-ring small {
    font-size: 9px !important;
}

.command-health-copy > small {
    font-size: 10px !important;
}

.command-health-copy > strong {
    font-size: 14px !important;
}

.command-health-copy > span {
    font-size: 11px !important;
}

/* Recherche */

.command-toolbar {
    min-height: 76px;
    padding: 12px;
}

.command-search {
    height: 52px;
    grid-template-columns:
        24px
        minmax(0, 1fr)
        auto
        auto;
    padding: 0 16px;
}

.command-search input {
    height: 48px;
    font-size: 15px !important;
}

.command-search kbd,
.command-footer kbd {
    min-width: 30px;
    height: 27px;
    font-size: 11px !important;
}

.command-search::after {
    min-height: 27px;
    padding: 0 9px;
    font-size: 10px !important;
}

.command-view-toggle button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 12px !important;
}

/* Colonnes principales */

.command-workspace {
    grid-template-columns:
        235px
        minmax(500px, 1fr)
        minmax(330px, 390px);
    gap: 15px;
}

.command-sidebar,
.command-feed,
.command-detail-panel {
    border-radius: 23px;
}

/* Sidebar */

.command-filter-group {
    padding: 18px;
}

.command-filter-group header {
    margin-bottom: 12px;
}

.command-filter-group header > span {
    font-size: 11px !important;
    letter-spacing: .1em;
}

.command-filter-group header button {
    font-size: 11px !important;
}

.command-filter-group > button {
    min-height: 45px;
    padding: 0 11px;
}

.command-filter-group > button > span {
    gap: 10px;
    font-size: 13px !important;
    line-height: 1.25;
}

.command-filter-group > button strong {
    min-width: 29px;
    height: 27px;
    font-size: 12px !important;
    line-height: 27px;
}

.command-filter-group i {
    width: 9px;
    height: 9px;
}

.command-productivity {
    padding: 19px;
}

.command-productivity-icon {
    width: 43px;
    height: 43px;
}

.command-productivity > strong {
    font-size: 14px !important;
}

.command-productivity p {
    margin: 9px 0 13px;
    font-size: 12px !important;
    line-height: 1.55;
}

.command-productivity > span:last-child {
    font-size: 12px !important;
}

/* Entête du flux */

.command-feed-header {
    padding: 23px;
}

.command-feed-kicker {
    margin-bottom: 6px;
    font-size: 11px !important;
}

.command-feed-header h2 {
    font-size: 25px;
}

.command-feed-header p {
    margin-top: 7px;
    font-size: 13px !important;
}

.command-result-count {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px !important;
}

/* Cartes d'action */

.command-action-list {
    gap: 9px;
    padding: 13px;
}

.command-action {
    min-height: 90px;
    grid-template-columns:
        33px
        52px
        minmax(0, 1fr)
        auto
        72px;
    gap: 12px;
    padding: 14px 13px 14px 17px;
    border-radius: 17px;
}

.command-rank {
    font-size: 11px !important;
}

.command-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
}

.command-action-icon svg {
    width: 23px;
    height: 23px;
}

.command-action-top {
    margin-bottom: 5px;
}

.command-type {
    font-size: 10px !important;
    letter-spacing: .075em;
}

.command-date {
    font-size: 11px !important;
}

.command-action-main > strong {
    font-size: 15px !important;
    line-height: 1.35;
}

.command-action-main > p {
    margin-top: 5px;
    font-size: 12px !important;
    line-height: 1.45;
}

.command-action-meta {
    gap: 11px;
    margin-top: 7px;
}

.command-action-meta > span {
    font-size: 11px !important;
}

.command-action-badges {
    max-width: 150px;
    gap: 6px;
}

.command-badge {
    min-height: 27px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 10px !important;
}

.command-score {
    min-width: 50px;
    min-height: 44px;
}

.command-score small {
    font-size: 8px !important;
}

.command-score strong {
    font-size: 15px;
}

.command-action-buttons {
    gap: 6px;
}

.command-action-buttons button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.command-action-buttons svg {
    width: 17px;
    height: 17px;
}

/* Panneau de détail */

.command-detail-panel {
    min-height: 520px;
}

.command-detail-placeholder {
    min-height: 520px;
    padding: 34px;
}

.command-detail-placeholder > span {
    width: 65px;
    height: 65px;
}

.command-detail-placeholder strong {
    font-size: 16px !important;
}

.command-detail-placeholder p {
    max-width: 285px;
    margin-top: 9px;
    font-size: 12px !important;
    line-height: 1.6;
}

.command-detail-content {
    padding: 22px;
}

.command-detail-type {
    font-size: 11px !important;
}

.command-detail-content > header button {
    width: 36px;
    height: 36px;
}

.command-detail-heading {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 20px;
}

.command-detail-icon {
    width: 56px;
    height: 56px;
}

.command-detail-heading h2 {
    font-size: 21px;
    line-height: 1.25;
}

.command-detail-heading div > span {
    margin-top: 7px;
    font-size: 12px !important;
}

.command-detail-score {
    margin-top: 9px !important;
    padding: 7px 10px;
    font-size: 11px !important;
}

.command-detail-score strong {
    font-size: 14px;
}

.command-detail-description {
    padding: 20px 0;
}

.command-detail-description > span {
    font-size: 10px !important;
}

.command-detail-description p {
    margin-top: 9px;
    font-size: 13px !important;
    line-height: 1.65;
}

.command-detail-data > div {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
}

.command-detail-data dt {
    font-size: 12px !important;
}

.command-detail-data dd {
    font-size: 12px !important;
    line-height: 1.4;
}

.command-detail-actions {
    gap: 9px;
    margin-top: 12px;
}

.command-detail-actions a,
.command-detail-actions button {
    min-height: 47px;
    font-size: 13px !important;
}

.command-detail-note {
    margin-top: 19px;
    padding: 15px;
}

.command-detail-note strong {
    font-size: 12px !important;
}

.command-detail-note p {
    margin-top: 7px;
    font-size: 11px !important;
    line-height: 1.55;
}

/* Pied de page */

.command-footer {
    min-height: 52px;
    gap: 18px;
    font-size: 11px !important;
}

/* Vue compacte : reste lisible */

.alphea-command-center.is-compact
.command-action {
    min-height: 69px;
    grid-template-columns:
        28px
        43px
        minmax(0, 1fr)
        auto
        68px;
    padding: 10px 12px 10px 16px;
}

.alphea-command-center.is-compact
.command-action-icon {
    width: 42px;
    height: 42px;
}

.alphea-command-center.is-compact
.command-action-main > strong {
    font-size: 14px !important;
}

.alphea-command-center.is-compact
.command-type,
.alphea-command-center.is-compact
.command-date {
    font-size: 10px !important;
}

.alphea-command-center.is-compact
.command-score {
    min-width: 43px;
    min-height: 35px;
}

.alphea-command-center.is-compact
.command-score strong {
    font-size: 13px;
}

/* Résolutions intermédiaires */

@media (max-width: 1450px) {
    .command-workspace {
        grid-template-columns:
            220px
            minmax(470px, 1fr)
            340px;
    }

    .command-action {
        grid-template-columns:
            30px
            48px
            minmax(0, 1fr)
            auto
            68px;
    }
}

@media (max-width: 1250px) {
    .command-workspace {
        grid-template-columns:
            220px
            minmax(0, 1fr);
    }
}

/* ALPHEA VISUAL COMFORT END */
