/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --muted: #9aa3b2;
  --accent: #b5854b; /* ton bois */
  --accent-hover: #caa063;

  /* ── Tokens de marque (héritage ancien site, modernisé) ────────────────── */
  --wood-dark: #241a12; /* bandeaux header/footer (noyer foncé) */
  --wood-darker: #190f09;
  --cream: #f5eee2; /* base claire des sections marketing */
  --cream-2: #ece0cd;
  --walnut: #38291a; /* texte sur crème (contraste AA) */
  --walnut-soft: #6f5942;
  --brand-accent: #c2622d; /* orange brûlé (le foret CNC) */
  --brand-accent-hover: #a9531f;
  --radius-lg: 16px;
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Barre de navigation globale (bandeau bois sombre) ───────────────────── */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--wood-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
}
.site-logo {
  height: 46px;
  width: auto;
  display: block;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: #e8dccb;
  font-size: 0.95rem;
}
.site-nav a:hover {
  color: #fff;
}
.site-nav .link-btn {
  color: #e8dccb;
}
.site-cta {
  white-space: nowrap;
}

/* Bouton de marque (accent orange brûlé). */
.btn-brand {
  display: inline-block;
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-brand:hover {
  background: var(--brand-accent-hover);
  color: #fff;
}

/* ── Accueil (landing) ───────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: 64vh;
  overflow: hidden; /* masque les slides hors-champ pour le défilement */
  /* Photo de planche d'origine — toujours visible (autour des bandeaux à image,
     et au travers des bandeaux SANS image). Hauteur inchangée. */
  background: url('/photos/gravure-cnc.jpg') center/cover no-repeat;
}
.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(20, 12, 6, 0.82) 0%, rgba(20, 12, 6, 0.45) 70%, rgba(20, 12, 6, 0.25) 100%);
}
/* Rail : tous les bandeaux côte à côte, translaté d'un cran (droite → gauche). */
.home-hero-track {
  position: relative;
  z-index: 2;
  display: flex;
  transition: transform 0.7s ease;
  will-change: transform;
}
.home-hero-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 64vh; /* conserve la hauteur d'origine du héro */
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-track {
    transition: none;
  }
}
.home-hero-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}
.home-hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  cursor: pointer;
}
.home-hero-dot.is-active {
  background: #fff;
}
.banner-thumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.banner-thumb img {
  width: 200px;
  max-width: 40vw;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
}
.home-hero-content {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Bandeau AVEC image : l'image remplit le contenu ; voile dégradé pour la lisibilité. */
.home-hero-content.has-image {
  border-radius: 14px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* sinon les enfants (dont le bouton) s'étirent en pleine largeur */
}
.home-hero-content.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(20, 12, 6, 0.74) 0%, rgba(20, 12, 6, 0.34) 65%, rgba(20, 12, 6, 0.18) 100%);
}
.home-hero-content > * {
  position: relative;
  z-index: 1;
}
.home-hero-content h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  max-width: 16ch;
  margin: 0 0 1rem;
}
.home-hero-content p {
  color: #efe6d8;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 46ch;
  margin: 0 0 1.6rem;
}
.home-hero-cta {
  font-size: 1.05rem;
  padding: 0.75rem 1.4rem;
}

.home-section {
  background: #fff;
  color: var(--walnut);
  padding: 3.5rem 1.5rem;
}
.home-section-cream {
  background: var(--cream);
}
.home-wrap {
  max-width: 1120px;
  margin: 0 auto;
}
.home-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 0.4rem;
  color: var(--walnut);
}
.home-lead {
  color: var(--walnut-soft);
  max-width: 56ch;
  margin: 0 0 1.8rem;
}

.essence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}
.essence-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}
.essence-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}
.essence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.essence-card span {
  display: block;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  color: var(--walnut);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 1.25rem;
  gap: 1.25rem;
}
.step-card {
  background: var(--cream);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}
.step-card h3 {
  margin: 0 0 0.5rem;
  color: var(--brand-accent);
}
.step-card p {
  margin: 0;
  color: var(--walnut-soft);
  line-height: 1.55;
}
.home-cta-row {
  margin-top: 2rem;
  text-align: center;
}

