/* Gestion des communiqués — thème teal (réutilise .sh-* de support-hub) */

body:has(.cq-hub-page) .container,
body:has(.cq-hub-page) #content,
body:has(.cq-hub-page).has-navbar > .content,
body:has(.cq-hub-page)[data-navbar="side"].minimized #content,
body:has(.cq-hub-page)[data-navbar="side"].has-navbar > .content {
    max-width: none !important;
    width: 100%;
}

.cq-hub-page.sh-hub-page,
.cq-hub-page .sh-hub {
    --sh-accent: #00a7b8;
    --sh-accent-2: #007a8a;
    --sh-accent-dark: #0b5f6a;
    --sh-accent-soft: #e6f7f9;
    --sh-accent-ring: rgba(0, 167, 184, .2);
    --sh-info: #0e7490;
    --sh-info-bg: #ecfeff;
    --sh-info-dot: #06b6d4;
}

.cq-hub-page .sh-header {
    background:
        radial-gradient(1200px 300px at 85% -60%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(600px 220px at 10% 140%, rgba(0, 122, 138, .5), transparent 60%),
        linear-gradient(120deg, #0b3d45 0%, #007a8a 45%, #00a7b8 100%);
}

.cq-hub-page .sh-header .sh-header-btn {
    width: auto;
    height: auto;
    min-height: 38px;
    padding: 8px 14px;
    gap: 8px;
    border-radius: 10px;
}

/* Cartes statut — même style que Liste des missions */
.cq-hub-page .mh-kpi-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 28px;
    margin: 0 0 12px;
}

.cq-hub-page .mh-block-title {
    margin: 4px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}

.cq-hub-page .mh-status-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cq-hub-page .mh-scard {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 8px;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    min-height: 0;
    box-shadow: none;
    font: inherit;
    color: inherit;
}

.cq-hub-page .mh-scard:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cq-hub-page .mh-scard.is-on {
    background: color-mix(in srgb, var(--mh-tone, #00a7b8) 10%, #fff);
    border-color: var(--mh-tone, #00a7b8);
}

.cq-hub-page .mh-scard-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--mh-tone, #64748b);
    font-variant-numeric: tabular-nums;
}

.cq-hub-page .mh-scard-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.cq-hub-page .mh-scard.tone-total { --mh-tone: #00a7b8; }
.cq-hub-page .mh-scard.tone-ok { --mh-tone: #15803d; }
.cq-hub-page .mh-scard.tone-info { --mh-tone: #0369a1; }
.cq-hub-page .mh-scard.tone-warn { --mh-tone: #b45309; }
.cq-hub-page .mh-scard.tone-neutral { --mh-tone: #64748b; }

.cq-hub-page .sh-table td.cq-title {
    font-weight: 700;
    color: var(--sh-text);
}

.cq-hub-page .sh-table td.cq-muted {
    color: var(--sh-muted);
    font-size: 12.5px;
}

.cq-hub-page .cq-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--sh-muted);
}

.cq-hub-page .cq-empty .fas {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: .55;
}

/* Colonne Actions (icône ⋮) — pas de sticky : sinon le menu fixed est clipé */
.cq-hub-page .sh-table-wrap {
    overflow-x: auto;
}

.cq-hub-page .mh-col-acts {
    width: 48px;
    min-width: 48px;
    max-width: 52px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    padding-left: 4px;
    padding-right: 8px;
    overflow: visible;
}

.cq-hub-page .mh-row-acts {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cq-hub-page .mh-act-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.cq-hub-page .mh-act-menu-btn:hover,
.cq-hub-page .mh-row-acts.is-open .mh-act-menu-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.cq-hub-page .mh-act-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 10050;
    min-width: 168px;
    padding: 6px 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.cq-hub-page .mh-row-acts.is-open .mh-act-menu {
    display: block;
}

.cq-hub-page .mh-act-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.cq-hub-page .mh-act-item .fas {
    width: 14px;
    color: #64748b;
    font-size: 12px;
}

.cq-hub-page .mh-act-item:hover {
    background: #f1f5f9;
}

.cq-hub-page .mh-act-item.is-danger {
    color: #b91c1c;
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
    padding-top: 10px;
}

.cq-hub-page .mh-act-item.is-danger .fas {
    color: #b91c1c;
}

.cq-hub-page .mh-act-item.is-danger:hover {
    background: #fef2f2;
}

/* ---------- Fiche détail ---------- */

.cq-detail-page .cq-detail-head-text {
    min-width: 0;
}

.cq-detail-page .cq-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.cq-detail-page .cq-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

@media (max-width: 960px) {
    .cq-detail-page .cq-detail-grid {
        grid-template-columns: 1fr;
    }
}

.cq-detail-page .cq-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    padding: 18px 20px;
}

.cq-detail-page .cq-detail-card-h {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 14px;
}

.cq-detail-page .cq-detail-lead {
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #e6f7f9;
    border-left: 3px solid #00a7b8;
    border-radius: 0 10px 10px 0;
    color: #0b5f6a;
    font-weight: 600;
    font-size: 14px;
}

.cq-detail-page .cq-detail-content {
    color: #334155;
    font-size: 14.5px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.cq-detail-page .cq-detail-content img,
.cq-detail-page .cq-detail-content table {
    max-width: 100%;
}

.cq-detail-page .cq-detail-dl {
    margin: 0;
}

.cq-detail-page .cq-detail-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.cq-detail-page .cq-detail-row:last-child {
    border-bottom: 0;
}

.cq-detail-page .cq-detail-row dt {
    margin: 0;
    color: #94a3b8;
    font-weight: 650;
}

.cq-detail-page .cq-detail-row dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}

.cq-detail-page .sh-subtitle .sh-badge {
    vertical-align: middle;
}

.cq-detail-page .cq-detail-illu {
    margin: 0 0 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cq-detail-page .cq-detail-illu img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.cq-detail-page .cq-detail-atts {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cq-detail-page .cq-att-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0b5f6a;
    font-weight: 650;
    font-size: 13px;
    text-decoration: none;
}

.cq-detail-page .cq-att-link:hover {
    background: #e6f7f9;
    border-color: #00a7b8;
}
