/**
 * Guide Digital Reader & Workbook CSS
 * Domtom Connect - Design Premium 2026
 */

:root {
    --bg-main: #020617;
    --bg-surface: #0b1329;
    --bg-card: #111e38;
    --bg-card-hover: #162646;
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.25);
    --accent-hover: #059669;
    --accent-gold: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.12);
    --sidebar-width: 340px;
    --header-height: 68px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 0 25px rgba(16, 185, 129, 0.2);
}

/* Light Theme Variables (Optionnel via toggle) */
body.light-theme {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #f1f5f9;
    --bg-card-hover: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-card: rgba(0, 0, 0, 0.12);
    --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Top Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    transition: width 0.2s ease;
}

/* Sidebar Styles */
.guide-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-brand img {
    height: 32px;
    filter: brightness(0) invert(1);
}

.sidebar-brand .brand-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-stats {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
}

.stats-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.stats-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 0.4s ease;
}

.sidebar-toc {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
}

.sidebar-toc::-webkit-scrollbar {
    width: 5px;
}

.sidebar-toc::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.toc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.toc-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.toc-item.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--text-primary);
    border-color: rgba(16, 185, 129, 0.3);
    font-weight: 700;
}

.toc-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.toc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.toc-item.active .toc-number {
    background: var(--accent);
    color: #020617;
}

.toc-item.completed .toc-number {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent);
}

.toc-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-check-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.toc-check-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    transform: scale(1.15);
}

.toc-item.completed .toc-check-btn {
    border-color: #10b981;
    background: #10b981;
    color: #020617;
}

.toc-item.completed .toc-check-btn:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-sidebar-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-sidebar-action:hover {
    background: var(--accent);
    color: #020617;
    border-color: var(--accent);
}

/* Main Reader Area */
.guide-main {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Top Navbar */
.reader-topbar {
    height: var(--header-height);
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-toggle-sidebar {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-sidebar:hover {
    background: var(--bg-card);
}

.breadcrumb-chapter {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-topbar-tool {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-topbar-tool:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Reader Content Container */
.reader-container {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 24px 100px;
    flex: 1;
}

/* Chapter Header */
.chapter-hero {
    margin-bottom: 44px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-subtle);
}

.chapter-badge-top {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.chapter-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chapter-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.chapter-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chapter-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article Body Typography */
.article-body {
    font-size: 1.08rem;
    line-height: 1.85;
    color: #e2e8f0;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body p.lead-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.8;
}

.article-body h3 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 40px 0 18px;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.article-body h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 28px 0 12px;
    color: #ffffff;
}

.article-body ul, .article-body ol {
    margin: 0 0 24px 24px;
    padding: 0;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body strong {
    color: #ffffff;
}

/* Special Cards & Elements inside text */
.quote-card {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-left: 4px solid var(--accent);
    padding: 24px 28px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 32px 0;
    position: relative;
}

.quote-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.quote-card p {
    font-size: 1.15rem;
    font-style: italic;
    color: #ffffff;
    margin-bottom: 0;
    line-height: 1.7;
}

.tip-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 32px 0;
}

.tip-card h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.highlight-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 32px 0;
}

.highlight-box h4 {
    margin-top: 0;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 5 Stories Box Styling */
.story-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 28px;
    margin: 28px 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.story-box:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.story-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.story-box h4 {
    margin-top: 0;
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 14px;
}

.story-moral {
    display: block;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    color: var(--accent);
}

/* VS Cards Container */
.vs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 32px 0;
}

.vs-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
}

.vs-card.bad {
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.05);
}

.vs-card.bad h4 {
    color: #ef4444;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-card.good {
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.05);
}

.vs-card.good h4 {
    color: var(--accent);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid 2 Features */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 32px 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 24px;
}

.feature-card .card-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 14px;
}

.feature-card h4 {
    margin-top: 0;
    color: #ffffff;
}

/* Sector Cards */
.sector-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    margin-bottom: 18px;
}

.sector-card h4 {
    margin-top: 0;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Table styling */
.tools-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95rem;
}

.tools-table th {
    background: rgba(255, 255, 255, 0.05);
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.tools-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

/* Roadmap Steps (Chapitre 17) */
.roadmap-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 32px 0;
}

.roadmap-step {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 24px;
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-body h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
}

/* Program Cards (Conclusion) */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.program-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.program-card.highlight {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.program-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent);
    color: #020617;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
}

