/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-italic-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;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-italic-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;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-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;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-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;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-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;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-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;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/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;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/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;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/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;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/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;
}
/* ==========================================================
   MotOutils — feuille de style
   ========================================================== */

:root {
  --bg: #faf7f2;
  --bg-soft: #f3eee5;
  --surface: #ffffff;
  --ink: #1d1b18;
  --ink-soft: #5c574f;
  --ink-faint: #8f887d;
  --line: #e6dfd3;
  --accent: #3a56d4;
  --accent-ink: #ffffff;
  --accent-soft: #e8ecfc;
  --focus: #3a56d4;

  --c-ana: #e2573b;     /* Anagrammeur */
  --c-ana-soft: #fde9e3;
  --c-gen: #1f9d74;     /* Générateur */
  --c-gen-soft: #dff4ec;
  --c-rim: #8a4fd8;     /* Rimes */
  --c-rim-soft: #efe5fc;
  --c-mdj: #d99a12;     /* Mot du jour */
  --c-mdj-soft: #fbf0d6;
  --c-frp: #2183c9;     /* Test de frappe */
  --c-frp-soft: #e0eefa;
  --c-dev: #c7417e;     /* L’Oracle */
  --c-dev-soft: #fbe4ee;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 8px 24px -12px rgba(40, 30, 10, .15);
  --shadow-lg: 0 2px 4px rgba(40, 30, 10, .05), 0 24px 48px -20px rgba(40, 30, 10, .25);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15140f; --bg-soft: #1d1b16; --surface: #22201a; --ink: #f2eee6; --ink-soft: #bdb6a9;
    --ink-faint: #857e72; --line: #36322a; --accent: #8ea2ff; --accent-ink: #11131f; --accent-soft: #262b45;
    --focus: #8ea2ff;
    --c-ana: #ff8a6e; --c-ana-soft: #3a2420; --c-gen: #4fd1a5; --c-gen-soft: #183229;
    --c-rim: #b993ff; --c-rim-soft: #2c2340; --c-mdj: #f5c24a; --c-mdj-soft: #352b14; --c-frp: #6cb8f0; --c-frp-soft: #1a2b3a; --c-dev: #f07cae; --c-dev-soft: #3a1f2b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15140f; --bg-soft: #1d1b16; --surface: #22201a; --ink: #f2eee6; --ink-soft: #bdb6a9;
  --ink-faint: #857e72; --line: #36322a; --accent: #8ea2ff; --accent-ink: #11131f; --accent-soft: #262b45;
  --focus: #8ea2ff;
  --c-ana: #ff8a6e; --c-ana-soft: #3a2420; --c-gen: #4fd1a5; --c-gen-soft: #183229;
  --c-rim: #b993ff; --c-rim-soft: #2c2340; --c-mdj: #f5c24a; --c-mdj-soft: #352b14; --c-frp: #6cb8f0; --c-frp-soft: #1a2b3a; --c-dev: #f07cae; --c-dev-soft: #3a1f2b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink-faint); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

@media (max-width: 1140px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .theme-btn { margin-left: 0; }
}

/* ---------- Boutons & champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, filter .12s ease, background .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { filter: none; border-color: var(--ink-faint); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.input, select.input {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--tool, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tool, var(--accent)) 18%, transparent); }
.input-xl { font-size: 1.35rem; padding: 16px 20px; border-radius: 14px; font-weight: 500; }

.search-row { display: flex; gap: 10px; }
.search-row .input { flex: 1; }
@media (max-width: 560px) { .search-row { flex-direction: column; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip[aria-pressed="true"], .chip.active { background: var(--tool, var(--accent)); border-color: var(--tool, var(--accent)); color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #15140f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #15140f; } }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--tool, var(--accent)); }

/* ---------- Accueil ---------- */
.hero { padding-block: clamp(48px, 9vw, 104px) clamp(32px, 6vw, 64px); text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 30%, var(--c-ana-soft), transparent 70%),
    radial-gradient(35% 45% at 80% 25%, var(--c-rim-soft), transparent 70%),
    radial-gradient(40% 50% at 55% 75%, var(--c-gen-soft), transparent 70%);
  opacity: .9;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-gen); }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 600; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; margin-inline: auto; }

