/* tuile — fiche technique : monochrome, traits fins, une seule couleur signal. */

:root {
  --paper: #f7f7f4;
  --panel: #ffffff;
  --panel-2: #efefeb;
  --ink: #101010;
  --muted: #6a6a64;
  --line: #d4d4ce;
  --signal: #2446f0;
  --signal-soft: #eceeff;
  --radius: 2px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --paper: #101010;
  --panel: #171717;
  --panel-2: #1e1e1e;
  --ink: #f2f2ee;
  --muted: #9a9a93;
  --line: #32322f;
  --signal: #8fa0ff;
  --signal-soft: #1c2040;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--signal); color: #fff; }

/* ---------- Structure ---------- */

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner { height: 62px; display: flex; align-items: center; gap: 12px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
}
.brand-mark svg { width: 13px; height: 13px; stroke-width: 1.6; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 7px 6px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--signal); }

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  width: 34px; height: 32px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { display: block; height: 1px; background: var(--ink); transition: transform .18s, opacity .18s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .28);
  z-index: 40;
}
.nav-backdrop.show { display: block; }

/* ---------- Hero ---------- */

.hero { padding: 74px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 72px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--signal); }

h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 600;
}
h1 em { font-style: normal; }

/* Le mot clé devient une vignette dimensionnée en em : elle suit la taille
   du titre sur mobile comme sur desktop. */