.program-card h4 {
    margin-top: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.program-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 20px;
}

.btn-program {
    display: inline-block;
    text-align: center;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-program.primary {
    background: var(--accent);
    color: #020617;
}

.btn-program.primary:hover {
    background: var(--accent-hover);
}

.btn-program.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
}

.btn-program.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* =========================================================================
   INTERACTIVE WORKBOOK SECTION (Cahier d'exercices à la fin de chaque chapitre)
   ========================================================================= */

.workbook-section {
    margin-top: 60px;
    padding: 36px 32px;
    background: linear-gradient(180deg, #0f1c3a 0%, #0c1730 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
    position: relative;
}

.workbook-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 18px;
}

.workbook-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workbook-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.workbook-title-group h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.workbook-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auto-save-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 100px;
}

.auto-save-status.saving {
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
}

.workbook-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.workbook-input, .workbook-textarea, .workbook-select {
    width: 100%;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.98rem;
    line-height: 1.6;
    transition: all 0.2s ease;
}

.workbook-input:focus, .workbook-textarea:focus, .workbook-select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(2, 6, 23, 0.85);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.workbook-textarea {
    min-height: 110px;
    resize: vertical;
}

.workbook-select option {
    background: var(--bg-surface);
    color: #ffffff;
}

/* Section Sub-Headers inside Exercises */
.form-section-title {
    margin-top: 20px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Checkbox Groups inside Workbook */
.form-checkbox-group {
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.form-checkbox-group:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(2, 6, 23, 0.7);
}

.custom-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    user-select: none;
}

.workbook-checkbox {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.5;
}

.custom-checkbox-container input:checked ~ .checkbox-text {
    color: var(--accent);
    text-decoration: line-through;
    opacity: 0.85;
}

/* Calculator specific inside workbook */
.calculator-results-box {
    margin-top: 24px;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-md);
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    text-align: center;
}

.calc-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
    background: rgba(2, 6, 23, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-stat .calc-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 6px;
}

.calc-stat .calc-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Chapter Navigation Footer */
.chapter-nav-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.btn-nav-chapter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-nav-chapter:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-nav-chapter.primary {
    background: var(--accent);
    color: #020617;
    border-color: var(--accent);
}

.btn-nav-chapter.primary:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.btn-nav-chapter:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Modal Carnet de Bord */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Print Friendly Styles */
@media print {
    .guide-sidebar, .reader-topbar, .reading-progress-container, .chapter-nav-footer, .btn-topbar-tool {
        display: none !important;
    }
    .guide-main {
        margin-left: 0 !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .workbook-section {
        background: #f8fafc !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }
}

/* Responsive Rules */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 300px;
    }
}

@media (max-width: 850px) {
    .guide-sidebar {
        transform: translateX(-100%);
    }
    .guide-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    }
    .guide-main {
        margin-left: 0;
    }
    .btn-toggle-sidebar {
        display: flex;
    }
    .vs-container, .grid-2, .calculator-results-box {
        grid-template-columns: 1fr;
    }
    .chapter-title {
        font-size: 1.9rem;
    }
}

/* ==========================================================================
   COVER SHOWCASE & 3D BOOK PRESENTATION (FRONTISPICE)
   ========================================================================== */
.cover-hero-wrapper {
    padding: 3rem 1.5rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cover-card-container {
    background: linear-gradient(145deg, #0b1329 0%, #030712 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 3.5rem 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.15);
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 3.5rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cover-card-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.cover-3d-visual {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-3d-mockup {
    width: 290px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-18deg) rotateX(6deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    border-radius: 12px;
    box-shadow: -15px 20px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(16, 185, 129, 0.25);
    cursor: pointer;
}

.book-3d-mockup:hover {
    transform: rotateY(-8deg) rotateX(2deg) translateY(-8px);
    box-shadow: -20px 25px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(16, 185, 129, 0.4);
}

.book-3d-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.book-spine-effect {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%, rgba(0,0,0,0.4) 100%);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    pointer-events: none;
}

.cover-info-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 1;
}

.cover-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cover-main-title {
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.cover-lead-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cover-value-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0.5rem 0;
}

.value-pill-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.value-pill-item i {
    color: var(--accent);
}

.cover-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 0.5rem;
}

.btn-cover-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #020617;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cover-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.btn-cover-bundle {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-cover-bundle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Quick Jump Highlights on Cover */
.cover-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.cover-feature-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cover-feature-box:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.4);
}

