/* Base: reset, typography, layout primitives, header and footer. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nm-lock { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--zellige); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--zellige); outline-offset: 3px; border-radius: 4px; }
.nm-section--night :focus-visible, .nm-footer :focus-visible, .nm-header--over :focus-visible { outline-color: var(--gold-2); }
::selection { background: var(--gold-1); color: var(--night); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.12; letter-spacing: var(--display-track); margin: 0 0 .5em; text-wrap: balance; color: inherit; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
small { font-size: var(--step--1); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.nm-skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--night); color: var(--paper); padding: .7rem 1.1rem; border-radius: var(--r-pill); text-decoration: none; }
.nm-skip:focus { top: 12px; }
.screen-reader-text, .nm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.nm-wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.nm-wrap--narrow { max-width: calc(760px + var(--gutter) * 2); }
.nm-section { padding-block: var(--section); position: relative; }
.nm-section--tight { padding-block: calc(var(--section) * .6); }
.nm-section--menthe { background: var(--menthe); }
.nm-section--sable { background: var(--sable); }
.nm-section--night { background: var(--night); color: var(--paper); isolation: isolate; }
.nm-section--night::before, .nm-zellige::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url('../img/pattern-zellige.svg') center / 112px repeat; opacity: .05;
}
.nm-section--night a:not(.nm-btn) { color: var(--gold-1); }
.nm-lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.nm-section--night .nm-lead { color: rgba(255, 253, 249, .78); }
.nm-kicker { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--step-1); color: var(--zellige); margin-bottom: .4rem; }
.nm-section--night .nm-kicker { color: var(--gold-2); }
.nm-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.nm-head--center { margin-inline: auto; text-align: center; }
.nm-head--center p { margin-inline: auto; }
.nm-gold {
  background: linear-gradient(100deg, var(--gold-3) 0%, var(--gold-2) 28%, var(--gold-1) 50%, var(--gold-2) 72%, var(--gold-3) 100%);
  background-size: 220% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Header */
.nm-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 249, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.nm-header.is-scrolled { border-bottom-color: var(--line); }
.nm-header--over { position: fixed; inset: 0 0 auto; background: transparent; color: var(--paper); backdrop-filter: none; }
.nm-header--over.is-scrolled { background: rgba(26, 35, 80, .92); backdrop-filter: saturate(1.2) blur(10px); border-bottom-color: var(--line-night); }
.nm-header__bar { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); min-height: var(--header-h); }
.nm-logo { display: inline-flex; align-items: flex-start; gap: 2px; font-family: var(--font-logo); font-size: 1.85rem; line-height: 1; letter-spacing: -.02em; color: inherit; text-decoration: none; }
.nm-logo .nm-icon { width: .62em; height: .62em; color: var(--apricot); margin-top: -.12em; }
.nm-nav { display: flex; gap: clamp(12px, 1.6vw, 24px); margin-right: auto; }
.nm-nav ul { display: contents; list-style: none; }
.nm-nav a { color: inherit; text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nm-nav a:hover, .nm-nav .current-menu-item > a, .nm-nav a[aria-current="page"] { border-bottom-color: var(--apricot); }
.nm-header__actions { display: flex; align-items: center; gap: 10px; }
.nm-iconlink { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); color: inherit; text-decoration: none; }
button.nm-iconlink { background: none; border: 0; padding: 0; cursor: pointer; }
.nm-iconlink:hover { background: rgba(127, 127, 160, .12); }
.nm-iconlink .nm-icon { width: 22px; height: 22px; }
.nm-count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--apricot); color: var(--night); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.nm-resume { font-weight: 600; font-size: .95rem; color: inherit; text-decoration: none; padding: .5rem .2rem; }
.nm-resume:hover { text-decoration: underline; }
.nm-menu-toggle { display: none; }
.nm-header__cta { padding-block: .72em; }

.nm-sheet { position: fixed; inset: 0; z-index: 60; background: var(--night); color: var(--paper); padding: 20px var(--gutter) 40px; display: flex; flex-direction: column; gap: 28px; overflow-y: auto; isolation: isolate; }
.nm-sheet[hidden] { display: none; }
.nm-sheet__top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.nm-sheet nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.nm-sheet nav a { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; color: var(--paper); text-decoration: none; padding: .35rem 0; }
.nm-sheet__links { display: grid; gap: 10px; }
.nm-sheet__links a { color: rgba(255, 253, 249, .8); text-decoration: none; }

@media (max-width: 960px) {
  .nm-nav, .nm-resume, .nm-header .nm-header__cta { display: none; }
  .nm-menu-toggle { display: inline-grid; margin-left: auto; }
  .nm-header__actions { margin-left: auto; }
  .nm-menu-toggle { margin-left: 0; }
}
/* Age pages (« De 0 à 3 ans »…) appended to the primary menu: on wide screens and in the mobile menu. */
@media (min-width: 961px) and (max-width: 1359px) {
  .nm-nav li:has(> a[href*="/livres-personnalises-"]) { display: none; }
}

/* Footer */
.nm-footer { position: relative; background: var(--night-3); color: rgba(255, 253, 249, .78); padding: clamp(56px, 7vw, 96px) 0 32px; isolation: isolate; overflow: hidden; }
.nm-footer a { color: var(--paper); text-decoration: none; }
.nm-footer a:hover { text-decoration: underline; }
.nm-footer__line { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--step-4); color: var(--paper); line-height: 1.1; max-width: 16ch; margin: 0 0 clamp(36px, 5vw, 64px); }
.nm-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.nm-footer h2 { font-family: var(--font-ui); font-size: .95rem; font-weight: 700; color: var(--paper); margin-bottom: .9rem; letter-spacing: 0; }
.nm-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.nm-footer__pay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.nm-footer__pay span { border: 1px solid var(--line-night); border-radius: 6px; padding: .3rem .6rem; font-size: .8rem; font-weight: 600; color: var(--paper); }
.nm-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-night); font-size: .875rem; }
.nm-footer__legal ul { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 860px) { .nm-footer__grid { grid-template-columns: 1fr 1fr; } .nm-footer__brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.nm-footer.nm-zellige::before { opacity: .045; }
