/* ============================================================
 ÉTUDES ET BAROMÈTRES — portées de refacto (assets/styles/white-papers.css)
 ------------------------------------------------------------
 Même traitement que la page « À propos » : le design est conservé,
 seules les couleurs passent à la charte, en notation hexadécimale ET
 rgba — l orange legacy se cachait dans les deux.
 Chargée uniquement sur ces pages.
 ============================================================ */

/* ============================================================
   WHITE PAPERS — Hub & Article Styles
   Extends about.min.css variables & patterns
   ============================================================ */

/* ---- HUB PAGE ---- */

.wp-hub-hero {
    text-align: center;
    padding: 60px 0 40px;
}

.wp-hub-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.wp-hub-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.wp-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.wp-hub-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.wp-hub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 99, 0, 0.3);
    color: inherit;
    text-decoration: none;
}

.wp-hub-card-body {
    padding: 28px 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wp-hub-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(255, 99, 0, 0.1);
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    margin-bottom: 14px;
    width: fit-content;
}

.wp-hub-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 10px;
}

.wp-hub-card-excerpt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
}

.wp-hub-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.wp-hub-card-meta i {
    margin-right: 4px;
    color: var(--orange);
}

.wp-hub-card-arrow {
    margin-left: auto;
    color: var(--orange);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.wp-hub-card:hover .wp-hub-card-arrow {
    transform: translateX(4px);
}

/* ---- ARTICLE PAGE ---- */

.wp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.wp-back-link:hover {
    color: var(--orange);
}

/* Hero */
.wp-article-hero {
    position: relative;
    padding: 70px 0 50px;
    overflow: hidden;
    background: #000;
    color: #fff;
}

.wp-article-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 99, 0, 0.15) 0, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 99, 0, 0.1) 0, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite alternate;
}

.wp-article-hero .container {
    position: relative;
    z-index: 1;
}

.wp-article-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 99, 0, 0.15);
    border: 1px solid rgba(255, 99, 0, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 20px;
}

.wp-article-hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
    max-width: 800px;
}

.wp-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.6);
}

.wp-article-meta i {
    margin-right: 5px;
    color: var(--orange);
}

/* Methodology */
.wp-methodology {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 28px 30px;
    margin: 40px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.wp-methodology-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* KPI Grid */
.wp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.wp-kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wp-kpi-value {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--orange);
    display: block;
    font-variant-numeric: tabular-nums;
}

.wp-kpi-suffix {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--orange);
}

.wp-kpi-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
    font-weight: 600;
}

/* Chart Blocks */
.wp-chart-block {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px 28px;
    margin: 36px 0;
}

.wp-chart-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-chart-title i {
    color: var(--orange);
}

.wp-chart-canvas {
    position: relative;
    width: 100%;
    max-height: 400px;
}

.wp-chart-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Article Sections */
.wp-section {
    padding: 40px 0;
}

.wp-section h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.wp-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 14px;
}

.wp-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.wp-section a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.wp-section a:hover {
    border-bottom-color: var(--orange);
    color: var(--orange-600);
}

/* Highlight text (reused from about) */
.wp-highlight {
    position: relative;
    padding: 20px 24px;
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(255, 99, 0, 0.06) 0, rgba(255, 99, 0, 0.02) 100%);
    border-left: 4px solid var(--orange);
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Anecdotes / Fun facts */
.wp-anecdote {
    background: #000;
    color: #fff;
    border-radius: 16px;
    padding: 28px 30px;
    margin: 32px 0;
}

.wp-anecdote-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--orange);
    margin-bottom: 14px;
}

.wp-anecdote p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 10px;
}

.wp-anecdote p:last-child {
    margin-bottom: 0;
}

/* Table of Contents */
.wp-toc {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 30px 0;
}

.wp-toc-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.wp-toc ol {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
}

.wp-toc li {
    counter-increment: toc;
    margin-bottom: 8px;
}

.wp-toc li::before {
    content: counter(toc) ".";
    font-weight: 700;
    color: var(--orange);
    margin-right: 8px;
    font-size: 0.9rem;
}

.wp-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.wp-toc a:hover {
    color: var(--orange);
}

