/*
 * Site public BabelPen — feuille de style unique, sans build.
 * Reprend la maquette « babelpen.com — accueil » du 24/10/2026 (polices Inter et Space Grotesk,
 * palette encre #15171E, accent indigo #3B47D6). Aucun style en ligne : la CSP n'autorise que ce fichier.
 * Polices servies depuis public/fonts (licence SIL OFL, voir OFL-*.txt) : rien n'est chargé chez Google.
 */

/* Inter, cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Inter, greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Inter, latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter, latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Grotesk, latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Grotesk, latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ——— Jetons de la maquette (maquette du 24/10/2026, « babelpen.com — accueil ») ——— */
:root {
  --ink: #15171E;
  --text: #3C4150;
  --muted: #5B6170;
  --border: #E2E5EB;
  --border-strong: #C9CDD6;
  --soft: #F7F8FB;
  --accent: #3B47D6;
  --accent-text: #2F3AB8;
  --accent-hover: #1F2780;
  --accent-light: #A9B4FF;
  --dark-card: #1C1F29;
  --dark-border: #2A2D38;
  --dark-text: #C9CDD6;
  --warning-text: #9A5B00;
  --warning-bg: #FFF4E0;
  --success-text: #166B40;
  --success-bg: #E3F5EA;
  --success-border: #C7D7CC;
  --success-soft: #F2FBF5;
  --neutral-bg: #EEF0F4;
  --radius: 16px;
  --radius-small: 10px;
  --font-text: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Space Grotesk', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
svg { flex: none; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-title); letter-spacing: -0.01em; margin: 0; color: inherit; }
p, ul, ol, dl, dd, figure, pre { margin: 0; }
code { font-family: var(--font-code); font-size: 0.875em; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-small);
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ——— Boutons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-small);
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn-large { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--soft); color: var(--ink); }

/* ——— En-tête ——— */
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.header-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 72px; padding-top: 10px; padding-bottom: 10px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-title); font-weight: 700; font-size: 22px;
}
.logo:hover { color: var(--accent-text); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-menu { display: contents; }
.main-nav { order: 1; display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.main-nav a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.header-tools { order: 2; }
.header-actions { order: 3; display: flex; align-items: center; gap: 10px; }
.link-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; }
.link-login:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.logo { order: 0; }

.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-small); background: #fff;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
}

/* Menu des langues (élément <details>, utilisable sans script). */
.lang-menu { position: relative; }
.lang-menu summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-small); background: #fff;
  font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; list-style: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--border-strong); }
.lang-menu[open] .chevron { transform: rotate(180deg); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 190px; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(21, 23, 30, 0.12);
}
.lang-menu a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu a:hover { background: var(--soft); }
.lang-menu a[aria-current] { font-weight: 600; color: var(--accent-text); }
.lang-menu a[aria-current]::after { content: '✓'; margin-left: auto; padding-left: 12px; }

/* Écrans moyens et téléphones : le menu se replie derrière le bouton « Menu » (avec le script). */
@media (max-width: 1179px) {
  .header-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; width: 100%; order: 3; padding-bottom: 6px; }
  .main-nav { flex: 1 1 100%; }
  .js .nav-toggle { display: inline-flex; }
  .js .header-menu { display: none; }
  .js .header-menu.is-open { display: flex; flex-direction: column; align-items: stretch; border-top: 1px solid var(--border); padding-top: 8px; }
  .js .header-menu.is-open .main-nav { flex-direction: column; gap: 0; }
  .js .header-menu.is-open .main-nav a { border-bottom: 1px solid var(--border); }
  .js .header-menu.is-open .header-actions { flex-wrap: wrap; padding-top: 8px; }
}

