/* ============================================================
   DZCounter - Centre d'aide
   ============================================================ */

.help-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

/* HERO */

.help-hero {
    padding: 70px 0 55px;
    background: linear-gradient(180deg, #f3f8fd 0%, #ffffff 100%);
    text-align: center;
}

.help-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #1769aa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.help-hero h1 {
    margin: 0 0 16px;
    color: #102a43;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.15;
}

.help-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #607086;
    font-size: 16px;
    line-height: 1.8;
}

/* NAVIGATION */

.help-navigation {
    padding: 0 0 65px;
    background: #fff;
}

.help-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.help-nav-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 20px;
    border: 1px solid #dbe4ee;
    border-radius: 13px;
    background: #fff;
    color: #243b53;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15,39,66,.04);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.help-nav-card:hover {
    transform: translateY(-2px);
    border-color: #9fc2df;
    box-shadow: 0 12px 28px rgba(15,39,66,.08);
}

.help-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: #edf6fc;
    font-size: 23px;
}

.help-nav-card div { min-width: 0; }

.help-nav-card strong {
    display: block;
    margin-bottom: 3px;
    color: #102a43;
    font-size: 15px;
}

.help-nav-card small {
    display: block;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}

/* SECTIONS */

.help-section {
    scroll-margin-top: 100px;
    padding: 75px 0;
    background: #fff;
}

.help-section-alt { background: #f5f8fc; }

.help-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    max-width: 820px;
    margin-bottom: 28px;
}

.help-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #1769aa;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.help-section-heading h2 {
    margin: 0 0 6px;
    color: #102a43;
    font-size: 30px;
}

.help-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* CONTENT */

.help-content-card {
    padding: 30px;
    border: 1px solid #dce5ee;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,39,66,.045);
}

.help-content-card h3 {
    margin: 28px 0 9px;
    color: #102a43;
    font-size: 19px;
}

.help-content-card h3:first-child { margin-top: 0; }

.help-content-card > p {
    margin: 0 0 14px;
    color: #5f6f82;
    font-size: 14px;
    line-height: 1.8;
}

.help-tip {
    margin-top: 24px;
    padding: 17px 19px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

.help-tip strong {
    display: block;
    margin-bottom: 5px;
    color: #1d4ed8;
    font-size: 13px;
}

.help-tip p {
    margin: 0;
    color: #49627c;
    font-size: 12px;
    line-height: 1.7;
}

/* PLANS & STAT CARDS */

.help-plan-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 35px 0 15px;
}

.help-plan-heading h3 {
    margin: 0;
    color: #102a43;
    font-size: 18px;
}

.help-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
}

.help-plan-badge.free { background: #eef2f7; color: #475569; }
.help-plan-badge.pro { background: #dbeafe; color: #1d4ed8; }
.help-plan-badge.premium { background: #ede9fe; color: #6d28d9; }

.help-stat-list {
    display: grid;
    gap: 14px;
}

.help-stat-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 17px;
    padding: 22px;
    border: 1px solid #dce5ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15,39,66,.035);
}

.help-stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border-radius: 10px;
    background: #edf4f9;
    color: #1769aa;
    font-size: 14px;
    font-weight: 800;
}

.help-stat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.help-stat-title h3 {
    margin: 0;
    color: #102a43;
    font-size: 16px;
}

.help-stat-card p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

.help-plan-note {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #dce5ee;
    border-radius: 12px;
    background: #f8fafc;
}

.help-plan-note strong {
    display: block;
    margin-bottom: 5px;
    color: #102a43;
    font-size: 14px;
}

.help-plan-note p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

/* ============================================================
   DEMOS VISUELLES
   ============================================================ */

.help-demo {
    margin: 18px 0 12px;
    padding: 18px;
    border: 1px solid #dbe5ef;
    border-radius: 13px;
    background: #f9fbfd;
}

.demo-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 15px;
}

.demo-heading strong {
    color: #102a43;
    font-size: 13px;
}

.demo-heading span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf4fa;
    color: #536b82;
    font-size: 9px;
}

/* Accounts */

.demo-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.demo-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dfe7ef;
    border-radius: 10px;
    background: #fff;
}

.demo-account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #eef6fc;
    font-size: 18px;
}

