/* JFOCUS — styles spécifiques rapport-presentation.html */

.rp-hero {
    background: #fff;
    border-bottom: 1px solid #e8edf3;
}

.hero-glow { background: radial-gradient(circle at 50% 30%, rgba(96, 207, 134, 0.1) 0%, transparent 70%); }

.rp-hero-checklist {
    display: grid;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(33, 58, 83, 0.04);
    border: 1px solid rgba(33, 58, 83, 0.08);
}

.rp-hero-checklist .check-item { font-size: 0.9375rem; color: #475569; }

.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #dce4ec; }
.toggle-wrap:last-child { border-bottom: none; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #334155; border-radius: 22px; cursor: pointer; transition: .25s; }
.slider:before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #94a3b8; border-radius: 50%; transition: .25s; }
input:checked + .slider { background: #60CF86; }
input:checked + .slider:before { transform: translateX(18px); background: #fff; }

.rp { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.rp-header { background: linear-gradient(135deg,#213A53,#1a2f44); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.rp-body { padding: 16px 20px; }
.rp-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #f1f5f9; font-size: .78rem; }
.rp-row:last-child { border: none; }
.rp-section { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; margin: 10px 0 4px; }

.format-card { border: 2px solid #334155; border-radius: 16px; padding: 20px; cursor: pointer; transition: all .2s; }
.format-card.active { border-color: #60CF86; background: rgba(96,207,134,0.08); }
.format-card:hover { border-color: #475569; }

.pro-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: rgba(234,179,8,0.15); border: 1px solid rgba(234,179,8,0.4); color: #fbbf24; font-size: .65rem; font-weight: 700; text-transform: uppercase; }

.rp-simplified { font-size: .82em; opacity: .88; }
.dot-neutral { background: #94a3b8 !important; }
.badge-neutral { background: #f1f5f9 !important; color: #64748b !important; }
.badge-colored { background: #fef9c3 !important; color: #92400e !important; }

.copy-btn { background: rgba(96,207,134,0.12); border: 1px solid rgba(96,207,134,0.4); color: #3a9a5a; }
.copy-btn.copy-active { background: rgba(96,207,134,0.25); border-color: #60CF86; color: #fff; }

.doc-wrap { background: #f8fafc; border-radius: 12px; overflow: hidden; }
.doc-cover { background: linear-gradient(135deg,#213A53 0%,#1a2f44 60%,#28603c 100%); padding: 28px 28px 24px; }
.doc-verdict { background: #60CF86; color: #0f1c28; display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.doc-section-title { font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: #4db870; padding: 10px 20px 4px; border-top: 1px solid #e2e8f0; margin-top: 2px; }
.doc-body { padding: 0 20px 16px; color: #1e293b; }
.doc-h3 { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #475569; margin: 12px 0 5px; border-bottom: 1px solid #e2e8f0; padding-bottom: 3px; }
.doc-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; border-bottom: 1px solid #f1f5f9; font-size: .74rem; color: #374151; }
.doc-row:last-child { border: none; }
.doc-lbl { color: #6b7280; flex-shrink: 0; max-width: 55%; }
.doc-val { font-weight: 600; text-align: right; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .69rem; margin: 4px 0 8px; }
.doc-table th { background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; text-align: left; }
.doc-table td { padding: 3px 6px; border-bottom: 1px solid #f1f5f9; color: #374151; }
.doc-table tfoot td { font-weight: 900; background: #f8fafc; border-top: 2px solid #e2e8f0; }
.p1b { background: #fee2e2; color: #991b1b; padding: 1px 7px; border-radius: 999px; font-weight: 800; font-size: .6rem; }
.p2b { background: #fef9c3; color: #92400e; padding: 1px 7px; border-radius: 999px; font-weight: 800; font-size: .6rem; }
.p3b { background: #ede9fe; color: #5b21b6; padding: 1px 7px; border-radius: 999px; font-weight: 800; font-size: .6rem; }
.doc-alert-ok { background: #d1fae5; border-left: 3px solid #10b981; padding: 6px 10px; border-radius: 6px; color: #065f46; font-size: .7rem; font-weight: 600; margin: 4px 0; }
.doc-info { background: #eff6ff; border-left: 3px solid #3b82f6; padding: 6px 10px; border-radius: 6px; color: #1e40af; font-size: .68rem; margin: 4px 0; line-height: 1.45; }
.doc-warn { background: #fffbeb; border-left: 3px solid #f59e0b; padding: 6px 10px; border-radius: 6px; color: #92400e; font-size: .68rem; margin: 4px 0; }
.doc-toc { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; padding: 8px 20px 4px; }
.doc-toc-item { font-size: .67rem; color: #64748b; padding: 2px 0; }
.doc-toc-item span { color: #10b981; font-weight: 700; margin-right: 4px; }
.doc-sig { background: #f1f5f9; border-radius: 8px; height: 40px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: .65rem; }
.doc-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.doc-total { font-weight: 900; font-size: .85rem; color: #0f172a; background: #f0fdf4; border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #10b981; margin-top: 6px; }
.doc-priority-caption { font-size: .63rem; line-height: 1.25; }
.doc-note { font-size: .68rem; line-height: 1.45; }
.doc-note-compact { font-size: .65rem; line-height: 1.45; }
.doc-note-mini { font-size: .62rem; line-height: 1.45; }
.doc-render { color: #0f172a; font-size: 14px; line-height: 1.5; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 16px; box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.doc-render-line { white-space: pre-wrap; }
.doc-render-gap { height: 8px; }
.doc-render-rule { color: #64748b; font-weight: 700; letter-spacing: .02em; }
.doc-render-head { font-weight: 800; color: #0f172a; margin-top: 4px; }
.doc-render-subhead { font-weight: 700; color: #1e293b; margin-top: 6px; }

/* Desktop : scroll interne conservé */
.doc-wrap--scroll {
    max-height: 660px;
    overflow-y: auto;
}

/* Mobile : carrousel horizontal (évite le double scroll) */
.doc-mobile-rail {
    display: none;
}

@media (max-width: 767px) {
    .doc-wrap--scroll {
        display: none !important;
    }

    .doc-mobile-rail {
        display: block;
        margin: 0;
    }

    .doc-mobile-track {
        display: flex;
        flex-direction: row;
        gap: 0.85rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.85rem 1rem 0.35rem;
        --doc-slide: min(88%, 22rem);
        padding-inline: calc((100% - var(--doc-slide)) / 2);
        scroll-padding-inline: calc((100% - var(--doc-slide)) / 2);
    }

    .doc-mobile-track::-webkit-scrollbar {
        display: none;
    }

    .doc-mobile-slide {
        flex: 0 0 var(--doc-slide);
        width: var(--doc-slide);
        max-height: 28rem;
        overflow: hidden;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        border-radius: 1rem;
        border: 1px solid #e2e8f0;
        background: #fff;
        box-shadow: 0 8px 24px rgba(33, 58, 83, 0.08);
        display: flex;
        flex-direction: column;
    }

    .doc-mobile-slide-label {
        margin: 0;
        padding: 0.65rem 0.9rem;
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #3d9a5a;
        border-bottom: 1px solid #eef2f6;
        background: rgba(96, 207, 134, 0.08);
    }

    .doc-mobile-slide-body {
        overflow: hidden;
        flex: 1;
        min-height: 0;
    }

    .doc-mobile-slide-body .doc-cover {
        border-radius: 0;
    }

    .doc-mobile-slide-body .doc-section-title {
        border-top: none;
        margin-top: 0;
    }

    .doc-mobile-dots {
        display: flex;
        justify-content: center;
        gap: 0.4rem;
        padding: 0.75rem 0 0.35rem;
    }

    .doc-mobile-dots .ix-carousel-dot {
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 999px;
        border: none;
        padding: 0;
        background: #cbd5e1;
        cursor: pointer;
        transition: width 0.2s ease, background 0.2s ease;
    }

    .doc-mobile-dots .ix-carousel-dot.is-active {
        width: 1.1rem;
        background: #60CF86;
    }
}

@media (min-width: 768px) {
    .doc-mobile-rail {
        display: none !important;
    }
}
