/* vivre-au-japon.com — mise en page « guide » des pages importées (2026-10-27).
   Surface : lecture longue. Papier clair, titres en serif japonaise, chapitres numérotés,
   sommaire collant sur grand écran. Ne touche ni l'accueil ni les articles WordPress. */
.vaj-guide-page{
  --g-ink:#1c1917; --g-text:#3f3a36; --g-muted:#78716c; --g-line:#e7e2db;
  --g-paper:#faf7f2; --g-accent:#b4351f; --g-link:#005fa3;
  background:var(--g-paper);
}
.vaj-guide-page main{background:var(--g-paper)}

/* Hero : moins haut, le contenu arrive plus vite */
.vaj-guide-page main>section:first-child[style*="min-height"]{min-height:clamp(340px,52vh,560px)!important}
.vaj-guide-page main>section:first-child h1{font-family:'Shippori Mincho',Georgia,serif!important;font-weight:800!important;letter-spacing:-.01em}

/* Barre de progression de lecture */
.vaj-progress{position:fixed;top:0;left:0;height:3px;width:0;background:var(--g-accent);z-index:10000;transition:width .1s linear}
body.admin-bar .vaj-progress{top:32px}

/* Grille : sommaire + texte */
.vaj-guide{max-width:1180px;margin:0 auto;padding:56px 24px 24px;display:grid;grid-template-columns:minmax(0,1fr);gap:48px;counter-reset:chap}
@media (min-width:1100px){.vaj-guide{grid-template-columns:240px minmax(0,1fr)}}