.quick { max-width: 640px; margin: 32px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-lg); }
.quick form { display: flex; gap: 8px; }
.quick .input { border: none; font-size: 1.15rem; padding: 12px 14px; }
.quick .input:focus { box-shadow: none; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 6px 4px; justify-content: center; }
.quick-actions .chip { font-weight: 600; }
.quick-actions .chip[data-tool="ana"] { --tool: var(--c-ana); }
.quick-actions .chip[data-tool="rim"] { --tool: var(--c-rim); }
@media (max-width: 560px) { .quick form { flex-direction: column; } }

.section { padding-block: clamp(40px, 7vw, 80px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); margin: 0; max-width: 52ch; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tool) 40%, var(--line)); }
.tool-card h3 { margin: 6px 0 0; font-size: 1.35rem; }
.tool-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.tool-card .go { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: .92rem; color: var(--tool); display: inline-flex; align-items: center; gap: 6px; }
.tool-card .go svg { width: 16px; height: 16px; transition: transform .18s; }
.tool-card:hover .go svg { transform: translateX(4px); }
.tool-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--tool-soft); color: var(--tool); }
.tool-icon svg { width: 26px; height: 26px; }
.t-ana { --tool: var(--c-ana); --tool-soft: var(--c-ana-soft); }
.t-gen { --tool: var(--c-gen); --tool-soft: var(--c-gen-soft); }
.t-rim { --tool: var(--c-rim); --tool-soft: var(--c-rim-soft); }
.t-mdj { --tool: var(--c-mdj); --tool-soft: var(--c-mdj-soft); }
.t-frp { --tool: var(--c-frp); --tool-soft: var(--c-frp-soft); }
.t-dev { --tool: var(--c-dev); --tool-soft: var(--c-dev-soft); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.feature h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.feature .num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 10px; }

.band { background: var(--bg-soft); border-block: 1px solid var(--line); }

