/* ================================
   Review page part 6 — SEO/EEAT/GEO/AEO fixes
   TOC v2, sidebar sticky fix, new components
   ================================ */

/* ---------- Sidebar sticky fix (align-self required in grid) ---------- */
.test-sidebar {
    align-self: start;
}

/* ---------- TOC v2 (card-based, numbered, visual) ---------- */
.toc-v2 {
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin: 40px 0;
}
.toc-v2 .toc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.08));
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text);
}
.toc-v2 .toc-head svg { color: var(--accent-2); }
.toc-v2 .toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}
.toc-v2 .toc-list li { border-bottom: 1px solid var(--border); }
.toc-v2 .toc-list li:nth-child(odd) { border-right: 1px solid var(--border); }
.toc-v2 .toc-list li:last-child,
.toc-v2 .toc-list li:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.toc-v2 .toc-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}
.toc-v2 .toc-list a:hover {
    background: var(--bg-hover);
    color: var(--accent-2);
}
.toc-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-hover);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-2);
    flex-shrink: 0;
    transition: all .2s;
}
.toc-v2 .toc-list a:hover .toc-n {
    background: var(--accent-grad);
    color: #fff;
}

/* ---------- GEO : Quick summary box ---------- */
.geo-summary {
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    margin: 32px 0;
    position: relative;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.12), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.1), transparent 60%);
}
.geo-summary .gs-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.geo-summary .gs-head h2 {
    margin: 0 !important;
    font-size: 22px !important;
    flex: 1;
}
.geo-summary .gs-icon { font-size: 24px; }
.gs-updated {
    font-size: 12px;
    color: var(--text-dim);
    padding: 4px 12px;
    background: var(--bg-hover);
    border-radius: 999px;
}
.gs-sentence {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    margin: 0 0 20px;
}
.gs-sentence strong { color: var(--accent-2); font-weight: 700; }
.gs-stats {
    display: flex;
    gap: 24px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.gs-stats > div { display: flex; flex-direction: column; }
.gs-stats dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 2px;
}
.gs-stats dd {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* ---------- GEO : Comparison table ---------- */
.comparison-wrap {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 14px;
}
.comparison-table caption {
    padding: 16px;
    text-align: left;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border);
}
.comparison-table th,
.comparison-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.comparison-table thead th {
    background: var(--bg-elev);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    position: relative;
}
.comparison-table thead th.is-current {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.15));
    color: var(--text);
}
.comparison-table .ct-badge {
    display: block;
    margin-top: 4px;
    padding: 2px 10px;
    background: var(--accent-grad);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    width: fit-content;
}
.comparison-table tbody th {
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-elev);
}
.comparison-table td.is-current {
    background: rgba(124, 58, 237, 0.05);
    color: var(--text);
    font-weight: 600;
}
.comparison-table tr:last-child th,
.comparison-table tr:last-child td { border-bottom: none; }

/* ---------- GEO : Key metrics box ---------- */
.key-metrics {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin: 24px 0;
}
.key-metrics h3 {
    margin: 0 0 20px !important;
    font-size: 18px !important;
    color: var(--text);
}
.km-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.km-item {
    padding: 18px 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.km-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    font-weight: 600;
}
.km-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.km-note { font-size: 12px; color: var(--text-muted); }
.km-footer {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
}

/* ---------- EEAT : External sources ---------- */
.external-sources {
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin: 32px 0;
    border-left: 4px solid var(--accent-2);
}
.external-sources h3 {
    margin: 0 0 8px !important;
    font-size: 16px !important;
    color: var(--text);
}
.es-intro {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.external-sources ul { list-style: none; padding: 0; margin: 0; }
.external-sources li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.external-sources li:last-child { border-bottom: none; }
.external-sources a { color: var(--text); transition: color .2s; }
.external-sources a:hover { color: var(--accent-2); }
.external-sources strong { color: var(--accent-2); }

/* ---------- AEO : HowTo ---------- */
.howto-section {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 40px 0;
}
.howto-steps {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    counter-reset: hs;
}
.howto-steps li {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.hs-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--accent-grad);
    color: #fff;
    border-radius: 50%;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    flex-shrink: 0;
}
.howto-steps li strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}
.howto-steps li p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Verdict structuré Pour qui / Pas pour qui ---------- */
.structured-verdict {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}
.sv-box {
    padding: 24px 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.sv-yes {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}
.sv-no {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}
.sv-box h3 { margin: 0 0 12px !important; font-size: 18px !important; }
.sv-yes h3 { color: var(--success); }
.sv-no h3 { color: var(--danger); }
.sv-box ul { list-style: none; padding: 0; margin: 0; }
.sv-box li {
    padding: 6px 0;
    color: var(--text);
    font-size: 15px;
}

/* Methodology enriched */
.methodology-box .mb-date {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .toc-v2 .toc-list { grid-template-columns: 1fr; }
    .toc-v2 .toc-list li:nth-child(odd) { border-right: none; }
    .structured-verdict { grid-template-columns: 1fr; }
    .km-grid { grid-template-columns: repeat(2, 1fr); }
    .gs-sentence { font-size: 16px; }
    .comparison-table { font-size: 13px; }
    .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
@media (max-width: 600px) {
    .km-grid { grid-template-columns: 1fr; }
    .gs-stats { gap: 16px; }
}
