/* Page « Licences » (licences.html) : mêmes couleurs que style.css, thème du système ou forcé. */
:root {
  --bg: #fcfcfc;
  --bg2: #f5f5f4;
  --t1: #1c1c1c;
  --t2: #6b6b6b;
  --line: #e5e5e5;
  --link: #2f5fd0;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161616;
    --bg2: #212121;
    --t1: #ececec;
    --t2: #9a9a9a;
    --line: #2e2e2e;
    --link: #8fb0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161616;
  --bg2: #212121;
  --t1: #ececec;
  --t2: #9a9a9a;
  --line: #2e2e2e;
  --link: #8fb0ff;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.licences { max-width: 860px; margin: 0 auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
.retour { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.retour::before { content: "‹"; margin-right: 6px; font-size: 20px; line-height: 1; }
h1 { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 24px; font-weight: 650; }
h2 { margin: 0 0 10px; font-size: 18px; font-weight: 650; }
header p, section > p, section li { color: var(--t2); }
section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
section ul { padding-left: 20px; }
strong { color: var(--t1); }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav a { display: inline-flex; align-items: center; min-height: 36px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.texte-licence {
  margin: 0;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12.5px/1.5 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tableau { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--bg2); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td:nth-child(2) { white-space: nowrap; }

/* Téléphone : chaque module en bloc, sans défilement horizontal. */
@media (max-width: 640px) {
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; }
  td:first-child { font-weight: 600; }
  td:nth-child(n+2) { color: var(--t2); font-size: 13px; }
  td:nth-child(2) { white-space: normal; }
}