/* ---------- Mot du jour (carte) ---------- */
.mdj-card {
  --tool: var(--c-mdj); --tool-soft: var(--c-mdj-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: clamp(24px, 5vw, 48px); position: relative; overflow: hidden;
}
.mdj-card::after { content: "“"; position: absolute; right: 24px; top: -30px; font-family: var(--font-display); font-size: 14rem; line-height: 1; color: var(--tool-soft); pointer-events: none; }
.mdj-date { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--tool); background: var(--tool-soft); padding: 5px 12px; border-radius: 999px; text-transform: capitalize; }
.mdj-word { font-family: var(--font-display); font-size: clamp(2.6rem, 8vw, 4.8rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 18px 0 8px; position: relative; z-index: 1; overflow-wrap: anywhere; }
.mdj-meta { color: var(--ink-faint); font-style: italic; margin-bottom: 18px; }
.mdj-def { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 60ch; position: relative; z-index: 1; }
.mdj-ex { border-left: 3px solid var(--tool); padding: 4px 0 4px 16px; color: var(--ink-soft); font-style: italic; max-width: 60ch; }
.mdj-origin { font-size: .92rem; color: var(--ink-soft); }
.mdj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mdj-mini { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.mdj-mini .mdj-word { font-size: clamp(2.2rem, 6vw, 3.4rem); }
@media (max-width: 700px) { .mdj-mini { grid-template-columns: 1fr; } }

.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.archive button {
  text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; color: var(--ink);
}
.archive button:hover { border-color: var(--c-mdj); }
.archive button[aria-current="true"] { border-color: var(--c-mdj); box-shadow: 0 0 0 3px var(--c-mdj-soft); }
.archive small { display: block; color: var(--ink-faint); font-size: .8rem; text-transform: capitalize; }
.archive strong { font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- Pages outil ---------- */
.tool-hero { padding-block: clamp(28px, 5vw, 56px) 8px; }
.crumbs { font-size: .88rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.tool-title { display: flex; align-items: center; gap: 16px; }
.tool-title h1 { margin: 0; }
.tool-title .tool-icon { width: 60px; height: 60px; border-radius: 16px; flex: none; }
.tool-title .tool-icon svg { width: 30px; height: 30px; }
.tool-hero .lead { margin: 14px 0 0; text-align: left; margin-inline: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3.5vw, 32px); margin-top: 28px;
}
.panel-options { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; margin-top: 18px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 20px; }
.hint { font-size: .88rem; color: var(--ink-faint); margin: 10px 0 0; }
.hint kbd { font-family: ui-monospace, monospace; font-size: .85em; background: var(--bg-soft); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

.results { margin-top: 28px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head h2 { font-size: 1.3rem; margin: 0; }
.results-count { color: var(--ink-soft); font-size: .95rem; }
.group { margin-bottom: 22px; }
.group-title { font-family: var(--font-body); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 0 0 10px; display: flex; gap: 10px; align-items: center; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-title span { color: var(--tool); }
.words { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.word {
  font: inherit; font-weight: 500; font-size: 1rem;
  padding: 7px 14px; border-radius: 10px; background: var(--tool-soft, var(--bg-soft)); color: var(--ink);
  border: 1px solid transparent; cursor: pointer; transition: border-color .12s, transform .12s;
}
.word:hover { border-color: var(--tool); }
.word:active { transform: scale(.97); }
.word.common { font-weight: 700; }
.word-lg { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; padding: 12px 20px; border-radius: 14px; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); border: 1.5px dashed var(--line); border-radius: 16px; }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); padding: 16px 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--tool, var(--accent)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.more-btn { margin-top: 12px; }

.phon { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95em; background: var(--tool-soft); color: var(--tool); padding: 2px 8px; border-radius: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Contenu éditorial (SEO) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.aside-card { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.aside-card h2 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }
.aside-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.aside-links a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.aside-links a:hover { background: var(--bg-soft); }
.aside-links .tool-icon { width: 38px; height: 38px; border-radius: 10px; }
.aside-links .tool-icon svg { width: 20px; height: 20px; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } .aside-card { position: static; } }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--ink-faint); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0 0 16px; }

.example-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.example-table th, .example-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.example-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.table-wrap { overflow-x: auto; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); margin-top: 40px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-grid p { color: var(--ink-soft); font-size: .95rem; max-width: 40ch; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-bottom a { color: var(--ink-soft); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Ajustements ---------- */
.btn { white-space: nowrap; }
.btn-tool { background: var(--tool); color: #fff; }
.t-mdj .btn-tool, .btn-tool.t-mdj { color: #1d1b18; }
:root[data-theme="dark"] .btn-tool { color: #15140f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-tool { color: #15140f; }
  :root:not([data-theme]) .theme-icon-dark { display: block; }
  :root:not([data-theme]) .theme-icon-light { display: none; }
}
.mdj-date svg { width: 16px; height: 16px; flex: none; }
.mdj-date, .archive small { text-transform: none; }

/* ---------- Jeu : Mot du jour ---------- */
:root { --j-correct: #1f9d74; --j-present: #e0a516; --j-absent: #8f887d; --j-key: #e9e3d8; }
:root[data-theme="dark"] { --j-correct: #2fae84; --j-present: #d6a12a; --j-absent: #4a453c; --j-key: #3a362e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --j-correct: #2fae84; --j-present: #d6a12a; --j-absent: #4a453c; --j-key: #3a362e; } }

.jeu { max-width: 560px; margin-inline: auto; padding-inline: clamp(12px, 3vw, 32px); }
.jeu-entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.jeu-entete .btn svg { width: 16px; height: 16px; }
.jeu-zone { position: relative; margin: 22px 0; }
.jeu-grille { --len: 5; display: grid; gap: 7px; width: min(100%, calc(66px * var(--len)), calc(7.2vh * var(--len))); min-width: calc(44px * var(--len)); max-width: 100%; margin-inline: auto; }
.jeu-ligne { display: grid; grid-template-columns: repeat(var(--len), 1fr); gap: 7px; }
.tuile {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 7vw, 2rem); text-transform: uppercase; color: var(--ink);
  user-select: none;
}
.tuile.pleine { border-color: var(--ink-faint); }
.tuile.correct, .tuile.present, .tuile.absent { border-color: transparent; color: #fff; }
.tuile.correct { background: var(--j-correct); }
.tuile.present { background: var(--j-present); }
.tuile.absent { background: var(--j-absent); }
.tuile.pop { animation: pop .1s ease-out; }
.tuile.flip { animation: flip .5s ease-in-out both; }
.jeu-ligne.shake { animation: shake .45s; }
.jeu-ligne.gagne .tuile { animation: saut .5s ease both; }
.jeu-ligne.gagne .tuile:nth-child(2) { animation-delay: .1s; }
.jeu-ligne.gagne .tuile:nth-child(3) { animation-delay: .2s; }
.jeu-ligne.gagne .tuile:nth-child(4) { animation-delay: .3s; }
.jeu-ligne.gagne .tuile:nth-child(5) { animation-delay: .4s; }
.jeu-ligne.gagne .tuile:nth-child(6) { animation-delay: .5s; }
@keyframes pop { 50% { transform: scale(1.1); } }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(-90deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes saut { 40% { transform: translateY(-14px); } 70% { transform: translateY(2px); } }

.jeu-message {
  position: absolute; left: 50%; top: -6px; transform: translate(-50%, -8px); z-index: 5;
  background: var(--ink); color: var(--bg); font-weight: 700; padding: 10px 16px; border-radius: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.jeu-message.show { opacity: 1; transform: translate(-50%, 0); }

.clavier { display: grid; gap: 7px; user-select: none; }
.clavier-ligne { display: flex; gap: 5px; justify-content: center; }
.touche {
  flex: 1 1 0; max-width: 46px; min-width: 0; height: 56px; border: none; border-radius: 9px;
  background: var(--j-key); color: var(--ink); font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  display: grid; place-items: center; padding: 0; touch-action: manipulation; transition: filter .1s, background .2s;
}
.touche:hover { filter: brightness(.95); }
.touche:active { transform: translateY(1px); }
.touche.large { flex: 1.6 1 0; max-width: 76px; font-size: .78rem; }
.touche svg { width: 22px; height: 22px; }
.touche.correct, .touche.present, .touche.absent { color: #fff; }
.touche.correct { background: var(--j-correct); }
.touche.present { background: var(--j-present); }
.touche.absent { background: var(--j-absent); }
@media (max-width: 400px) { .touche { height: 50px; font-size: .9rem; } .clavier-ligne { gap: 4px; } }

.jeu-fin { text-align: center; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 22px; }
.fin-titre { color: var(--ink-soft); font-weight: 600; margin: 0; }
.fin-mot { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 8vw, 3.2rem); letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.stats div { background: var(--bg-soft); border-radius: 12px; padding: 10px 4px; }
.stats strong { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.stats span { font-size: .75rem; color: var(--ink-soft); }
.dist { display: grid; gap: 5px; text-align: left; }
.dist-ligne { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.dist-ligne > span { width: 12px; }
.dist-barre { background: var(--j-absent); color: #fff; border-radius: 6px; padding: 2px 8px; text-align: right; font-size: .85rem; min-width: 26px; }
.dist-barre.actuel { background: var(--j-correct); }
.prochain { margin: 18px 0 0; color: var(--ink-soft); }
.prochain strong { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 1.1rem; }

.jeu-aide {
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink);
  width: min(92vw, 440px); padding: 28px 24px; box-shadow: var(--shadow-lg);
}
.jeu-aide::backdrop { background: rgba(20, 18, 14, .5); backdrop-filter: blur(3px); }
.jeu-aide h2 { margin-right: 40px; }
.jeu-aide p { color: var(--ink-soft); }
.jeu-aide .fermer { position: absolute; right: 16px; top: 16px; }
.aide-ex { display: grid; grid-template-columns: repeat(5, 44px); gap: 5px; margin: 6px 0 4px; }
.aide-ex .tuile { font-size: 1.3rem; border-radius: 9px; }

.mini-tuiles { display: flex; gap: 6px; margin: 18px 0 14px; }
.mini-tuiles .tuile { width: 52px; font-size: 1.6rem; }
@media (max-width: 600px) {
  .t-mdj .tool-hero { padding-top: 16px; }
  .t-mdj .tool-hero .lead, .t-mdj .crumbs { display: none; }
  .t-mdj .tool-title .tool-icon { width: 44px; height: 44px; }
  .t-mdj .tool-title h1 { font-size: 1.8rem; }
  .jeu { margin-top: 16px; padding-block: 14px; }
  .jeu-zone { margin: 14px 0; }
}

.jeu-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.mode { font: inherit; font-weight: 600; font-size: .95rem; border: none; background: transparent; color: var(--ink-soft); padding: 9px 6px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mode:hover { color: var(--ink); }
.mode[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mode .etat { color: var(--j-correct); font-weight: 800; }
.mode .etat:empty { display: none; }

/* ---------- Accueil : fonctionnement ---------- */
.etapes { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; counter-reset: none; }
.etapes li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.etapes h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; margin: 14px 0 6px; }
.etapes p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.etape-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.explications { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px 40px; }
.explication { display: flex; gap: 16px; align-items: flex-start; }
.explication .tool-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.explication .tool-icon svg { width: 22px; height: 22px; }
.explication h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 2px 0 6px; }
.explication p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* ---------- Pages légales & contact ---------- */
.legal h2 { font-size: 1.35rem; }
.legal .maj { color: var(--ink-faint); font-size: .9rem; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 24px 28px; margin: 24px 0 36px; }
.contact-card .tool-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); flex: none; }
.contact-card .tool-icon svg { width: 28px; height: 28px; }
.contact-email { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 3.5vw, 1.6rem); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-email:hover { color: var(--accent); }
.contact-card .label { display: block; margin-bottom: 2px; }
.contact-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.motifs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; list-style: none; padding: 0; }
.motifs li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 0; }
.motifs strong { display: block; margin-bottom: 4px; }
.prose .motifs { padding-left: 0; }
@media (max-width: 600px) {
  .jeu-modes { margin-bottom: 10px; }
  .mode { padding: 7px 4px; }
  .touche { height: 48px; }
  .jeu-zone { margin: 10px 0 12px; }
}

/* ---------- Test de frappe ---------- */
.frp-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; }
.frp-options { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.frp-live { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.frp-live > div { display: flex; align-items: baseline; gap: 6px; background: var(--bg-soft); border-radius: 12px; padding: 8px 14px; }
.frp-live strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--tool); font-variant-numeric: tabular-nums; min-width: 1.6ch; }
.frp-live span { font-size: .85rem; color: var(--ink-soft); }
.frp-live .icon-btn { margin-left: auto; }
.frp-box { position: relative; border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px; cursor: text; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.frp-box.focus { border-color: var(--tool); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tool) 15%, transparent); }
.frp-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: text; font-size: 16px; z-index: 1; }
.frp-fenetre { position: relative; height: calc(3 * 2.3em); overflow: hidden; font-size: clamp(1.15rem, 3.2vw, 1.55rem); line-height: 2.3em; }
.frp-mots { display: flex; flex-wrap: wrap; column-gap: .55em; transition: transform .15s ease; font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; letter-spacing: .01em; }
.fw { position: relative; white-space: nowrap; }
.fl { color: var(--ink-faint); transition: color .05s; }
.fl.ok { color: var(--ink); }
.fl.ko { color: #d9443a; background: color-mix(in srgb, #d9443a 12%, transparent); border-radius: 3px; }
.fl.extra { opacity: .7; }
.fw.err { text-decoration: underline wavy #d9443a; text-decoration-thickness: 1.5px; text-underline-offset: .3em; }
.frp-caret { position: absolute; left: 0; top: 0; width: 2.5px; border-radius: 2px; background: var(--tool); transition: transform .08s linear; animation: clignote 1s step-end infinite; }
.frp-box.en-cours .frp-caret { animation: none; }
.frp-box:not(.focus) .frp-caret { opacity: 0; }
@keyframes clignote { 50% { opacity: 0; } }
.frp-focus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); font-weight: 600; color: var(--ink); pointer-events: none; z-index: 2; }
.frp-focus svg { width: 22px; height: 22px; color: var(--tool); }
.frp-resultat { text-align: center; padding-top: 8px; }
.frp-score { margin: 8px 0 18px; }
.frp-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 14vw, 6rem); line-height: 1; color: var(--tool); }
.frp-unit { font-weight: 700; font-size: 1.2rem; color: var(--ink-soft); margin-left: 8px; }
.frp-niveau { margin: 8px 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.frp-stats { max-width: 560px; margin: 0 auto 6px; }
@media (max-width: 560px) {
  .frp-live > div { padding: 6px 10px; flex-direction: column; gap: 2px; align-items: flex-start; }
  .frp-live strong { font-size: 1.3rem; }
  .frp-box { padding: 12px 14px; }
}
.frp-resultat:focus { outline: none; }

/* Graphique du test de frappe */
:root { --chart-ligne: #2183c9; --chart-err: #d9443a; }
:root[data-theme="dark"] { --chart-ligne: #3d95d6; --chart-err: #e2544a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-ligne: #3d95d6; --chart-err: #e2544a; } }
.frp-graph { text-align: left; margin: 26px 0 8px; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 10px; }
.frp-graph-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.frp-graph-head h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0; }
.frp-legende { display: flex; gap: 16px; font-size: .85rem; color: var(--ink-soft); }
.frp-legende span { display: inline-flex; align-items: center; gap: 6px; }
.k-ligne { width: 16px; height: 2px; border-radius: 2px; background: var(--chart-ligne); }
.k-err { width: 9px; height: 9px; border-radius: 50%; background: var(--chart-err); }
.frp-graph-zone { position: relative; }
.frp-graph-svg { width: 100%; border-radius: 8px; }
.frp-graph-svg:focus-visible { outline-offset: 4px; }
.frp-graph-svg svg { display: block; touch-action: pan-y; }
.frp-graph .gr { stroke: var(--line); stroke-width: 1; }
.frp-graph .ax { fill: var(--ink-faint); font-size: 11px; font-family: var(--font-body); }
.frp-graph .ligne { fill: none; stroke: var(--chart-ligne); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.frp-graph .zone { fill: var(--chart-ligne); opacity: .08; }
.frp-graph .err-dot { fill: var(--chart-err); stroke: var(--surface); stroke-width: 2; }
.frp-graph .curseur { stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.frp-graph .curseur-pt { fill: var(--chart-ligne); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.frp-tip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: .82rem; display: flex; flex-direction: column; white-space: nowrap; box-shadow: var(--shadow); }
.frp-tip strong { font-size: .95rem; }
.frp-donnees { margin-top: 6px; font-size: .9rem; }
.frp-donnees summary { cursor: pointer; color: var(--ink-soft); padding: 4px 0; }
.frp-donnees .table-wrap { max-height: 220px; overflow: auto; }

/* ---------- L’Oracle ---------- */
.oracle { max-width: 680px; margin-inline: auto; text-align: center; }
.oracle-scene { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }
.oracle-boule { --eclat: 0; width: 120px; filter: drop-shadow(0 0 calc(6px + 22px * var(--eclat)) color-mix(in srgb, var(--c-dev) calc(25% + 55% * var(--eclat)), transparent)); transition: filter .5s; animation: flotte 4s ease-in-out infinite; }
.oracle-boule svg { display: block; width: 100%; }
.dv-ombre { fill: var(--ink); opacity: .1; }
.dv-socle { fill: var(--ink-soft); }
.dv-etincelles path { fill: #fff; animation: scintille 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.dv-etincelles path:nth-child(2) { animation-delay: 1.1s; }
@keyframes flotte { 50% { transform: translateY(-6px); } }
@keyframes scintille { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
.oracle-jauge { width: 160px; height: 6px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.oracle-jauge span { display: block; height: 100%; width: 0; background: var(--c-dev); border-radius: 99px; transition: width .5s ease; }
.oracle-ecran h2 { margin-top: 6px; }
.oracle-ecran p { color: var(--ink-soft); }
.btn-lg { padding: 15px 28px; font-size: 1.1rem; }
.oracle-compteur { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tool) !important; margin: 6px 0 4px; }
.oracle-bulle { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.25; color: var(--ink) !important; min-height: 2.5em; display: flex; align-items: center; justify-content: center; margin: 0 0 20px; }
.oracle-bulle.apparait { animation: apparait .35s ease; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } }
.oracle-reponses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rep { font: inherit; font-weight: 600; font-size: .95rem; padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .12s, background .12s, transform .1s; }
.rep:hover { border-color: var(--tool); background: var(--tool-soft); }
.rep:active { transform: scale(.97); }
.rep kbd { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.rep-oui { border-color: color-mix(in srgb, var(--c-gen) 45%, var(--line)); }
.rep-non { border-color: color-mix(in srgb, #d9443a 40%, var(--line)); }
.oracle-outils, .oracle-choix { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.oracle-mot { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 9vw, 3.6rem); letter-spacing: -.02em; line-height: 1.1; color: var(--ink) !important; margin: 6px 0 8px; overflow-wrap: anywhere; }
.oracle-form { max-width: 460px; margin: 0 auto; }
@media (max-width: 560px) {
  .oracle-reponses { grid-template-columns: 1fr 1fr; }
  .oracle-reponses .rep:nth-child(3) { grid-column: 1 / -1; order: 5; }
  .rep { flex-direction: row; justify-content: center; padding: 12px 8px; }
  .oracle-boule { width: 90px; }
}
.frp-graph .curseur-pt.sur-erreur { fill: var(--chart-err); }

/* ---------- Accueil compact : outils visibles sans défiler ---------- */
.hero-compact { padding-block: clamp(28px, 5vw, 56px) clamp(16px, 3vw, 28px); }
.hero-compact .eyebrow { margin-bottom: 14px; }
.hero-compact h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: none; margin-bottom: .35em; }
.hero-compact .lead { font-size: clamp(1rem, 1.8vw, 1.15rem); }
.outils-accueil { padding-top: 0; }
.tools-accueil { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tools-accueil .tool-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 14px; row-gap: 4px; padding: 18px 20px; }
.tools-accueil .tool-icon { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 12px; }
.tools-accueil .tool-icon svg { width: 23px; height: 23px; }
.tools-accueil .tool-card h3 { margin: 0; font-size: 1.2rem; align-self: center; }
.tools-accueil .tool-card p { font-size: .9rem; grid-column: 2; }
.tools-accueil .tool-card .go { grid-column: 2; padding-top: 6px; font-size: .88rem; }
@media (max-width: 900px) { .tools-accueil { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .tools-accueil { grid-template-columns: 1fr; gap: 10px; }
  .tools-accueil .tool-card { padding: 14px 16px; }
  .tools-accueil .tool-card p { display: none; }
  .tools-accueil .tool-icon { grid-row: 1 / 3; width: 42px; height: 42px; }
  .tools-accueil .tool-card .go { padding-top: 0; }
  .hero-compact .eyebrow { display: none; }
}

/* Bouton son */
.son-btn .son-off { display: none; }
.son-btn[aria-pressed="false"] .son-on { display: none; }
.son-btn[aria-pressed="false"] .son-off { display: block; }
.son-btn[aria-pressed="false"] { color: var(--ink-faint); }
.oracle { position: relative; }
.oracle-son { position: absolute; top: 16px; right: 16px; }
.hero-compact { padding-block: clamp(20px, 3.5vw, 40px) clamp(14px, 2.5vw, 24px); }
.hero-compact .eyebrow { margin-bottom: 10px; }
.tools-accueil .tool-card p { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tools-accueil .tool-card { row-gap: 2px; padding: 16px 18px; }
@media (max-width: 560px) { .tools-accueil .tool-card p { display: none; } }

/* ==========================================================
   Mobile
   ========================================================== */
/* Pas d'effets de survol « collants » sur écran tactile */
@media (hover: none) {
  .tool-card:hover { transform: none; }
  .tool-card:hover .go svg { transform: none; }
}

/* Menu : défilable s'il dépasse l'écran */
@media (max-width: 1140px) {
  .nav { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-lg); }
}

/* Zones tactiles plus confortables */
@media (pointer: coarse) {
  .chip { padding: 9px 15px; }
  .footer-grid ul { gap: 2px; }
  .footer-grid li a { display: inline-block; padding-block: 6px; }
  .crumbs a { display: inline-block; padding-block: 4px; }
}

@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .tool-hero { padding-top: 20px; }
  .crumbs { margin-bottom: 12px; }
  .tool-title { gap: 12px; }
  .tool-title h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); overflow-wrap: anywhere; }
  .tool-title .tool-icon { width: 48px; height: 48px; border-radius: 14px; }
  .tool-title .tool-icon svg { width: 24px; height: 24px; }
  .panel { margin-top: 20px; border-radius: 18px; }
  .results { margin-top: 20px; }
  .section-head { margin-bottom: 20px; }
  /* Générateur : options sur deux colonnes */
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .btn { white-space: normal; text-align: center; }
  .btn-lg { padding: 14px 22px; font-size: 1.05rem; }
  .content-grid { gap: 32px; }
  .faq details { padding: 0 16px; }
  .contact-card { padding: 20px; }
  .contact-card .actions { margin-left: 0; }
  .jeu-message { white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 48px); }

  /* Le Mot : grille + clavier visibles sans défiler */
  .t-mdj .tool-hero { padding-top: 12px; }
  .t-mdj .tool-title .tool-icon { width: 38px; height: 38px; border-radius: 11px; }
  .t-mdj .tool-title .tool-icon svg { width: 20px; height: 20px; }
  .t-mdj .tool-title h1 { font-size: 1.6rem; }
  .jeu { margin-top: 12px; padding-block: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
  .jeu > * { grid-column: 1 / -1; }
  .jeu > .jeu-modes, .jeu > .jeu-entete { grid-column: auto; margin-bottom: 0; }
  .jeu-entete .mdj-date { display: none; }
  .jeu-entete .btn { width: 42px; height: 42px; padding: 0; border-radius: 12px; }
  .jeu-entete .btn svg { width: 20px; height: 20px; }
  .aide-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mode { padding: 8px 4px; }
  .jeu-zone { margin: 10px 0; }
  .jeu-grille {
    --tuile: clamp(34px, calc((100vh - 400px) / 6), 62px);
    --tuile: clamp(34px, calc((100dvh - 400px) / 6), 62px);
    gap: 6px; min-width: 0;
    width: min(100%, calc(var(--tuile) * var(--len) + 6px * (var(--len) - 1)));
  }
  .jeu-ligne { gap: 6px; }
  .tuile { border-radius: 9px; font-size: clamp(1.15rem, calc(var(--tuile, 48px) * .5), 1.9rem); }
  .clavier { gap: 6px; }
  .touche { height: 48px; border-radius: 7px; }
  .jeu-fin { padding-top: 14px; margin-bottom: 14px; }
  .stats strong { font-size: 1.4rem; }
}
@media (max-width: 600px) and (max-height: 640px) {
  .touche { height: 44px; }
}
@media (max-width: 380px) {
  .wrap { padding-inline: 14px; }
  .touche { font-size: .88rem; }
  .touche.large { font-size: .68rem; }
  .clavier-ligne { gap: 4px; }
  .frp-live { gap: 6px; }
  .oracle-reponses .rep { font-size: .9rem; }
  .mode { font-size: .82rem; white-space: nowrap; padding-inline: 2px; }
}
