/* ═══ LunaRise Diaries — feuille partagée du blog ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #080B14;
  --bg2:       #0D1120;
  --bg3:       #111827;
  --text:      #EEF0F8;
  --muted:     #8B93B0;
  --purple:    #B78FE8;
  --blue:      #7EC8E3;
  --pink:      #E891C8;
  --grad:      linear-gradient(135deg, #B78FE8, #7EC8E3, #E891C8);
  --radius:    16px;
  --radius-sm: 10px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- figures d'article ---------- */
/* width/height sont TOUJOURS portés par la balise <img> : sans eux le navigateur
   ne peut pas réserver la place avant le décodage, et l'image pousse le texte au
   chargement (CLS) — une régression Core Web Vitals directe. */
.figure { margin: 34px 0; }
.figure img {
  width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(183, 143, 232, .18);
}
.figure figcaption {
  font-size: .78rem; color: var(--muted);
  margin-top: 10px; text-align: center; line-height: 1.6;
}
/* Crédit photographe : dû pour Unsplash comme pour Pexels, quel que soit
   le mode d'hébergement. */
.figure .credit { opacity: .75; }
.figure .credit a { text-decoration: underline; text-underline-offset: 2px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-btn {
  background: var(--grad);
  color: #080B14;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .25s, transform .2s;
  display: inline-block;
}
.grad-btn:hover { opacity: .88; transform: translateY(-2px); }
.grad-btn:active { transform: translateY(0); }
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.page-wrap .reveal:first-child, .post-header .reveal { opacity: 1; transform: none; }

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 11, 20, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(183, 143, 232, .12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1120px;
  margin: 0 auto;
}
.logo-wrap { display: flex; flex-direction: column; }
.logo-name { font-size: 1.15rem; font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.logo-sub { font-size: .62rem; font-weight: 500; letter-spacing: .22em; color: var(--muted); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.header-cta { border-radius: 50px; padding: 9px 22px; font-size: .82rem; }
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 75vw; max-width: 280px;
  background: #12001f; z-index: 201; padding: 28px 24px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.mobile-panel.open { transform: translateX(0); }
.panel-close {
  align-self: flex-end; background: none; border: none;
  color: rgba(255,255,255,.65); font-size: 1.4rem; line-height: 1;
  cursor: pointer; padding: 4px 8px; margin-bottom: 36px; transition: color .2s;
}
.panel-close:hover { color: #fff; }
.panel-nav { display: flex; flex-direction: column; gap: 4px; }
.panel-nav a {
  font-size: 18px; font-weight: 600; color: #fff;
  padding: 12px 16px; border-radius: 8px;
  border-left: 3px solid transparent;
  transition: border-color .2s, background .2s;
}
.panel-nav a:hover { border-left-color: var(--purple); background: rgba(183,143,232,.09); }
.panel-nav a.active { border-left-color: var(--pink); background: rgba(232,145,200,.07); }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .header-cta { display: none; }
}

/* ─── PAGE ─── */
.page-wrap { padding: 110px 20px 80px; }
.page-wrap h1 {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 18px;
  letter-spacing: -.01em;
}
.page-wrap h2 {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 52px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.page-wrap h3 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 10px; }
.page-wrap p { font-size: .975rem; color: var(--muted); margin-bottom: 16px; max-width: 720px; }
.page-wrap p strong, .page-wrap li strong { color: var(--text); font-weight: 600; }
.page-wrap ul, .page-wrap ol { margin: 0 0 16px 22px; color: var(--muted); font-size: .975rem; }
.page-wrap li { margin-bottom: 8px; }
.page-wrap a.inline-link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; opacity: .9; }
.page-wrap a.inline-link:hover { opacity: 1; }

/* ─── POST META ─── */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 34px;
}
.post-meta .tag {
  border: 1px solid rgba(183,143,232,.35);
  color: var(--purple);
  background: rgba(183,143,232,.07);
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: .72rem;
  letter-spacing: .06em;
}
.breadcrumb { font-size: .78rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: #fff; }

/* ─── TABLE ─── */
.income-table-wrap { overflow-x: auto; margin: 12px 0 20px; }
.income-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.income-table thead tr { background: var(--bg2); border-bottom: 1px solid rgba(183,143,232,.25); }
.income-table th {
  padding: 13px 16px; text-align: left;
  font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  color: var(--purple); text-transform: uppercase;
  white-space: nowrap;
}
.income-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--muted); }
.income-table td:first-child { color: var(--text); font-weight: 600; }
.income-table td:last-child {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.income-table tbody tr:hover { background: rgba(183,143,232,.04); }

/* ─── CALLOUT ─── */
.callout {
  background: var(--bg2);
  border: 1px solid rgba(183,143,232,.25);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: .93rem;
  color: var(--muted);
  max-width: 720px;
}
.callout strong { color: var(--text); }
.callout.pink { border-color: rgba(232,145,200,.3); border-left-color: var(--pink); }

/* ─── FAQ ─── */
.faq-list { max-width: 740px; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq-item { border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .25s; }
.faq-item.open { border-color: rgba(183,143,232,.45); }
.faq-q {
  width: 100%;
  background: var(--bg2);
  border: none;
  text-align: left;
  padding: 16px 20px;
  color: var(--text);
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background .2s;
}
.faq-item.open .faq-q { background: rgba(183,143,232,.06); }
.faq-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(183,143,232,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: transform .3s, background .2s;
  color: var(--purple);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: rgba(183,143,232,.15); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .3s; background: var(--bg2); border-left: 3px solid transparent; }
.faq-item.open .faq-a { max-height: 500px; border-left-color: var(--purple); padding: 14px 20px 18px; }
.faq-a p { font-size: .875rem; color: var(--muted); line-height: 1.75; }

/* ─── CTA BLOCK ─── */
.cta-block {
  margin-top: 56px;
  padding: 44px 32px;
  background: var(--bg2);
  border: 1px solid rgba(183,143,232,.18);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(183,143,232,.04) 0%, rgba(126,200,227,.04) 50%, rgba(232,145,200,.04) 100%);
  pointer-events: none;
}
.cta-block h2 { border: none; margin: 0 0 10px; padding: 0; font-size: clamp(1.3rem, 4vw, 1.9rem); }
.cta-block p { margin: 0 auto 28px; max-width: 480px; text-align: center; }
.cta-btn { padding: 16px 44px; border-radius: 50px; font-size: 1rem; letter-spacing: .03em; }
.cta-note { margin-top: 14px !important; font-size: .75rem !important; color: var(--muted); text-align: center; }

/* ─── HUB : cartes d'articles ─── */
.diaries-intro { max-width: 640px; margin-bottom: 44px; }
.diaries-intro p { font-size: 1rem; }
.post-grid { display: flex; flex-direction: column; gap: 14px; }
.post-card {
  display: block;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .3s, transform .3s;
}
.post-card:hover { border-color: rgba(183,143,232,.4); transform: translateY(-3px); }
.post-card .post-date {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-card h2 { font-size: 1.15rem; font-weight: 700; line-height: 1.4; margin: 0 0 8px; padding: 0; border: none; }
.post-card p { font-size: .88rem; color: var(--muted); margin: 0; }
.post-card .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── FOOTER ─── */
footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 40px 20px;
  text-align: center;
  margin-top: 80px;
}
.footer-copy { font-size: .75rem; color: var(--muted); line-height: 1.9; }
.footer-divider { display: inline-block; margin: 0 10px; opacity: .3; }

@media (max-width: 600px) {
  .income-table th, .income-table td { padding: 10px 10px; font-size: .8rem; }
  .cta-block { padding: 32px 20px; }
  .post-card { padding: 22px 20px; }
}