/* ——— Sections ——— */
.section { padding: 88px 0 72px; }
.section-tight { padding: 56px 0; }
.section-soft { background: var(--soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-bordered { border-bottom: 1px solid var(--border); }
.section-bordered-top { border-top: 1px solid var(--border); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { max-width: 720px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.section-head-wide { max-width: 820px; }
.section h2 { font-size: clamp(28px, 2.2vw + 16px, 40px); line-height: 1.1; font-weight: 700; }
.section-lead { font-size: 18px; color: var(--text); }
.section-dark .section-lead { color: var(--dark-text); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }

/* ——— Accroche ——— */
.hero { background: linear-gradient(var(--soft), #fff); border-bottom: 1px solid var(--border); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 64px; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(38px, 3.6vw + 18px, 56px); line-height: 1.05; font-weight: 700; }
.lead { font-size: 20px; line-height: 1.5; color: var(--text); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Aperçu de l'écran Traduire */
.demo {
  flex: 1 1 460px; min-width: 0; max-width: 600px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(21, 23, 30, 0.08); overflow: hidden;
}
.demo-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--soft);
}
.demo-head code { font-size: 14px; font-weight: 600; color: var(--ink); }
.demo-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.demo-block { display: flex; flex-direction: column; gap: 8px; }
.demo-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.demo-reference { font-size: 18px; font-weight: 600; }
.demo-context { display: flex; gap: 10px; padding: 12px 14px; background: var(--soft); border-radius: var(--radius-small); font-size: 14px; color: var(--text); }
.demo-context svg { margin-top: 2px; }
.demo-context strong { color: var(--ink); }
.proposals { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.proposal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-small); }
.proposal-chosen { border-color: var(--success-border); background: var(--success-soft); }
.proposal-text { flex: 1 1 180px; font-size: 15px; }
.proposal-chosen .proposal-text { font-weight: 600; }
del.proposal-text { color: var(--text); }
.proposal-engine { font-size: 13px; color: var(--text); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; border-radius: 999px; padding: 4px 10px; }
.badge-warning { color: var(--warning-text); background: var(--warning-bg); }
.badge-success { color: var(--success-text); background: var(--success-bg); }
.badge-neutral { color: var(--text); background: var(--neutral-bg); }
.history { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.history li { display: flex; gap: 10px; }
.history-version { flex: none; width: 28px; color: var(--ink); font-weight: 600; }
.demo-buttons { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.demo-buttons .btn { cursor: default; }
.demo-buttons .btn-outline { font-weight: 500; }

/* ——— Chiffres ——— */
.stats { border-bottom: 1px solid var(--border); }
.stats-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; padding-top: 36px; padding-bottom: 36px; }
.stats-text { flex: 1 1 260px; font-size: 15px; color: var(--muted); }
.stats-numbers { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.stats-numbers div { display: flex; flex-direction: column-reverse; }
.stats-numbers dd { font-family: var(--font-title); font-size: 32px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stats-numbers dt { font-size: 14px; color: var(--muted); }

/* ——— Cartes ——— */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; list-style: none; padding: 0; }
.cards-two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; margin-bottom: 24px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.card h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
.card p { color: var(--text); font-size: 15px; }
.card-soft { background: var(--soft); }
.card-title { display: flex; align-items: center; gap: 12px; }
.card-dark { background: var(--dark-card); border-color: var(--dark-border); gap: 12px; }
.card-dark p { color: var(--dark-text); }
.step-number { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--accent-light); }

/* ——— Serveur MCP ——— */
.command {
  padding: 16px 18px; border-radius: 12px; background: var(--ink); color: #E8EAF0;
  font-family: var(--font-code); font-size: 13.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.command code { font-size: inherit; }
.command-name { color: var(--accent-light); }
.abilities { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: var(--text); }
.abilities strong { display: block; color: var(--ink); font-size: 16px; }
.abilities code, .path code, .tools-list code { color: var(--accent-text); font-weight: 600; }
.abilities code { display: inline-block; margin-top: 4px; font-size: 13px; }
.paths { margin-bottom: 40px; }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.path { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.path code { font-size: 14px; }
.tools { display: flex; flex-direction: column; gap: 16px; }
.tools h3 { font-size: 20px; font-weight: 600; }
.tools-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.tools-list li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.tools-list code { color: var(--ink); font-size: 14px; }
.tools-list span { font-size: 14px; color: var(--text); }

/* ——— Moteurs ——— */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.engines-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.engines-table caption { text-align: left; padding: 16px 20px; font-weight: 600; color: var(--muted); font-size: 14px; }
.engines-table thead tr { background: var(--soft); text-align: left; }
.engines-table th, .engines-table td { padding: 14px 20px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.engines-table thead th { padding-top: 12px; padding-bottom: 12px; font-weight: 600; }
.engines-table tbody th { font-weight: 500; }
.engines-table td:last-child { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; }
.chips-title { font-family: var(--font-text); font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 6px; letter-spacing: 0; }
.chips ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.chips li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; }

/* ——— Open source ——— */
.banner-dark { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: 32px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.section .banner-dark h2 { font-size: 26px; }

/* ——— Questions fréquentes ——— */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px 48px; margin-top: 36px; }
.faq div { display: flex; flex-direction: column; gap: 8px; }
.faq dt { font-size: 18px; font-weight: 600; }
.faq dd { color: var(--text); font-size: 15px; }

/* ——— Appel final ——— */
.final { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.final > div { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.section .final h2 { font-size: clamp(26px, 1.4vw + 16px, 32px); line-height: 1.15; }
.final .section-lead { font-size: 17px; }

/* ——— Pages d'information ——— */
.page { padding-top: 56px; padding-bottom: 88px; }
.prose { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.prose h1 { font-size: clamp(32px, 2.2vw + 20px, 44px); line-height: 1.1; margin-bottom: 6px; }
.prose h2 { font-size: 22px; font-weight: 600; margin-top: 22px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { color: var(--text); }
.site-map ul { margin-top: 8px; }
.site-map a { display: inline-block; padding: 2px 0; }

/* ——— Pied de page ——— */
.site-footer { background: var(--soft); border-top: 1px solid var(--border); }
.site-footer .container { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footer-columns { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.footer-brand { flex: 1 1 220px; display: flex; flex-direction: column; gap: 12px; }
.footer-name { font-family: var(--font-title); font-weight: 700; font-size: 20px; }
.footer-brand p, .footer-langs p { font-size: 14px; color: var(--muted); }
.footer-nav { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.footer-nav h2 { font-family: var(--font-text); font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 4px; }
.footer-nav > a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text); text-decoration: none; }
.footer-nav > a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-langs { flex: 1 1 320px; }
.footer-langs ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin-bottom: 4px; }
.footer-langs ul a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); text-decoration: none; }
.footer-langs ul a:hover { border-color: var(--ink); color: var(--ink); }
.footer-langs ul a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* ——— Téléphones ——— */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0 48px; }
  .section-tight { padding: 40px 0; }
  .hero-grid { padding-top: 40px; padding-bottom: 40px; gap: 32px; }
  .hero-text, .demo { flex-basis: 100%; }
  .lead { font-size: 18px; }
  .section-lead { font-size: 17px; }
  .card { padding: 22px; }
  .demo-body, .demo-head { padding-left: 16px; padding-right: 16px; }
  .banner-dark { padding: 24px; }
  .stats-numbers { gap: 20px 32px; }
  .stats-numbers dd { font-size: 28px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .logo { font-size: 20px; }
  .header-tools { gap: 8px; }
}
