/*
  La barre du haut et le pied de page des pages publiques de Keryx (1er décembre 2026) : les mêmes sur l'accueil,
  « Les écrans » et les Tarifs, pour passer de l'une à l'autre sans rien chercher. Une seule feuille pour les trois :
  l'accueil et « Les écrans » sont écrits par le serveur (server/publicHome.ts), les Tarifs par l'application
  (src/ui/PublicChrome.tsx), qui charge cette même feuille. Tout est sous .pubc, avec ses propres jetons : rien ne
  dépend de la page qui l'accueille, rien ne déborde sur elle.
*/
@font-face { font-family: Onest; src: url("/fonts/onest-latin-wght-normal.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }

/*
  Plein écran : au-delà d'un portable (1366 px de large), toute la page grandit avec la fenêtre, pour remplir un écran
  1920 × 1080 comme un 2560 × 1440 : tout est en rem, il suffit de faire grandir la taille de base. La hauteur de la
  fenêtre borne l'échelle, pour que l'accroche tienne dans le premier écran. En dessous, rien ne change.
*/
/* « html:root » : cette échelle passe devant celle de la régie (src/ui/temoin.css) sur la page Tarifs, écrite par l'application. */
html:root:has(.pubc) { font-size: clamp(100%, min(28.5% + .8375vw, 2.15vh), 165%); }

.pubc {
  --bg: #F4F5F7; --surface: #FFFFFF; --surface-2: #EAEDF1; --line: #D9DEE5; --line-strong: #78818D;
  --ink: #111418; --ink-2: #3C4451; --ink-3: #5B6472;
  --brand: #111418; --on-brand: #FFFFFF; --accent: #A16207;
  --r-s: 3px; --ease: cubic-bezier(.2, .7, .2, 1);
  /* Les six tailles et les trois graisses des pages publiques (home.css), pour la barre et le pied. */
  --t1: .8125rem; --t2: .9375rem; --t3: 1.0625rem;
  font: 400 var(--t2)/1.5 Onest, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-stretch: normal;
  color: var(--ink); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
html.theme-dark .pubc {
  --bg: #15181D; --surface: #1C2027; --surface-2: #242A32; --line: #2F3640; --line-strong: #68717E;
  --ink: #EEF1F5; --ink-2: #BCC3CD; --ink-3: #8F98A5;
  --brand: #EEF1F5; --on-brand: #15181D; --accent: #E3B341;
}
.pubc, .pubc *, .pubc *::before, .pubc *::after { box-sizing: border-box; }
.pubc a { color: inherit; text-underline-offset: .22em; text-decoration-color: var(--line-strong); }
.pubc a:hover { text-decoration-color: var(--accent); }
.pubc img { display: block; max-width: 100%; }
.pubc button { font: inherit; color: inherit; cursor: pointer; }
.pubc :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.pubc .on-dark { display: none; }
html.theme-dark .pubc .on-light { display: none; }
html.theme-dark .pubc .on-dark { display: block; }
.pubc .ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pubc .wrap { width: min(100% - clamp(2rem, 6vw, 5rem), 78rem); margin-inline: auto; }

/* Boutons : un bord, ou l'aplat d'encre pour l'action principale. Le survol change le fond, rien ne bouge. */
.pubc .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: transparent; color: var(--ink); font-weight: 600; font-size: var(--t2); line-height: 1.1; white-space: nowrap; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s; }
.pubc .btn:hover { background: var(--surface-2); }
.pubc .btn.primary { background: var(--brand); border-color: transparent; color: var(--on-brand); box-shadow: 0 1px 2px rgb(16 22 34 / .08), 0 1px 3px rgb(16 22 34 / .1); }
.pubc .btn.primary:hover { background: color-mix(in srgb, var(--brand) 86%, var(--on-brand)); }

/* La barre du haut : toujours là, sur un fond plein, la connexion bien visible ; un filet apparaît dès qu'on défile. */
.pubc.top { position: sticky; top: 0; z-index: 20; margin: 0; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .15s; }
.pubc.top.is-scrolled { border-bottom-color: var(--line); }
.pubc .bar { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 2rem); min-height: 4.5rem; }
.pubc .brand { display: inline-flex; flex: none; align-items: center; min-height: 2.75rem; }
.pubc .logo { width: clamp(5.2rem, 9vw, 6.6rem); height: auto; }
.pubc .links { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.75rem); margin-right: auto; font-size: var(--t2); font-weight: 600; }
.pubc .links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.pubc .links a:hover, .pubc .links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.pubc .tools { display: flex; align-items: center; gap: .6rem; }
.pubc .lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.pubc .lang a { display: grid; place-items: center; min-width: 2.4rem; min-height: 2.1rem; padding: 0 .5rem; border-radius: 999px; font-size: var(--t1); font-weight: 600; letter-spacing: .04em; color: var(--ink-2); text-decoration: none; }
.pubc .lang a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pubc .theme { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-2); }
.pubc .theme:hover { background: var(--surface-2); color: var(--ink); }
.pubc .theme .ico-sun, html.theme-dark .pubc .theme .ico-moon { display: none; }
html.theme-dark .pubc .theme .ico-sun { display: block; }
/* Jour ↔ nuit (4 décembre 2026) : un fondu des couleurs de 0,3 s, au clic seulement. La classe est posée le temps du
   fondu par home.js et legal.js, jamais au chargement ; rien avec « réduire les animations ». */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease, text-decoration-color .3s ease !important;
}