.demo-account-card small {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 9px;
}

.demo-account-card strong {
    color: #102a43;
    font-size: 12px;
}

/* Transactions */

.demo-transaction-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #e6edf4;
}

.demo-transaction-row:last-child { border-bottom: 0; }

.demo-transaction-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
}

.demo-transaction-row.income .demo-transaction-dot { background: #dcfce7; color: #15803d; }
.demo-transaction-row.expense .demo-transaction-dot { background: #fee2e2; color: #dc2626; }
.demo-transaction-row.transfer .demo-transaction-dot { background: #dbeafe; color: #1d4ed8; }

.demo-transaction-copy strong {
    display: block;
    color: #102a43;
    font-size: 11px;
}

.demo-transaction-copy small {
    color: #8190a0;
    font-size: 9px;
}

.demo-transaction-row b {
    font-size: 10px;
    white-space: nowrap;
}

.demo-transaction-row.income b { color: #15803d; }
.demo-transaction-row.expense b { color: #dc2626; }
.demo-transaction-row.transfer b { color: #1d4ed8; }

/* Dashboard */

.demo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.demo-kpi {
    padding: 12px;
    border: 1px solid #dce5ee;
    border-radius: 9px;
    background: #fff;
}

.demo-kpi.income { border-top: 3px solid #16a34a; }
.demo-kpi.expense { border-top: 3px solid #ef4444; }
.demo-kpi.balance { border-top: 3px solid #2563eb; }

.demo-kpi small {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 8px;
}

.demo-kpi strong {
    color: #102a43;
    font-size: 10px;
}

.demo-panel {
    margin-top: 11px;
    padding: 13px;
    border: 1px solid #dce5ee;
    border-radius: 9px;
    background: #fff;
}

.demo-panel > strong {
    display: block;
    margin-bottom: 11px;
    color: #102a43;
    font-size: 9px;
}

.demo-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 78px;
    border-bottom: 1px solid #dbe5ef;
}

.demo-bars span {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #5aa5f4, #1769aa);
}

.demo-progress-row {
    display: grid;
    grid-template-columns: 85px 1fr;
    align-items: center;
    gap: 9px;
    margin-top: 8px;
}

.demo-progress-row span {
    color: #536b82;
    font-size: 8px;
}

.demo-progress-row i,
.demo-budget-row i {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf5;
}

.demo-progress-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #7c3aed;
}

/* Period comparison */

.demo-compare-grid {
    display: grid;
    grid-template-columns: 1fr 34px 1fr;
    align-items: center;
    gap: 10px;
}

.demo-period-card {
    padding: 14px;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    background: #fff;
}

.demo-period-card.current { border-color: #93c5fd; background: #f6faff; }

.demo-period-card small,
.demo-period-card span,
.demo-period-card em {
    display: block;
}

.demo-period-card small { color: #64748b; font-size: 9px; }
.demo-period-card strong { display: block; margin: 5px 0; color: #102a43; font-size: 14px; }
.demo-period-card span { color: #1769aa; font-size: 9px; }
.demo-period-card em { margin-top: 7px; color: #7b8794; font-size: 8px; font-style: normal; }

.demo-period-arrow {
    text-align: center;
    color: #1769aa;
    font-size: 20px;
}

.demo-variation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 11px;
}

.demo-variation-grid span {
    padding: 8px;
    border-radius: 8px;
    background: #eef6fc;
    color: #34536f;
    font-size: 8px;
    text-align: center;
}

/* Advanced analysis */

.demo-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.demo-metric-grid > div {
    padding: 12px;
    border: 1px solid #dce5ee;
    border-radius: 9px;
    background: #fff;
}

.demo-metric-grid small {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 8px;
}

.demo-metric-grid strong {
    color: #102a43;
    font-size: 11px;
}

.demo-insight {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 11px;
    padding: 11px;
    border-radius: 9px;
    background: #eff6ff;
}

.demo-insight p {
    margin: 0 !important;
    color: #49627c !important;
    font-size: 9px !important;
}

/* Accounts analysis */

.demo-account-analysis {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 20px;
}

.demo-donut {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(#1769aa 0 47%, #5aa5f4 47% 76%, #7c3aed 76% 93%, #f59e0b 93% 100%);
    position: relative;
}

.demo-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #f9fbfd;
}

.demo-legend {
    display: grid;
    gap: 9px;
}

.demo-legend span {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 8px;
    color: #536b82;
    font-size: 9px;
}

.demo-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.legend-one { background: #1769aa; }
.legend-two { background: #5aa5f4; }
.legend-three { background: #7c3aed; }
.legend-four { background: #f59e0b; }

/* Charts */

.demo-line-chart {
    position: relative;
    height: 150px;
    overflow: hidden;
    border-bottom: 1px solid #dbe5ef;
}

.demo-chart-grid {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 36px,
            #e5edf5 37px
        );
}

.demo-line-chart svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.demo-line-chart polyline {
    fill: none;
    stroke: #1769aa;
    stroke-width: 5;
    vector-effect: non-scaling-stroke;
}

.demo-chart-labels {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    margin-top: 7px;
}

.demo-chart-labels span {
    color: #7b8794;
    font-size: 7px;
    text-align: center;
}

/* Export */

.demo-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.demo-export-actions span {
    padding: 6px 10px;
    border-radius: 7px;
    background: #1769aa;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
}

.demo-table {
    overflow: hidden;
    border: 1px solid #dce5ee;
    border-radius: 9px;
    background: #fff;
}

.demo-table-row {
    display: grid;
    grid-template-columns: 80px 1fr 90px 100px;
    gap: 8px;
    padding: 9px 11px;
    border-top: 1px solid #edf1f5;
}

.demo-table-row:first-child { border-top: 0; }

.demo-table-row.head {
    background: #f1f5f9;
    color: #334e68;
    font-weight: 700;
}

.demo-table-row span {
    font-size: 8px;
}

/* Budgets */

.demo-budget-row {
    margin-bottom: 14px;
}

.demo-budget-row:last-child { margin-bottom: 0; }

.demo-budget-row > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.demo-budget-row strong {
    color: #102a43;
    font-size: 10px;
}

.demo-budget-row span {
    color: #64748b;
    font-size: 8px;
}

.demo-budget-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #1769aa;
}

.demo-budget-row.warning b { background: #f59e0b; }

/* Alerts */

.demo-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 9px;
    margin-bottom: 9px;
}

.demo-alert:last-child { margin-bottom: 0; }

.demo-alert > span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
}

.demo-alert.warning { background: #fff7ed; }
.demo-alert.warning > span { background: #ffedd5; color: #c2410c; }
.demo-alert.danger { background: #fef2f2; }
.demo-alert.danger > span { background: #fee2e2; color: #dc2626; }

.demo-alert strong {
    display: block;
    color: #102a43;
    font-size: 10px;
}

.demo-alert small {
    color: #64748b;
    font-size: 8px;
}

/* Forecast */

.demo-forecast-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.demo-forecast-summary > div {
    padding: 12px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #dce5ee;
}

.demo-forecast-summary small {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 8px;
}

.demo-forecast-summary strong {
    color: #102a43;
    font-size: 12px;
}

.demo-forecast-bars {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    height: 120px;
    margin-top: 15px;
    padding: 10px 15px 0;
    border-bottom: 1px solid #dbe5ef;
}

.demo-forecast-bars > span {
    position: relative;
    flex: 1;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, #93c5fd, #1769aa);
}

.demo-forecast-bars small {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
    color: #64748b;
    font-size: 7px;
    white-space: nowrap;
}

/* Habits */

.demo-habit {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid #e6edf4;
}

.demo-habit:last-child { border-bottom: 0; }

.demo-habit > span {
    font-size: 20px;
}

.demo-habit strong {
    display: block;
    color: #102a43;
    font-size: 10px;
}

.demo-habit small {
    color: #64748b;
    font-size: 8px;
}

/* Reports */

.demo-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e5edf5;
}

.demo-report-head small {
    display: block;
    color: #64748b;
    font-size: 8px;
}

.demo-report-head strong {
    display: block;
    margin-top: 3px;
    color: #102a43;
    font-size: 12px;
}

.demo-report-head > span {
    padding: 5px 9px;
    border-radius: 7px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 8px;
    font-weight: 800;
}

.demo-report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 11px;
}

.demo-report-grid > div {
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dce5ee;
}

.demo-report-grid small {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 7px;
}

.demo-report-grid strong {
    color: #102a43;
    font-size: 9px;
}

.demo-report-conclusion {
    margin-top: 11px;
    padding: 10px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-size: 9px;
    line-height: 1.6;
}

/* CONTACT */

.help-contact {
    padding: 70px 0;
    background: #f4f7fb;
}

.help-contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px;
    border-radius: 15px;
    background: #1769aa;
    color: #fff;
}

.help-contact-card span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    opacity: .8;
}

.help-contact-card h2 {
    margin: 7px 0 6px;
    color: #fff;
    font-size: 24px;
}

.help-contact-card p {
    margin: 0;
    color: rgba(255,255,255,.85);
    font-size: 13px;
}

.help-contact-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 9px 20px;
    border-radius: 9px;
    background: #fff;
    color: #1769aa;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.help-contact-button:hover { background: #f4f8fc; }

/* RTL */

html[dir="rtl"] .help-section-heading,
html[dir="rtl"] .help-content-card,
html[dir="rtl"] .help-stat-card,
html[dir="rtl"] .help-contact-card,
html[dir="rtl"] .help-demo {
    text-align: right;
}

html[dir="rtl"] .help-nav-card,
html[dir="rtl"] .help-plan-heading,
html[dir="rtl"] .demo-account-card,
html[dir="rtl"] .demo-transaction-row,
html[dir="rtl"] .demo-insight,
html[dir="rtl"] .demo-alert,
html[dir="rtl"] .demo-habit {
    direction: rtl;
}

html[dir="rtl"] .demo-period-arrow {
    transform: rotate(180deg);
}

html[dir="rtl"] .demo-table-row {
    direction: rtl;
}

html[dir="rtl"] .demo-forecast-bars small {
    direction: rtl;
}

/* RESPONSIVE */

@media (max-width: 760px) {

    .help-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .help-hero {
        padding: 52px 0 42px;
    }

    .help-hero h1 { font-size: 33px; }
    .help-hero p { font-size: 14px; }
    .help-navigation { padding-bottom: 50px; }
    .help-nav-grid { grid-template-columns: 1fr; }
    .help-section { padding: 55px 0; }
    .help-section-heading h2 { font-size: 26px; }
    .help-content-card { padding: 22px 17px; }

    .help-stat-card {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 18px 15px;
    }

    .help-stat-number {
        width: 38px;
        height: 38px;
    }

    .help-stat-title { align-items: flex-start; }

    .demo-account-grid,
    .demo-kpi-grid,
    .demo-metric-grid,
    .demo-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-account-analysis {
        grid-template-columns: 1fr;
    }

    .demo-compare-grid {
        grid-template-columns: 1fr;
    }

    .demo-period-arrow {
        transform: rotate(90deg);
    }

    html[dir="rtl"] .demo-period-arrow {
        transform: rotate(90deg);
    }

    .demo-variation-grid {
        grid-template-columns: 1fr;
    }

    .demo-table {
        overflow-x: auto;
    }

    .demo-table-row {
        min-width: 520px;
    }

    .help-contact-card {
        align-items: stretch;
        flex-direction: column;
        padding: 24px 20px;
    }

    .help-contact-button { width: 100%; }
}

@media (max-width: 520px) {

    .demo-account-grid,
    .demo-kpi-grid,
    .demo-metric-grid,
    .demo-report-grid,
    .demo-forecast-summary {
        grid-template-columns: 1fr;
    }

    .demo-transaction-row {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .demo-transaction-row > b {
        grid-column: 2;
        justify-self: start;
    }

    html[dir="rtl"] .demo-transaction-row > b {
        justify-self: end;
    }

    .demo-progress-row {
        grid-template-columns: 72px 1fr;
    }

    .demo-forecast-bars {
        gap: 10px;
    }
}

@media (max-width: 420px) {

    .help-section-heading { gap: 12px; }

    .help-section-number {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .help-stat-title {
        flex-direction: column;
        gap: 7px;
    }

    .help-plan-badge { align-self: flex-start; }

    .help-contact-card h2 { font-size: 21px; }
}


/* Montants : chiffres + devise restent toujours dans le bon ordre */
.help-money {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}
