/* ==========================================================================
   Juste Mardi — styles
   White paper, black ink, and exactly one colour: bleu, blanc, rouge, as a hairline.
   Modern CSS only: oklch + light-dark(), container queries, popover + @starting-style,
   cross-document view transitions, text-wrap, logical properties, nesting, @layer.
   ========================================================================== */

@layer reset, base, layout, components, motion;

/* ---------- Fonts (self-hosted, subset by script) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2766, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2766, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/commissioner-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/commissioner-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* The two official colours of the République (DSFR): bleu France and rouge Marianne. */
  --bleu: #000091;
  --rouge: #e1000f;

  /* Everything else is paper and ink. Plain values first, light-dark() pairs below where supported. */
  --papier: #ffffff;
  --encre: #111111;
  --encre-2: #6f6f6f;
  --ligne: #e4e4e4;
  --ligne-2: #c9c9c9;

  --font-serif: "Cormorant Garamond", "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", "Noto Serif CJK JP", "Noto Serif", Georgia, serif;
  --font-sans: "Commissioner", "Hiragino Sans", "Yu Gothic", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK JP", system-ui, sans-serif;

  --fs-s: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --fs-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-1: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-2: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --fs-3: clamp(2rem, 1.55rem + 2.2vw, 3.4rem);
  --fs-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem);
  --fs-hero: clamp(4rem, 1.4rem + 13vw, 13rem);

  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.5rem;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@supports (color: light-dark(#000, #fff)) {
  :root {
    --papier: light-dark(#ffffff, #000000);
    --encre: light-dark(#111111, #f2f2f2);
    --encre-2: light-dark(#6f6f6f, #9a9a9a);
    --ligne: light-dark(#e4e4e4, #262626);
    --ligne-2: light-dark(#c9c9c9, #3a3a3a);
    --bleu: light-dark(#000091, #4d6cff);
    --rouge: light-dark(#e1000f, #ff4d57);
  }
}
/* No popover support → keep the menu out of the flow; the footer still lists every language. */
@supports not selector(:popover-open) {
  .lang-menu, .lang-button { display: none; }
}

/* Cross-document view transitions: switching language cross-fades the page. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
  body { margin: 0; }
  img, svg { display: block; max-inline-size: 100%; }
  button { font: inherit; color: inherit; }
  h1, h2, h3, p, dl, dd, figure { margin: 0; }
  ul[role="list"], ol { padding: 0; }
}

/* ---------- Base ---------- */
@layer base {
  body {
    background: var(--papier);
    color: var(--encre);
    font-family: var(--font-sans);
    font-size: var(--fs-0);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    overflow-x: clip;
  }
  :lang(ja) body, :lang(zh-Hans) body { line-height: 1.8; }
  a { color: inherit; }
  :focus-visible { outline: 1.5px solid var(--encre); outline-offset: 3px; border-radius: 2px; }
  ::selection { background: var(--bleu); color: #fff; }

  .skip-link {
    position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
    padding: 0.6rem 1rem; background: var(--encre); color: var(--papier); text-decoration: none; font-weight: 600;
    transition: top 0.2s;
  }
  .skip-link:focus { top: 1rem; }

  /* Bleu, blanc, rouge: the white band is the paper itself. */
  .tricolore {
    display: inline-block; inline-size: 6rem; block-size: 3px; vertical-align: middle;
    background: linear-gradient(90deg, var(--bleu) 0 33.4%, transparent 33.4% 66.6%, var(--rouge) 66.6%);
  }
  .tricolore--small { inline-size: 1.5rem; block-size: 2px; margin-inline-end: 0.6rem; translate: 0 -1px; }
}

/* ---------- Layout ---------- */
@layer layout {
  .wrap { inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

  .section { padding-block: clamp(5rem, 11vw, 10rem); border-top: 1px solid var(--ligne); }
  .section-grid { display: grid; gap: 1.25rem 3rem; grid-template-columns: minmax(0, 1fr); }
  .section-label {
    align-self: start;
    font-family: var(--font-serif); font-style: italic; font-weight: 400;
    font-size: var(--fs-2); line-height: 1.1; color: var(--encre-2);
  }
  :lang(ru) .section-label, :lang(ja) .section-label, :lang(zh-Hans) .section-label { font-style: normal; }
  @media (min-width: 60rem) {
    .section-grid { grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem 5rem; }
    .section-label { position: sticky; top: calc(var(--header-h) + 1.5rem); }
  }
}

/* ---------- Components ---------- */
@layer components {

  /* Header — invisible over the title page, a hairline once past it */
  .site-header {
    position: fixed; inset-inline: 0; top: 0; z-index: 50;
    color: var(--encre);
    view-transition-name: site-header;
    transition: background-color 0.3s, box-shadow 0.3s;
  }
  .site-header.is-solid {
    background: color-mix(in oklab, var(--papier) 86%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--ligne);
  }
  .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: var(--header-h); }
  .brand {
    font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em;
    text-decoration: none; line-height: 1;
    opacity: 0; translate: 0 -4px; pointer-events: none;
    transition: opacity 0.3s, translate 0.3s;
  }
  .site-header.is-solid .brand { opacity: 1; translate: 0 0; pointer-events: auto; }
  .site-nav { display: none; gap: 2rem; margin-inline-start: auto; margin-inline-end: 2rem; }
  @media (min-width: 52rem) { .site-nav { display: flex; } }
  .site-nav a {
    text-decoration: none; font-size: var(--fs-s); font-weight: 500; color: var(--encre-2);
    padding-block: 0.3rem; border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }
  .site-nav a:hover { color: var(--encre); border-color: currentColor; }

  .flag {
    inline-size: 1.4rem; block-size: auto; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 1px; box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.12);
    flex: none;
  }

  .lang-button {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-block-size: 2.75rem; padding: 0.35rem 0.85rem 0.35rem 0.6rem;
    border: 1px solid var(--ligne-2); border-radius: 999px; background: var(--papier);
    font-weight: 500; font-size: var(--fs-s); line-height: 1; cursor: pointer;
    transition: border-color 0.2s;
  }
  .lang-button:hover { border-color: var(--encre); }
  .lang-button .icon { color: var(--encre-2); }

  /* Hero — a title page: the name, the three colours, one line */
  .hero {
    position: relative;
    min-block-size: 100svh;
    display: grid; grid-template-rows: 1fr auto; place-items: center;
    padding-block: var(--header-h) 2.5rem;
    text-align: center;
  }
  .hero-inner { display: grid; justify-items: center; gap: 1.6rem; }
  .hero-greeting { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-2); line-height: 1; color: var(--encre-2); margin-block-end: -0.4rem; }
  .wordmark {
    font-family: var(--font-serif); font-weight: 500;
    font-size: var(--fs-hero); line-height: 0.92; letter-spacing: -0.02em;
    text-wrap: balance;
  }
  .hero-tagline {
    font-family: var(--font-serif); font-style: italic; font-weight: 400;
    font-size: var(--fs-2); line-height: 1.2; color: var(--encre-2); text-wrap: balance;
  }
  :lang(ru) .hero-tagline, :lang(ja) .hero-tagline, :lang(zh-Hans) .hero-tagline { font-style: normal; }
  .hero-foot { display: grid; gap: 0.6rem; justify-items: center; }
  .week {
    list-style: none; margin: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.25rem;
    font-size: var(--fs-s); font-weight: 400; color: var(--encre-2);
  }
  .week .is-mardi { color: var(--rouge); font-weight: 600; }
  .hero-today { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-1); color: var(--encre); }
  :lang(ru) .hero-today, :lang(ja) .hero-today, :lang(zh-Hans) .hero-today { font-style: normal; }

  /* Studio */
  .lede {
    font-family: var(--font-serif); font-weight: 500;
    font-size: var(--fs-4); line-height: 1.06; letter-spacing: -0.012em;
    max-inline-size: 24ch; text-wrap: balance; hanging-punctuation: first;
    margin-block-end: 1.5rem;
  }
  :lang(ja) .lede, :lang(zh-Hans) .lede { font-size: var(--fs-3); line-height: 1.3; letter-spacing: 0; }
  .prose { max-inline-size: 58ch; font-size: var(--fs-1); line-height: 1.55; text-wrap: pretty; }
  .values {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 2rem clamp(1.5rem, 3vw, 3rem); margin-block-start: clamp(3rem, 6vw, 5rem);
  }
  .values dt { font-family: var(--font-serif); font-size: var(--fs-2); font-weight: 500; line-height: 1.12; margin-block-end: 0.4rem; }
  .values dd { color: var(--encre-2); max-inline-size: 32ch; text-wrap: pretty; }

  /* La carte — a bistro menu: just the list, with dotted leaders */
  .menu-title {
    display: flex; align-items: center; justify-content: center; gap: 0.6em;
    font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-3); line-height: 1;
    margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
  }
  .fleuron { font-family: "Cormorant Garamond", serif; font-size: 0.5em; color: var(--encre-2); line-height: 1; }
  .menu-list { list-style: none; margin: 0; }
  .menu-list li { display: flex; align-items: baseline; gap: 0.8rem; padding-block: clamp(0.6rem, 1.4vw, 0.9rem); }
  .menu-name { font-family: var(--font-serif); font-size: var(--fs-2); font-weight: 500; line-height: 1.12; text-wrap: balance; }
  .menu-leader { flex: 1 1 1.5rem; min-inline-size: 1.5rem; border-bottom: 1px dotted var(--ligne-2); translate: 0 -0.3em; }
  .menu-note { font-size: var(--fs-0); line-height: 1.35; color: var(--encre-2); text-align: end; max-inline-size: 46%; text-wrap: balance; }
  @media (max-width: 40rem) {
    .menu-list li { flex-wrap: wrap; gap: 0.1rem 0; padding-block: 0.8rem; border-bottom: 1px solid var(--ligne); }
    .menu-list li:last-child { border-bottom: 0; }
    .menu-leader { display: none; }
    .menu-note { flex-basis: 100%; text-align: start; max-inline-size: none; }
  }
  .menu-foot { margin-block-start: clamp(1.5rem, 3vw, 2.5rem); text-align: center; font-family: var(--font-serif); font-style: italic; font-size: var(--fs-1); color: var(--encre-2); }
  :lang(ru) .menu-foot, :lang(ja) .menu-foot, :lang(zh-Hans) .menu-foot { font-style: normal; }

  /* Pourquoi mardi — text, then a postcard laid flat on the page */
  .mardi-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4rem); }
  .mardi-text h2 { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-3); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin-block-end: 1rem; }
  .mardi-text p { font-size: var(--fs-1); line-height: 1.55; max-inline-size: 52ch; text-wrap: pretty; }

  .postcard {
    --pc-bg: #ffffff; --pc-ink: #111111; --pc-line: #d6d6d6;
    color-scheme: light;
    container-type: inline-size;
    background: var(--pc-bg); color: var(--pc-ink);
    border: 1px solid #c9c9c9;
    aspect-ratio: 3 / 2;
    display: grid; grid-template-columns: 1.1fr 1px 1fr; gap: clamp(0.8rem, 3cqi, 1.4rem);
    padding: clamp(1rem, 4cqi, 1.6rem);
    inline-size: min(100%, 34rem);
  }
  .postcard-left { display: grid; align-content: start; }
  .postcard-date { font-family: var(--font-serif); font-style: italic; font-size: clamp(0.85rem, 3cqi, 1.05rem); color: #6f6f6f; margin-block-end: 0.8em; line-height: 1.25; }
  .postcard-greeting { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(1.25rem, 5.4cqi, 2.1rem); line-height: 1.05; margin-block-end: 0.5em; text-wrap: balance; }
  .postcard-text { font-family: var(--font-serif); font-style: italic; font-size: clamp(0.95rem, 3.4cqi, 1.3rem); line-height: 1.32; text-wrap: pretty; }
  .postcard-sign { font-family: var(--font-serif); font-style: italic; font-size: clamp(0.95rem, 3.4cqi, 1.25rem); margin-block-start: 0.6em; text-align: end; }
  :lang(ru) .postcard :is(.postcard-date, .postcard-greeting, .postcard-text, .postcard-sign, .postcard-address p),
  :lang(ja) .postcard :is(.postcard-date, .postcard-greeting, .postcard-text, .postcard-sign, .postcard-address p),
  :lang(zh-Hans) .postcard :is(.postcard-date, .postcard-greeting, .postcard-text, .postcard-sign, .postcard-address p) { font-style: normal; }
  .postcard-divider { background: var(--pc-line); }
  .postcard-right { display: grid; grid-template-rows: auto 1fr; }
  .postcard-stamp-area { position: relative; display: flex; justify-content: flex-end; block-size: clamp(3.6rem, 15cqi, 5.6rem); }
  .stamp { block-size: 100%; inline-size: auto; }
  .postmark { position: absolute; inset-inline-end: 2.4rem; top: 0.6rem; inline-size: clamp(5rem, 20cqi, 7.6rem); color: #555; rotate: -9deg; }
  .postcard-address { align-self: end; display: grid; gap: 0.75em; }
  .postcard-address p {
    border-bottom: 1px solid var(--pc-line); padding-block-end: 0.1em; min-block-size: 1.3em;
    font-family: var(--font-serif); font-style: italic; font-size: clamp(0.9rem, 3.2cqi, 1.15rem); line-height: 1.2;
  }

  /* Contact — and l'Hexagone */
  .contact-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: start; }
  @media (min-width: 60rem) { .contact-body { grid-template-columns: minmax(0, 1fr) auto; gap: 5rem; } }
  .contact h2 { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-4); line-height: 1.04; letter-spacing: -0.012em; margin-block-end: 1rem; text-wrap: balance; }
  :lang(ja) .contact h2, :lang(zh-Hans) .contact h2 { font-size: var(--fs-3); line-height: 1.25; letter-spacing: 0; }
  .contact-text { font-size: var(--fs-1); line-height: 1.5; max-inline-size: 46ch; color: var(--encre-2); margin-block-end: 2.25rem; text-wrap: pretty; }
  .email {
    display: inline-block; max-inline-size: 100%;
    font-family: var(--font-serif); font-weight: 500;
    font-size: clamp(1.5rem, 0.9rem + 2.8vw, 3.1rem); line-height: 1.15;
    text-decoration: none; overflow-wrap: anywhere;
    border-bottom: 1px solid var(--encre);
    transition: color 0.2s, border-color 0.2s;
  }
  .email:hover { color: var(--bleu); border-color: var(--bleu); }
  .contact-meta { display: grid; gap: 0.25rem; margin-block-start: 2.5rem; color: var(--encre-2); font-size: var(--fs-0); }
  .contact-meta [data-paris-time] { font-variant-numeric: tabular-nums; }

  .hexagone-figure { display: grid; justify-items: center; gap: 1rem; }
  @media (min-width: 60rem) { .hexagone-figure { padding-block-start: 0.5rem; } }
  .hexagone { inline-size: clamp(9rem, 20vw, 13rem); color: var(--encre); }
  .hexagone-figure figcaption { display: grid; justify-items: center; gap: 0.15rem; text-align: center; font-size: var(--fs-s); color: var(--encre-2); }
  .hexagone-name { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-1); color: var(--encre); }

  /* Footer — every language, then the small print */
  .site-footer { border-top: 1px solid var(--ligne); padding-block: clamp(3rem, 6vw, 5rem) 2.5rem; }
  .footer-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-2); line-height: 1.1; margin-block-end: 1.25rem; }

  .lang-row { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
  .lang-row a {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.75rem; margin-inline-start: -0.75rem; border-radius: 0.4rem;
    text-decoration: none; font-weight: 500; font-size: var(--fs-0);
    transition: background-color 0.2s;
  }
  .lang-row a + a, .lang-row li + li a { margin-inline-start: 0; }
  .lang-row a:hover { background: var(--ligne); }
  .lang-row a[aria-current] .lang-native { text-decoration: underline; text-decoration-color: var(--rouge); text-underline-offset: 0.25em; text-decoration-thickness: 1.5px; }
  .lang-row .lang-en { display: none; }

  .footer-bottom {
    margin-block-start: clamp(2.5rem, 5vw, 4rem); padding-block-start: 1.25rem;
    border-top: 1px solid var(--ligne);
    display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem;
    font-size: var(--fs-s); color: var(--encre-2);
  }
  .footer-bottom .made { color: var(--encre); display: inline-flex; align-items: center; }
  .footer-type { flex-basis: 100%; }

  /* Language menu — a native popover in the top layer */
  .lang-menu {
    position: fixed; inset: 0; margin: auto;
    inline-size: min(100% - 2rem, 60rem);
    max-block-size: min(100dvh - 2rem, 46rem); overflow: auto; overscroll-behavior: contain;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--ligne-2); border-radius: 0.75rem;
    background: var(--papier); color: var(--encre);
    box-shadow: 0 30px 60px -30px oklch(0% 0 0 / 0.35);
    opacity: 0; translate: 0 12px;
    transition: opacity 0.25s var(--ease-out), translate 0.25s var(--ease-out),
                display 0.25s allow-discrete, overlay 0.25s allow-discrete;
  }
  .lang-menu:popover-open {
    opacity: 1; translate: 0 0;
    @starting-style { opacity: 0; translate: 0 12px; }
  }
  .lang-menu::backdrop {
    background: color-mix(in oklab, var(--papier) 70%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
  }
  .lang-menu:popover-open::backdrop { opacity: 1; @starting-style { opacity: 0; } }
  .lang-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-block-end: 1.25rem; }
  .lang-menu-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-3); line-height: 1; }
  .lang-menu-sub { margin-block-start: 0.4rem; color: var(--encre-2); }
  .icon-button {
    inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%; cursor: pointer; flex: none;
    display: grid; place-items: center; padding: 0;
    border: 1px solid var(--ligne-2); background: var(--papier);
    transition: border-color 0.2s;
  }
  .icon-button:hover { border-color: var(--encre); }

  .lang-grid { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.5rem; }
  @media (min-width: 62rem) { .lang-grid { grid-template-columns: repeat(5, 1fr); } }
  @media (max-width: 30rem) { .lang-grid { grid-template-columns: 1fr 1fr; } }
  .lang-grid a {
    display: flex; align-items: center; gap: 0.8rem; min-block-size: 3.75rem;
    padding: 0.75rem 0.9rem; border: 1px solid var(--ligne); border-radius: 0.5rem; text-decoration: none;
    transition: border-color 0.2s;
  }
  .lang-grid a:hover { border-color: var(--encre); }
  .lang-grid a[aria-current] { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
  .lang-grid .flag { inline-size: 1.9rem; }
  .lang-names { display: grid; line-height: 1.2; min-inline-size: 0; }
  .lang-native { font-weight: 600; font-size: var(--fs-0); }
  .lang-en { font-size: 0.78em; color: var(--encre-2); }

  /* Language hint — a small, dismissable note for first-time visitors */
  .lang-hint {
    position: fixed; z-index: 60; bottom: max(1rem, env(safe-area-inset-bottom)); inset-inline: 0;
    margin-inline: auto; inline-size: min(100% - 2rem, 34rem);
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem;
    padding: 1rem 1.1rem; border-radius: 0.75rem;
    background: var(--papier); color: var(--encre); border: 1px solid var(--ligne-2);
    box-shadow: 0 20px 40px -20px oklch(0% 0 0 / 0.3);
    transition: opacity 0.3s, translate 0.3s, display 0.3s allow-discrete;
    @starting-style { opacity: 0; translate: 0 10px; }
  }
  .lang-hint[hidden] { display: none; opacity: 0; translate: 0 10px; }
  .lang-hint .flag { inline-size: 2rem; }
  .lang-hint p { flex: 1 1 12rem; font-weight: 500; line-height: 1.35; }
  .lang-hint-actions { display: flex; gap: 0.5rem; margin-inline-start: auto; }
  .button {
    display: inline-flex; align-items: center; justify-content: center; min-block-size: 2.5rem;
    padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--encre);
    background: var(--encre); color: var(--papier); font-weight: 600; font-size: var(--fs-s);
    text-decoration: none; cursor: pointer; white-space: nowrap;
  }
  .button--ghost { background: transparent; color: var(--encre); border-color: var(--ligne-2); }
  .button--ghost:hover { border-color: var(--encre); }
}

/* ---------- Motion — one quiet entrance, nothing else moves by itself ---------- */
@layer motion {
  @keyframes rise {
    from { opacity: 0; translate: 0 0.4rem; }
    to { opacity: 1; translate: 0 0; }
  }
  .hero-greeting, .wordmark, .tricolore--hero, .hero-tagline, .hero-foot { animation: rise 0.9s var(--ease-out) both; }
  .hero-greeting { animation-delay: 0.05s; }
  .wordmark { animation-delay: 0.15s; }
  .tricolore--hero { animation-delay: 0.45s; }
  .hero-tagline { animation-delay: 0.6s; }
  .hero-foot { animation-delay: 0.9s; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
  }
}