/* ── Pied de page global ─────────────────────────────────────────────────── */
.site-footer {
  background:
    linear-gradient(rgba(15, 9, 5, 0.9), rgba(15, 9, 5, 0.95)),
    url('/wood/planks-bg.jpg') center / cover;
  color: #d9ccba;
  margin-top: 3rem;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  grid-gap: 2rem;
  gap: 2rem;
}
.site-footer-logo {
  height: 56px;
  width: auto;
  margin-bottom: 0.6rem;
}
.site-footer-brand .muted {
  color: #b7a890;
  max-width: 320px;
}
.site-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1.5rem;
  gap: 1.5rem;
}
.site-footer-cols h4 {
  margin: 0 0 0.6rem;
  color: #fff;
  font-size: 0.95rem;
}
.site-footer-cols a {
  display: block;
  color: #c9bba6;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}
.site-footer-cols a:hover {
  color: #fff;
}
.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #8f8068;
}
.site-footer-credits {
  font-size: 0.72rem;
  opacity: 0.8;
}
.site-footer-credits a {
  color: inherit;
  text-decoration: underline;
}
@media (max-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
  .site-cart-label {
    display: none;
  }
}
.site-cart {
  position: relative;
}
.cart-badge {
  display: inline-block;
  min-width: 1.1rem;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1205;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1rem;
}
.cart-icon {
  display: inline-block;
  margin-right: 0.3rem;
  transform-origin: center bottom;
}
.cart-bump {
  animation: cart-bump 0.65s ease;
}
@keyframes cart-bump {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.4) rotate(-12deg); }
  45% { transform: scale(1.15) rotate(8deg); }
  65% { transform: scale(1.3) rotate(-5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Vignette volante « fly-to-cart ». */
.fly-plate {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
}
.fly-plate svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Barre contextuelle de fusion de motifs. */

/* Pastille « ajouté au panier » dans le configurateur. */
.cfg-added {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 111, 61, 0.15);
  border: 1px solid rgba(31, 111, 61, 0.5);
  color: #b7e4c7;
  font-size: 0.9rem;
  animation: cfg-added-in 0.25s ease;
}
.cfg-added-icon {
  display: inline-block;
  animation: cart-bump 0.6s ease;
}
@keyframes cfg-added-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cart-bump,
  .cfg-added,
  .cfg-added-icon {
    animation: none;
  }
}

.btn {
  background: var(--accent);
  color: #1a1206;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.field input,
.field textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
}
.field textarea {
  resize: vertical;
  width: 100%;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.muted {
  color: var(--muted);
}
.error {
  color: #ff7b7b;
}
.ok {
  color: #7bdca0;
}

/* ── Configurateur ─────────────────────────────────────────────────────────── */
.cfg {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  grid-gap: 1rem;
  gap: 1rem;
  padding: 1.25rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .cfg {
    grid-template-columns: 1fr;
  }
}

.cfg-side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.cfg-side h2 {
  margin: 0 0 0.75rem;
}
.cfg-block {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.cfg-block:first-of-type {
  border-top: none;
  padding-top: 0;
}
.cfg-block h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.cfg-hint {
  font-size: 0.8rem;
  margin: 0.35rem 0;
}

.cfg-row {
  display: flex;
  gap: 0.6rem;
}
.cfg-row .field {
  flex: 1 1;
  min-width: 0; /* autorise le rétrécissement → pas de débordement du select */
  margin-bottom: 0;
}
.cfg-row .field select,
.cfg-row .field input {
  width: 100%;
  box-sizing: border-box;
}
.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0.35rem;
}

.cfg-woods {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cfg-wood {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  color: var(--text);
  text-align: left;
}
.cfg-wood.is-active {
  border-color: var(--accent);
}
.cfg-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  flex: 0 0 auto;
}
.cfg-wood-name {
  flex: 1 1;
}
.cfg-wood-price {
  font-size: 0.8rem;
}

.cfg-motif-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.cfg-motif-cats .chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted, #9aa0a6);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
}
.cfg-motif-cats .chip:hover {
  border-color: var(--accent);
}
.cfg-motif-cats .chip-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cfg-motifs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 0.4rem;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
}
.cfg-motif {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem;
  aspect-ratio: 1;
}
.cfg-motif:hover {
  border-color: var(--accent);
}

.cfg-palette {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.cfg-color {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid var(--border);
}
.cfg-color.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-hover);
}
/* Couleur « nulle » : usinée non peinte (#23) — damier transparent + barre. */
.cfg-color-none {
  background-color: #fff;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  position: relative;
  overflow: hidden;
}
.cfg-color-none::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 2px;
  background: #c0392b;
  transform: rotate(-45deg);
}