/* Download PDF Button */
.wp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wp-download-btn:hover {
    background: var(--orange-600);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.wp-download-btn--dark {
    background: #1A1A1A;
}
.wp-download-btn--dark:hover {
    background: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wp-article-hero {
        padding: 50px 0 35px;
    }

    .wp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .wp-kpi-card {
        padding: 18px 12px;
    }

    .wp-chart-block {
        padding: 20px 16px;
        margin: 24px -12px;
        border-radius: 14px;
    }

    .wp-chart-canvas {
        max-height: 300px;
    }

    .wp-methodology {
        padding: 20px 18px;
        margin: 24px 0;
    }

    .wp-highlight {
        padding: 16px 18px;
        font-size: 1rem;
    }

    .wp-section {
        padding: 28px 0;
    }

    .wp-anecdote {
        padding: 20px 18px;
        margin: 24px 0;
    }

    .wp-hub-hero {
        padding: 40px 0 28px;
    }
}

/* ============================================================
   INTÉGRATION DANS okc_v2 — mêmes corrections que « À propos »
   ============================================================ */

/* ---- FUSION AVEC LE MOTEUR ----
   Le moteur est sur `--black` (#101014), le héros de l'article était sur
   `#000` pur : deux noirs voisins mais distincts, donc une ligne visible
   entre les deux blocs. Et la lueur orange démarrait à 50 % de hauteur avec
   un rayon large, donc juste sous la jonction, ce qui la soulignait.
   On part du même fond, et le dégradé vient ensuite. */
.wp-article-hero{background:var(--black);padding:52px 0 40px}
.wp-article-hero-bg{
  background:
    radial-gradient(ellipse at 22% 80%, rgba(255,99,0,.17) 0, transparent 58%),
    radial-gradient(ellipse at 80% 55%, rgba(255,99,0,.10) 0, transparent 52%);
}
/* Le voile est porté par le héros et non par le calque qui pulse : animé, il
   ferait scintiller la jonction, c'est-à-dire ce qu'il masque. Il passe
   DERRIÈRE le contenu, qui a déjà son `z-index:1`. */
.wp-article-hero::after{
  content:"";position:absolute;left:0;right:0;top:0;height:46%;z-index:0;
  background:linear-gradient(to bottom, var(--black) 0%, rgba(16,16,20,.72) 38%, rgba(16,16,20,0) 100%);
  pointer-events:none}

/* ---- LISIBILITÉ ----
   `theme.css` impose `h1,h2,h3{color:var(--ink)}` : le titre de l'article
   sortait en #16161a sur fond noir. Le legacy n'imposait pas de couleur, il
   héritait de sa propre feuille. C'est le piège du §5 de CLAUDE.md, rencontré
   pour la troisième fois. */
.wp-article-hero h1{color:#fff}
.wp-article-hero .wp-article-meta,.wp-article-hero .wp-article-meta *{color:rgba(255,255,255,.72)}

/* ---- MISE AU DIAPASON ----
   Le design est conservé ; ces réglages ne font que l'accorder au reste du
   site, comme sur « À propos ». */
.wp-article-hero h1,.wp-section h2,.wp-section h3,.wp-hub-card h3{
  font-family:var(--font-head);letter-spacing:-.02em}
/* Filet orange court sous les titres de section, signature des pages
   éditoriales d'okc_v2. */
.wp-section > h2{position:relative;padding-bottom:.55rem}
.wp-section > h2::after{content:"";position:absolute;left:0;bottom:0;
  width:44px;height:3px;border-radius:2px;background:var(--orange)}
/* Rayons ramenés aux 12 px du thème, le legacy mêlait 8, 10, 16 et 20. */
.wp-hub-card,.wp-callout,.wp-figure,.wp-table-wrap,.wp-keyfig,
.wp-chart-block{border-radius:12px}
/* Colonne de lecture : un article se lit, il ne se parcourt pas en pleine
   largeur. Les pages éditoriales sont bornées à 820 px, on aligne. */
/* Le heros et le corps doivent partager la MEME colonne : sans cela le titre
   commencait a 12 px quand le fil d Ariane etait a 107, et rien ne s alignait
   verticalement. */
.p-etudes .ap-main .container,
.p-etudes .wp-article-hero .container{max-width:880px;margin-inline:auto}
