/* =========================================================
   tokenisation.css — Dossier Tokenisation
   Direction artistique : éditorial financier / WSJ-meets-Stripe
   Palette : crème papier + encre profonde + or ancien
   ========================================================= */

:root {
    --paper:      #F3EFE6;
    --paper-2:    #EAE4D6;
    --ink:        #111111;
    --ink-soft:   #2A2A2A;
    --ink-mute:   #6B6B6B;
    --rule:       #1a1a1a;
    --gold:       #B8860B;
    --gold-light: #D4A93A;
    --red:        #B8251C;
    --green:      #1F6B3A;
    --dark-bg:    #131211;
    --dark-bg-2:  #1C1A17;
    --dark-ink:   #F3EFE6;
    --dark-mute:  #8F8A80;

    --serif: 'Instrument Serif', 'Times New Roman', serif;
    --sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono:  'JetBrains Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ================ GRAIN DE FOND (texture papier) ================ */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.035;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ================ TICKER BAND ================ */
.ticker {
    background: var(--ink);
    color: var(--paper);
    border-bottom: 1px solid var(--gold);
    overflow: hidden;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.03em;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ticker-track {
    display: inline-flex;
    gap: 48px;
    white-space: nowrap;
    animation: tickerScroll 45s linear infinite;
    padding-left: 48px;
}

.t-item { display: inline-flex; gap: 10px; align-items: center; }
.t-sym  { color: var(--gold-light); font-weight: 700; }
.up     { color: #4ADE80; }
.down   { color: #F87171; }
.flat   { color: var(--dark-mute); }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ================ MASTHEAD ================ */
.masthead {
    border-bottom: 3px double var(--ink);
    padding: 28px 64px 20px;
}
.masthead-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-mute);
}
.masthead-top .logo {
    font-family: var(--serif);
    font-size: 38px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink);
    font-weight: 400;
    font-style: italic;
}
.masthead-top .date { text-align: right; }

/* ================ HERO ================ */
.hero { padding: 60px 64px 40px; border-bottom: 1px solid var(--rule); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 72px;
    align-items: end;
}

.kicker {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 28px;
}

.title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(54px, 7.5vw, 118px);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 28px;
}
.title .italic { font-style: italic; color: var(--gold); }

.deck {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.4;
    color: var(--ink-soft);
    max-width: 640px;
}

.hero-card {
    background: var(--ink);
    color: var(--paper);
    padding: 36px 32px;
    position: relative;
    border: 1px solid var(--gold);
}
.hero-card::before {
    content: '';
    position: absolute;
    inset: -6px -6px 6px 6px;
    border: 1px solid var(--ink);
    z-index: -1;
}
.card-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--gold-light);
    text-transform: uppercase;
    margin-bottom: 18px;
}
.card-big {
    font-family: var(--serif);
    font-size: 68px;
    line-height: 1;
    margin-bottom: 16px;
}
.big-u { font-size: 24px; margin-left: 6px; color: var(--gold-light); }
.card-sub {
    font-size: 13px;
    color: var(--dark-mute);
    line-height: 1.5;
    border-top: 1px solid #333;
    padding-top: 14px;
}

/* nav */
.hero-nav {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
}
.hero-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
    text-transform: uppercase;
}
.hero-nav a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ================ STATS BAND ================ */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 3px double var(--ink);
    border-bottom: 3px double var(--ink);
    background: var(--paper-2);
}
.stat {
    padding: 40px 32px;
    border-right: 1px solid var(--rule);
    position: relative;
}
.stat:last-child { border-right: none; }
.stat-num {
    font-family: var(--serif);
    font-size: 62px;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 14px;
}
.stat-u {
    font-size: 20px;
    margin-left: 6px;
    color: var(--gold);
    font-family: var(--mono);
    font-style: normal;
}
.stat-legend {
    font-size: 13px;
    color: var(--ink-mute);
    line-height: 1.5;
    max-width: 250px;
}

/* ================ SECTION ================ */
.section {
    padding: 100px 64px;
    border-bottom: 1px solid var(--rule);
    position: relative;
}

.section.dark {
    background: var(--dark-bg);
    color: var(--dark-ink);
    border-color: #2b2824;
}
.section.dark .section-num { color: var(--gold-light); }
.section.dark .section-title { color: var(--dark-ink); }

.section-head {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: baseline;
    gap: 40px;
    margin-bottom: 60px;
    padding-bottom: 24px;
    border-bottom: 1px solid currentColor;
    opacity: 1;
}
.section.dark .section-head { border-color: #3a362f; }

.section-num {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.25em;
    color: var(--gold);
}
.section-num .bis {
    font-size: 10px;
    vertical-align: super;
    margin-left: 2px;
    font-style: italic;
}
.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 4.5vw, 64px);
    line-height: 1;
    letter-spacing: -0.015em;
    color: var(--ink);
}
.section-title .italic { font-style: italic; color: var(--gold); }

.section-intro {
    max-width: 700px;
    margin: -40px 0 50px 200px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    line-height: 1.45;
    color: var(--ink-soft);
}
.section.dark .section-intro { color: var(--dark-mute); }