/* Panier en surimpression (#18) et actions de ligne (#19). */
.cart-overlay {
  width: min(760px, 92vw);
  max-height: 86vh;
  overflow: auto;
}
/* Barre d'outils grille + coordonnées, sous le canvas du configurateur. */
.cfg-grid-bar {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 0.4rem 0.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.cfg-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-right: 0.4rem;
}
.cfg-tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
}
.cfg-tab.is-active {
  background: var(--accent);
  color: #1a1205;
}
.cfg-grid-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cfg-grid-step input {
  width: 64px;
}
.cfg-cursor {
  margin-left: auto;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.checkout-billing {
  border-left: 2px solid var(--border);
  padding-left: 0.8rem;
  margin: 0.4rem 0 0.8rem;
}
.promo-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}
.promo-row input {
  flex: 1 1;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font: inherit;
}
.cart-foot {
  text-align: right;
  margin-top: 1rem;
}
.cart-overlay-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-block {
  width: 100%;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
}
.btn-ghost:hover {
  border-color: var(--accent);
}
.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Boutons icône (barre d'actions du canevas + barre de fusion) : carrés, l'icône
   est centrée et le libellé passe en info-bulle. */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  width: 2.6rem;
  height: 2.6rem;
  line-height: 0;
}
.btn-icon svg {
  display: block;
}
/* Bouton de fusion armé (mode actif) : bordure + trait accentués. */
.btn-icon.is-armed {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.cfg-merge-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--accent);
}
.cfg-merge-cancel {
  background: none;
  border: none;
  color: var(--muted, #9aa3af);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}
.cfg-merge-cancel:hover {
  color: #fff;
}

.cfg-stage {
  min-width: 0;
}
.cfg-stage-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.6rem;
}
.cfg-stage-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cfg-canvas-wrap {
  grid-column: 2;
  grid-row: 2;
  line-height: 0;
}

/* ── Lignes de côtes autour du canvas (longueur en haut, largeur à gauche) ── */
.cfg-ruler-grid {
  display: grid;
  grid-template-columns: 26px auto;
  grid-template-rows: 22px auto;
  grid-gap: 4px;
  gap: 4px;
  justify-content: center;
}
.ruler-corner {
  grid-column: 1;
  grid-row: 1;
}
.ruler-top {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  position: relative;
  height: 9px;
  border: 1px solid var(--muted);
  border-bottom: none; /* ⊓ ouvert vers le bas → vers la plaque */
  box-sizing: border-box;
  opacity: 0.85;
}
.ruler-top span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -1px);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.ruler-left {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  position: relative;
  width: 9px;
  border: 1px solid var(--muted);
  border-right: none; /* ⊏ ouvert vers la droite → vers la plaque */
  box-sizing: border-box;
  opacity: 0.85;
}
.ruler-left span {
  position: absolute;
  top: 50%;
  right: 100%;
  /* rotate(180deg) → texte orienté vers l'intérieur (lecture bas → haut). */
  transform: translate(-2px, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  -webkit-text-orientation: mixed;
          text-orientation: mixed;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.cfg-side-right .field input[type='range'] {
  width: 100%;
}

.cfg-price {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cfg-price td {
  padding: 0.25rem 0;
}
.cfg-price td:last-child {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.cfg-price-sep td {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  font-weight: 600;
}
.cfg-price-total td {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-hover);
}

/* Sélecteurs (dimensions, police) */
.field select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
}

/* Boutons segmentés (contour/plein, gras/italique) */
.cfg-seg {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.cfg-seg-btn {
  flex: 1 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.45rem 0.6rem;
}
.cfg-seg-btn.is-active {
  border-color: var(--accent);
  color: var(--accent-hover);
}
.cfg-seg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Admin ──────────────────────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-top: 1.5rem;
}
.admin-card {
  display: block;
  color: var(--text);
}
.admin-card:hover {
  border-color: var(--accent);
}
.admin-card h3 {
  margin: 0 0 0.4rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}
.admin-table th {
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  padding: 0.25rem 0.4rem;
}
.admin-table td {
  padding: 0.2rem 0.4rem;
}
.admin-table input[type='number'] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.4rem 0.5rem;
}
.admin-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 0.6rem;
  gap: 0.6rem;
}
.cfg-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.4rem 0;
}
.cfg-check input {
  width: auto;
}

