/* Page « Notre inspiration : Nihondex » (gen-seo.ts, classe .nd-page sur <body>), par-dessus legal.css
   et fiches.css : l'habillage de la vitrine (carte en pixel art, polices du site, or, habitants qui
   flottent, blocs qui apparaissent au défilement). Nuit ou jour selon le choix fait sur le site
   (classe .dark posée par theme-boot.js). Aucun flou ni filtre animé (règles de fluidité du site). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2'); }
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/pixelify-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/dm-sans-latin-600-normal.woff2) format('woff2'); }

/* ── Couleurs : jour (parchemin) et nuit (vert profond), comme la vitrine ── */
.nd-page { --bg: #f4eee1; --ink: #22392e; --muted: rgb(34 57 46 / .74); --line: rgb(122 92 40 / .22); --gold: #8f6a28; --gold-2: #b8924a; --card: #fffaf0; --card-2: #f3ead7; --veil: 246 240 226; --shadow: 70 50 20;
  color-scheme: light; font-family: 'DM Sans', system-ui, sans-serif; overflow-x: clip; }
html.dark .nd-page { --bg: #091711; --ink: #f4eddf; --muted: rgb(232 226 210 / .74); --line: rgb(215 189 131 / .18); --gold: #e6c98a; --gold-2: #c9a45c; --card: #13291e; --card-2: #0d1f16; --veil: 9 23 17; --shadow: 0 0 0; color-scheme: dark; }
.nd-page header, .nd-page main, .nd-page footer { max-width: 1120px; }
.nd-page .brand { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 25px; }
.nd-page :is(h1, h2, h3) { font-family: 'Cormorant Garamond', Georgia, serif; letter-spacing: -0.01em; }
.nd-page em { font-style: italic; font-weight: 500; color: var(--gold); }
.nd-page :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nd-eyebrow { display: inline-block; font: 500 12px/1.2 'Pixelify Sans', monospace; letter-spacing: .22em; word-spacing: .2em; text-transform: uppercase; color: var(--gold); }

/* ── Bannière : la carte du royaume sous un voile, le nom en grand ── */
.nd-hero { position: relative; isolation: isolate; overflow: hidden; margin: 18px calc(50% - 50vw) 0; min-height: min(80vh, 700px); display: grid; place-items: center; padding: 90px 24px 96px; text-align: center; }
.nd-hero-map { position: absolute; inset: -30px; z-index: -3; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; image-rendering: pixelated; transform: scale(1.12); animation: nd-drift 28s ease-in-out infinite alternate; }
.nd-hero::before { content: ''; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse 65% 55% at 50% 48%, rgb(var(--veil) / .78), rgb(var(--veil) / .45) 70%, transparent), linear-gradient(180deg, rgb(var(--veil) / .95) 0%, rgb(var(--veil) / .5) 30%, rgb(var(--veil) / .55) 65%, var(--bg) 100%); }
.nd-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; z-index: -2; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 50% 100%, rgb(233 196 106 / .22), transparent 70%); }
.nd-kanji { position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -52%; font: 700 clamp(120px, 26vw, 360px)/1 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif; color: var(--gold); opacity: .09; white-space: nowrap; pointer-events: none; user-select: none; }
.nd-hero-inner { position: relative; max-width: 760px; }
.nd-hero h1 { margin: 18px 0 0; font-size: clamp(54px, 9vw, 104px); line-height: .95; }
.nd-hero h1 span { display: block; }
.nd-hero h1 .nd-h1-b { margin-top: 10px; font-size: .42em; line-height: 1.1; font-style: italic; font-weight: 500; color: var(--gold); }
.nd-hero .lead { max-width: 620px; margin: 26px auto 0; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.nd-rule { display: block; width: min(460px, 70%); height: 1px; margin: 28px auto 0; background: linear-gradient(90deg, transparent, var(--gold-2) 30%, var(--gold) 50%, var(--gold-2) 70%, transparent); transform-origin: 50% 50%; animation: nd-rule 1.1s cubic-bezier(.2,.7,.2,1) .9s both; }
.nd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
/* Entrée échelonnée (opacité de départ non nulle : le texte compte dès sa première image). */
.nd-in { animation: nd-up .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }

/* Boutons : l'or de « Commencer l'aventure », avec un reflet qui passe au survol. */
.nd-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 14px; font: 600 16px/1 'DM Sans', system-ui, sans-serif; text-decoration: none; color: #243b2d;
  background: linear-gradient(135deg, #f3dda3, #ddbd77 55%, #c9a45c); box-shadow: inset 0 1px 0 #fff3d6, 0 8px 24px rgb(201 164 92 / .35); transition: transform .25s ease, box-shadow .25s ease; }
.nd-cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s ease; }
.nd-cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff7e0, 0 0 0 1px rgb(243 221 163 / .6), 0 12px 34px rgb(201 164 92 / .5); }
.nd-cta:hover::after { transform: translateX(120%); }
.nd-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 14px; font: 600 16px/1 'DM Sans', system-ui, sans-serif; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: rgb(var(--veil) / .7); transition: border-color .2s ease, transform .2s ease; }
.nd-ghost:hover { border-color: var(--gold); transform: translateY(-2px); }