/* ================ PROSE ================ */
.prose {
    max-width: 820px;
    margin-left: 200px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
}
.prose p { margin-bottom: 20px; }
.prose .lead {
    font-size: 22px;
    line-height: 1.5;
    color: var(--ink);
    font-family: var(--serif);
    margin-bottom: 28px;
}
.prose.two-col { column-count: 2; column-gap: 48px; max-width: 1100px; }
.prose.two-col p { break-inside: avoid; }
.prose.two-col .lead { column-span: all; }

strong { font-weight: 700; color: var(--ink); }
.section.dark strong { color: var(--dark-ink); }
em { font-style: italic; color: var(--gold); }
code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: rgba(184, 134, 11, 0.12);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid rgba(184, 134, 11, 0.3);
}

/* ================ QUOTE ================ */
.quote {
    margin: 70px 200px 0;
    padding: 50px 60px;
    border-left: 4px solid var(--gold);
    background: var(--paper-2);
    position: relative;
}
.quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-family: var(--serif);
    font-size: 160px;
    color: var(--gold);
    line-height: 1;
    opacity: 0.4;
}
.quote blockquote {
    font-family: var(--serif);
    font-size: 30px;
    line-height: 1.35;
    color: var(--ink);
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.quote figcaption {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--ink-mute);
    text-transform: uppercase;
}

/* ================ PROCESS (étapes) ================ */
.process {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #2b2824;
    border: 1px solid #2b2824;
    margin-left: 200px;
    max-width: calc(100% - 200px);
}
.step {
    background: var(--dark-bg-2);
    padding: 36px 30px;
    display: flex;
    gap: 20px;
    transition: background 0.3s ease;
    opacity: 0;
    animation: stepReveal 0.6s ease forwards;
    animation-delay: var(--delay);
}
.step:hover { background: #252220; }
.step-num {
    font-family: var(--serif);
    font-size: 48px;
    color: var(--gold);
    line-height: 1;
    min-width: 42px;
    font-style: italic;
}
.step-body h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 17px;
    color: var(--dark-ink);
    margin-bottom: 10px;
    letter-spacing: -0.005em;
}
.step-body p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--dark-mute);
}
@keyframes stepReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================ CALLOUT ================ */
.callout {
    margin: 60px 200px 0;
    padding: 32px 36px;
    background: rgba(212, 169, 58, 0.08);
    border: 1px solid var(--gold);
    position: relative;
}
.callout.alt { background: var(--paper-2); border-color: var(--ink); margin-top: 40px; }
.callout-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.callout-list { list-style: none; }
.callout-list li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(212, 169, 58, 0.3);
    font-size: 15px;
    color: var(--dark-ink);
}
.section:not(.dark) .callout-list li { color: var(--ink-soft); }
.callout-list li:last-child { border-bottom: none; }
.callout p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ================ TYPES CARDS ================ */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    border-top: 1px solid var(--ink);
    border-left: 1px solid var(--ink);
}
.type-card {
    padding: 40px 32px;
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
    transition: background 0.4s ease, transform 0.4s ease;
    position: relative;
    overflow: hidden;
}
.type-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.type-card:hover { background: var(--paper-2); }
.type-card:hover::after { transform: scaleX(1); }

.type-code {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 18px;
}
.type-name {
    font-family: var(--serif);
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--ink);
    font-weight: 400;
}
.type-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 20px;
}
.type-ex {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-mute);
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
}
.type-ex span { color: var(--gold); font-weight: 700; }

/* ================ AVANTAGES GRID ================ */
.adv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 32px;
    margin-left: 200px;
    max-width: calc(100% - 200px);
}
.adv-item { position: relative; padding-top: 28px; }
.adv-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 32px;
    height: 1px;
    background: var(--gold);
}
.adv-idx {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 12px;
}
.adv-item h3 {
    font-family: var(--serif);
    font-size: 26px;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 10px;
    font-weight: 400;
}
.adv-item p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* ================ COMPARATIF TABLE ================ */
.compare-table {
    margin-left: 200px;
    max-width: calc(100% - 200px);
    border: 1px solid var(--ink);
    font-family: var(--mono);
    font-size: 14px;
}
.ct-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    border-bottom: 1px solid var(--rule);
    transition: background 0.2s ease;
}
.ct-row:last-child { border-bottom: none; }
.ct-row > div {
    padding: 18px 24px;
    border-right: 1px solid var(--rule);
}
.ct-row > div:last-child { border-right: none; }
.ct-row:not(.ct-head):hover { background: var(--paper-2); }