.cover-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.cover-feature-box h4 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.cover-feature-box p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive Cover Styles */
@media (max-width: 850px) {
    .cover-card-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    .book-3d-mockup {
        width: 230px;
        height: 320px;
        transform: none;
    }
    .cover-features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Interactive Modular Sector Switcher (Chapter 12)
   ========================================================================== */
.sector-switcher-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0 24px 0;
}

.sector-switcher-header {
    text-align: center;
    margin-bottom: 20px;
}

.sector-switcher-header h3 {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sector-switcher-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sector-tabs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .sector-tabs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sector-tabs-grid {
        grid-template-columns: 1fr;
    }
}

.active-sector-indicator-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    gap: 16px;
}

.indicator-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.indicator-tag {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #10b981;
    color: #0b0f19;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.indicator-sector-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.btn-change-sector {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-change-sector:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}

.step-flow-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.sector-tab-btn {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.sector-tab-btn:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.sector-tab-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.sector-tab-btn.active::after {
    content: "ACTIF";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.sector-tab-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: #10b981;
}

.sector-tab-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.sector-tab-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Sector Panels in Reading Content */
.sector-article-panel {
    display: none;
    animation: fadeInScale 0.3s ease;
}

.sector-article-panel.active {
    display: block;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sector Form Filter Wrapper */
.sector-field-wrapper {
    transition: opacity 0.25s ease, max-height 0.3s ease;
}

.sector-field-wrapper.hidden-sector {
    display: none !important;
}

/* ==========================================================================
   Branding Masterclass (Chapter 9)
   ========================================================================== */
.branding-archetypes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.branding-archetype-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.branding-archetype-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.archetype-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.archetype-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.archetype-title {
    margin: 0;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
}

.archetype-examples {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 10px;
}

.archetype-prompt-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.4;
}

/* Color Palettes System */
.color-palettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.color-palette-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 18px;
}

.color-palette-card h5 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #ffffff;
}

.palette-swatches-row {
    display: flex;
    height: 46px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.swatch-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.swatch-60 { width: 60%; }
.swatch-30 { width: 30%; }
.swatch-10 { width: 10%; }

/* ==========================================================================
   Marketing Funnel & Closing Script (Chapter 15)
   ========================================================================== */
.funnel-phases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0;
}

.funnel-phase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
}

.phase-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.phase-tofu { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.phase-mofu { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.phase-bofu { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.script-box-container {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 28px 0;
}

.script-step {
    padding: 12px 16px;
    border-left: 3px solid #10b981;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 14px;
    border-radius: 0 8px 8px 0;
}

.script-step-title {
    font-weight: 700;
    color: #10b981;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.script-step-example {
    font-style: italic;
    color: #e2e8f0;
    font-size: 0.9rem;
}

/* ==========================================================================
   Interactive Logo Live Preview & Mockup Studio (Chapter 9)
   ========================================================================== */
.logo-studio-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.logo-dropzone-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: center;
}

.logo-uploader-zone {
    border: 2px dashed rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    background: rgba(16, 185, 129, 0.04);
    transition: all 0.25s ease;
    cursor: pointer;
}

.logo-uploader-zone:hover, .logo-uploader-zone.dragover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

.logo-uploader-zone i {
    font-size: 2.2rem;
    color: #10b981;
    margin-bottom: 10px;
}

.logo-mockups-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mockup-item-box {
    background: rgba(11, 15, 25, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.2s ease;
}

.mockup-item-box:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.mockup-avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}

.mockup-avatar-circle img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.mockup-card-surface {
    width: 84px;
    height: 50px;
    background: #0f172a;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
    padding: 4px;
}

.mockup-card-surface img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
}

.mockup-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ==========================================================================
   Channel Pros & Cons Comparison Matrix (Chapter 15)
   ========================================================================== */
/* ==========================================================================
   Social Media TOFU-MOFU-BOFU Funnel & Interactive Navigator (Chapter 16)
   ========================================================================== */
.social-funnel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 850px) {
    .social-funnel-grid {
        grid-template-columns: 1fr;
    }
}