.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .52em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 3px 10px rgba(0, 0, 0, .28);
  padding: .22em .8em .22em .22em;
  border: 1px solid transparent;
  border-radius: .26em;
  background: #4f46e5;
  color: #f7f7f4;
  font-family: var(--mono);
  font-size: .34em;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  vertical-align: .18em;
  overflow: hidden;
  animation: hero-badge-color 8s ease-in-out infinite;
}
.hero-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .06) 38%, transparent 62%);
  pointer-events: none;
}
@keyframes hero-badge-color {
  0%, 20% { background: #4f46e5; border-color: #4f46e5; }
  25%, 45% { background: #0891b2; border-color: #0891b2; }
  50%, 70% { background: #7c3aed; border-color: #7c3aed; }
  75%, 95% { background: #db2777; border-color: #db2777; }
  100% { background: #4f46e5; border-color: #4f46e5; }
}
.hero-badge-icon {
  position: relative;
  width: 1.7em;
  height: 1.7em;
  flex: 0 0 1.7em;
  overflow: hidden;
  border-radius: .22em;
  background: rgba(255, 255, 255, .2);
  z-index: 1;
}
.hero-icon-reel, .hero-word-reel {
  display: flex;
  flex-direction: column;
  animation: hero-icon-carousel 8s linear infinite;
}
.hero-icon {
  display: block;
  width: 1.7em;
  height: 1.7em;
  flex: 0 0 1.7em;
  color: inherit;
  animation: hero-icon-bounce 8s ease-out infinite;
}
.hero-badge-label {
  position: relative;
  z-index: 1;
  display: block;
  width: 3.7em;
  height: 1.7em;
  overflow: hidden;
}
.hero-word {
  display: block;
  height: 1.7em;
  flex: 0 0 1.7em;
  line-height: 1.7em;
  text-align: center;
  white-space: nowrap;
}
@keyframes hero-icon-carousel {
  0%, 18% { transform: translateY(0); filter: blur(0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  21.5% { transform: translateY(-.85em); filter: blur(1.4px); animation-timing-function: cubic-bezier(.16,.84,.44,1); }
  25%, 43% { transform: translateY(-1.7em); filter: blur(0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  46.5% { transform: translateY(-2.55em); filter: blur(1.4px); animation-timing-function: cubic-bezier(.16,.84,.44,1); }
  50%, 68% { transform: translateY(-3.4em); filter: blur(0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  71.5% { transform: translateY(-4.25em); filter: blur(1.4px); animation-timing-function: cubic-bezier(.16,.84,.44,1); }
  75%, 93% { transform: translateY(-5.1em); filter: blur(0); animation-timing-function: cubic-bezier(.55,.06,.68,.19); }
  96.5% { transform: translateY(-5.95em); filter: blur(1.4px); animation-timing-function: cubic-bezier(.16,.84,.44,1); }
  100% { transform: translateY(-6.8em); filter: blur(0); }
}
@keyframes hero-icon-bounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.14); }
  30%, 45% { transform: scale(1); }
  50% { transform: scale(1.14); }
  55%, 70% { transform: scale(1); }
  75% { transform: scale(1.14); }
  80%, 93% { transform: scale(1); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-icon-reel, .hero-icon, .hero-word-reel { animation: none; }
  .hero-badge { background: #4f46e5; border-color: #4f46e5; }
}

.lead { font-size: 1.06rem; color: var(--muted); max-width: 34em; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-family: var(--mono); font-size: .66rem;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.agent-pill:hover { color: var(--signal); border-color: var(--signal); }
.agent-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn svg { width: 15px; height: 15px; }

.hero-visual {
  position: relative;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hero-visual::before {
  content: 'FIG. 01 / CATALOGUE';
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .12em;
}
.hero-visual img { display: block; width: 100%; }
.hero-caption {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .02em;
}
.dot { width: 6px; height: 6px; background: var(--signal); }

/* ---------- Sections ---------- */

section { padding: 56px 0; border-top: 1px solid var(--line); }
section[id] { scroll-margin-top: 78px; }
.section-head { margin-bottom: 26px; }
.section-index {
  display: block;
  margin-bottom: 10px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
}
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -.04em;
}
.section-head p { margin: 0; color: var(--muted); max-width: 46em; }

.collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.collection-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-width: 0;
  min-height: 174px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.collection-card:hover { border-color: var(--signal); transform: translateY(-2px); }
.collection-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.collection-number {
  color: var(--signal);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
}
.collection-copy { display: grid; align-content: start; gap: 5px; }
.collection-copy strong { font-size: .9rem; line-height: 1.3; }
.collection-copy small { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.collection-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.collection-card:hover .collection-action { color: var(--signal); }

#stats-gallery .badge-card .preview { height: 76px; }
#stats-gallery .badge-card .preview img { max-height: 66px; }

.stats-feature { margin-bottom: 18px; }
.stats-feature img {
  display: block; width: 100%; max-width: 960px; height: auto;
  margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius);
}
@media (max-width: 640px) {
  .stats-feature img { max-width: 320px; }
}

/* ---------- Outils de galerie ---------- */

.gallery-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }

.search { position: relative; flex: 1 1 220px; max-width: 300px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.search input {
  width: 100%; height: 36px; padding: 0 10px 0 34px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); outline: none;
  font-family: var(--mono); font-size: .75rem;
}
.search input:focus { border-color: var(--signal); }

.filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter {
  height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .03em;
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter[aria-pressed="true"] { border-color: var(--signal); color: var(--signal); }

.preview-toggle { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: var(--radius); }
.preview-toggle button {
  height: 34px; padding: 0 11px; border: 0;
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .7rem;
}
.preview-toggle button + button { border-left: 1px solid var(--line); }
.preview-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Galeries ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s;
  cursor: pointer;
}
.card:hover { border-color: var(--ink); }
.card:focus-visible, .badge-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.card-preview {
  padding: 20px 16px;
  background: var(--panel-2);
  display: grid; place-items: center;
  min-height: 170px;
  border-bottom: 1px solid var(--line);
}
.card-preview img { width: 100%; height: auto; }
.card-body { padding: 16px; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-body h3 { margin: 0; font-size: .98rem; font-weight: 600; letter-spacing: -.02em; }
.tag {
  color: var(--muted);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
}
.card-body p { margin: 8px 0 14px; color: var(--muted); font-size: .85rem; min-height: 2.6em; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions .btn { flex: 1; min-height: 34px; padding: 0 8px; font-size: .65rem; }

.badge-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .badge-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .badge-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.pagination button {
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .7rem;
}
.pagination button:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.pagination button[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination .page-info { margin: 0 6px; color: var(--muted); font-family: var(--mono); font-size: .66rem; }

.badge-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color .15s;
  cursor: pointer;
}
.badge-card:hover { border-color: var(--ink); }
.badge-card .preview { height: 46px; display: grid; place-items: center; background: var(--panel-2); margin-bottom: 10px; }
.badge-card .preview img { max-width: 100%; height: auto; }
.badge-card .meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.badge-card h3 { margin: 0; font-size: .9rem; font-weight: 600; }
.badge-card .cat { font-family: var(--mono); font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.badge-showcase { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.badge-showcase img { height: 34px; width: auto; max-width: 100%; cursor: pointer; }
.badge-showcase img:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.link-row { display: flex; gap: 5px; margin-top: 8px; }
.link-row input {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--muted);
  font-family: var(--mono); font-size: .62rem;
}
.link-row button {
  height: 26px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .6rem; text-transform: uppercase;
}
.link-row button:hover { border-color: var(--signal); color: var(--signal); }
.badge-card .card-actions { margin-top: 5px; }
.badge-card .card-actions .btn {
  min-height: 27px;
  font-size: .58rem;
  letter-spacing: .02em;
  white-space: nowrap;
  padding: 0 5px;
  border-color: var(--line);
  color: var(--muted);
}
.badge-card .card-actions .btn:hover { color: var(--ink); border-color: var(--ink); }

.empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

/* ---------- Étapes et code ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step-num {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--mono); font-size: .72rem; color: var(--ink); margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: .98rem; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: .86rem; }

.code {
  margin-top: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: #111111; color: #e6e6e2;
  font-family: var(--mono); font-size: .76rem; line-height: 1.75; overflow-x: auto;
}
.code .c { color: #7d7d77; }
.code .t { color: #a7b5ff; }

.code-block { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
}
.code-head button {
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase;
}
.code-head button:hover { color: var(--ink); border-color: var(--ink); }
.code-pre { margin: 0; border-radius: 0; white-space: pre-wrap; word-break: break-word; }
.code-pre code { font-family: inherit; }
.code-note { margin: 0; padding: 10px 12px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); font-size: .74rem; }
.deploy-code { display: flex; flex-direction: column; gap: 12px; }
.deploy-code .code-block { margin-top: 0; }
.deploy .code-pre code { color: inherit; font-family: inherit; }

/* ---------- Hébergement ---------- */

.deploy {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
  padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.deploy h2 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 600; letter-spacing: -.035em; }
.deploy p { color: var(--muted); margin: 0 0 14px; }
.deploy ol { margin: 0; padding-left: 20px; color: var(--muted); }
.deploy li { margin: 6px 0; }
.deploy code { font-family: var(--mono); font-size: .84em; color: var(--signal); }
.deploy .code { margin: 0; }

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

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 36px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: .7rem; }
.footer-inner strong { color: var(--ink); }
.footer-inner a { color: var(--signal); text-decoration: none; }
.footer-inner code { font-size: .95em; }

/* ---------- Configurateur ---------- */

.back-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none;
}
.back-link:hover { color: var(--signal); }

.mobile-preview { display: none; }

.zoom-controls {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--muted); font-family: var(--mono); font-size: .62rem; letter-spacing: 0; text-transform: none;
}
.zoom-controls button {
  width: 20px; height: 20px; padding: 0;
  border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: .8rem; line-height: 1;
}
.zoom-controls button:hover:not(:disabled) { border-color: var(--ink); }
.zoom-controls button:disabled { opacity: .35; cursor: not-allowed; }
.zoom-controls > span { min-width: 38px; text-align: center; }

.mode-switch { display: flex; gap: 0; padding: 12px 12px 0; }
.mode-switch button {
  flex: 1; height: 34px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
}
.mode-switch button + button { border-left: 0; }
.mode-switch button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.config-layout { display: grid; grid-template-columns: minmax(310px, 380px) 1fr; gap: 16px; padding: 28px 0 64px; align-items: start; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.field { padding: 14px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.field .hint { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }
.field input[type="text"], .field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 36px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); outline: none;
  font-size: .82rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--signal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--signal); }
.range-row output { width: 44px; text-align: right; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] { width: 38px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.color-row input[type="text"] { flex: 1; font-family: var(--mono); font-size: .76rem; }

.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.icon-pagination { margin-top: 10px; }
.icon-group-label { grid-column: 1 / -1; }
.mode-switch button:focus-visible, .tabs button:focus-visible, .switch:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.icon-choice {
  aspect-ratio: 1; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--muted);
}
.icon-choice:hover { border-color: var(--ink); color: var(--ink); }
.icon-choice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#icon-search { margin-bottom: 14px; }
.icon-choice svg { width: 16px; height: 16px; }
.icon-choice[hidden], .icon-group-label[hidden] { display: none; }
.icon-group-label {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
}

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch-row span { font-family: var(--mono); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.switch { width: 36px; height: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; position: relative; }
.switch::after { content: ''; position: absolute; width: 14px; height: 14px; background: var(--muted); top: 2px; left: 2px; transition: transform .15s, background .15s; }
.switch[aria-pressed="true"] { border-color: var(--signal); }
.switch[aria-pressed="true"]::after { transform: translateX(16px); background: var(--signal); }

.preview-panel { position: sticky; top: 78px; }
.preview-stage {
  padding: 28px 20px; min-height: 230px; display: grid; place-items: center; overflow: hidden;
  background-color: var(--panel-2);
  background-image: radial-gradient(var(--line) .6px, transparent .6px);
  background-size: 14px 14px;
}
.preview-stage svg { max-width: 100%; height: auto; transform-box: fill-box; transform-origin: center; }
.field[hidden] { display: none; }
.status-samples { padding: 12px; border-bottom: 1px solid var(--line); }
.status-samples summary { cursor: pointer; font-weight: 600; }
.status-samples p { margin: 8px 0; }
.status-examples { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.status-examples img { max-width: 100%; height: auto; }
.preview[data-gallery-theme="dark"], .card-preview[data-gallery-theme="dark"], .preview-stage[data-preview-theme="dark"],
.mobile-preview-frame[data-preview-theme="dark"], .status-examples[data-preview-theme="dark"] {
  --line: #3a3c42; background-color: #1b1d22; color: #f0f0ef;
}
.preview[data-gallery-theme="light"], .card-preview[data-gallery-theme="light"], .preview-stage[data-preview-theme="light"],
.mobile-preview-frame[data-preview-theme="light"], .status-examples[data-preview-theme="light"] {
  --line: #d3d5d9; background-color: #f1f2f4; color: #202126;
}
#stats-gallery .preview { height: 88px; }
#stats-gallery img { max-height: 78px; }
#status-gallery .meta { flex-wrap: wrap; }

.tabs { display: flex; gap: 0; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.tabs button {
  padding: 8px 12px; border: 0; background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--signal); border-color: var(--signal); }

.snippet-options { padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
.snippet-options[hidden] { display: none; }
.snippet-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.snippet-source > span {
  color: var(--muted); font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase;
}
.snippet-source button {
  min-height: 30px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); color: var(--muted);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
}
.snippet-source button[aria-pressed="true"] { color: var(--signal); border-color: var(--signal); }
.snippet-options .field { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.snippet-options .field[hidden] { display: none; }
.snippet-hint { display: block; margin: 8px 0 12px; color: var(--muted); font-size: .72rem; }

.output-wrap { padding: 12px; }
.output-wrap[hidden] { display: none; }
.output-area {
  width: 100%; min-height: 110px; resize: vertical; padding: 11px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: .7rem; line-height: 1.6;
}
.output-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.output-actions .btn { min-height: 32px; font-size: .64rem; padding: 0 10px; }

.share-row { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.share-row input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--muted); font-family: var(--mono); font-size: .66rem; }
.share-row .btn { min-height: 32px; font-size: .64rem; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 12px);
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .72rem;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Adaptatif ---------- */

@media (max-width: 1100px) {
  .header-inner { gap: 8px; }
  .nav-toggle { display: flex; order: 3; margin-left: auto; }
  .icon-btn { order: 4; }
  .nav {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    max-height: calc(100vh - 62px);
    max-height: calc(100dvh - 62px);
    overflow-y: auto;
    margin: 0;
    padding: 6px 24px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open { display: grid; }
  .nav a {
    padding: 11px 4px;
    font-size: .7rem;
    border-bottom: 1px solid var(--line);
    border-bottom-color: var(--line) !important;
  }
  .nav a:last-child { border-bottom: 0; }
}

@media (max-width: 900px) {
  .hero-grid, .deploy, .config-layout { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding-top: 52px; }
  .preview-panel { position: static; }
  .steps { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .mobile-preview {
    display: block;
    position: sticky;
    top: 62px;
    z-index: 30;
    padding: 8px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .mobile-preview-head {
    display: flex; justify-content: space-between; gap: 10px;
    margin-bottom: 6px;
    color: var(--muted); font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  }
  .mobile-preview-frame {
    display: grid;
    place-items: center;
    height: 104px;
    padding: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--panel-2);
    background-image:
      linear-gradient(45deg, color-mix(in srgb, var(--muted) 7%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted) 7%, transparent) 75%),
      linear-gradient(45deg, color-mix(in srgb, var(--muted) 7%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted) 7%, transparent) 75%);
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
  }
  .mobile-preview img {
    display: block; max-width: 100%; max-height: 84px;
    object-fit: contain; transform-origin: center;
  }
  .mobile-preview-stats .mobile-preview-frame { height: 140px; }
  .mobile-preview-stats img { max-height: 120px; }
  .preview-stage { display: none; }
  .config-layout > .panel { order: 1; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .header-inner { gap: 8px; }
  .collection-grid { grid-template-columns: 1fr; gap: 8px; }
  .preview-toggle { width: 100%; margin-left: 0; }
  .preview-toggle button { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: repeat(7, 1fr); }
  .badge-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .badge-card { padding: 10px; }
  .badge-card .preview { height: 40px; margin-bottom: 8px; }
  .badge-card .card-actions { gap: 4px; }
  .badge-card .card-actions .btn { font-size: .55rem; padding: 0 3px; }
}
