/* ===== Business plan document ===== */

.doc-body{
    background: #EEEAF4;
    min-height: 100vh;
}

/* Toolbar */

.doc-toolbar{
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border-bottom: 1px solid #E4DCEF;
    padding: 14px 28px;
}

.doc-tool-back{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5C5372;
    font-weight: 500;
    font-size: 14.5px;
}

.doc-tool-back:hover{ color: #8B0EF0; }

.doc-tool-title{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1A1332;
    font-weight: 600;
}

.doc-tool-actions{
    margin-left: auto;
    display: flex;
    gap: 12px;
}

.doc-tool-btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.doc-tool-btn.ghost{
    background: #fff;
    color: #8B0EF0;
    border: 1.5px solid #E6D8F7;
}

/* Édition inline */

.doc-edit-status{
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
}
.doc-edit-status[data-state="saving"]{ color: #8B0EF0; }
.doc-edit-status[data-state="saved"]{ color: #16A34A; }
.doc-edit-status[data-state="error"]{ color: #DC2626; }

.doc-editing [contenteditable="true"]{
    outline: 1.5px dashed rgba(139, 14, 240, .35);
    outline-offset: 3px;
    border-radius: 4px;
    cursor: text;
    transition: outline-color .15s, background .15s;
}
.doc-editing [contenteditable="true"]:hover{
    outline-color: rgba(139, 14, 240, .6);
    background: rgba(139, 14, 240, .04);
}
.doc-editing [contenteditable="true"]:focus{
    outline: 2px solid #8B0EF0;
    background: rgba(139, 14, 240, .06);
}

/* Document sheet */

.doc{
    max-width: 1040px;
    margin: 34px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(26, 19, 50, 0.10);
    overflow: hidden;
}

/* Cover */

.doc-cover{
    background:
        radial-gradient(120% 140% at 85% -10%, rgba(255,255,255,0.18), transparent 60%),
        linear-gradient(135deg, #1A0B3B 0%, #6A12B0 60%, #EC02A3 130%);
    color: #fff;
    padding: 70px 64px;
}

.doc-cover-tag{
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.35);
    color: #EADCFB;
    font-size: 12.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
}

.doc-cover h1{
    font-size: 52px;
    font-weight: 800;
    margin-top: 20px;
    letter-spacing: -0.5px;
}

.doc-cover-sub{
    color: #E7DAFA;
    font-size: 18px;
    margin-top: 10px;
}

.doc-cover-meta{
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.18);
}

.doc-cover-meta span{
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-cover-meta strong{
    display: block;
    font-size: 16px;
    margin-top: 6px;
}

/* Layout: TOC + content */

.doc-layout{
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
}

.doc-toc{
    border-right: 1px solid #F0EBF7;
    padding: 36px 24px;
    align-self: start;
    position: sticky;
    top: 64px;
}

.doc-toc-title{
    color: #9A90AE;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.doc-toc nav{
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-toc a{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #5C5372;
    font-size: 14.5px;
    font-weight: 500;
}

.doc-toc a span{
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #F1E9FB;
    color: #8B0EF0;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-toc a.active{
    background: #F6F0FD;
    color: #1A1332;
    font-weight: 600;
}

.doc-toc a.active span{
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
}

.doc-toc a.upcoming{
    color: #B4ABC6;
    cursor: default;
}

.doc-toc a.upcoming span{
    background: #F3EFF8;
    color: #B4ABC6;
}

/* Content */

.doc-content{
    padding: 48px 56px 56px;
}

.doc-section-head{
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 2px solid #F0EBF7;
}

.doc-section-num{
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.doc-section-head h2{
    color: #1A1332;
    font-size: 30px;
    font-weight: 800;
}

.doc-section-lead{
    color: #6B6280;
    font-size: 15.5px;
    margin-top: 8px;
    line-height: 1.6;
}

.doc-content h3{
    color: #1A1332;
    font-size: 19px;
    font-weight: 700;
    margin-top: 34px;
    padding-left: 14px;
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #EC02A3, #831CF8) 1;
}

.doc-content p{
    color: #463C5C;
    font-size: 15.5px;
    line-height: 1.8;
    margin-top: 14px;
}

.doc-list{
    margin-top: 14px;
    padding-left: 4px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-list li{
    position: relative;
    padding-left: 28px;
    color: #463C5C;
    font-size: 15.5px;
    line-height: 1.6;
}

.doc-list li::before{
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
    color: #8B0EF0;
    font-size: 13px;
}

/* Goals */

.doc-goals{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.doc-goal{
    border: 1px solid #ECE4F6;
    border-radius: 14px;
    padding: 20px;
    background: #FBF9FE;
}

.doc-goal-tag{
    display: inline-block;
    background: #F1E3FB;
    color: #8B0EF0;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}

.doc-goal p{
    margin-top: 10px;
    font-size: 14.5px;
}

/* Callout */

.doc-callout{
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 20px 24px;
    border-radius: 14px;
    background: linear-gradient(98deg, rgba(236,2,163,0.08), rgba(131,28,248,0.08));
    border: 1px solid #F0DCF1;
}

.doc-callout i{
    font-size: 26px;
    color: #8B0EF0;
}

.doc-callout strong{
    display: block;
    color: #1A1332;
    font-size: 17px;
}

.doc-callout span{
    display: block;
    color: #6B6280;
    font-size: 14px;
    margin-top: 4px;
}

/* KPIs */

.doc-kpis{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.doc-kpi{
    border: 1px solid #ECE4F6;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    background: #fff;
}

.doc-kpi-label{
    display: block;
    color: #6B6280;
    font-size: 13px;
}

.doc-kpi-value{
    display: block;
    margin-top: 8px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-next{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 44px;
    padding: 18px 22px;
    border: 1px dashed #D8CCEC;
    border-radius: 14px;
    color: #8A7FA3;
    font-size: 14px;
    background: #FAF8FD;
}

.doc-next i{ color: #B14BFF; }

/* Responsive */

@media (max-width: 860px){
    .doc{ margin: 16px; border-radius: 14px; }
    .doc-cover{ padding: 48px 28px; }
    .doc-cover h1{ font-size: 38px; }
    .doc-layout{ grid-template-columns: 1fr; }
    .doc-toc{
        position: static;
        border-right: none;
        border-bottom: 1px solid #F0EBF7;
    }
    .doc-content{ padding: 32px 24px 40px; }
    .doc-goals,
    .doc-kpis{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px){
    .doc-kpis{ grid-template-columns: 1fr; }
    .doc-cover-meta{ gap: 24px; }
    .doc-tool-title{ display: none; }
}

/* Print */

@media print{
    @page{ margin: 14mm; }

    .doc-toolbar{ display: none !important; }
    .doc-toc{ display: none !important; }
    .doc-next{ display: none !important; }

    .doc-body{ background: #fff; }
    .doc{ box-shadow: none; margin: 0; max-width: none; border-radius: 0; }
    .doc-layout{ display: block; }
    .doc-content{ padding: 0; }

    /* Render every section (tabs hide them on screen) and keep colours */
    .doc .is-hidden{ display: block !important; }
    .doc, .doc *{
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Each section starts on a new page */
    .doc-section{ break-before: page; }
    #section-1{ break-before: auto; }

    /* Avoid splitting these blocks across pages */
    .doc-section-head,
    .doc-kpi, .doc-card, .doc-mv-card, .doc-step,
    .doc-member, .doc-persona, .doc-value, .doc-innov-card,
    .doc-swot-card, .doc-plan, .doc-market-card, .doc-callout,
    .doc-figure, .doc-table{ break-inside: avoid; }
}

/* ===== Figures: donut, bars, table ===== */

.doc-figure-title{
    color: #1A1332;
    font-size: 15px;
    font-weight: 700;
    margin-top: 30px;
}

/* Donut chart (financing allocation) */

.doc-figure{
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 24px;
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    background: #FBF9FE;
}

.doc-donut{
    --c-a: #831CF8;
    --c-b: #EC02A3;
    --c-c: #F4A0DC;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(
        var(--c-a) 0 var(--a),
        var(--c-b) var(--a) var(--b),
        var(--c-c) var(--b) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-donut-hole{
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #F0EBF7;
}

.doc-donut-hole span{
    font-size: 22px;
    font-weight: 800;
    color: #1A1332;
}

.doc-donut-hole small{
    color: #9A90AE;
    font-size: 12px;
}

.doc-legend{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-width: 220px;
}

.doc-legend li{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #463C5C;
    font-size: 14.5px;
}

.doc-legend strong{
    margin-left: auto;
    color: #1A1332;
    font-weight: 700;
}

.doc-legend .dot{
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.doc-legend .dot-a{ background: #831CF8; }
.doc-legend .dot-b{ background: #EC02A3; }
.doc-legend .dot-c{ background: #F4A0DC; }

/* Bar chart (revenue) */

.doc-bars{
    display: flex;
    align-items: flex-end;
    gap: 28px;
    height: 220px;
    padding: 20px 24px 0;
    margin-top: 14px;
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    background:
        repeating-linear-gradient(to top, #F4EFFA, #F4EFFA 1px, transparent 1px, transparent 44px);
}

.doc-bar{
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.doc-bar-fill{
    position: relative;
    width: 56px;
    max-width: 70%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #EC02A3, #831CF8);
    display: flex;
    justify-content: center;
}

.doc-bar-fill b{
    position: absolute;
    top: -24px;
    color: #1A1332;
    font-size: 14px;
    font-weight: 700;
}

.doc-bar-x{
    color: #6B6280;
    font-size: 13.5px;
    font-weight: 600;
}

/* Table */

.doc-table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    border: 1px solid #ECE4F6;
    border-radius: 14px;
    overflow: hidden;
}

.doc-table th,
.doc-table td{
    padding: 14px 18px;
    text-align: right;
    font-size: 14.5px;
}

.doc-table th:first-child,
.doc-table td:first-child{
    text-align: left;
}

.doc-table thead th{
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    font-weight: 600;
}

.doc-table tbody td{
    color: #463C5C;
    border-top: 1px solid #F0EBF7;
}

.doc-table tbody tr:nth-child(even){
    background: #FBF9FE;
}

.doc-table tbody td:first-child{
    font-weight: 600;
    color: #1A1332;
}

.doc-table .neg{
    color: #D11A6B;
    font-weight: 600;
}

.doc-table tfoot td{
    background: #F6F0FD;
    color: #1A1332;
    font-weight: 700;
    border-top: 2px solid #E4D6F6;
}

@media (max-width: 520px){
    .doc-bars{ gap: 14px; }
    .doc-table th, .doc-table td{ padding: 10px 12px; font-size: 13px; }
}

/* ===== Navigation: smooth scroll + section offset ===== */

html{ scroll-behavior: smooth; }

.doc-section{ scroll-margin-top: 84px; }

/* ===== Section 2 components ===== */

/* Identity table (label / value) */
.doc-identity td:last-child{
    color: #1A1332;
    font-weight: 600;
}

/* Mission & Vision */
.doc-mv{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.doc-mv-card{
    border-radius: 16px;
    padding: 26px;
    border: 1px solid #ECE4F6;
}

.doc-mv-card.mission{ background: linear-gradient(160deg, #FBF1F8, #fff); }
.doc-mv-card.vision{ background: linear-gradient(160deg, #F4F1FD, #fff); }

.doc-mv-card i{
    font-size: 22px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    color: #8B0EF0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(131, 28, 248, 0.10);
}

.doc-mv-card h4{
    color: #1A1332;
    font-size: 18px;
    font-weight: 700;
    margin-top: 16px;
}

.doc-mv-card p{
    color: #463C5C;
    font-size: 14.5px;
    line-height: 1.7;
    margin-top: 8px;
}

/* Values grid */
.doc-values{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.doc-value{
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #ECE4F6;
    border-radius: 14px;
    background: #fff;
}

.doc-value i{
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #F6F0FD;
    color: #8B0EF0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.doc-value strong{
    display: block;
    color: #1A1332;
    font-size: 15.5px;
}

.doc-value span{
    display: block;
    color: #6B6280;
    font-size: 13.5px;
    margin-top: 3px;
}

/* Timeline */
.doc-timeline{
    list-style: none;
    margin-top: 20px;
    padding-left: 8px;
    border-left: 2px solid #EADFF6;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.doc-timeline li{
    position: relative;
    padding-left: 28px;
}

.doc-timeline li::before{
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    box-shadow: 0 0 0 4px #F6F0FD;
}

.doc-tl-date{
    display: inline-block;
    color: #8B0EF0;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-timeline strong{
    display: block;
    color: #1A1332;
    font-size: 16px;
    margin-top: 4px;
}

.doc-timeline p{
    color: #6B6280;
    font-size: 14.5px;
    line-height: 1.6;
    margin-top: 4px;
}

/* Team */
.doc-team{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.doc-member{
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    background: #FBF9FE;
}

.doc-member-av{
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-member strong{
    display: block;
    color: #1A1332;
    font-size: 16px;
}

.doc-member span{
    display: block;
    color: #6B6280;
    font-size: 13.5px;
    margin-top: 4px;
}

@media (max-width: 860px){
    .doc-mv,
    .doc-values{ grid-template-columns: 1fr; }
    .doc-team{ grid-template-columns: 1fr; }
}

/* Tabbed sections: hide inactive ones */
.doc .is-hidden{ display: none !important; }

/* ===== Section 3 components ===== */

/* Before / After comparison */
.doc-compare{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.doc-compare-card{
    border-radius: 16px;
    padding: 22px;
    border: 1px solid #ECE4F6;
}

.doc-compare-card.before{ background: #FCF4F7; border-color: #F3D9E5; }
.doc-compare-card.after{ background: #F3F6FF; border-color: #D6E2FB; }

.doc-compare-tag{
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.doc-compare-card.before .doc-compare-tag{ background: #FAD9E5; color: #C2185B; }
.doc-compare-card.after .doc-compare-tag{ background: #D8E6FB; color: #2E5BBE; }

.doc-compare-card ul{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-compare-card li{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #463C5C;
    font-size: 14.5px;
}

.doc-compare-card.before li i{ color: #D11A6B; }
.doc-compare-card.after li i{ color: #2BA66B; }

/* How it works steps */
.doc-steps{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.doc-step{
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    padding: 24px 20px;
    background: #FBF9FE;
    position: relative;
}

.doc-step-num{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-step strong{
    display: block;
    color: #1A1332;
    font-size: 16px;
    margin-top: 14px;
}

.doc-step p{
    color: #6B6280;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}

/* Innovations */
.doc-innov{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.doc-innov-card{
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    padding: 22px;
    background: #fff;
}

.doc-innov-card i{
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(236,2,163,0.12), rgba(131,28,248,0.12));
    color: #8B0EF0;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-innov-card strong{
    display: block;
    color: #1A1332;
    font-size: 16px;
    margin-top: 14px;
}

.doc-innov-card p{
    color: #6B6280;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}

@media (max-width: 860px){
    .doc-compare,
    .doc-steps,
    .doc-innov{ grid-template-columns: 1fr; }
}

/* ===== Section 4 components ===== */

/* TAM / SAM / SOM */
.doc-market{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.doc-market-card{
    border-radius: 16px;
    padding: 24px;
    color: #fff;
}

.doc-market-card.tam{ background: linear-gradient(150deg, #1A0B3B, #4A148C); }
.doc-market-card.sam{ background: linear-gradient(150deg, #6A12B0, #9C27B0); }
.doc-market-card.som{ background: linear-gradient(150deg, #C2185B, #EC02A3); }

.doc-market-label{
    display: block;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.75);
}

.doc-market-value{
    display: block;
    font-size: 30px;
    font-weight: 800;
    margin-top: 8px;
}

.doc-market-card p{
    color: rgba(255,255,255,0.85);
    font-size: 13.5px;
    line-height: 1.55;
    margin-top: 10px;
}

/* Opportunities / Threats (reuse compare cards) */
.doc-compare-card.opp{ background: #F1FAF4; border-color: #CDEBD8; }
.doc-compare-card.threat{ background: #FCF4F4; border-color: #F1D8D8; }

.doc-compare-card.opp .doc-compare-tag{ background: #D5F0DF; color: #1B7A45; }
.doc-compare-card.threat .doc-compare-tag{ background: #F8DADA; color: #C0392B; }

.doc-compare-card.opp li i{ color: #2BA66B; }
.doc-compare-card.threat li i{ color: #D9534F; }

/* Client segmentation bars */
.doc-segments{
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.doc-segment-top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.doc-segment-top span{
    color: #463C5C;
    font-size: 14.5px;
    font-weight: 500;
}

.doc-segment-top strong{
    color: #8B0EF0;
    font-weight: 700;
}

.doc-segment-track{
    height: 12px;
    background: #EFE7F8;
    border-radius: 100px;
    overflow: hidden;
}

.doc-segment-track span{
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #EC02A3, #831CF8);
    border-radius: 100px;
}

/* Personas */
.doc-personas{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}

.doc-persona{
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    padding: 22px;
    background: #FBF9FE;
}

.doc-persona-head{
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid #ECE4F6;
}

.doc-persona-av{
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-persona-head strong{
    display: block;
    color: #1A1332;
    font-size: 16.5px;
}

.doc-persona-head span{
    display: block;
    color: #6B6280;
    font-size: 13.5px;
    margin-top: 2px;
}

.doc-persona-row{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #463C5C;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 10px;
}

.doc-persona-row i{
    color: #8B0EF0;
    margin-top: 3px;
}

@media (max-width: 860px){
    .doc-market{ grid-template-columns: 1fr; }
    .doc-personas{ grid-template-columns: 1fr; }
}

/* ===== Section 5 components ===== */

/* Comparison table */
.doc-table-wrap{
    overflow-x: auto;
    margin-top: 14px;
}

.doc-vs{ margin-top: 0; min-width: 560px; }

.doc-vs th, .doc-vs td{ text-align: center; }
.doc-vs th:first-child, .doc-vs td:first-child{ text-align: left; }

.doc-vs th.is-us{
    background: #1A0B3B;
}

.doc-vs td.is-us{
    background: #F6F0FD;
    border-left: 2px solid #B14BFF;
    border-right: 2px solid #B14BFF;
    font-weight: 600;
}

.doc-vs tbody tr:last-child td.is-us{
    border-bottom: 2px solid #B14BFF;
}

.doc-vs i.ok{ color: #2BA66B; }
.doc-vs i.no{ color: #D9534F; }
.doc-vs i.mid{ color: #D7A521; }

/* Positioning map */
.doc-map{
    position: relative;
    margin-top: 18px;
    height: 320px;
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(131,28,248,0.04), rgba(236,2,163,0.04));
}

.doc-map-line-h,
.doc-map-line-v{
    position: absolute;
    background: #E3D8F2;
}

.doc-map-line-h{ left: 8%; right: 8%; top: 50%; height: 1px; }
.doc-map-line-v{ top: 8%; bottom: 8%; left: 50%; width: 1px; }

.doc-map-axis-x,
.doc-map-axis-y{
    position: absolute;
    color: #9A90AE;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-map-axis-x{ right: 14px; bottom: 10px; }
.doc-map-axis-y{ left: 10px; top: 10px; }

.doc-map-dot{
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 5px rgba(139,14,240,0.15);
}

.doc-map-dot.alt{
    background: #B9AECB;
    box-shadow: 0 0 0 4px rgba(185,174,203,0.18);
}

.doc-map-dot::after{
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: #1A1332;
}

.doc-map-dot.alt::after{ color: #6B6280; font-weight: 500; }

@media (max-width: 520px){
    .doc-map{ height: 280px; }
}

/* ===== Section 6 components: pricing plans ===== */

.doc-plans{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
    align-items: start;
}

.doc-plan{
    position: relative;
    border: 1px solid #ECE4F6;
    border-radius: 16px;
    padding: 24px;
    background: #fff;
}

.doc-plan.featured{
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #EC02A3, #831CF8) border-box;
    box-shadow: 0 14px 36px rgba(131, 28, 248, 0.12);
}

.doc-plan-badge{
    position: absolute;
    top: -12px;
    right: 18px;
    background: linear-gradient(98deg, #EC02A3, #831CF8);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 100px;
}

.doc-plan-name{
    display: block;
    color: #6B6280;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-plan-price{
    display: block;
    color: #1A1332;
    font-size: 30px;
    font-weight: 800;
    margin-top: 8px;
}

.doc-plan-price small{
    font-size: 14px;
    font-weight: 500;
    color: #9A90AE;
}

.doc-plan ul{
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-plan li{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #463C5C;
    font-size: 14px;
}

.doc-plan li i{ color: #8B0EF0; font-size: 13px; }

@media (max-width: 860px){
    .doc-plans{ grid-template-columns: 1fr; }
}

/* ===== Sections 8–14 components ===== */

/* Brand palette */
.doc-palette{
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.doc-swatch{
    width: 120px;
    height: 90px;
    border-radius: 14px;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.doc-swatch span{
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.doc-swatch.light span{
    background: #fff;
    color: #6B6280;
}

/* Acquisition funnel */
.doc-funnel{
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.doc-funnel-row{
    width: var(--w);
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(98deg, #EC02A3, #831CF8);
}

.doc-funnel-row span{ font-size: 14.5px; font-weight: 600; }
.doc-funnel-row strong{ font-size: 14.5px; opacity: .95; }
.doc-funnel-row:nth-child(2){ opacity: .92; }
.doc-funnel-row:nth-child(3){ opacity: .84; }
.doc-funnel-row:nth-child(4){ opacity: .76; }
.doc-funnel-row:nth-child(5){ opacity: .68; }

/* Org chart */
.doc-org{
    margin-top: 18px;
    text-align: center;
}

.doc-org-top{
    display: inline-block;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    border-radius: 14px;
    padding: 16px 30px;
    position: relative;
}

.doc-org-top strong{ display: block; font-size: 16px; }
.doc-org-top span{ display: block; font-size: 13px; opacity: .9; }

.doc-org-row{
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
    position: relative;
    flex-wrap: wrap;
}

.doc-org-row::before{
    content: "";
    position: absolute;
    top: -22px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: #DDD0EF;
}

.doc-org-box{
    background: #FBF9FE;
    border: 1px solid #ECE4F6;
    border-radius: 14px;
    padding: 16px 22px;
    min-width: 150px;
    position: relative;
}

.doc-org-box::before{
    content: "";
    position: absolute;
    top: -22px;
    left: 50%;
    width: 1px;
    height: 22px;
    background: #DDD0EF;
}

.doc-org-box strong{ display: block; color: #1A1332; font-size: 15px; }
.doc-org-box span{ display: block; color: #6B6280; font-size: 12.5px; margin-top: 2px; }

/* Skill tags */
.doc-tags{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.doc-tags span{
    background: #F1E9FB;
    color: #6A12B0;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
}

/* SWOT 2x2 */
.doc-swot{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 6px;
}

.doc-swot-card{
    border-radius: 16px;
    padding: 22px;
    border: 1px solid;
}

.doc-swot-card.s{ background: #F1FAF4; border-color: #CDEBD8; }
.doc-swot-card.w{ background: #FFF7EC; border-color: #F3E2C2; }
.doc-swot-card.o{ background: #F0F5FF; border-color: #D2E1FB; }
.doc-swot-card.t{ background: #FCF4F4; border-color: #F1D8D8; }

.doc-swot-card h4{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1A1332;
    margin-bottom: 12px;
}

.doc-swot-card.s h4 i{ color: #2BA66B; }
.doc-swot-card.w h4 i{ color: #D7A521; }
.doc-swot-card.o h4 i{ color: #2E5BBE; }
.doc-swot-card.t h4 i{ color: #D9534F; }

.doc-swot-card ul{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-swot-card li{
    position: relative;
    padding-left: 16px;
    color: #463C5C;
    font-size: 14px;
}

.doc-swot-card li::before{
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .4;
}

/* Risk severity badges */
.doc-risks td:nth-child(3){ text-align: center; }

.sev{
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}

.sev.high{ background: #FBE0E0; color: #C0392B; }
.sev.med{ background: #FBF0D8; color: #B8860B; }
.sev.low{ background: #DEF3E6; color: #1B7A45; }

@media (max-width: 860px){
    .doc-swot{ grid-template-columns: 1fr; }
    .doc-org-row{ flex-direction: column; align-items: center; }
    .doc-org-row::before{ display: none; }
    .doc-org-box::before{ display: none; }
}

/* ===== Loader de génération (business plan IA) ===== */

.bp-loader{
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.bp-loader-card{
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid #E7DEF5;
    border-radius: 22px;
    padding: 40px 34px 32px;
    text-align: center;
    box-shadow: 0 24px 60px -28px rgba(60, 16, 120, .45);
}


/* Halo lumineux animé en fond */
.bp-loader-glow{
    position: absolute;
    top: -60px; left: 50%;
    width: 260px; height: 260px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(131,28,248,.18), rgba(236,2,163,0) 70%);
    filter: blur(6px);
    animation: bp-pulse 2.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bp-pulse{
    0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.12); }
}

.bp-loader-icon{
    position: relative;
    width: 76px; height: 76px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #fff;
    font-size: 30px;
    background: linear-gradient(135deg, #831CF8, #EC02A3);
    box-shadow: 0 12px 26px -8px rgba(131,28,248,.6);
    animation: bp-float 3s ease-in-out infinite;
}

@keyframes bp-float{
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.bp-loader-badge{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #8B0EF0;
    background: #F4ECFE;
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 14px;
}

.bp-loader-title{
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 700;
    color: #1A1332;
}

.bp-loader-status{
    margin: 0 0 26px;
    min-height: 22px;
    font-size: 14.5px;
    color: #6B6383;
    transition: opacity .2s ease;
}

.bp-loader-track{
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #EEE7F8;
    overflow: hidden;
}

.bp-loader-bar{
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #831CF8, #EC02A3);
    transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* Reflet qui balaie la barre */
.bp-loader-bar::after{
    content: "";
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 90px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    animation: bp-shimmer 1.4s linear infinite;
}

@keyframes bp-shimmer{
    0%   { transform: translateX(-90px); }
    100% { transform: translateX(460px); }
}

.bp-loader-meta{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    color: #8A82A0;
}

.bp-loader-pct{
    font-weight: 700;
    color: #8B0EF0;
    font-variant-numeric: tabular-nums;
}

.bp-loader-hint{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 0;
    font-size: 12.5px;
    color: #A199B5;
}

@media (max-width: 480px){
    .bp-loader-card{ padding: 32px 22px 26px; border-radius: 18px; }
    .bp-loader-title{ font-size: 19px; }
}

/* ===== Présentation de projet (pitch deck / slides) ===== */

.deck{
    min-height: calc(100vh - 58px);
    display: flex;
    flex-direction: column;
    background: radial-gradient(120% 120% at 50% 0%, #2A1259 0%, #1A0B3B 55%, #120726 100%);
    outline: none;
}

.deck-stage{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    overflow-y: auto;
}

.slide{
    display: none;
    width: 100%;
    max-width: 940px;
}

.slide.is-active{
    display: block;
    animation: slide-in .35s cubic-bezier(.2,.7,.3,1);
}

@keyframes slide-in{
    from { opacity: 0; transform: translateY(14px) scale(.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.slide-inner{
    background: #fff;
    border-radius: 22px;
    padding: 52px 60px;
    min-height: min(72vh, 620px);
    box-shadow: 0 40px 90px -40px rgba(0,0,0,.7);
    display: flex;
    flex-direction: column;
}

/* Bandeau dégradé en haut de chaque carte */
.slide-inner{ position: relative; overflow: hidden; }
.slide-inner::before{
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #831CF8, #EC02A3);
}

.slide-kicker{
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8B0EF0;
    margin-bottom: 14px;
}

.slide-title{
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    color: #1A1332;
    margin: 0 0 10px;
}

.slide-lead{
    font-size: 17px;
    color: #5C5372;
    margin: 0 0 26px;
    max-width: 70ch;
}

.slide-body{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

/* Diapositive de couverture */
.slide-cover .slide-inner{
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-tag{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8B0EF0;
    background: #F4ECFE;
    border-radius: 999px;
    padding: 7px 16px;
    margin-bottom: 22px;
}

.slide-cover-title{
    font-size: 52px;
    line-height: 1.08;
    font-weight: 800;
    color: #1A1332;
    margin: 0 0 16px;
    background: linear-gradient(120deg, #831CF8, #EC02A3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-cover-lead{
    font-size: 20px;
    color: #5C5372;
    max-width: 60ch;
    margin: 0 auto 18px;
}

.slide-cover .slide-body{ flex: none; }

.slide-cover-by{
    margin-top: 26px;
    font-size: 14px;
    color: #9A90AE;
}

/* Barre de navigation */
.deck-bar{
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 26px;
    background: rgba(18, 7, 38, .85);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.08);
}

.deck-btn{
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

.deck-btn:hover{ background: linear-gradient(135deg, #831CF8, #EC02A3); transform: translateY(-1px); }

.deck-progress{
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: hidden;
}

.deck-progress-fill{
    display: block;
    height: 100%;
    width: 7%;
    border-radius: 999px;
    background: linear-gradient(90deg, #831CF8, #EC02A3);
    transition: width .3s ease;
}

.deck-counter{
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    text-align: center;
}

@media (max-width: 600px){
    .slide-inner{ padding: 34px 24px; min-height: min(76vh, 540px); border-radius: 18px; }
    .slide-title{ font-size: 26px; }
    .slide-cover-title{ font-size: 36px; }
    .slide-lead, .slide-cover-lead{ font-size: 16px; }
}

/* ============================================================
   Sommaire imprimé (page dédiée du PDF) — masqué à l'écran
   ============================================================ */
.doc-print-toc{ display: none; }

.doc-print-toc{
    padding: 8mm 4mm;
}
.doc-print-toc-head{
    padding-bottom: 22px;
    margin-bottom: 30px;
    border-bottom: 2px solid #F0EBF7;
}
.doc-print-toc-eyebrow{
    display: block;
    color: #8B0EF0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.doc-print-toc-title{
    font-size: 40px;
    font-weight: 800;
    color: #1A1332;
    letter-spacing: -0.5px;
    margin-top: 8px;
}
.doc-print-toc-list{
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.doc-print-toc-item{
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 15px 4px;
    border-bottom: 1px solid #F2EDF9;
}
.doc-print-toc-num{
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.doc-print-toc-text{
    font-size: 17px;
    font-weight: 600;
    color: #2A2140;
}
