/* ============================================================
   MICROFINANCE IMUHIRA S.A — privacy.css
   Page Politique de Confidentialité — UI ULTRA PREMIUM
   ============================================================ */

:root {
    --primary: #1012A1;
    --primary-dark: #0B0D75;
    --primary-light: #E7E7FD;
    --accent: #D32A2C;
    --accent-light: #FEE5E5;
    --gold: #FFD166;
    --bg: #F8F9FC;
    --surface: #FFFFFF;
    --text: #111318;
    --text-secondary: #555B6B;
    --text-tertiary: #8A91A3;
    --border: #E1E4EC;
    --success: #16A34A;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(16, 18, 161, 0.14);
    --radius-lg: 20px;
    --gradient-primary: linear-gradient(135deg, #1012A1 0%, #0B0D75 60%, #1A1DB8 100%);
    --gradient-accent: linear-gradient(135deg, #D32A2C 0%, #B51F25 100%);
    --gradient-brand: linear-gradient(120deg, #1012A1 0%, #D32A2C 100%);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --page-padding: clamp(16px, 4vw, 48px);
}

/* ---------- HERO DE LA PAGE ---------- */
.page-hero {
    position: relative;
    background: var(--gradient-primary);
    color: #fff;
    padding: 72px 0 120px;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 85% 20%, rgba(211, 42, 44, 0.35), transparent 60%),
        radial-gradient(500px 300px at 10% 90%, rgba(255, 209, 102, 0.12), transparent 60%);
    pointer-events: none;
}
.page-hero-inner {
    position: relative;
    max-width: 900px;
}
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}
.breadcrumb a { color: rgba(255, 255, 255, 0.85); transition: var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: rgba(255, 255, 255, 0.5); }
.page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1.15;
    margin-bottom: 14px;
}
.page-hero .subtitle {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 720px;
    line-height: 1.7;
    margin-bottom: 28px;
}
.hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(8px);
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}
.meta-badge i { color: var(--gold); }
.meta-badge.accent { background: rgba(211, 42, 44, 0.35); border-color: rgba(255, 255, 255, 0.4); }
.hero-wave { display: flex; line-height: 0; margin-top: -1px; }
.hero-wave svg { width: 100%; height: 70px; }

/* ---------- LAYOUT : TOC + ARTICLE ---------- */
.policy-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 56px;
    padding-bottom: 80px;
}

/* ---------- TABLE DES MATIÈRES (sticky) ---------- */
.toc {
    position: sticky;
    top: 96px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.toc-head {
    background: var(--gradient-primary);
    color: #fff;
    padding: 16px 22px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toc-head i { color: var(--gold); }
.toc-list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 12px 10px;
}
.toc-list::-webkit-scrollbar { width: 5px; }
.toc-list::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 5px; }
.toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1.45;
}
.toc-link .toc-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.toc-link:hover { background: var(--bg); color: var(--primary); }
.toc-link.active { background: var(--gradient-primary); color: #fff; }
.toc-link.active .toc-num { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- ARTICLE ---------- */
.policy-article { max-width: 860px; }
.policy-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.policy-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: var(--transition);
}
.policy-section:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.policy-section:hover::before { opacity: 1; }
.policy-section:target { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.sec-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.sec-num {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(16, 18, 161, 0.35);
}
.sec-head h2 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.2px;
    line-height: 1.3;
}
.policy-body { color: var(--text-secondary); font-size: 15.5px; line-height: 1.8; }
.policy-body p { margin-bottom: 14px; }
.policy-body strong { color: var(--text); }
.subsec-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.subsec-title i { color: var(--accent); font-size: 14px; }

/* ---------- LISTES PREMIUM ---------- */
.policy-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 12px 0 16px;
}
.policy-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 15px;
    transition: var(--transition);
}
.policy-list li:hover { border-color: var(--primary-light); background: var(--primary-light); transform: translateX(4px); }
.policy-list li > i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 12px;
}
.policy-list.check li > i { color: var(--success); }

/* ---------- APPELS (callouts) ---------- */
.callout {
    display: flex;
    gap: 16px;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin: 18px 0;
    font-size: 14.5px;
    line-height: 1.7;
    align-items: flex-start;
}
.callout i { font-size: 22px; margin-top: 2px; flex-shrink: 0; }
.callout-info { background: var(--primary-light); border: 1px solid #C9C9FB; color: #2A2C7A; }
.callout-info i { color: var(--primary); }
.callout-danger { background: var(--accent-light); border: 1px solid #F5C2C3; color: #7A1E20; }
.callout-danger i { color: var(--accent); }
.callout-success { background: #DCFCE7; border: 1px solid #BBE7C8; color: #14532D; }
.callout-success i { color: var(--success); }
.callout strong { display: block; margin-bottom: 4px; font-size: 15px; }

/* ---------- BANDEAU FINAL ---------- */
.policy-end {
    text-align: center;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin: 32px 0 0;
    box-shadow: var(--shadow-lg);
}
.policy-end img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 8px;
    margin: 0 auto 16px;
}
.policy-end h3 { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 6px; }
.policy-end p { color: rgba(255, 255, 255, 0.8); font-size: 14.5px; }
.policy-end .end-badge {
    display: inline-block;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ---------- ACTIONS DE PAGE ---------- */
.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}
.action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 18, 161, 0.3); }

/* ---------- BOUTON RETOUR EN HAUT ---------- */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(16, 18, 161, 0.45);
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    pointer-events: none;
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); }

/* ---------- TOAST ---------- */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 12px 30px rgba(16, 18, 161, 0.4);
    z-index: 200;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
    .policy-layout { grid-template-columns: 1fr; gap: 28px; }
    .toc { position: static; }
    .toc-list { max-height: 320px; }
    .policy-article { max-width: none; }
}
@media (max-width: 640px) {
    :root { --page-padding: 16px; }
    .page-hero { padding: 52px 0 90px; }
    .policy-section { padding: 24px 20px; }
    .sec-head { gap: 12px; }
    .sec-num { width: 40px; height: 40px; font-size: 15px; }
    .policy-body { font-size: 14.5px; }
    .hero-meta { gap: 8px; }
    .meta-badge { font-size: 12px; padding: 7px 14px; }
    .page-actions { gap: 8px; }
    .action-btn { padding: 9px 16px; font-size: 13px; }
    .back-to-top { width: 44px; height: 44px; bottom: 20px; right: 20px; }
}

/* ---------- IMPRESSION ---------- */
@media print {
    .topbar, .header, .page-hero, .footer, .page-actions,
    .back-to-top, .toast, .toc, .nav-toggle, .modal { display: none !important; }
    .policy-layout { display: block; padding: 0; }
    .policy-section { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    body { background: #fff; }
}
