/*
  KeepVault — feuille de style commune du site keepvault.eu (28/10/2026).

  Une seule source pour toutes les pages (FR à la racine, EN sous /en/).
  Style de l'app : fond nuit, deux surfaces, texte blanc-bleu, accent CYAN
  (palette.cyan de src/theme/tokens.ts). Jamais de noir et or.
  Aucune police externe, aucun traceur.
*/
:root {
  color-scheme: dark;
  --bg: #050810; /* palette.night */
  --card: #0d1422; /* palette.navy900 */
  --card-2: #131b2e; /* palette.navy800 */
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f4ff; /* palette.ice */
  --muted: #8b9fc0; /* palette.blueGray */
  --accent: #06d6d6; /* palette.cyan */
  --on-accent: #050810;
  --coral: #ff6b6b;
  --warn-bg: rgba(255, 107, 107, 0.08);
  --warn-border: rgba(255, 107, 107, 0.22);
  --note-bg: rgba(6, 214, 214, 0.06);
  --note-border: rgba(6, 214, 214, 0.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  padding: 24px 18px 48px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.wrap { width: 100%; max-width: 720px; margin: 0 auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.lang {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}
.lang:hover { color: var(--text); border-color: var(--note-border); }

/* Sélecteur de langue FR | EN (demande d'Ash du 11/11) : deux positions de 48 × 44 px, la langue de la page
   sur la pastille cyan de la charte (--accent), l'autre en lien vers la page jumelle. La pastille annonce le
   lien au survol, puis glisse vers l'autre langue au changement de page (transition entre documents, CSS
   seul : aucune ligne de script, CSP intacte). Rien ne bouge sous « réduire les animations ». */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.langues {
  position: relative;
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  isolation: isolate;
}
.langues > .lang,
.langue-active {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.langues > .lang { color: var(--muted); }
.langues > .lang:hover { color: var(--text); }
.langues > .lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; color: var(--text); }
.langue-active { color: var(--on-accent); }
.langues-pastille {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  width: 48px;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--accent);
  view-transition-name: pastille-langue;
}
html[lang="en"] .langues-pastille { transform: translateX(48px); }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .langues-pastille { transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
  /* Au survol (ou au focus) de l'autre langue, la pastille s'avance vers elle. */
  html[lang="fr"] .langues:has(> .lang:hover, > .lang:focus-visible) .langues-pastille { transform: translateX(10px); }
  html[lang="en"] .langues:has(> .lang:hover, > .lang:focus-visible) .langues-pastille { transform: translateX(38px); }
  ::view-transition-group(pastille-langue) { animation-duration: 0.42s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
  ::view-transition-old(root) { animation: kv-page-sortie 0.18s ease-in both; }
  ::view-transition-new(root) { animation: kv-page-entree 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes kv-page-sortie { to { opacity: 0; } }
@keyframes kv-page-entree { from { opacity: 0; transform: translateY(10px); } }

h1 { font-size: 26px; line-height: 1.25; margin: 24px 0 6px; }
h2 {
  font-size: 18px;
  margin: 32px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
.updated { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.lead { font-size: 17px; color: var(--muted); }
/* Petite légende sous un bouton (page d'accueil). */
.hint { font-size: 13px; color: var(--muted); }
p, li { font-size: 15px; color: var(--text); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 8px; }
strong { color: var(--text); }
a { color: var(--accent); }
a:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.note strong { color: var(--accent); }
.warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.warn strong { color: var(--coral); }
/* Pas de marge sous le dernier paragraphe d'un encadré (remplace les style="margin: 0",
   interdits par la CSP du site : _headers, style-src 'self'). */
.note > p:last-child, .warn > p:last-child { margin-bottom: 0; }

.cta {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}
.cta-secondaire {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.table-scroll { overflow-x: auto; margin: 0 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

dl { margin: 16px 0; }
dt { font-size: 13px; color: var(--muted); margin-top: 14px; }
dd { margin: 2px 0 0; font-size: 15px; }
.foot-note { font-size: 13px; color: var(--muted); margin-top: 24px; }

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
footer a { text-decoration: none; }
footer a[aria-current='page'] { color: var(--muted); }
