/* ═══════════════════════════════════════════════════════════════
   PILLAR CORE v1.3.0 — Layout, navigation, hero, sections
   Split from pillar-pages.css (Phase 6d — 25/02/2026)
   v1.3.0 — Hero eyebrow + chips épurés, hero-meta supprimé (24/03/2026)
   v1.2.0 — Hiérarchie hero : lead accroche + text discret (23/03/2026)
   v1.1.0 — Spacing Option B : breadcrumb, hero, sections (23/03/2026)
   
   Chargé sur TOUTES les pages template-pillar-*
   ═══════════════════════════════════════════════════════════════ */

/* Variables spécifiques pillar — [AUDIT] O10 : --accent-cyan supprimé (= --accent-cyan) */
:root {
    --pillar-accent-purple: #7C3AED;
}

[data-theme="dark"] {
    --pillar-accent-purple: #7C3AED;
}

/* ═══════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Floating CTA — supprimé v4.2 (était display:none!important) */

/* ═══════════════════════════════════════════════════════════════
   BASE - GRID LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.pillar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-areas: "sidebar content";
    gap: 3rem;
    position: relative;
}

/* ── Fix écart header/hero : écraser GeneratePress ── */
.omnia-header-spacer + #page,
.omnia-header-spacer ~ #page {
    margin-top: 0;
    padding-top: 0;
}

#page .site-content,
.site-content,
.site-main,
.content-area,
.inside-article,
.entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body[class*="template-pillar"] .omnia-header-spacer {
    height: 52px;
}

.pillar-toc {
    grid-area: sidebar;
}

.pillar-content {
    grid-area: content;
    padding: 0 0 4rem 0;
    max-width: 900px;
}

@media (max-width: 1024px) {
    .pillar-container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "content";
        padding: 0 1rem;
        min-width: 0;
        overflow: hidden;
    }
    
    .pillar-toc {
        grid-area: none;
    }
    
    .pillar-content {
        padding: 0 0 3rem 0;
        min-width: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TABLE OF CONTENTS - LINEAR STYLE (ultra minimal)
   ═══════════════════════════════════════════════════════════════ */

.pillar-toc {
    position: sticky;
    top: 150px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.pillar-toc::-webkit-scrollbar {
    width: 3px;
}

.pillar-toc::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.p-toc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0;
    border-bottom: none;
}

.p-toc__header h4 {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-muted);
}

.p-toc__toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}

.p-toc__nav {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-left: 2px;
    counter-reset: toc-item;
}

.p-toc__link {
    display: block;
    padding: 0.5rem 0 0.5rem 1.25rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0;
    transition: color 0.2s ease;
    position: relative;
    line-height: 1.4;
    counter-increment: toc-item;
}

.p-toc__link::before {
    content: counter(toc-item, decimal-leading-zero);
    font-family: 'DM Mono', 'Fira Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    color: rgba(0,0,0,.12);
    flex-shrink: 0;
    background: transparent;
    position: static;
    width: auto;
    height: auto;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    border-radius: 0;
    transition: color 0.2s ease;
}

[data-theme="dark"] .p-toc__link::before {
    color: rgba(255,255,255,.12);
}

.p-toc__link:hover {
    color: var(--text-primary);
    background: transparent;
}

.p-toc__link.active {
    color: var(--accent-claude, #D97757);
    font-weight: 600;
    background: transparent;
    box-shadow: inset 2px 0 0 var(--accent-claude, #D97757);
}

.p-toc__link.active::before {
    color: rgba(217,119,87,.45);
    background: transparent;
    position: static;
    width: auto;
    height: auto;
    left: auto;
    top: auto;
    bottom: auto;
}

/* Mobile TOC */
@media (max-width: 1024px) {
    .pillar-toc {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        max-height: 100vh;
        z-index: 10001;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--border-light);
        background: var(--bg-primary);
        padding: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }
    
    .pillar-toc.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    }
    
    .p-toc__toggle {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON SOMMAIRE DANS LE HEADER (mobile/tablette)
   ═══════════════════════════════════════════════════════════════ */

.omnia-toc-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--slate-10);
    border: 1px solid var(--slate-30);
    border-radius: 10px;
    color: var(--accent-cyan, #475569);
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t-default);
    white-space: nowrap;
}

.omnia-toc-btn svg {
    flex-shrink: 0;
}

.omnia-toc-btn:hover {
    background: var(--slate-20);
    border-color: var(--slate-50);
}

