/* Styles communs aux outils BoîteDeDev : mêmes jetons et composants que la page d'accueil */
:root {
  --ink: #16181d;
  --ink-2: #2e333d;
  --muted: #5e6675;
  --line: #e3e9ef;
  --ctl-line: #cdd5de;
  --field-line: #8a94a3; /* 3:1 sur blanc, contour de champ lisible */
  --paper: #f6f9fb;
  --raised: #eceff4;
  --white: #ffffff;
  --sky: #0ea5ff;
  --sky-deep: #026cb5;
  --sky-soft: #e4f5ff;
  --beam-1: #bfe8ff;
  --butter: #fff1cc;
  --butter-ink: #8a5a00;
  --ok: #1f7a4d;
  --err: #a12222;
  --r-ctl: 10px;
  --r-card: 16px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Petits textes : trois tailles seulement */
  --fs-meta: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-ui: 0.9375rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky-deep); }
img, svg { display: block; max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: #fff; font-weight: 600; padding: 12px 16px; border-radius: var(--r-ctl); text-decoration: none; }
.skip:focus { top: 12px; }

/* Barre du haut */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(246, 249, 251, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav img { display: block; height: 44px; width: auto; }
.back {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-ui); text-decoration: none; color: var(--ink);
  padding: 8px 16px; border-radius: var(--r-ctl); background: var(--white); box-shadow: inset 0 0 0 1px var(--ctl-line);
  transition: box-shadow 0.15s var(--ease);
}
.back:hover { box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 420px) { .nav img { height: 36px; } .back { padding: 8px 12px; font-size: var(--fs-small); } }

/* En-tête de page */
header.top { padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 4vw, 48px); }
.eyebrow { font-family: var(--mono); font-size: var(--fs-meta); color: var(--sky-deep); }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2.375rem, 6vw, 4.25rem); letter-spacing: -0.03em; line-height: 1; margin: 16px 0; }
h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.hl { position: relative; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: 0.06em; height: 0.3em; background: var(--beam-1); border-radius: 4px; z-index: -1; }
@media (min-width: 480px) { .hl { white-space: nowrap; } }
/* Sur petit écran le titre passe à la ligne : le surlignage suit chaque ligne */
@media (max-width: 479px) {
  .hl::after { display: none; }
  .hl { background: linear-gradient(transparent 64%, var(--beam-1) 64%, var(--beam-1) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 4px; margin: 0 -4px; border-radius: 4px; }
}
.lead { font-size: clamp(1.0625rem, 2vw, 1.1875rem); color: var(--muted); max-width: 62ch; margin: 0; }

/* Boutons, comme sur la page d'accueil */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 1rem; line-height: 1.5rem;
  padding: 12px 20px; border-radius: var(--r-ctl); border: 0; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ctl-line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-sm { padding: 8px 16px; font-size: var(--fs-small); line-height: 1.25rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Champs */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-weight: 600; font-size: var(--fs-ui); }
.field .hint { font-size: var(--fs-small); color: var(--muted); }
input[type="text"], input[type="url"], textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--field-line); border-radius: var(--r-ctl); padding: 12px 16px; width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input:focus, textarea:focus { outline: none; border-color: var(--sky-deep); box-shadow: 0 0 0 3px var(--sky-soft); }

/* Carte blanche */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 3.5vw, 32px); }

/* Pied de page */
footer.site { border-top: 1px solid var(--line); padding: 32px 0; font-size: var(--fs-small); color: var(--muted); }
footer.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer.site img { display: block; height: 32px; width: auto; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: inherit; }
footer.site a:hover { color: var(--ink); }