.social-funnel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.social-funnel-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.funnel-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.pill-tofu { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.pill-mofu { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-bofu { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Interactive Matrix Navigator Bar (Replaces ugly wall of cards) */
.matrix-navigator-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 24px 0 18px 0;
}

@media (max-width: 900px) {
    .matrix-navigator-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .matrix-navigator-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.matrix-nav-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.matrix-nav-btn:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
}

.matrix-nav-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.matrix-nav-btn i {
    font-size: 1.3rem;
}

.matrix-nav-btn span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.matrix-card-panel {
    display: none;
    animation: fadeInScale 0.25s ease;
}

.matrix-card-panel.active {
    display: block;
}

.channel-deep-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 14px 0;
    transition: all 0.25s ease;
}

.channel-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.channel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-title-group h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.15rem;
}

.channel-icon {
    font-size: 1.4rem;
}

.channel-icon.ig { color: #E1306C; }
.channel-icon.tt { color: #00F2FE; }
.channel-icon.yt { color: #FF0000; }
.channel-icon.wa { color: #25D366; }
.channel-icon.li { color: #0A66C2; }
.channel-icon.fb { color: #1877F2; }

.pros-cons-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}

.pros-box {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
}

.cons-box {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
}

.pros-title {
    color: #10b981;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cons-title {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.pros-cons-list {
    margin: 0;
    padding-left: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.channel-verdict-bar {
    background: rgba(15, 23, 42, 0.7);
    border-left: 3px solid #10b981;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-top: 12px;
}

/* ==========================================================================
   Color Psychology Guide (Chapter 10)
   ========================================================================== */
.color-psychology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.color-swatch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-swatch-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.color-swatch-info h5 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: #ffffff;
}

.color-swatch-info p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ==========================================================================
   Three Bank Accounts System (Chapter 11)
   ========================================================================== */
.accounts-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0;
}

.account-flow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
}

.account-percent-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.acc-op .account-percent-badge { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.acc-tax .account-percent-badge { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.acc-pay .account-percent-badge { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* ==========================================================================
   Channel Strategy Switcher & Panels (Chapter 16)
   ========================================================================== */
.channel-switcher-banner {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 28px 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.channel-switcher-header {
    text-align: center;
    margin-bottom: 20px;
}

.channel-switcher-header h3 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.channel-switcher-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.channel-strategy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .channel-strategy-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .channel-strategy-grid {
        grid-template-columns: 1fr;
    }
}

.channel-strategy-btn {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.channel-strategy-btn:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.channel-strategy-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.channel-strategy-btn.active::after {
    content: "ACTIF";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.channel-tab-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: #10b981;
}

.channel-tab-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.channel-tab-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Channel Article Panels in Reading Mode */
.channel-article-panel {
    display: none;
    animation: fadeInScale 0.3s ease;
}

.channel-article-panel.active {
    display: block;
}

/* Channel Form Filter Wrapper */
.channel-field-wrapper {
    transition: opacity 0.25s ease, max-height 0.3s ease;
}

.channel-field-wrapper.hidden-sector {
    display: none !important;
}

@media (max-width: 850px) {
    .logo-dropzone-wrapper {
        grid-template-columns: 1fr;
    }
    .pros-cons-split {
        grid-template-columns: 1fr;
    }
    .accounts-flow-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TOFU - MOFU - BOFU Acquisition Funnel (Chapter 16)
   ========================================================================== */
.social-funnel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0 32px 0;
}

@media (max-width: 900px) {
    .social-funnel-grid {
        grid-template-columns: 1fr;
    }
}

.social-funnel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-funnel-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.funnel-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.funnel-badge-pill {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pill-tofu { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.pill-mofu { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-bofu { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.funnel-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.funnel-card-role {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.funnel-card-details {
    background: rgba(2, 6, 23, 0.4);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.funnel-card-details div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.funnel-detail-label {
    color: var(--text-muted);
    font-weight: 600;
}

.funnel-detail-val {
    color: #f1f5f9;
    font-weight: 700;
    text-align: right;
}

/* ==========================================================================
   Interactive 6-Network Navigator (Chapter 16)
   ========================================================================== */
.matrix-navigator-container {
    margin: 30px 0 24px 0;
}

.matrix-navigator-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    background: rgba(15, 23, 42, 0.6);
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.matrix-nav-btn {
    flex: 1 1 calc(16.66% - 8px);
    min-width: 130px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.matrix-nav-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.matrix-nav-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.18) 100%);
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.matrix-card-panel {
    display: none;
    animation: fadeInScale 0.25s ease;
}

.matrix-card-panel.active {
    display: block;
}

.network-spotlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.network-spotlight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.network-spotlight-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-spotlight-title i {
    font-size: 1.6rem;
}

.network-spotlight-title h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
}

.network-target-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    color: #e2e8f0;
}

.network-target-box strong {
    color: #10b981;
}

.network-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    .network-pros-cons-grid {
        grid-template-columns: 1fr;
    }
}

.network-golden-rule {
    background: rgba(15, 23, 42, 0.85);
    border-left: 4px solid #10b981;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #f1f5f9;
}

.network-golden-rule strong {
    color: #10b981;
}

/* Viral Hooks Table / Cards */
.viral-hooks-container {
    margin: 28px 0;
}

.viral-hook-card {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.viral-hook-category {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    flex-shrink: 0;
    text-transform: uppercase;
}

.viral-hook-text {
    font-size: 0.92rem;
    color: #ffffff;
    flex: 1;
    font-style: italic;
}

/* ==========================================================================
   Global Sector Pill in Topbar & Sector Selection Modal
   ========================================================================== */
.topbar-sector-pill {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    white-space: nowrap;
}

.topbar-sector-pill:hover {
    background: rgba(16, 185, 129, 0.24);
    border-color: #10b981;
    color: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.topbar-sector-pill .pill-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

@media (max-width: 850px) {
    .topbar-sector-pill {
        display: none;
    }
}

/* Sector Modal */
.sector-modal-card {
    max-width: 660px;
    width: 95%;
}

.sector-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sector-modal-btn {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.sector-modal-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateX(4px);
}

.sector-modal-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.16) 100%);
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.sector-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sector-modal-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.98rem;
    color: #ffffff;
}

.sector-modal-info p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Cross-Chapter Sector Adaptive Cards */
.sector-adaptive-container {
    margin: 22px 0;
}

.sector-adaptive-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.85) 100%);
    border: 1px solid var(--border-card);
    border-left: 4px solid #10b981;
    border-radius: var(--radius-md);
    padding: 20px;
    display: none;
    animation: fadeInScale 0.25s ease;
}

.sector-adaptive-card.active {
    display: block;
}

.sector-adaptive-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sector-adaptive-card h4 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sector-adaptive-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

/* Adaptive Offers 3-tier Grid */
.adaptive-offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 800px) {
    .adaptive-offers-grid {
        grid-template-columns: 1fr;
    }
}

.adaptive-offer-col {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.adaptive-offer-col:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.adaptive-offer-col.highlight-tier {
    border-color: #10b981;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.adaptive-offer-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 8px;
}

.badge-tripwire { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-core { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-vip { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.adaptive-offer-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.adaptive-offer-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 12px;
}

.adaptive-offer-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 12px;
}

.adaptive-offer-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.adaptive-offer-bullets li {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.adaptive-offer-bullets li i {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 3px;
}

/* Adaptive Minimalist Tools Grid (Ch 14) */
.adaptive-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.adaptive-tool-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.adaptive-tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.adaptive-tool-meta h5 {
    margin: 0 0 4px 0;
    font-size: 0.92rem;
    color: #ffffff;
}

.adaptive-tool-meta p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.adaptive-tool-cost {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Social Media Masterclass 2026 Pillars (Ch 16) */
.social-masterclass-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 28px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.social-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.social-pillar-item {
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-pillar-item:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-3px);
}

.social-pillar-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.social-pillar-item h4 {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0 0 8px 0;
}

.social-pillar-item p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

.algorithm-alert-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 20px;
    margin: 20px 0;
    color: #fca5a5;
    font-size: 0.92rem;
    line-height: 1.6;
}

.algorithm-truth-box {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 20px;
    margin: 20px 0;
    color: #6ee7b7;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* 6-Networks Interactive Matrix Container & Pill Selector Bar */
.matrix-6-networks-container {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.matrix-networks-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 100%;
}

@media (max-width: 900px) {
    .matrix-networks-nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 550px) {
    .matrix-networks-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

.matrix-nav-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    width: 100%;
}

.matrix-nav-btn i {
    font-size: 1.35rem;
}

.matrix-nav-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(16, 185, 129, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
}

.matrix-nav-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.16) 100%);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.matrix-card-panel {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.matrix-card-panel.active {
    display: block;
    animation: fadeInScale 0.25s ease;
}

.matrix-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.network-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.network-icon-box.ig { background: rgba(225, 48, 108, 0.18); color: #e1306c; }
.network-icon-box.tt { background: rgba(0, 242, 234, 0.18); color: #00f2fe; }
.network-icon-box.wa { background: rgba(37, 211, 102, 0.18); color: #25d366; }
.network-icon-box.yt { background: rgba(255, 0, 0, 0.18); color: #ff0000; }
.network-icon-box.li { background: rgba(10, 102, 194, 0.18); color: #0a66c2; }
.network-icon-box.fb { background: rgba(24, 119, 242, 0.18); color: #1877f2; }

.matrix-card-header h4 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    color: #ffffff;
}

.network-target-badge {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-block;
}

.network-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 700px) {
    .network-details-grid {
        grid-template-columns: 1fr;
    }
}

.detail-block h5 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-block ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.55;
}

.detail-block ul li {
    margin-bottom: 6px;
}

.network-domtom-rule {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #6ee7b7;
    line-height: 1.5;
}

/* ==========================================================================
   Chapter Navigation Action Row & Validation Toggle
   ========================================================================== */
.chapter-nav-actions-row {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    width: 100%;
}

.btn-chapter-completed-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-chapter-completed-toggle:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    transform: translateY(-1px);
}

.btn-chapter-completed-toggle.is-completed {
    background: rgba(16, 185, 129, 0.18);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.btn-chapter-completed-toggle.is-completed:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

.chapter-nav-buttons-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

@media (max-width: 650px) {
    .chapter-nav-buttons-row {
        flex-direction: column-reverse;
        gap: 12px;
    }
    .chapter-nav-buttons-row .btn-nav-chapter {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Topbar Sector Pill Unselected State
   ========================================================================== */
.topbar-sector-pill.unselected {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
}

.topbar-sector-pill.unselected .pill-dot {
    background: var(--text-muted);
    box-shadow: none;
}

.topbar-sector-pill.unselected:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.topbar-sector-pill.unselected:hover .pill-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* ==========================================================================
   Chapter 5 : Decision Grid & Pathway Selection Cards
   ========================================================================== */
.pathway-decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.pathway-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.pathway-card:hover {
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.pathway-card.selected {
    border-color: #10b981;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.16) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.28);
}

.pathway-card.selected::before {
    content: "✓ Voie Validée";
    position: absolute;
    top: -11px;
    right: 18px;
    background: #10b981;
    color: #020617;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.pathway-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pathway-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.pathway-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
}

.pathway-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.12rem;
    color: #ffffff;
}

.pathway-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.pathway-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.pathway-metrics span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pathway-metrics span i {
    color: #10b981;
    font-size: 0.85rem;
    width: 14px;
}

.btn-choose-pathway {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-choose-pathway:hover,
.pathway-card:hover .btn-choose-pathway {
    background: #10b981;
    border-color: #10b981;
    color: #020617;
}

.pathway-card.selected .btn-choose-pathway {
    background: #10b981;
    border-color: #10b981;
    color: #020617;
    font-weight: 700;
}

.pathway-confirmation-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.12) 100%);
    border: 1px solid #10b981;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
    animation: fadeInScale 0.3s ease;
}

.confirmation-icon {
    font-size: 2rem;
    color: #10b981;
    flex-shrink: 0;
}

.confirmation-text h4 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 1.05rem;
}

.confirmation-text p {
    margin: 0;
    color: #a7f3d0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-reset-pathway {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-reset-pathway:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* ==========================================================================
   CLEAN MINIMALIST COVER VIEW
   ========================================================================== */
.clean-cover-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 2.5rem 1rem 3.5rem;
    text-align: center;
}

.clean-cover-wrapper {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    perspective: 1200px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.clean-cover-wrapper:hover {
    transform: translateY(-6px) scale(1.015);
}

.clean-cover-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.4s ease;
}

.clean-cover-wrapper:hover .clean-cover-image {
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 45px rgba(16, 185, 129, 0.35);
}

.clean-cover-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-clean-open-cover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #10b981;
    color: #020617;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 34px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-clean-open-cover:hover {
    background: #059669;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.5);
}

.clean-cover-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* ==========================================================================
   ENHANCED MOBILE PHONE EXPERIENCE (DOMTOM CONNECT 2026)
   ========================================================================== */

/* Mobile Sidebar Close Button */
.btn-sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-sidebar-close:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 890;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 850px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .app-container {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    .guide-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .btn-sidebar-close {
        display: flex;
    }
    .guide-sidebar {
        width: min(320px, 86vw) !important;
        z-index: 1000 !important;
    }
    .sidebar-toc .toc-title {
        white-space: normal !important;
        line-height: 1.35 !important;
        font-size: 0.88rem !important;
    }
    .sidebar-footer .btn-sidebar-action {
        font-size: 0.82rem !important;
        padding: 10px 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Topbar Mobile Cleanup: no text overlap */
    .reader-topbar {
        height: 54px !important;
        padding: 0 12px !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    .topbar-left {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        gap: 8px !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
    }
    .btn-toggle-sidebar {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }
    .breadcrumb-chapter {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 0.82rem !important;
        max-width: 100% !important;
        display: block !important;
    }
    .topbar-right {
        flex-shrink: 0 !important;
        gap: 6px !important;
        display: flex !important;
        align-items: center !important;
    }
    .btn-topbar-tool {
        padding: 8px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 0.88rem !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    .btn-topbar-tool .tool-label {
        display: none !important;
    }
    .topbar-sector-pill {
        display: none !important;
    }

    /* Container & Reader Body */
    .reader-container {
        padding: 16px 14px 90px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .chapter-article {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .chapter-hero {
        margin-bottom: 20px !important;
        padding-bottom: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .chapter-badge-top {
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
        margin-bottom: 10px !important;
    }
    .chapter-title {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        margin-bottom: 10px !important;
    }
    .chapter-subtitle {
        font-size: 0.92rem !important;
        line-height: 1.5 !important;
        margin-bottom: 12px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .chapter-meta-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        font-size: 0.76rem !important;
        width: 100% !important;
    }
    .chapter-meta-item {
        white-space: normal !important;
        word-break: break-word !important;
    }
    .article-body {
        font-size: 0.96rem !important;
        line-height: 1.65 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .article-body p {
        margin-bottom: 14px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .article-body h3 {
        font-size: 1.18rem !important;
        margin: 22px 0 10px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .quote-card {
        padding: 16px 14px !important;
        margin: 18px 0 !important;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .quote-card p {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .tip-card, .highlight-box {
        padding: 16px 14px !important;
        margin: 18px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 16px 0 !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .table-compare {
        min-width: 500px !important;
    }

    /* Chapter Footer: Fixed Stack on Phone */
    .chapter-nav-footer {
        flex-direction: column !important;
        gap: 14px !important;
        align-items: stretch !important;
        margin-top: 36px !important;
        padding-top: 20px !important;
    }
    .chapter-nav-actions-row {
        width: 100% !important;
    }
    .btn-chapter-completed-toggle {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    .chapter-nav-buttons-row {
        flex-direction: column-reverse !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .chapter-nav-buttons-row .btn-nav-chapter {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
    }

    /* Workbook on Phone */
    .workbook-section {
        padding: 20px 14px !important;
        margin-top: 36px !important;
        border-radius: 16px !important;
    }
    .workbook-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .workbook-title-group h3 {
        font-size: 1.15rem !important;
    }
    .workbook-input, .workbook-textarea, .workbook-select {
        font-size: 16px !important; /* Prevents auto zoom in iOS Safari */
        padding: 12px 14px !important;
    }

    /* Clean Cover Chapitre 0 on Mobile */
    .clean-cover-page {
        padding: 1.5rem 0.5rem 2rem !important;
        min-height: auto !important;
    }
    .clean-cover-wrapper {
        max-width: 300px !important;
    }
    .btn-clean-open-cover {
        width: 100% !important;
        max-width: 320px !important;
        padding: 14px 20px !important;
        font-size: 0.98rem !important;
    }

    /* Grids & Cards fallback to 1 column */
    .funnel-phases-grid,
    .accounts-flow-grid,
    .pros-cons-split,
    .vs-container,
    .grid-2,
    .logo-dropzone-wrapper,
    .logo-mockups-grid,
    .pathway-decision-grid,
    .color-psychology-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Modal Responsive */
    .modal-card {
        width: 95vw !important;
        max-height: 90vh !important;
        border-radius: 16px !important;
    }
    .modal-header {
        padding: 16px 18px !important;
    }
    .modal-header h3 {
        font-size: 1.1rem !important;
    }
    .modal-body {
        padding: 16px 18px !important;
    }
    .modal-footer {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 14px 18px !important;
    }
    .modal-footer button {
        width: 100% !important;
        justify-content: center !important;
    }
}