[data-theme="dark"] .omnia-toc-btn {
    background: var(--slate-8);
    border-color: var(--slate-20);
    color: var(--accent-cyan, #94A3B8);
}

[data-theme="dark"] .omnia-toc-btn:hover {
    background: var(--slate-15);
    border-color: var(--slate-40);
}

@media (max-width: 1024px) {
    .omnia-toc-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .omnia-toc-btn-label {
        display: none;
    }
    .omnia-toc-btn {
        padding: 8px 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   v1.3.0 — Eyebrow + chips épurés, hero-meta supprimé
   v1.2.0 — Hiérarchie texte : lead accroche proéminente + text discret
   v1.1.0 — Spacing Option B
   ═══════════════════════════════════════════════════════════════ */

.pillar-hero {
    padding: 1.5rem 0 2.5rem;
    margin-bottom: 3.5rem;
    border-bottom: 0.5px solid var(--border-light);
}

/* ── Eyebrow (A) — label décoré avant le H1 ── */
.pillar-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-claude, #D97757);
    margin-bottom: 20px;
}
.pillar-hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent-claude, #D97757);
    flex-shrink: 0;
}

.pillar-hero h1 {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Lead — accroche principale */
.pillar-lead {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-left: 2px solid var(--accent-claude, #D97757);
    padding-left: 14px;
    opacity: 1;
}

/* Text — contexte secondaire */
.pillar-hero p {
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.72;
}

/* Exception : lead reste distinct si imbriqué dans p */
.pillar-hero p.pillar-lead {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 1;
}

.pillar-hero strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pillar-hero a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* Dark mode — border-left lead */
[data-theme="dark"] .pillar-lead {
    border-left-color: var(--accent-claude, #D97757);
    color: var(--text-primary);
}

/* ── Chips (A) — méta discrets sous le triple parcours ── */
.pillar-hero-chips {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.pillar-hero-chip {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}
.pillar-hero-chip::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-claude, #D97757);
    flex-shrink: 0;
}
[data-theme="dark"] .pillar-hero-chip { color: var(--text-muted); }

@media (max-width: 768px) {
    .pillar-hero-eyebrow { font-size: 10px; }
    .pillar-hero-chips { gap: 14px; margin-top: 20px; }
    .pillar-hero-chip { font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   v1.1.0 — margin-bottom augmenté (Option B)
   ═══════════════════════════════════════════════════════════════ */

.pillar-section {
    display: block;
    width: 100%;
    margin-bottom: 3.5rem;
    padding: 0 !important;
    scroll-margin-top: 120px;
}

.pillar-section h2 {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 2rem;
    color: var(--text-primary);
}

.pillar-section h3 {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-primary);
}

.pillar-section h4 {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.pillar-section p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 14px;
    color: var(--text-secondary);
}


/* ─── Sections importées depuis zones responsive/print/nav ─── */

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   v1.1.0 — Spacing Option B mobile
   v1.2.0 — Hiérarchie hero mobile
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pillar-breadcrumb {
        margin-top: 2rem;
    }

    .pillar-hero {
        padding: 1rem 0 2rem;
    }

    .pillar-lead {
        font-size: 15px;
        padding-left: 12px;
    }

    .pillar-hero p {
        font-size: 13px;
    }
    
    .pillar-section {
        margin-bottom: 2.5rem;
    }
    
    /* [PHASE 5] Supprimé .pillar-final-cta responsive */
    
    .p-obligations {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════ */

@media print {
    .pillar-toc,
    #reading-progress {
        display: none;
    }
    
    .pillar-container {
        grid-template-columns: 1fr;
        grid-template-areas: "content";
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIL D'ARIANE SEO
   v1.1.0 — margin-top augmenté (Option B)
   ═══════════════════════════════════════════════════════════════ */

.pillar-breadcrumb {
    padding: 0 0 1.25rem;
    margin-top: 3rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.pillar-breadcrumb a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

.pillar-breadcrumb a:hover {
    opacity: 0.7;
}

.pillar-breadcrumb-sep {
    margin: 0 0.5rem;
    opacity: 0.4;
}

.pillar-breadcrumb-current {
    color: var(--text-muted);
    opacity: 0.7;
}


/* ═══════════════════════════════════════════════════════════════
   BOUTON RETOUR EN HAUT
   ═══════════════════════════════════════════════════════════════ */

.pillar-back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: var(--t-default);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.pillar-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pillar-back-to-top:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 2px 16px var(--slate-20), 0 0 20px var(--slate-6);
}

[data-theme="dark"] .pillar-back-to-top:hover {
    box-shadow: 0 2px 16px var(--slate-15), 0 0 30px var(--slate-8);
}

@media (max-width: 1024px) {
    .pillar-back-to-top {
        bottom: 80px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RACCOURCIS CLAVIER — Hint dans le TOC
   ═══════════════════════════════════════════════════════════════ */

.p-toc__shortcuts {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.5;
    line-height: 1.6;
    border-top: 1px solid var(--border-light);
}

.p-toc__shortcuts kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    color: var(--text-secondary);
}

@media (max-width: 1024px) {
    .p-toc__shortcuts {
        display: none;
    }
}
