/* ============================================================
   PHONY — Page /diagnostic (hero, layout, sidebar)
   Le chat utilise diag-chat.css (+ dg-page-chat)
============================================================ */

.dg-hero {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    padding: 12px 0;
    color: #fff;
    border-bottom: 1px solid oklch(99% 0.01 260 / 0.12);
}

.dg-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dg-hero-text h1 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 2px;
    line-height: 1.25;
}

.dg-hero-text h1 span { color: var(--accent-yellow); }

.dg-hero-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.88;
    line-height: 1.35;
}

.dg-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: oklch(99% 0.01 260 / 0.12);
    border: 1px solid oklch(99% 0.01 260 / 0.22);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.dg-stat i { color: var(--accent-yellow); }
.dg-stat strong { color: var(--accent-yellow); font-size: 15px; }

@media (max-width: 640px) {
    .dg-hero-inner { flex-direction: column; align-items: flex-start; }
    .dg-stat { width: 100%; justify-content: center; }
}

.dg-wrap {
    padding: 16px 0 48px;
    background: var(--gray-50);
}

.dg-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 960px) {
    .dg-layout { grid-template-columns: 1fr; }
    .dg-sidebar { order: 2; }
    .dg-wrap { padding: 12px 0 32px; }
}

/* —— Chat page (pas widget) —— */
.dg-page-chat {
    min-height: 480px;
    max-height: calc(100dvh - 200px);
    height: min(560px, calc(100dvh - 200px));
}

.dg-page-chat.is-locked {
    min-height: 460px;
    max-height: none;
}

.dg-page-chat .dg-chat-head {
    padding: 12px 16px;
}

.dg-page-chat .dg-chat-head strong { font-size: 16px; }
.dg-page-chat .dg-chat-head span {
    font-size: 13px;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.dg-page-chat .dg-end-chat {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm, 8px);
}

.dg-page-chat .dg-chat {
    min-height: 140px;
    padding: 12px 14px;
    gap: 8px;
}

.dg-page-chat .diag-msg-bubble {
    font-size: 14px;
    padding: 8px 12px;
    line-height: 1.32;
}

.dg-page-chat .dg-form {
    padding: 12px 16px 16px;
    gap: 10px;
}

.dg-page-chat .dg-form textarea {
    min-height: 48px;
    font-size: 15px;
    padding: 12px 14px;
    border-radius: var(--radius-md, 12px);
}

.dg-page-chat .dg-send {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md, 12px);
    font-size: 16px;
}

.dg-page-chat .dg-disclaimer {
    padding: 10px 16px 14px;
    font-size: 12px;
}

.dg-page-chat .dg-gate {
    padding: 12px 16px 16px;
}

@media (max-width: 960px) {
    .dg-page-chat {
        min-height: 0;
        max-height: none;
    }

    .dg-page-chat .dg-chat {
        min-height: 120px;
        max-height: min(320px, 42dvh);
    }
}

.dg-sidebar { display: flex; flex-direction: column; gap: 16px; }

.dg-side-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.dg-side-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dg-side-card h3 i { color: var(--primary-blue); }

.dg-side-card p,
.dg-side-card li {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.55;
}

.dg-side-card ul { margin: 0; padding-left: 18px; }
.dg-side-card li { margin-bottom: 6px; }

.dg-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s;
}

.dg-cta-btn:hover { background: var(--primary-blue-dark); }

.dg-cta-btn--yellow {
    background: var(--accent-yellow);
    color: var(--gray-900);
}

.dg-cta-btn--yellow:hover { background: oklch(80% 0.19 85); }