.ct-head {
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 12px;
}
.ct-head > div { border-right-color: #333; }
.ct-row .hi {
    color: var(--gold);
    font-weight: 600;
    background: rgba(184, 134, 11, 0.04);
}

/* ================ RISQUES ================ */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-left: 200px;
    max-width: calc(100% - 200px);
}
.risk {
    padding: 28px 24px;
    background: var(--dark-bg-2);
    border-left: 3px solid var(--gold);
}
.risk.eleve   { border-left-color: var(--red); }
.risk.moyen   { border-left-color: var(--gold); }
.risk.faible  { border-left-color: var(--green); }
.risk-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.risk-level {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    text-transform: uppercase;
    border: 1px solid currentColor;
    color: var(--gold);
}
.risk.eleve  .risk-level { color: var(--red); }
.risk.faible .risk-level { color: var(--green); }
.risk h3 {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--dark-ink);
    font-weight: 400;
}
.risk p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-mute);
}

/* ================ ACTORS TABLE ================ */
.actors {
    margin-left: 200px;
    max-width: calc(100% - 200px);
    font-family: var(--sans);
}
.actors-head, .actor-row {
    display: grid;
    grid-template-columns: 2fr 0.6fr 2.4fr;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
    align-items: center;
}
.actors-head {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
    border-bottom: 2px solid var(--ink);
}
.actor-row { transition: background 0.2s ease; }
.actor-row:hover { background: var(--paper-2); }
.a-name {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--ink);
}
.a-zone {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--paper);
    background: var(--ink);
    padding: 4px 10px;
    justify-self: start;
}
.a-focus {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ================ RÉGULATION CARDS ================ */
.reg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1px;
    background: var(--ink);
    border: 1px solid var(--ink);
    margin-left: 200px;
    max-width: calc(100% - 200px);
}
.reg-card {
    background: var(--paper);
    padding: 32px 28px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.reg-card:hover { background: var(--paper-2); }
.reg-card h3 {
    font-family: var(--serif);
    font-size: 26px;
    margin-bottom: 12px;
    color: var(--ink);
    font-weight: 400;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 10px;
    display: inline-block;
}
.reg-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-top: 12px;
}

/* ================ HORIZON / TIMELINE ================ */
.horizon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 70px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    position: relative;
}
.horizon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--gold);
    opacity: 0.3;
}
.h-item {
    padding: 36px 28px;
    border-right: 1px solid var(--rule);
    position: relative;
    background: var(--paper);
}
.h-item:last-child { border-right: none; }
.h-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--paper);
    z-index: 1;
}
.h-year {
    font-family: var(--serif);
    font-size: 56px;
    font-style: italic;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 50px;
}
.h-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-top: 20px;
}

/* ================ FINALE SECTION ================ */
.section.finale { background: var(--paper-2); }

/* ================ FOOTER ================ */
.foot {
    background: var(--ink);
    color: var(--dark-ink);
    padding: 70px 64px 30px;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}
.foot-logo {
    font-family: var(--serif);
    font-style: italic;
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--gold);
}
.foot p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--dark-mute);
}
.foot-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.foot ul { list-style: none; }
.foot ul li {
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed #333;
    color: var(--dark-mute);
}
.foot ul li:last-child { border-bottom: none; }
.foot-bottom {
    padding-top: 24px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #666;
    text-align: center;
}

/* ================ BOUTON TOP ================ */
.top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--ink);
    color: var(--gold);
    border: 1px solid var(--gold);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 50;
    font-family: var(--mono);
}
.top-btn:hover { background: var(--gold); color: var(--ink); }
.top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ================ REVEAL ON SCROLL ================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ================ RESPONSIVE ================ */
@media (max-width: 1100px) {
    .section { padding: 70px 40px; }
    .masthead, .hero, .foot { padding-left: 40px; padding-right: 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 50px; }
    .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 40px; }
    .section-intro, .prose, .process, .callout, .adv-grid, .compare-table,
    .risk-grid, .actors, .reg-grid, .quote { margin-left: 0; max-width: 100%; }
    .prose.two-col { column-count: 1; }
    .adv-grid { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(2, 1fr); }
    .risk-grid { grid-template-columns: repeat(2, 1fr); }
    .horizon { grid-template-columns: repeat(2, 1fr); }
    .horizon::before { display: none; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .foot-grid { grid-template-columns: 1fr; gap: 40px; }
    .masthead-top { grid-template-columns: 1fr; text-align: center; }
    .masthead-top .date { text-align: center; }
    .quote { padding: 30px 24px; margin-top: 40px; }
    .quote blockquote { font-size: 22px; }
}

@media (max-width: 640px) {
    .section { padding: 50px 24px; }
    .masthead, .hero, .foot { padding-left: 24px; padding-right: 24px; }
    .title { font-size: 52px; }
    .deck { font-size: 18px; }
    .adv-grid, .process, .risk-grid, .horizon, .stats { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--rule); }
    .ct-row { grid-template-columns: 1fr; }
    .ct-row > div { border-right: none; border-bottom: 1px solid var(--rule); }
    .actors-head, .actor-row { grid-template-columns: 1fr; gap: 8px; }
    .hero-nav { font-size: 11px; gap: 4px 16px; }
    .card-big { font-size: 48px; }
    .stat-num { font-size: 44px; }
    .h-year { font-size: 42px; }
}

/* ================ ACCESSIBILITY ================ */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .ticker-track { animation: none; }
}

::selection { background: var(--gold); color: var(--ink); }
