/* ==========================================================================
   Rapport — coque de la page : fond papier, en-tête, lien d'évitement, utilitaires
   (kicker, hangul, puces d'élément, donnée incrustée), icônes, squelette de chargement.
   Référence : design/maquettes/rapport/ (rapport.css). Jetons uniquement.
   ========================================================================== */

.report-page {
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-ui);
  font-synthesis: none;
  font-kerning: normal;
  font-variant-numeric: lining-nums; /* Cormorant : chiffres elzéviriens par défaut, « 0 » ressemble à « o » */
}
@media (min-width: 1024px) { .report-page { background-attachment: fixed; } }
html { scroll-padding-top: 76px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.report-page.is-locked { overflow: hidden; }
/* Chiffres alignés partout : `!important`, car le raccourci `font:` des composants réinitialise font-variant-numeric (comme base.css) ; seuls les numéros italiques du sommaire restent elzéviriens. */
.report-page * { font-variant-numeric: lining-nums !important; }
.report-page .toc__num, .report-page .osn { font-variant-numeric: oldstyle-nums !important; }

.premium-shell { min-height: 100svh; /* le pied de page reste sous le pli : il ne bouge pas à l'arrivée du rapport (CLS) */ width: 100%; margin: 0; padding: 0; color: var(--ink); overflow-wrap: break-word; }
.premium-shell img, .premium-shell canvas { max-width: 100%; }
/* Réinitialisation locale des blocs du rapport. */
.rp :where(h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote) { margin: 0; }
.rp :where(ol, ul) { padding: 0; list-style: none; }
.rp :where(h1, h2, h3, h4) { font-weight: 500; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 60; padding: 12px 16px; border-radius: var(--r-sm); background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* En-tête : marque + outils (hauteur réservée : aucun décalage à l'arrivée des boutons) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand .ko-b { font-size: 18px; color: var(--accent); }
.brand span:last-child { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.topbar__actions { display: flex; gap: 8px; min-width: 96px; min-height: 44px; justify-content: flex-end; }
.topbar .icon-btn, .navtoc__tools .icon-btn { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
.icon-btn.is-done { color: var(--success); border-color: var(--success); }
@media (min-width: 1024px) { .topbar { padding: 14px 40px; } }

/* Hangul, hanja et caractères coréens isolés */
.ko { font-family: var(--font-ko); white-space: nowrap; font-weight: 400; letter-spacing: 0; }
.ko-b { font-family: var(--font-ko); white-space: nowrap; font-weight: 600; }
.hanja { font-family: var(--font-ko); font-size: 0.72em; color: var(--ink-3); letter-spacing: 0.04em; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.kicker { font: 600 var(--fs-kicker)/1.3 var(--font-ui); letter-spacing: var(--tracking-kicker); text-transform: uppercase; color: var(--accent-ink); }
.kicker--mute { color: var(--ink-3); }
.meta { font-size: var(--fs-meta); line-height: 1.45; color: var(--ink-2); }
.m-only { display: block; }
.d-only { display: none; }
@media (min-width: 1024px) { .m-only { display: none !important; } .d-only { display: block; } }

/* Puce d'élément : « • Eau Yin » (couleurs de .el-* : tags.css) */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-pill);
  background: var(--el-soft, var(--surface-2)); color: var(--el-ink, var(--ink)); font: 600 13px/1 var(--font-ui);
  letter-spacing: 0.01em; white-space: nowrap; vertical-align: middle;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--el, currentColor); }
.chip--plain { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip--plain::before { display: none; }
.rp .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--el, currentColor); vertical-align: 0.05em; flex: none; }

/* Donnée du thème incrustée dans la prose : « Métal 4 / 8 » */
.data {
  display: inline-block; font: 650 0.74em/1.3 var(--font-ui); letter-spacing: 0.01em; color: var(--accent-ink); white-space: nowrap;
  padding: 0.08em 0.42em 0.1em; border-radius: 6px; background: var(--accent-soft); vertical-align: 0.08em;
}
.data .dot { width: 7px; height: 7px; margin-right: 4px; vertical-align: 0.06em; }

/* Boutons du rapport : les .btn du site (button.css), en un peu plus compacts */
.report-page .btn { font-size: 16px; min-height: 52px; }
.report-page .btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.report-page .btn--ghost:hover { background: var(--surface-2); }
.report-page .btn--sm { min-height: 44px; font-size: 14px; }

/* Icônes propres au rapport : masques SVG en data URI (CSP : `data:` admis), couleur du texte */
[class^="ri-"], [class*=" ri-"] { display: inline-grid; place-items: center; flex: none; }
[class^="ri-"]::before, [class*=" ri-"]::before {
  content: ""; display: block; width: var(--ri, 20px); height: var(--ri, 20px); background: currentColor;
  -webkit-mask: var(--ri-img) center / contain no-repeat; mask: var(--ri-img) center / contain no-repeat;
}
.ri-download { --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11M7 10l5 5 5-5M5 19h14'/></svg>"); }
.ri-share { --ri: 17px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 15V4M8 8l4-4 4 4M5 13v6h14v-6'/></svg>"); }
.ri-menu { --ri: 18px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M5 7h14M5 12h14M5 17h9'/></svg>"); }
.ri-heart { --ri: 18px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'><path d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/></svg>"); }
.ri-case { --ri: 18px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'><rect x='4' y='7' width='16' height='12' rx='2'/><path d='M9 7V5h6v2'/></svg>"); }
.ri-coin { --ri: 18px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'><circle cx='12' cy='12' r='7.5'/><path d='M14.5 9.5a3 3 0 1 0 0 5M8.5 11h5M8.5 13h5'/></svg>"); }
.ri-bolt { --ri: 18px; --ri-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'><path d='M13 3L5 14h6l-1 7 8-11h-6z'/></svg>"); }

/* Squelette de couverture : mêmes dimensions que la couverture finale */
.is-loading .sk { color: transparent; background: linear-gradient(90deg, var(--line-soft), var(--paper-2), var(--line-soft)); background-size: 200% 100%; border-radius: 8px; animation: sk 1.6s ease-in-out infinite; }
.is-loading .btn { background: var(--paper-2); box-shadow: none; color: transparent; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Liens et pied de page historiques (légal) */
/* Pied de page commun aux pages du site (même balisage et mêmes règles que chrome.css, merci.html) :
   chrome.css n'est pas chargé ici (sa marque `.brand` n'est pas celle de la barre du rapport). */
.site-foot { padding: 40px 0 48px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-3); }
.site-foot .wrap { width: 100%; max-width: calc(var(--canvas) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
.site-foot p { margin: 0; }
.premium-footer a { color: inherit; text-decoration: underline; }
.report-notice { font-size: 0.86rem; color: var(--ink-2); margin: 0 0 4px; }

/* Sections historiques (Ton année, Duo) : toujours lisibles, hors gabarit du rapport */
.legacy { max-width: 780px; margin: 0 auto; padding: 0 16px; }
.legacy-section { margin: 40px 0; }
.legacy-section .chapter-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.legacy-section .chapter-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-ink); font-style: italic; min-width: 32px; }
.legacy-section .chapter-head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3.6vw, 2rem); line-height: 1.12; margin: 0; }
.legacy-section .chapter-body p { font: 1.22rem/1.7 var(--font-display); margin: 0 0 16px; }
.partner-title { font: 600 clamp(2rem, 6vw, 3rem)/1.05 var(--font-display); margin: 8px 0 18px; }
.partner-head { text-align: center; }
.partner-dm { margin-top: 14px; color: var(--ink-2); }