/* ── Checkout / commandes ────────────────────────────────────────────────────── */
.checkout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 760px) {
  .checkout {
    grid-template-columns: 1fr;
  }
}
.checkout-preview {
  background: #0b0d11;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}
.checkout-preview svg {
  max-width: 100%;
  height: auto;
}
.order-events {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.order-events li {
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* Aperçu plaque dans les tableaux */
.order-thumb{width:64px;height:40px;display:flex;align-items:center;justify-content:center;background:#0b0d11;border:1px solid var(--border);border-radius:6px;overflow:hidden}
.order-thumb svg{max-width:100%;max-height:100%;height:auto}
.admin-orders td{vertical-align:middle}
.order-thumb-btn{padding:0;cursor:zoom-in;transition:border-color .15s}
.order-thumb-btn:hover{border-color:var(--accent,#6ea8fe)}

/* Liste commandes admin : recherche, scroll vertical, séparation par commande */
.admin-search{flex:1 1 240px;min-width:200px;padding:.5rem .75rem;background:#0e1320;border:1px solid var(--border);border-radius:8px;color:inherit}
/* Barre d'outils : recherche à gauche, taille de page à droite. */
.admin-toolbar{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin:0 0 1rem}
.admin-pagesize{display:inline-flex;align-items:center;gap:.4rem;margin-left:auto;white-space:nowrap;color:var(--muted,#9aa3af);font-size:.9rem}
.admin-pagesize select{padding:.45rem .6rem;background:#0e1320;border:1px solid var(--border);border-radius:8px;color:inherit}
/* Plus d'ascenseurs : le tableau tient dans la page, la pagination gère la suite. */
.admin-table-scroll{overflow:visible;border:1px solid var(--border);border-radius:8px}
.admin-table-scroll table{margin:0;width:100%}
.admin-table-scroll thead th{background:#0b0d11}
/* Navigation par page (sous le tableau). */
.admin-pager{display:flex;align-items:center;justify-content:center;gap:1rem;margin:1rem 0}
.admin-orders tr.order-row-first td{border-top:2px solid var(--border)}

/* Aperçu de la texture de bois (admin essences) */
.wood-texture-preview{display:flex;align-items:center;gap:.5rem}
.wood-texture-preview img{width:48px;height:48px;object-fit:cover;border:1px solid var(--border);border-radius:6px}

/* Modale d'agrandissement de l'aperçu plaque */
.plaque-modal-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);padding:1rem}
.plaque-modal{position:relative;background:#0b0d11;border:1px solid var(--border);border-radius:10px;padding:1.25rem;box-shadow:0 12px 40px rgba(0,0,0,.5)}
.plaque-modal-close{position:absolute;top:.35rem;right:.5rem;background:none;border:none;color:var(--muted,#9aa3af);font-size:1.6rem;line-height:1;cursor:pointer}
.plaque-modal-close:hover{color:#fff}
.plaque-modal-svg{width:300px;max-width:80vw}
.plaque-modal-svg svg{width:100%;height:auto;display:block}

/* Visualiseur de trajectoires / G-code (admin) */
.gcode-modal{width:100%;max-height:92vh;overflow:auto}
.gcode-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}
.gcode-head h3{margin:0}
.gcode-modal .btn-close{background:none;border:none;color:var(--muted,#9aa3af);font-size:1.3rem;line-height:1;cursor:pointer}
.gcode-modal .btn-close:hover{color:#fff}
.gcode-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1rem;margin-bottom:.6rem}
.gcode-toggle{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem;cursor:pointer}
.gcode-swatch{width:11px;height:11px;border-radius:2px;display:inline-block}
.gcode-legend{font-size:.78rem;color:var(--muted,#9aa3af);margin-left:auto}
.gcode-canvas{background:#11151b;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.gcode-warnings{margin-top:.7rem;border:1px solid #b4540055;background:#3a230033;border-radius:8px;padding:.6rem .8rem;font-size:.85rem}
.gcode-warnings ul{margin:.3rem 0 0;padding-left:1.1rem}
.gcode-warnings li{margin:.15rem 0}

/* Overlay de recherche d'icônes (catalogue complet FA) */
.icon-search{width:720px;max-width:92vw;display:flex;flex-direction:column;max-height:85vh}
.icon-search h2{margin:0 0 .75rem}
.icon-search-input{width:100%;padding:.55rem .75rem;background:var(--bg);border:1px solid var(--border);border-radius:8px;color:inherit;font-size:.95rem}
.icon-search-input:focus{outline:none;border-color:var(--accent)}
.icon-search-count{margin:.5rem 0 .75rem;font-size:.8rem}
.icon-search-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));grid-gap:.4rem;gap:.4rem;overflow-y:auto;padding-right:.25rem}

/* Sélecteur de point relais */
.relay-picker{margin-bottom:1rem}
.relay-selected{margin:.5rem 0;padding:.5rem .75rem;background:#0e1320;border:1px solid var(--accent,#6ea8fe);border-radius:6px;font-size:.9rem}
.relay-list{list-style:none;margin:.5rem 0 0;padding:0;max-height:260px;overflow:auto;border:1px solid var(--border);border-radius:8px}
.relay-list li{border-bottom:1px solid var(--border)}
.relay-list li:last-child{border-bottom:none}
.relay-item{display:flex;flex-direction:column;gap:.15rem;width:100%;text-align:left;padding:.55rem .75rem;background:none;border:none;color:inherit;cursor:pointer}
.relay-item:hover{background:#0e1320}
.relay-item.is-active{background:#13203a}
.relay-item-name{font-weight:600}

