/* Style commun aux pages du site : jetons, base, en-tête, boutons, pied de page, texte de lecture. */
@font-face { font-family: "Inter"; src: url(fonts/inter-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --noir: #000; --carte: #0f0f11; --ligne: #26262a; --blanc: #fff; --gris: #a1a1a6; --gris2: #86868b; --bleu: #2f6bff; --rose: #ff4fa3; --vert: #2fbf71;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --section: clamp(80px, 11vw, 144px); --gouttiere: clamp(20px, 4vw, 32px);
  --large: 1120px; --moyenne: 880px; --lecture: 680px;
  --police: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --t-display: clamp(2.75rem, 1.2rem + 6.2vw, 5.75rem); --t-h2: clamp(2.125rem, 1.35rem + 3.4vw, 3.75rem); --t-h3: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  --t-lead: clamp(1.125rem, 1rem + .55vw, 1.375rem); --t-corps: 1.0625rem; --t-petit: .875rem; --t-note: .8125rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
html[data-lang="fr"] .en, html[data-lang="en"] .fr { display: none !important; }
body { margin: 0; background: var(--noir); color: var(--blanc); font: 400 var(--t-corps)/1.6 var(--police); font-optical-sizing: auto; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; } svg, img { display: block; }
p { margin: 0; text-wrap: pretty; } h1, h2, h3 { margin: 0; text-wrap: balance; }
.w { max-width: calc(var(--large) + 2 * var(--gouttiere)); margin: 0 auto; padding: 0 var(--gouttiere); }
.w.moy { max-width: calc(var(--moyenne) + 2 * var(--gouttiere)); } .w.lec { max-width: calc(var(--lecture) + 2 * var(--gouttiere)); }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.evite { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; z-index: 60; } .evite:focus { left: 8px; }
h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.04; letter-spacing: -.038em; }
.rose { color: var(--rose); } .accent { color: var(--bleu); }
.note { font-size: var(--t-petit); color: var(--gris2); line-height: 1.5; }
.tabul { font-variant-numeric: tabular-nums lining-nums; }

.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 1.0625rem/1 var(--police); letter-spacing: -.011em; text-decoration: none; border-radius: 999px; padding: 15px 28px; min-height: 48px; border: 0; cursor: pointer; transition: background-color .15s, color .15s; }
.btn.bleu { background: var(--bleu); color: #fff; } .btn.bleu:hover { background: #4a80ff; }
.btn.blanc { background: #fff; color: #000; } .btn.blanc:hover { background: #e8e8ed; }
.btn.gros { padding: 19px 36px; min-height: 58px; font-size: 1.1875rem; }
.btn:disabled { opacity: .55; cursor: default; }

/* en-tête : le logo et l'onglet Documentation, la langue à droite */
.nav { position: sticky; top: 0; z-index: 20; background: #000; border-bottom: 1px solid #141416; }
.nav .w { display: flex; align-items: center; height: 56px; gap: var(--s4); }
.nav .logo img { height: 22px; width: auto; }
.nav .logo .icone { display: none; }
.nav a.l { font-size: var(--t-petit); color: var(--gris); text-decoration: none; } .nav a.l:hover, .nav a.l[aria-current] { color: #fff; }
.nav .d { margin-left: auto; }
.langue { background: none; border: 1px solid #3a3a40; color: var(--gris); border-radius: 999px; padding: 6px 12px; font: 600 .8125rem/1 var(--police); cursor: pointer; } .langue:hover { color: #fff; border-color: #fff; }

/* pied de page */
footer { margin-top: var(--section); border-top: 1px solid var(--ligne); padding: var(--s5) 0 var(--s6); }
footer .w { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s4) var(--s7); align-items: start; }
footer .marque img { height: 20px; width: auto; margin-bottom: var(--s2); } footer .marque p { color: var(--gris); font-size: var(--t-petit); max-width: 32ch; }
footer h3 { font-size: var(--t-petit); font-weight: 600; margin-bottom: var(--s2); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--t-petit); } footer li a { color: var(--gris); text-decoration: none; } footer li a:hover { color: #fff; }
footer .legal { grid-column: 1 / -1; display: grid; gap: var(--s1); color: var(--gris2); font-size: var(--t-note); line-height: 1.55; max-width: 76ch; border-top: 1px solid var(--ligne); padding-top: var(--s3); }

/* texte de lecture (documentation, mentions légales) : une colonne, rien d'autre */
.texte { padding-top: clamp(40px, 6vw, 72px); }
.texte h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem); font-weight: 700; line-height: 1.04; letter-spacing: -.04em; margin-bottom: var(--s3); }
.texte .intro { font-size: var(--t-lead); line-height: 1.45; color: var(--gris); letter-spacing: -.012em; }
.texte h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); line-height: 1.15; letter-spacing: -.028em; margin: var(--s7) 0 var(--s2); }
.texte h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.012em; margin: var(--s4) 0 var(--s1); }
.texte p, .texte li { color: #d2d2d7; } .texte p + p { margin-top: var(--s2); }
.texte ul, .texte ol { margin: var(--s2) 0 0; padding-left: 1.25em; display: grid; gap: 10px; } .texte li::marker { color: var(--gris2); }
.texte ul + p, .texte ol + p { margin-top: var(--s2); }
.texte a { text-underline-offset: 3px; } .texte b { color: #fff; font-weight: 600; }
.texte code { font: .9em/1 ui-monospace, "Cascadia Mono", Consolas, monospace; background: #17171a; border: 1px solid var(--ligne); border-radius: 6px; padding: 2px 6px; color: #fff; word-break: break-all; }
.texte .maj { margin-top: var(--s2); }

@media (max-width: 860px) {
  .nav .w { gap: var(--s3); }
  footer .w { grid-template-columns: 1fr 1fr; gap: var(--s4); } footer .marque { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* documentation : menu latéral à gauche, une page par sujet, « précédent / suivant » en bas */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: clamp(32px, 5vw, 56px); }
.doc-nav { position: sticky; top: 80px; max-height: calc(100vh - 104px); overflow-y: auto; padding-bottom: var(--s4); scrollbar-width: thin; }
.doc-menu summary { display: none; list-style: none; cursor: pointer; font-weight: 600; padding: 12px 16px; border: 1px solid var(--ligne); border-radius: 12px; }
.doc-menu summary::-webkit-details-marker { display: none; }
.doc-menu .groupe + .groupe { margin-top: var(--s4); }
.doc-menu h2 { font-size: var(--t-petit); font-weight: 600; color: var(--gris2); letter-spacing: 0; margin: 0 0 var(--s1); line-height: 1.3; }
.doc-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-menu li a { display: block; padding: 7px 12px; margin: 0 -12px; border-radius: 8px; color: var(--gris); text-decoration: none; font-size: var(--t-petit); line-height: 1.35; }
.doc-menu li a:hover { color: #fff; background: #111113; }
.doc-menu li a[aria-current] { color: #fff; background: #17171a; font-weight: 600; }
.doc-contenu { min-width: 0; max-width: var(--lecture); padding-top: 0; }
.doc-contenu h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem); }
.doc-contenu h2 { margin-top: var(--s6); scroll-margin-top: 80px; } .doc-contenu h3 { scroll-margin-top: 80px; }
.doc-contenu .intro + h2 { margin-top: var(--s5); }
.texte .astuce { margin-top: var(--s3); padding: var(--s2) var(--s3); border-left: 3px solid var(--bleu); background: #0b0b0d; border-radius: 0 10px 10px 0; color: #e4e4e8; }
.texte pre { margin: var(--s2) 0 0; padding: var(--s2) var(--s3); background: #0b0b0d; border: 1px solid var(--ligne); border-radius: 12px; overflow-x: auto; }
.texte pre code { background: none; border: 0; padding: 0; word-break: normal; white-space: pre; }
.tableau { margin-top: var(--s3); overflow-x: auto; border: 1px solid var(--ligne); border-radius: 12px; }
.texte table { border-collapse: collapse; width: 100%; font-size: var(--t-petit); }
.texte th { text-align: left; font-weight: 600; color: #fff; background: #0b0b0d; }
.texte th, .texte td { padding: 12px 16px; border-bottom: 1px solid var(--ligne); vertical-align: top; line-height: 1.45; }
.texte tbody tr:last-child td { border-bottom: 0; } .texte td { color: #d2d2d7; } .texte td:first-child { color: #fff; }
.doc-suite { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--ligne); }
.doc-suite a { display: grid; gap: 4px; padding: var(--s2) var(--s3); border: 1px solid var(--ligne); border-radius: 12px; text-decoration: none; color: #fff; font-weight: 600; transition: border-color .15s; }
.doc-suite a:hover { border-color: #fff; } .doc-suite small { color: var(--gris2); font-weight: 400; font-size: var(--t-note); }
.doc-suite .apres { text-align: right; grid-column: 2; }
.version { margin-top: var(--s5); } .version h3 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s1); font-size: 1.375rem; } .version h3 span { color: var(--gris2); font-size: var(--t-petit); font-weight: 400; }
.version h4 { margin: var(--s2) 0 0; font-size: var(--t-corps); color: #fff; } .texte .version ul { margin-top: var(--s1); }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: var(--s4); }
  .doc-nav { position: static; max-height: none; overflow: visible; padding: 0; }
  .doc-menu summary { display: flex; justify-content: space-between; align-items: center; } .doc-menu summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; line-height: 1; } .doc-menu[open] summary::after { content: "–"; }
  .doc-menu nav { margin-top: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--ligne); border-radius: 12px; }
  .doc-suite { grid-template-columns: 1fr; } .doc-suite .apres { grid-column: auto; }
}

.version h3 .badge { color: #000; background: #fff; font-size: var(--t-note); font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.suite-nouveautes { margin-top: var(--s6); }

/* téléphone : une seule ligne dans l'en-tête, donc l'icône carrée à la place du logo-texte (sinon les deux onglets débordent) */
@media (max-width: 500px) {
  .nav .w { gap: var(--s2); } .nav .logo .mot { display: none; } .nav .logo .icone { display: block; }
  .nav a.l { font-size: .8125rem; }
}
/* très petits téléphones : les trois onglets, l'icône et la langue tiennent encore sur une ligne */
@media (max-width: 400px) {
  .nav .w { padding: 0 12px; gap: 10px; } .nav .logo img { height: 20px; }
  .nav a.l { font-size: .75rem; } .langue { padding: 5px 8px; font-size: .6875rem; }
}
