/* Line Factory — site statique (Cloudflare Pages). Aucune ressource externe, aucun script. */

/* Police Outfit auto-hébergée (SIL Open Font License 1.1, voir /assets/fonts/OFL.txt). */
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Thème : sombre par défaut (univers du jeu), clair si le système le demande. */
:root {
  color-scheme: dark light;
  --bg: #12151c;
  --surface: #191c23;
  --surface-2: #20242d;
  --border: #2e3440;
  --text: #f2f4f8;
  --muted: #b3bac6;
  --accent: #f6ba40;
  --accent-ink: #12151c;
  --link: #f6ba40;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max: 720px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f4f7;
    --surface: #ffffff;
    --surface-2: #eceef3;
    --border: #d5d9e1;
    --text: #12151c;
    --muted: #4a5261;
    --accent: #f6ba40;
    --accent-ink: #12151c;
    --link: #8a5300;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:focus-visible,
.skip-link:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Lien d'évitement : visible seulement au clavier. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------ Barre du haut */

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

/* ------------------------------------------------------------ Typographie */

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}
h1 {
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 2.75rem);
  letter-spacing: -0.01em;
}
h2 {
  font-weight: 800;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 16px;
}
h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
p,
ul,
ol,
table {
  margin: 0 0 1rem;
}
ul,
ol {
  padding-left: 1.4rem;
}
li + li {
  margin-top: 0.35rem;
}
strong {
  font-weight: 600;
}
.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------ Accueil */

.hero {
  padding: 48px 0 8px;
}
.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 12px;
}
.cards li + li {
  margin-top: 0;
}
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.card-link:active {
  background: var(--surface-2);
}
.card-link .label {
  font-weight: 600;
  font-size: 1.125rem;
}
.card-link .hint {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.card-link .chevron {
  flex: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
}

/* ------------------------------------------------------------ Politique */

.page-head {
  padding: 40px 0 8px;
}
.updated {
  color: var(--muted);
  margin-top: 0.5rem;
}

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 1.5rem 0;
}
.box > :last-child {
  margin-bottom: 0;
}
.box h2 {
  margin-top: 0;
  font-size: 1.2rem;
}
.box-accent {
  border-left: 6px solid var(--accent);
}

.toc ol {
  margin: 0;
  padding-left: 1.6rem;
}
.toc li + li {
  margin-top: 0.2rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.98rem;
}
caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.5rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}
thead th {
  background: var(--surface-2);
  font-weight: 600;
}
tbody th {
  font-weight: 600;
  width: 34%;
}

/* ------------------------------------------------------------ Pied de page */

main {
  padding-bottom: 32px;
}
.footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer p {
  margin: 0 0 0.5rem;
}
.footer a {
  color: var(--muted);
}

@media print {
  .skip-link,
  .topbar {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
  }
}
