/* T-20 · Design system — 7 archetypes + Kit UI */

/* ============ HERO variants ============ */
.hero--editorial { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%); padding: 100px 0 70px; }
.hero--editorial h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 60px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; color: var(--ink); max-width: 22ch; margin: 16px 0; }
.hero--editorial .lead { font-size: 19px; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; font-family: 'Instrument Serif', serif; font-style: italic; }

.hero--division { background: linear-gradient(135deg, var(--green-deep) 0%, var(--ink) 100%); color: #fff; padding: 100px 0 80px; position: relative; overflow: hidden; }
.hero--division::before { content: ""; position: absolute; top: -180px; right: -120px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(240,168,46,.2), transparent 70%); border-radius: 50%; }
.hero--division .container { position: relative; z-index: 1; }
.hero--division h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 60px); color: #fff; line-height: 1.05; margin: 16px 0; }
.hero--division h1 .serif { color: var(--yellow); font-family: 'Instrument Serif', serif; font-weight: 400; }
.hero--division .lead { font-size: 17px; line-height: 1.65; color: rgba(255,255,255,.85); max-width: 60ch; }

.hero--dashboard { background: var(--ink); color: #fff; padding: 60px 0 40px; }
.hero--dashboard h1 { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: #fff; margin: 0 0 18px; }
.hero--dashboard .lead { color: rgba(255,255,255,.75); margin-bottom: 24px; }

.hero--hub { background: linear-gradient(135deg, var(--green-deep) 0%, var(--ink) 100%); color: #fff; padding: 80px 0 60px; }
.hero--hub h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 52px); font-weight: 800; color: #fff; margin: 16px 0; max-width: 22ch; }
.hero--hub h1 .serif { color: var(--yellow); font-family: 'Instrument Serif', serif; font-weight: 400; }

.hero--profile { background: var(--paper); padding: 70px 0 40px; border-bottom: 1px solid var(--line); }
.hero--profile h1 { font-family: var(--display); font-size: clamp(32px, 4.5vw, 48px); color: var(--ink); margin: 16px 0; max-width: 22ch; }

.hero--legal { background: var(--paper-alt); padding: 60px 0 40px; border-bottom: 1px solid var(--line); }
.hero--legal h1 { font-family: var(--display); font-size: clamp(28px, 3.5vw, 42px); color: var(--ink); margin: 12px 0; }
.hero--legal p.updated { font-size: 13px; color: var(--ink-faded); }

.hero--form { background: var(--paper); padding: 70px 0 40px; }
.hero--form h1 { font-family: var(--display); font-size: clamp(32px, 4vw, 48px); color: var(--ink); margin: 16px 0; max-width: 22ch; }

/* ============ Kit UI components ============ */

/* .key-stat */
.key-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; }
.key-stat .num { font-family: var(--display); font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: var(--green); line-height: 1; letter-spacing: -.02em; }
.key-stat .unit { font-size: 11px; color: var(--ink-faded); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; margin-top: 6px; display: block; }
.key-stat .label { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-top: 12px; }
.key-stat.trend-up::after { content: " ▲"; color: var(--green); font-size: 11px; }
.key-stat.trend-stable::after { content: " —"; color: var(--ink-faded); font-size: 11px; }

/* .callout */
.callout { background: var(--paper-alt); border-left: 4px solid var(--green); padding: 22px 28px; border-radius: 0 12px 12px 0; margin: 30px 0; }
.callout strong { color: var(--ink); }
.callout.warning { border-left-color: var(--orange); background: rgba(232,116,28,.05); }
.callout.info { border-left-color: var(--gold); background: rgba(184,151,58,.05); }

/* .pull-quote */
.pull-quote { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 28px; line-height: 1.45; color: var(--ink); border: none; padding: 32px 0; margin: 32px 0; border-top: 2px solid var(--green); border-bottom: 2px solid var(--green); }
.pull-quote cite { display: block; font-family: var(--display); font-style: normal; font-size: 12px; color: var(--ink-faded); margin-top: 18px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

/* .timeline */
.timeline { display: flex; flex-direction: column; gap: 28px; padding: 0; list-style: none; position: relative; margin: 30px 0; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline-item { display: grid; grid-template-columns: 40px 1fr; gap: 18px; position: relative; }
.timeline-item .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 4px solid #fff; box-shadow: 0 0 0 1px var(--line); margin: 6px 0 0 7px; z-index: 1; }
.timeline-item.now .dot { background: var(--yellow); }
.timeline-item.future .dot { background: var(--paper-alt); border-color: var(--paper-alt); box-shadow: 0 0 0 1px var(--line); }
.timeline-item .when { font-family: var(--display); font-size: 12px; color: var(--ink-faded); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.timeline-item h4 { font-family: var(--display); font-size: 17px; color: var(--ink); margin: 0 0 6px; }
.timeline-item p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.timeline-item.now h4::after { content: " ← Vous êtes ici"; color: var(--gold); font-size: 12px; font-weight: 700; }

/* .accordion */
.accordion details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0; margin-bottom: 12px; }
.accordion summary { padding: 18px 22px; cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 22px; color: var(--ink-faded); font-weight: 400; }
.accordion details[open] summary::after { content: "−"; }
.accordion details > *:not(summary) { padding: 0 22px 18px; }

/* .card-deck */
.card-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 30px 0; }
.card-deck .card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card-deck .card:hover { transform: translateY(-3px); border-color: var(--green-vif); box-shadow: 0 16px 32px -16px rgba(0,0,0,.1); }
.card-deck .card h4 { font-family: var(--display); font-size: 17px; margin: 0 0 10px; color: var(--ink); }
.card-deck .card p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* .filter-bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.filter-bar .filter { padding: 8px 16px; border: 1px solid var(--line); background: transparent; border-radius: 999px; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .2s; }
.filter-bar .filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* .toc-sticky */
.toc-sticky { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; }
.toc-sticky h5 { font-family: var(--display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faded); margin: 0 0 12px; }
.toc-sticky ul { list-style: none; padding: 0; margin: 0; }
.toc-sticky li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.toc-sticky a { color: var(--ink-soft); text-decoration: none; }
.toc-sticky a:hover, .toc-sticky a.active { color: var(--green); }

/* .dl-pdf - replaced by popup component but keep style for legacy */
.dl-pdf { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 999px; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.dl-pdf:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.dl-pdf::before { content: "↓"; font-size: 14px; }

/* .image-placeholder */
.image-placeholder { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #5BA22D 0%, #1B4332 60%, #0F1115 100%); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); font-family: var(--display); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.image-placeholder.portrait { aspect-ratio: 3 / 4; }
.image-placeholder.square { aspect-ratio: 1 / 1; }

/* .cta-strip */
.cta-strip { margin: 60px 0; padding: 36px 44px; background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%); color: #fff; border-radius: 18px; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-strip::before { content: ""; position: absolute; top: -100px; right: -100px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(240,168,46,.2), transparent 70%); border-radius: 50%; }
.cta-strip > div { position: relative; z-index: 1; }
.cta-strip h3 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.cta-strip h3 .serif { color: var(--yellow); font-family: 'Instrument Serif', serif; font-weight: 400; }
.cta-strip p { font-size: 14px; color: rgba(255,255,255,.85); margin: 0; }
.cta-strip .btn { background: var(--yellow); color: var(--ink); padding: 14px 28px; position: relative; z-index: 1; border-radius: 999px; font-weight: 600; }
.cta-strip .btn:hover { background: #fff; }

/* Dark mode */
[data-theme="dark"] .key-stat, [data-theme="dark"] .card-deck .card, [data-theme="dark"] .accordion details, [data-theme="dark"] .toc-sticky { background: #161C20; border-color: #2A3036; color: #c8c8c8; }
[data-theme="dark"] .callout { background: #161C20; }
[data-theme="dark"] .hero--editorial { background: #0E1418; }
[data-theme="dark"] .hero--editorial h1, [data-theme="dark"] .pull-quote, [data-theme="dark"] .accordion summary, [data-theme="dark"] .card-deck .card h4, [data-theme="dark"] .hero--profile h1, [data-theme="dark"] .hero--legal h1, [data-theme="dark"] .hero--form h1 { color: #fff; }
[data-theme="dark"] .hero--profile, [data-theme="dark"] .hero--legal, [data-theme="dark"] .hero--form { background: #0E1418; border-color: #2A3036; }
