/**
 * CQ Results Widget — Step 5 Styles
 *
 * Components: CQ-ScoreGauge, CQ-ReportSection (16×).
 *
 * UX refs: UX-DR14, UX-DR15, UX-DR19, UX-DR20, UX-DR24, UX-DR27
 */

/* ── Widget wrapper ── */
.cq-results-widget {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ── Page title ── */
.cq-results-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1A202C;
    margin: 0 0 4px;
    text-align: center;
}

.cq-results-phone {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #2D7EF8;
    text-align: center;
    margin: 0 0 28px;
}

/* ── Notices ── */
.cq-results-notice {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cq-results-notice p {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #6B7280;
    margin: 12px 0 0;
}

.cq-results-notice--warning {
    border-left: 4px solid #F59E0B;
}

.cq-results-notice--pending {
    border-left: 4px solid #2D7EF8;
}

/* .cq-spinner, .cq-spinner--lg et @keyframes cq-spin — définis dans cq-shared.css (Epic 7, Story 7.2) */

/* ════════════════════════════════════════
   CQ-ScoreGauge (UX-DR14, UX-DR27)
════════════════════════════════════════ */
.cq-score-gauge {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cq-score-gauge__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cq-score-gauge__label {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
}

/* Score value — always shown with color (UX-DR27) */
.cq-score-gauge__value {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.cq-score-gauge--red    .cq-score-gauge__value { color: #EF4444; }
.cq-score-gauge--yellow .cq-score-gauge__value { color: #F59E0B; }
.cq-score-gauge--green  .cq-score-gauge__value { color: #10B981; }

/* Gauge track */
.cq-score-gauge__track {
    height: 10px;
    background: #E8ECEF;
    border-radius: 5px;
    overflow: hidden;
}

.cq-score-gauge__fill {
    height: 100%;
    border-radius: 5px;
    transition: width 800ms ease;
}

.cq-score-gauge--red    .cq-score-gauge__fill { background: #EF4444; }
.cq-score-gauge--yellow .cq-score-gauge__fill { background: #F59E0B; }
.cq-score-gauge--green  .cq-score-gauge__fill { background: #10B981; }

/* ════════════════════════════════════════
   CQ-ReportSection (UX-DR15)
════════════════════════════════════════ */
.cq-report-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cq-report-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Header: uppercase title + colored bar (UX-DR15) */
.cq-report-section__header {
    margin-bottom: 14px;
}

.cq-report-section__title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase; /* UX-DR15 */
    letter-spacing: 0.1em;
    margin: 0 0 6px;
}

/* Colored bar under title (UX-DR15) */
.cq-report-section__bar {
    height: 2px;
    width: 32px;
    background: #2D7EF8;
    border-radius: 1px;
}

/* Data rows */
.cq-report-section__rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cq-report-section__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
    min-height: 36px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cq-report-section__row:last-child {
    border-bottom: none;
}

.cq-report-section__row-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 400;
    flex-shrink: 0;
}

.cq-report-section__row-value {
    font-size: 13px;
    font-weight: 600;
    color: #1A202C;
    text-align: right;
    word-break: break-word;
}

/* "Non trouvé" state (FR28, UX-DR15) */
.cq-report-section__empty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #9CA3AF;
}

.cq-empty-icon {
    font-size: 16px;
    color: #D1D5DB;
    flex-shrink: 0;
}

/* ── Responsive — mobile < 768px (UX-DR19) ── */
@media (max-width: 767px) {
    .cq-results-widget {
        padding: 16px 12px;
    }

    .cq-results-title {
        font-size: 20px;
    }

    .cq-score-gauge,
    .cq-report-section {
        padding: 16px 18px;
    }

    .cq-report-section__row {
        flex-direction: column;
        gap: 2px;
    }

    .cq-report-section__row-value {
        text-align: left;
    }
}

/* ── Tablet 768–1024px (UX-DR19) ── */
@media (min-width: 768px) and (max-width: 1024px) {
    .cq-score-gauge,
    .cq-report-section {
        padding: 18px 22px;
    }
}