/* Habitants qui flottent (sprites Tiny Swords, comme l'écran d'arrivée). */
.nd-floater { position: absolute; z-index: -1; animation: nd-bob var(--bob, 6s) ease-in-out infinite; animation-delay: var(--d, 0s); pointer-events: none; }
.nd-floater.is-flip { scale: -1 1; }
.nd-sprite { position: relative; overflow: hidden; }
.nd-sprite i { position: absolute; background-repeat: no-repeat; image-rendering: pixelated; animation: nd-sheet var(--dur) steps(var(--n)) infinite; }
@media (max-width: 760px) { .nd-floater { scale: .62; } .nd-floater.is-flip { scale: -.62 .62; } .nd-floater.is-wide { display: none; } }

/* ── Sections ── */
.nd-section { margin-top: clamp(70px, 10vw, 120px); }
.nd-heading { max-width: 700px; margin: 0 auto clamp(30px, 5vw, 48px); text-align: center; }
.nd-heading h2 { margin: 12px 0 0; padding: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; }
.nd-heading p { margin: 14px auto 0; color: var(--muted); font-size: 17px; }

.nd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; padding: 0; list-style: none; }
.nd-card { position: relative; padding: 26px 24px 24px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card), var(--card-2)); box-shadow: 0 14px 34px -24px rgb(var(--shadow) / .45); transition: border-color .3s ease, translate .3s ease; }
.nd-card:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); translate: 0 -4px; }
.nd-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #243b2d; background: linear-gradient(135deg, #f3dda3, #c9a45c); box-shadow: 0 6px 16px rgb(201 164 92 / .3); }
.nd-icon svg { width: 22px; height: 22px; }
.nd-card h3 { margin: 18px 0 0; font-size: 24px; line-height: 1.15; }
.nd-card p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* « Une île, un royaume » : deux colonnes reliées par un fil d'or et des sceaux. */
.nd-bridge { position: relative; max-width: 920px; margin: 0 auto; }
.nd-bridge::before { content: ''; position: absolute; left: 50%; top: 70px; bottom: 30px; width: 2px; translate: -50% 0; background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--gold) 55%, transparent) 0 8px, transparent 8px 14px); }
.nd-bridge-head, .nd-pair { display: grid; grid-template-columns: 1fr 74px 1fr; align-items: center; gap: 18px; }
.nd-bridge-head { margin-bottom: 18px; }
.nd-bridge-head strong { font: 600 28px/1 'Cormorant Garamond', Georgia, serif; }
.nd-bridge-head strong:first-child { text-align: right; }
.nd-pair { padding: 14px 0; }
.nd-pair > div { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.nd-pair > div:first-child { text-align: right; }
.nd-pair small { display: block; font: 500 11px/1.2 'Pixelify Sans', monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.nd-pair > div span { display: block; margin-top: 6px; font-size: 15.5px; line-height: 1.5; }
.nd-seal { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; color: #243b2d; background: linear-gradient(135deg, #f3dda3, #ddbd77 55%, #c9a45c); box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px color-mix(in srgb, var(--gold) 45%, transparent), 0 8px 24px rgb(201 164 92 / .3); }
.nd-seal svg { width: 26px; height: 26px; }
.nd-bridge-note { max-width: 640px; margin: 26px auto 0; text-align: center; color: var(--muted); }
@media (max-width: 720px) {
  .nd-bridge::before, .nd-bridge-head { display: none; }
  .nd-pair { grid-template-columns: 1fr; gap: 10px; padding: 18px 0; }
  .nd-pair > div:first-child { text-align: left; }
  .nd-seal { order: -1; width: 54px; height: 54px; }
}

/* Dernier appel, avec les équerres de la vitrine. */
.nd-final { position: relative; max-width: 920px; margin: clamp(70px, 10vw, 120px) auto 0; padding: clamp(46px, 7vw, 76px) 24px; text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgb(233 196 106 / .2), transparent 70%), radial-gradient(ellipse 80% 80% at 50% 50%, rgb(63 140 100 / .1), transparent 75%); }
.nd-final h2 { margin: 12px 0 0; padding: 0; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.06; }
.nd-final p { max-width: 520px; margin: 14px auto 28px; color: var(--muted); font-size: 17px; }
.nd-corner { position: absolute; width: 26px; height: 26px; border: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); }
.nd-corner:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.nd-corner:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.nd-corner:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.nd-corner:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* L'encadré « Apprends l'anglais en jouant » des fiches, aux couleurs de la page. */
.nd-page .cta { max-width: 920px; margin-left: auto; margin-right: auto; border-color: var(--line); background: linear-gradient(180deg, var(--card), var(--card-2)); border-radius: 20px; }
.nd-page .cta-btn { color: #243b2d; background: linear-gradient(135deg, #f3dda3, #c9a45c); }

/* ── Apparition au défilement (inspiration.js) ── */
.nd-js .nd-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.nd-js .nd-reveal.is-in { opacity: 1; transform: none; }

@keyframes nd-drift { from { transform: scale(1.12); } to { transform: scale(1.04) translate(-1%, -1%); } }
@keyframes nd-bob { 50% { translate: 0 -14px; } }
@keyframes nd-sheet { from { background-position-x: 0; } to { background-position-x: var(--sheet-w); } }
@keyframes nd-up { from { opacity: .2; transform: translateY(16px); } }
@keyframes nd-rule { from { opacity: 0; transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .nd-hero-map, .nd-floater, .nd-sprite i, .nd-in, .nd-rule { animation: none; }
  .nd-cta::after { display: none; }
}