/*
  Le pied de page (refait le 3 décembre 2026) : à gauche qui fait Keryx et le mot pour les copilotes, à droite trois
  colonnes de liens ; dessous, la mention des « Game Content Usage Rules » de Microsoft.
*/
.pubc.foot { margin: 0; border-top: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: var(--t1); }
.pubc .foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 3rem; padding-block: 2.75rem 2rem; }
.pubc .foot-who { display: grid; gap: .9rem; align-content: start; max-width: 26rem; }
.pubc .foot-who p { margin: 0; }
.pubc .foot-logo { width: 5.6rem; height: auto; }
.pubc .foot-copilot { display: flex; align-items: flex-start; gap: .6rem; color: var(--ink-3); }
.pubc .foot-copilot .ico { margin-top: .1em; color: var(--ink-3); }
.pubc .foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.pubc .foot-title { margin: 0 0 .5rem; color: var(--ink-3); font-size: var(--t1); font-weight: 600; }
.pubc .foot-cols ul { margin: 0; padding: 0; list-style: none; }
.pubc .foot-cols a { display: inline-flex; align-items: center; min-height: 2rem; color: var(--ink); text-decoration: none; }
.pubc .foot-cols a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.pubc .foot-ms { margin: 0; max-width: 78ch; color: var(--ink-3); }
.pubc .foot-ms a { color: var(--ink-2); }
@media (max-width: 46rem) { .pubc .foot-grid { grid-template-columns: 1fr; } .pubc .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/*
  « Soutenir » (01/12/2026) : se voit sans insister. Un lien gris après les Tarifs, un autre en bas de page ; le cœur
  ne prend l'or qu'au survol. Jamais un bouton, jamais une fenêtre.
*/
.pubc .links .link-support { gap: .35rem; color: var(--ink-3); font-weight: 400; }
.pubc .links .link-support .ico { width: 1em; height: 1em; transition: color .2s; }
.pubc .links .link-support[aria-current] { color: var(--ink); }
.pubc .links .link-support:hover .ico, .pubc .links .link-support[aria-current] .ico { color: var(--accent); }
.pubc .foot-end { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.25rem 2rem; border-top: 1px solid var(--line); }
.pubc .foot-end > span { color: var(--ink-3); white-space: nowrap; }

@media (max-width: 46rem) {
  .pubc .top-signup { display: none; }
  .pubc .bar { min-height: 3.9rem; gap: .6rem; }
  .pubc .tools { gap: .35rem; }
  .pubc .links { gap: .75rem; }
}
/*
  Le menu du téléphone et de la tablette (3 décembre 2026) : sous 60 rem, les cinq entrées passent dans un menu (un
  <details> : Entrée ou Espace l'ouvre, Échap le ferme). Il s'ouvre en douceur ; « réduire les animations » le coupe.
  Au-dessus, la barre montre les cinq entrées et le menu n'existe pas.
*/
.pubc .pubc-menu { display: none; position: relative; }
.pubc .pubc-menu > summary { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.6rem; padding: 0 .7rem; border-radius: var(--r-s); cursor: pointer; list-style: none; font-weight: 600; font-size: var(--t2); color: var(--ink); transition: background-color .15s; }
.pubc .pubc-menu > summary::-webkit-details-marker { display: none; }
.pubc .pubc-menu > summary:hover, .pubc .pubc-menu[open] > summary { background: var(--surface-2); }
.pubc .menu-ico { position: relative; width: 1.1rem; height: .8rem; }
.pubc .menu-ico i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.pubc .menu-ico i:nth-child(1) { top: 0; } .pubc .menu-ico i:nth-child(2) { top: calc(50% - 1px); } .pubc .menu-ico i:nth-child(3) { bottom: 0; }
.pubc .pubc-menu[open] .menu-ico i:nth-child(1) { transform: translateY(calc(.4rem - 1px)) rotate(45deg); }
.pubc .pubc-menu[open] .menu-ico i:nth-child(2) { opacity: 0; }
.pubc .pubc-menu[open] .menu-ico i:nth-child(3) { transform: translateY(calc(-.4rem + 1px)) rotate(-45deg); }
.pubc .menu-panel { position: absolute; z-index: 30; top: calc(100% + .4rem); right: 0; display: grid; min-width: 15rem; padding: .4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  box-shadow: 0 1px 2px rgb(16 22 34 / .06), 0 4px 8px rgb(16 22 34 / .06), 0 12px 28px -8px rgb(16 22 34 / .18); animation: pubc-menu-in .22s var(--ease); }
.pubc .menu-panel a { display: flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: 0 .85rem; border-radius: var(--r-s); color: var(--ink-2); font-weight: 600; text-decoration: none; }
.pubc .menu-panel a:hover { background: var(--surface-2); color: var(--ink); }
.pubc .menu-panel a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.pubc .menu-panel a .ico { width: 1em; height: 1em; }
@keyframes pubc-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 60rem) {
  .pubc .links { display: none; }
  .pubc .tools { margin-left: auto; }
  .pubc .pubc-menu { display: block; }
}
@media (max-width: 36rem) { .pubc .menu-name { display: none; } .pubc .pubc-menu > summary { padding: 0 .55rem; } .pubc .menu-panel { position: fixed; top: 4rem; right: 1rem; left: 1rem; } }
@media (max-width: 36rem) {
  /* « Ouvrir ma régie » (connecté) tient au téléphone sans sa flèche. */
  .pubc .top-regie .ico { display: none; }
  .pubc .lang a[aria-current] { display: none; }
  .pubc .lang { background: none; padding: 0; }
  .pubc .lang a { min-height: 2.6rem; }
  .pubc .theme { width: 2.4rem; }
  .pubc .btn { padding: 0 .8rem; }
  .pubc .logo { width: 4.6rem; }
}
@media (max-width: 24rem) {
  .pubc .bar { gap: .4rem; }
  .pubc .tools { gap: .15rem; }
  .pubc .btn { padding: 0 .6rem; font-size: var(--t1); }
  .pubc .logo { width: 4rem; }
}
@media (max-width: 21.25rem) {
  .pubc .btn { padding: 0 .45rem; font-size: var(--t1); }
  .pubc .logo { width: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pubc, .pubc *, .pubc *::before, .pubc *::after { animation-duration: .01ms !important; transition-duration: 0s !important; }
}

/* Le choix de la langue (3 décembre 2026) : le drapeau en cours, la liste des cinq langues en dessous.
   Les mêmes règles sont dans public/home/chrome.css pour les pages du serveur. */
.kx-lang { position: relative; display: inline-block; }
.kx-lang > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px; border-radius: 8px; cursor: pointer; list-style: none; font-size: .8rem; font-weight: 650; color: var(--ink-2, currentColor); transition: background-color .18s ease; }
.kx-lang > summary::-webkit-details-marker { display: none; }
.kx-lang > summary:hover, .kx-lang[open] > summary { background: var(--surface-2, rgb(127 127 127 / .14)); color: var(--ink, currentColor); }
.kx-lang > summary:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 2px; }
.kx-lang img { display: block; flex: none; width: 22px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / .18); }
.kx-lang-menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 11rem; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line, rgb(127 127 127 / .3)); border-radius: 10px; background: var(--surface-1, #fff); box-shadow: var(--shadow-pop, 0 14px 36px -14px rgb(0 0 0 / .35)); animation: kx-lang-in .18s ease; }
.kx-lang-menu :is(a, button) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--ink, inherit); font: inherit; font-size: .9rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.kx-lang-menu :is(a, button):hover { background: var(--surface-2, rgb(127 127 127 / .14)); }
.kx-lang-menu :is([aria-current="true"], [aria-pressed="true"]) { font-weight: 700; background: var(--surface-2, rgb(127 127 127 / .14)); }
@keyframes kx-lang-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kx-lang-menu { animation: none; } }

/* Au téléphone, le drapeau seul. */
@media (max-width: 36rem) { .pubc .kx-lang > summary span { display: none; } .pubc .kx-lang > summary { padding: 0 6px; } }

/* Fermée, la liste n'existe pas pour la page (ni mise en page, ni animation en attente). */
.kx-lang:not([open]) > .kx-lang-menu { display: none; }