/* Sommaire */
.vaj-toc{font-size:.9rem}
.vaj-toc-inner{position:sticky;top:calc(var(--nav-height,72px) + 24px)}
.vaj-toc-title{font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--g-muted);margin:0 0 14px}
.vaj-toc ol{list-style:none;margin:0;padding:0;border-left:1px solid var(--g-line)}
.vaj-toc li{margin:0}
.vaj-toc a{display:flex;gap:10px;padding:7px 0 7px 16px;margin-left:-1px;border-left:2px solid transparent;color:var(--g-muted);text-decoration:none;line-height:1.35;transition:color .15s,border-color .15s}
.vaj-toc a span{font-variant-numeric:tabular-nums;color:#a8a29e;font-weight:600;min-width:1.4em}
.vaj-toc a:hover{color:var(--g-ink)}
.vaj-toc a.is-active{color:var(--g-ink);border-left-color:var(--g-accent);font-weight:600}
.vaj-toc a.is-active span{color:var(--g-accent)}
@media (max-width:1099px){
  .vaj-toc{border:1px solid var(--g-line);border-radius:14px;background:#fff}
  .vaj-toc details>summary{cursor:pointer;list-style:none;padding:16px 20px;font-weight:700;color:var(--g-ink);display:flex;justify-content:space-between;align-items:center;min-height:44px}
  .vaj-toc details>summary::after{content:"+";font-size:1.3rem;color:var(--g-accent)}
  .vaj-toc details[open]>summary::after{content:"–"}
  .vaj-toc details>summary::-webkit-details-marker{display:none}
  .vaj-toc ol{margin:0 20px 16px}
  .vaj-toc-inner{position:static}
  .vaj-toc-title{display:none}
}
@media (min-width:1100px){.vaj-toc details>summary{display:none}}

/* Chapitres */
.vaj-guide-body{max-width:740px;min-width:0}
.vaj-guide-page .vaj-guide-body>section.section-padded{background:transparent!important;padding:0 0 44px!important;margin:0 0 44px;border-bottom:1px solid var(--g-line);counter-increment:chap}
.vaj-guide-page .vaj-guide-body>section.section-padded:last-child{border-bottom:0}
.vaj-guide-page .vaj-guide-body>section>.container{max-width:none;padding:0;margin:0;width:auto}
.vaj-guide-page .vaj-guide-body .section-header{text-align:left;margin:0 0 22px;max-width:none}
.vaj-guide-page .vaj-guide-body .section-header::before{content:counter(chap,decimal-leading-zero);display:block;font-size:.8rem;font-weight:700;letter-spacing:.12em;color:var(--g-accent);margin-bottom:8px}
.vaj-guide-page .vaj-guide-body .section-header h2{font-family:'Shippori Mincho',Georgia,serif;font-size:clamp(1.6rem,2.6vw,2.15rem);font-weight:800;line-height:1.25;letter-spacing:-.01em;color:var(--g-ink);margin:0;text-wrap:balance;scroll-margin-top:calc(var(--nav-height,72px) + 24px)}
.vaj-guide-page .vaj-guide-body .section-divider{display:none}
.vaj-guide-page .vaj-guide-body .section-header p{text-align:left;margin-top:10px!important}

/* Texte courant */
.vaj-guide-page .vaj-guide-body .section-header+div{max-width:none;margin:0;font-size:1.075rem;line-height:1.8;color:var(--g-text)}
.vaj-guide-page .vaj-guide-body .section-header+div>*+*{margin-top:1.05em}
.vaj-guide-page .vaj-guide-body .section-header+div strong{color:var(--g-ink);font-weight:700}
.vaj-guide-page .vaj-guide-body .section-header+div a:not([class]){color:var(--g-link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;font-weight:600}
.vaj-guide-page .vaj-guide-body .section-header+div a:not([class]):hover{color:var(--g-accent)}
.vaj-guide-page .vaj-guide-body .section-header+div>h3{font-size:1.25rem;font-weight:700;color:var(--g-ink);margin-top:1.8em}
.vaj-guide-page .vaj-guide-body .section-header+div>h4{font-size:1.08rem;font-weight:700;color:var(--g-ink);margin-top:1.5em}

/* Listes simples */
.vaj-guide-page .vaj-guide-body .section-header+div>ul:not(.vaj-terms){list-style:none;padding:0}
.vaj-guide-page .vaj-guide-body .section-header+div>ul:not(.vaj-terms)>li{position:relative;padding-left:1.5em}
.vaj-guide-page .vaj-guide-body .section-header+div>ul:not(.vaj-terms)>li::before{content:"";position:absolute;left:.2em;top:.72em;width:7px;height:7px;border-radius:50%;background:var(--g-accent)}
.vaj-guide-page .vaj-guide-body .section-header+div>ul>li+li{margin-top:.6em}

/* Étapes numérotées */
.vaj-guide-page .vaj-guide-body .section-header+div>ol{list-style:none;padding:0;counter-reset:step}
.vaj-guide-page .vaj-guide-body .section-header+div>ol>li{counter-increment:step;position:relative;padding:0 0 0 3.1em;min-height:2.2em}
.vaj-guide-page .vaj-guide-body .section-header+div>ol>li+li{margin-top:1em}
.vaj-guide-page .vaj-guide-body .section-header+div>ol>li::before{content:counter(step);position:absolute;left:0;top:-.05em;width:2.05em;height:2.05em;border-radius:50%;border:1.5px solid var(--g-accent);color:var(--g-accent);font-weight:700;font-size:.95em;display:flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}

/* Listes « terme : explication » → liste de repères lisible */
.vaj-guide-page ul.vaj-terms{list-style:none;padding:0;border-top:1px solid var(--g-line)}
.vaj-guide-page ul.vaj-terms>li{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;padding:14px 0;border-bottom:1px solid var(--g-line);margin:0!important}
@media (min-width:700px){.vaj-guide-page ul.vaj-terms>li{grid-template-columns:200px minmax(0,1fr);gap:24px}}
.vaj-guide-page ul.vaj-terms .vaj-term{color:var(--g-ink);font-weight:700;line-height:1.5}
.vaj-guide-page ul.vaj-terms .vaj-def{line-height:1.7}

/* Tableaux */
.vaj-guide-page .vaj-guide-body table{width:100%;border-collapse:collapse;font-size:.97rem;background:#fff;border:1px solid var(--g-line);border-radius:12px;overflow:hidden}
.vaj-guide-page .vaj-guide-body th,.vaj-guide-page .vaj-guide-body td{padding:.7em .9em;text-align:left;vertical-align:top;border-bottom:1px solid var(--g-line)}
.vaj-guide-page .vaj-guide-body th{background:#f3eee6;color:var(--g-ink);font-weight:700}
.vaj-guide-page .vaj-guide-body img{max-width:100%;height:auto}

/* « À découvrir aussi » et cartes déjà stylées : on ne garde que la largeur */
.vaj-guide-page .vaj-guide-body .bento-card{background:#fff;border:1px solid var(--g-line);border-radius:12px;padding:10px;box-shadow:none}
.vaj-guide-page .vaj-guide-body .bento-card:hover{border-color:var(--g-accent)}
.vaj-guide-page .vaj-guide-body [style*="minmax(320px"]{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))!important}

/* Encadré affiliation sous le guide */
.vaj-guide-page main>aside.affiliated-tools{background:var(--g-paper)}

@media (max-width:600px){
  .vaj-guide{padding:32px 18px 8px;gap:32px}
  .vaj-guide-page .vaj-guide-body>section.section-padded{padding-bottom:32px!important;margin-bottom:32px}
  .vaj-guide-page .vaj-guide-body .section-header+div{font-size:1.02rem}
  .vaj-guide-page .vaj-guide-body table{display:block;overflow-x:auto}
}
@media (prefers-reduced-motion:reduce){.vaj-progress{transition:none}}
.vaj-guide-page ul.vaj-terms .vaj-def{display:block}
.vaj-guide-page ul.vaj-terms .vaj-def::first-letter{text-transform:uppercase}
.vaj-guide-page ul.vaj-terms>li:last-child{border-bottom:0}
.vaj-guide-page .vaj-guide-body>section.vaj-more{counter-increment:none;border-bottom:0;padding-top:8px!important}
.vaj-guide-page .vaj-guide-body>section.vaj-more .section-header::before{content:none}
.vaj-guide-page .vaj-guide-body>section.vaj-more .section-header h2{font-size:1.5rem}
.vaj-guide-page .vaj-guide-body .bento-card{transform:none!important;align-self:stretch}
.vaj-guide-page .vaj-guide-body .section-header+div[style*="grid"]>*,.vaj-guide-page .vaj-guide-body .section-header+div[class*="grid"]>*{margin-top:0}
