/* Pap’pote, accueil « Piste 27 » intégré au site (30/10/2026) : ce que la maquette n’avait pas.
   - le vrai menu des 39 langues (#langMenu, piloté par design-system/landing.js), dans le style de l’en-tête ;
   - les crochets que landing.js lit sans les montrer (#themeBtn, #demoSay : masqués, décision D7) ;
   - les écritures que la maquette n’a jamais essayées (hébreu, chinois, japonais, coréen, hindi, cyrillique, grec) :
     piles de polices système explicites, ni capitales forcées ni interlettrage là où l’écriture n’en a pas ;
   - le pied de page juridique complet ;
   - deux retouches de la carte sur téléphone demandées à l’intégration (amas et repère de Paris, légende sous la barre).
   Couleurs : uniquement les jetons de style.css (--c-*, qui pointent vers --pp-p27-* de design-system/v2/tokens.css). */

/* ---------- Crochets de landing.js ---------- */
#themeBtn[hidden], #demoSay[hidden], .lang-pop[hidden] { display: none; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Menu des langues ---------- */
.lang-menu { position: relative; }
.lang-menu .ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lang-menu .ic.chev { width: 14px; height: 14px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 10px;
  background: transparent; color: inherit; border: 1px solid var(--c-ivory-a35); border-radius: 22px;
  font: 500 0.95rem/1 var(--font-text); white-space: nowrap; cursor: var(--pp-cursor-pointer, var(--ds-cursor-pointer, pointer));
}
.lang-btn:hover { border-color: var(--c-ivory-a60); }
.lang-btn .ppl-flag, .lang-list .ppl-flag { display: inline-flex; flex: none; }
.lang-btn .ppl-flag img, .lang-list .ppl-flag img { display: block; width: 18px; height: 18px; border-radius: 50%; }
.lang-cur { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.lang-pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 50;
  width: min(280px, calc(100vw - 32px));
  padding: 8px 0;
  background: var(--c-night-900); color: var(--ink-night); /* opaque : le texte de la page ne doit pas transparaître (Raphaël, 05/11/2026) */
  border: 1px solid var(--c-ivory-a20); border-radius: 12px;
  box-shadow: 0 18px 40px var(--c-night-a70);
  /* Safari (05/11/2026, capture de Raphaël) : la liste qui défile passait sur sa propre couche, au-dessus du titre de la page,
     sans le fond du menu. Le menu forme sa propre couche et la liste porte le même fond plein. */
  isolation: isolate; transform: translateZ(0);
}
.lang-pop-title {
  padding: 6px 16px 8px;
  font-family: "Barlow Condensed", var(--font-display); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.82;
}
.lang-list { list-style: none; margin: 0; padding: 0; background: var(--c-night-900); max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.lang-list li {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  cursor: var(--pp-cursor-pointer, var(--ds-cursor-pointer, pointer));
}
.lang-list li > span[dir] { flex: 1; }
.lang-list li:hover, .lang-list li:focus { background: var(--c-ivory-a12); outline: none; }
.lang-list li:focus-visible { outline: 2px solid var(--c-ivory-50); outline-offset: -2px; }
.lang-list .chk { width: 16px; height: 16px; visibility: hidden; }
.lang-list li[aria-selected="true"] { font-weight: 600; }
.lang-list li[aria-selected="true"] .chk { visibility: visible; }
/* Navigation repliée (style.css, 1080 px) : le menu des langues est dans le panneau, sa liste s’y déplie sur place. */
@media (max-width: 1080px) {
  .js .lang-menu { margin-top: 12px; }
  .js .lang-btn { width: 100%; justify-content: flex-start; }
  .js .lang-btn .ic.chev { margin-inline-start: auto; }
  .js .lang-pop { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .js .lang-list { max-height: min(46vh, 360px); }
}

/* ---------- Pied de page juridique ---------- */
.foot-nav ul { flex-wrap: wrap; }
.foot-copy { margin: 0; font-size: 0.85rem; opacity: 0.82; }

/* ---------- Écritures sans capitales ni interlettrage (comme l’arabe de la maquette) ---------- */
html[lang="he"] {
  --font-serif: "Noto Serif Hebrew", "Times New Roman", serif;
  --font-display: "Noto Sans Hebrew", "Arial Hebrew", "Segoe UI", Arial, sans-serif;
  --font-text: "Noto Sans Hebrew", "Arial Hebrew", "Segoe UI", Arial, sans-serif;
}
html[lang="zh"] {
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-text: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[lang="ja"] {
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-display: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-text: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}
html[lang="ko"] {
  --font-serif: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --font-display: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-text: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
html[lang="hi"] {
  --font-serif: "Noto Serif Devanagari", "Kohinoor Devanagari", serif;
  --font-display: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", sans-serif;
  --font-text: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", sans-serif;
}
/* Cyrillique et grec : Barlow et Instrument Serif ne couvrent que le latin ; repli système nommé. */
html:is([lang="ru"], [lang="uk"], [lang="el"]) {
  --font-serif: "Noto Serif", "Georgia", "Times New Roman", serif;
  --font-display: "Roboto Condensed", "Arial Narrow", "Noto Sans", Arial, sans-serif;
  --font-text: "Noto Sans", "Segoe UI", Arial, sans-serif;
}
html:is([lang="he"], [lang="zh"], [lang="ja"], [lang="ko"], [lang="hi"]) :is(.strip, .kicker, .dest-kicker, .kicker-line, .pass-kind, .pass-fields dt, .field label, .valise legend, .seats-cap, .cab-class, .soon, .cm-lab, .cf-flight, .lang-pop-title) { letter-spacing: 0; text-transform: none; }
html:is([lang="he"], [lang="zh"], [lang="ja"], [lang="ko"], [lang="hi"]) :is(h1, h2) { text-transform: none; letter-spacing: 0; line-height: 1.3; }
html:is([lang="he"], [lang="zh"], [lang="ja"], [lang="ko"], [lang="hi"]) :is(.ann h3, .valise h3, .exams h3, .schools h3, .family h3) { line-height: 1.35; }
html:is([lang="zh"], [lang="ja"], [lang="ko"]) :is(h1, h2, h3, p, li) { overflow-wrap: anywhere; line-break: strict; }

/* ---------- Carte sur téléphone (retouches demandées à l’intégration, 30/10/2026) ---------- */
/* 1. Le repère de Paris (piste 27) ne déborde plus sous la pastille d’un amas posé dessus (carte.js : is-sous-amas). */
.cm-hub.is-sous-amas { visibility: hidden; }
/* 2. La barre fixe « S’enregistrer » (lot2.css, --l2-barre-h) ne recouvre plus la légende de la carte. */
@media (max-width: 768px) {
  .l2-barre-pret .carte { padding-bottom: calc(var(--l2-barre-h) + env(safe-area-inset-bottom, 0px)); }
}

/* Lien d’évitement du serveur (lib/landing-i18n foot_skip) : premier élément focalisable, visible au focus seulement. */
.lg-skip {
  position: absolute; inset-inline-start: 8px; top: -80px; z-index: 60;
  padding: 10px 14px; background: var(--c-ivory-50); color: var(--c-night-900); font-weight: 600;
}
.lg-skip:focus { top: 8px; }

/* Connexion toujours atteignable (30/10/2026) : au-delà de 1080 px, une fois la page défilée, « Embarquer / Se connecter »
   reste à côté de l’inscription au lieu de lui céder la place ; en dessous, elle est aussi dans le panneau replié. */
.nav-login { display: none; }
@media (min-width: 1081px) {
  .is-scrolled .hdr-swap { display: flex; align-items: center; gap: 18px; }
  .is-scrolled .login { visibility: visible; }
}
/* Entre 1081 et 1279 px, défilé : la barre porte connexion et inscription ; dans les langues aux libellés longs, on garde
   seulement « Se connecter » et l’inscription passe sur deux lignes, pour que rien ne sorte de la barre. */
@media (min-width: 1081px) and (max-width: 1279px) {
  .is-scrolled .hdr-swap { gap: 12px; }
  .is-scrolled .login-main { display: none; }
  .is-scrolled .login-sub { font-size: 0.9em; margin-top: 0; }
  .is-scrolled .btn-hdr { white-space: normal; text-align: center; line-height: 1.1; max-width: 10em; padding: 4px 12px; }
}
/* Panneau replié : la liste des langues reste dans l’écran (elle défile), sous l’en-tête. */
@media (max-width: 1080px) {
  .js .nav .lang-pop { position: fixed; top: calc(var(--header-h) + 8px); inset-inline: 16px; width: auto; display: flex; flex-direction: column; max-height: calc(100dvh - var(--header-h) - 24px); }
  .js .nav .lang-pop[hidden] { display: none; }
  .js .nav .lang-list { max-height: none; flex: 1 1 auto; min-height: 0; }
}
@media (max-width: 1080px) {
  .js .nav .nav-login {
    display: flex; align-items: center; min-height: 48px; width: 100%; font-size: 1.1rem;
    border-bottom: 1px solid var(--c-ivory-a12); text-decoration: underline; text-underline-offset: 4px;
  }
}
/* Bouton du menu : cible de 44 px (WCAG 2.5.8 renforcé par le dépôt) */
.menu-btn.icon-btn { min-width: 44px; min-height: 44px; }
/* Réseaux sociaux du pied de page */
.site-footer .pp-social { margin: 0; padding: 0; border: 0; }
/* Très petits écrans (280 px, téléphone plié) : l’en-tête du billet passe à la ligne au lieu de déborder. */
@media (max-width: 340px) {
  .pass-top { flex-wrap: wrap; row-gap: 4px; }
  .pass-kind { min-width: 0; overflow-wrap: anywhere; }
}
/* Tableau des examens : dans les langues aux mots longs (de, ru, fi…), les cellules passent à la ligne au lieu
   d’élargir la colonne et la page. */
.exams-text { min-width: 0; }
.manifest th, .manifest td { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 400px) {
  .manifest th { letter-spacing: 0.04em; }
}
/* En-tête à 280-340 px : l’appel d’inscription peut passer sur deux lignes, la marque se resserre. */
@media (max-width: 340px) {
  .hdr-row { gap: 8px; }
  .btn-hdr { white-space: normal; text-align: center; line-height: 1.1; padding: 4px 10px; font-size: 0.9rem; max-width: 9.5em; }
  .brand-wordmark:not(.foot-wordmark), .brand-wordmark:not(.foot-wordmark) img { height: 22px; }
}
/* Mots longs (de, ru, uk, fi…) aux très petites largeurs : les blocs de texte peuvent rétrécir et couper un mot. */
main :is(.sec-head, .family-text, .exams-text, .method-text, .dest-text) { min-width: 0; }
main :is(h1, h2, h3, .kicker-line, .lead, .kicker) { overflow-wrap: break-word; }
@media (max-width: 400px) {
  main :is(h1, h2, h3) { hyphens: auto; }
  main .kicker-line { flex-wrap: wrap; }
}
/* Règle du dépôt (test/responsive/v2-vibe-guard.e2e.js, n° 10) : aucun texte invisible sous le pli au chargement. Les
   bulles du guide restent lisibles d’emblée ; à leur entrée à l’écran, seul un léger glissement subsiste. */
.l2-bulle.l2-attend { opacity: 1; }

/* Intégration : commandes de l'intro du côté fin de ligne (miroir en rtl), pour laisser le coin de début de ligne à la
   pastille de retrait du consentement ; sous 340 px, « Passer l’intro » devient un bouton-icône de 44 px (son libellé
   reste lu par les lecteurs d’écran) pour tenir à côté d’elle sans monter sur l’appel du héros. */
[dir="rtl"] .hv-ctrl { right: auto; left: var(--gutter); }
@media (max-width: 340px) {
  .hv-ctrl .hv-skip { justify-content: center; gap: 0; width: 44px; padding: 0; }
  .hv-ctrl .hv-skip > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Le lien du mot-symbole reste une cible de 44 px de haut quand le mot-symbole rétrécit (≤ 340 px). */
.site-header .brand { min-height: 44px; align-items: center; }

/* Téléphone à l'horizontale très bas (≤ 420 px de haut) : le texte du premier écran s'élargit vers le hublot et se
   resserre (le surtitre et la ligne « pour qui » s'effacent) pour que l'appel « Commencer » reste dans le premier écran. */
@media (orientation: landscape) and (max-height: 420px) {
  .hv .h-text { left: calc(50vw - 8vw); padding: 6px 10px 10px; border-radius: 6px; background: var(--c-cabin-a80); }
  .hv .kicker, .hv .who { display: none; }
  .hv h1, html[lang="ar"] .hv h1 { font-size: clamp(1.25rem, 7.2vh, 1.9rem); }
  .hv .sub { font-size: 0.85rem; line-height: 1.3; margin-top: 4px; }
  .hv .actions { margin-top: 8px; }
}

/* Testeurs simulés (30/10/2026) : cibles d'au moins 44 × 44 px partout, y compris dans les langues aux mots courts
   (hi, he, zh), et le bouton « Passer l'introduction » ; place réservée sous le pied tant que la bannière
   « Installer Pap'pote » (pwa-install.js) est ouverte, pour qu'elle ne cache plus la fin de la page ni le focus. */
.anchors a, .site-header #loginBtn { min-inline-size: 44px; justify-content: center; text-align: center; }
/* Audit landing (11/11/2026) : « Se connecter » se lisait mal sur l'image du haut (texte crème à 82 %). Une pastille
   sombre (jeton --pp-ink-900) le porte, sur téléphone seulement (la largeur de l'en-tête ne bouge pas sur ordinateur) ; le libellé et le lien ne changent pas. */
@media (max-width: 767.98px) {
  .site-header #loginBtn { background: color-mix(in srgb, var(--pp-ink-900, var(--fq-graphite)) 80%, transparent); border-radius: var(--fq-r-pill, 999px); padding-inline: var(--fq-s-2, 8px); }
  .site-header .login-sub { opacity: 1; }
}
.hv-skip { min-block-size: 44px; }
html:root body:has(> .pp-pwa.in) { padding-block-end: calc(var(--p27-pwa-reserve, 210px) + env(safe-area-inset-bottom, 0px)); }
/* le focus ne passe ni sous l'en-tête fixe, ni sous la puce « Cookies » (testeurs simulés : focus masqué) */
html { scroll-padding-block-start: calc(var(--header-h) + 12px); }
.sec, .destination { scroll-margin-top: 0; } /* la marge vient désormais de scroll-padding (sinon elle compterait deux fois) */
html:has(.ppc-chip) { scroll-padding-block-end: calc(76px + env(safe-area-inset-bottom, 0px)); }
html.l2-barre-pret:has(.ppc-chip) { scroll-padding-block-end: calc(var(--l2-barre-h, 68px) + env(safe-area-inset-bottom, 0px)); }
html:root:has(.pp-pwa.in) { scroll-padding-block-end: calc(var(--p27-pwa-reserve, 210px) + env(safe-area-inset-bottom, 0px)); }
/* le panneau de navigation replié (≤ 1080 px) dépassait de 7 px à droite en roumain avec un grand texte (défilement
   horizontal mesuré sur iPad mini) : l'en-tête rogne à l'horizontale sans devenir un conteneur de défilement */
.site-header, .site-header .hdr-row { overflow-x: clip; }
/* un écran de la tablette du siège qui s'efface ne capte plus le toucher (bouton « Écouter » recouvert en arabe) */
.pane:not(.is-on) { pointer-events: none; }
/* les six escales en colonnes : un mot long (roumain, grand texte, 768 px) élargissait la page ; il se coupe désormais */
.stops-list > li { min-inline-size: 0; }
.stops-list :is(.stop-t, .stop-ex) { overflow-wrap: anywhere; hyphens: auto; }
/* grand texte : le contenu d'un écran de la tablette dépassait du cadre et le bouton « Écouter » sortait de l'écran ;
   l'écran défile alors en lui-même, et le centrage ne coupe jamais le haut */
.pane { overflow-y: auto; justify-content: safe center; overscroll-behavior: contain; }
