/* =========================================================
   PMD ET FILS — Design system
   Direction : chantier contemporain (crème, charbon, orange brûlé)
   Inspiré d’une identité BTP claire et contrastée
   ========================================================= */

:root {
  --cream: #f3efe6;
  --cream-2: #ebe4d6;
  --cream-3: #e2d9c8;
  --white: #faf8f3;
  --ink: #1a1814;
  --ink-muted: #6b6458;
  --charcoal: #1c1a17;
  --charcoal-2: #2a2622;
  --orange: #fd6603;
  --orange-deep: #d45400;
  --orange-soft: #ff8530;
  --line: rgba(26, 24, 20, 0.12);
  --line-on-dark: rgba(243, 239, 230, 0.12);
  --success: #1f7a4c;
  --warning: #b45309;
  --danger: #b42318;
  --info: #1d4e6b;
  --radius: 2px;
  --shadow: 0 16px 40px rgba(26, 24, 20, 0.12);
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --max: 1140px;
  --header-h: 86px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* aliases legacy */
  --bg: var(--cream);
  --bg-elevated: var(--white);
  --bg-soft: var(--cream-2);
  --surface: var(--white);
  --surface-2: var(--cream-2);
  --amber: var(--orange);
  --amber-deep: var(--orange-deep);
  --amber-soft: var(--orange-soft);
  --line-light: var(--line-on-dark);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-deep); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff; padding: .75rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
}

.brand {
  display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(240px, 48vw);
  object-fit: contain;
}

.brand-mark {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .04em;
  font-weight: 600;
  border: 2px solid var(--orange);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .04em;
  font-weight: 600;
  text-transform: uppercase;
}
.brand-text small {
  color: var(--ink-muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.site-nav {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--ink); }
.site-nav .btn-primary {
  color: #fff;
}
.site-nav .btn-primary:hover,
.site-nav .btn-primary:focus {
  color: #fff;
}

.nav-toggle {
  display: none; background: transparent; border: 0; width: 42px; height: 42px;
  padding: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); margin: 7px 8px; transition: .25s var(--ease);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: .7rem 1.25rem;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: .88rem;
  text-decoration: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: .06em;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); color: inherit; text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange); color: #fff; border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-deep); color: #fff; }

.btn-dark {
  background: var(--charcoal); color: #fff; border-color: var(--charcoal);
}
.btn-dark:hover { background: #000; color: #fff; }

.btn-ghost {
  background: transparent; color: var(--ink); border-color: rgba(26, 24, 20, 0.25);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-light {
  background: #fff; color: var(--ink); border-color: #fff;
}
.btn-light:hover { background: var(--cream); color: var(--ink); }

.btn-outline {
  background: transparent; color: var(--ink); border-color: rgba(26, 24, 20, 0.25);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-sm { min-height: 36px; padding: .4rem .9rem; font-size: .78rem; }

/* Toasts — mini notifs bas-droite */
.toast-stack {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column-reverse;
  gap: .65rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  --toast-accent: var(--info);
  --toast-tint: rgba(29, 78, 107, 0.1);
  position: relative;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: start;
  gap: .75rem;
  padding: .85rem .9rem .95rem .85rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: auto;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(.98);
  animation: toast-in .55s var(--ease) calc(var(--toast-i, 0) * 80ms) forwards;
}

.toast.is-leaving {
  animation: toast-out .32s var(--ease) forwards;
}

.toast-accent {
  grid-row: 1 / 3;
  width: 4px;
  min-height: 100%;
  align-self: stretch;
  background: var(--toast-accent);
  border-radius: 1px;
}

.toast-body {
  min-width: 0;
  padding-top: .05rem;
}

.toast-label {
  margin: 0 0 .2rem;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--toast-accent);
}

.toast-msg {
  margin: 0;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  width: 1.75rem;
  height: 1.75rem;
  margin: -.25rem -.25rem 0 0;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}

.toast-close:hover,
.toast-close:focus-visible {
  color: var(--ink);
  background: var(--toast-tint);
  outline: none;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--toast-tint);
  pointer-events: none;
}

.toast-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: var(--toast-accent);
  transform-origin: left center;
  animation: toast-progress-fill 4.5s linear forwards;
}

.toast.is-paused .toast-progress::after {
  animation-play-state: paused;
}

.toast-success {
  --toast-accent: var(--success);
  --toast-tint: rgba(31, 122, 76, 0.12);
}
.toast-warning {
  --toast-accent: var(--warning);
  --toast-tint: rgba(180, 83, 9, 0.12);
}
.toast-danger {
  --toast-accent: var(--danger);
  --toast-tint: rgba(180, 35, 24, 0.12);
}
.toast-info {
  --toast-accent: var(--info);
  --toast-tint: rgba(29, 78, 107, 0.12);
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }
}

@keyframes toast-progress-fill {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-leaving,
  .toast-progress::after {
    animation: none;
  }
  .toast {
    opacity: 1;
    transform: none;
  }
}

/* Hero — split comme la référence */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(232, 93, 4, 0.12), transparent 35%),
    var(--cream);
  color: var(--ink);
  padding: 3rem 0 4rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy { max-width: 34rem; }

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: .9;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--ink);
  opacity: 0;
  transform: translateY(24px);
  animation: rise .9s var(--ease) .1s forwards;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 0 0 .85rem;
  max-width: 32ch;
  color: var(--ink);
  opacity: 0;
  transform: translateY(24px);
  animation: rise .9s var(--ease) .25s forwards;
}

.hero-copy > p {
  margin: 0 0 1.6rem;
  max-width: 40ch;
  color: var(--ink-muted);
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(24px);
  animation: rise .9s var(--ease) .4s forwards;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: .75rem;
  opacity: 0;
  transform: translateY(24px);
  animation: rise .9s var(--ease) .55s forwards;
}

.hero-visual {
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  animation: rise .9s var(--ease) .35s forwards;
}

.hero-visual .media-slot {
  opacity: 1;
  transform: none;
  border: 0;
  box-shadow: var(--shadow);
  background: var(--cream-3);
}

.hero-visual .media-slot img {
  aspect-ratio: 5 / 4;
  min-height: 360px;
}

.hero-float {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: #fff;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: var(--shadow);
  max-width: 220px;
  z-index: 2;
}

.hero-float-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hero-float strong {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hero-float a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.hero-float a:hover { color: var(--orange-deep); }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Media slots */
.media-slot {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--cream-3);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.media-slot.is-in {
  opacity: 1;
  transform: none;
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform .7s var(--ease);
}

.media-slot:hover img {
  transform: scale(1.03);
}

.media-slot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .75rem 1rem;
  background: linear-gradient(transparent, rgba(28, 26, 23, 0.75));
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.media-hint {
  display: block;
  margin-top: .85rem;
  color: var(--ink-muted);
  font-size: .88rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.media-grid .media-slot:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.media-grid .media-slot:first-child img {
  aspect-ratio: auto;
  min-height: 100%;
}

.split-media {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2.5rem;
  align-items: center;
}

.split-media .media-slot img {
  aspect-ratio: 16 / 11;
}

/* Sections */
.section { padding: 5rem 0; }
.section-dark {
  background: var(--charcoal);
  color: var(--cream);
}
.section-soft { background: var(--cream-2); }
.section-white { background: var(--white); }
.section-orange {
  background: var(--orange);
  color: #fff;
  padding: 3.5rem 0;
}

/* Partenaires — carrousel horizontal infini */
.partners-band {
  background: var(--white);
  padding: 3.25rem 0 2.75rem;
  border-block: 1px solid var(--line);
  overflow: hidden;
}

.partners-head {
  margin-bottom: 1.75rem;
  text-align: center;
  margin-inline: auto;
}

.partners-marquee {
  --partners-gap: 3.5rem;
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: var(--partners-gap);
  width: max-content;
  will-change: transform;
}

.partners-marquee.is-ready .partners-track {
  animation: partners-scroll var(--partners-duration, 40s) linear infinite;
}

.partners-marquee:hover .partners-track {
  animation-play-state: paused;
}

.partners-list {
  display: flex;
  align-items: center;
  gap: var(--partners-gap);
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  flex: 0 0 auto;
}

.partners-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 72px;
}

.partners-item img {
  max-height: 56px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.72;
  transition: opacity .35s var(--ease), filter .35s var(--ease);
}

.partners-item:hover img {
  filter: none;
  opacity: 1;
}

@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--partners-shift, 0px))); }
}

@media (prefers-reduced-motion: reduce) {
  .partners-marquee.is-ready .partners-track {
    animation: none;
  }
  .partners-marquee {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.section-label {
  display: inline-block;
  margin: 0 0 .65rem;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-dark .section-label { color: var(--orange); }

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}
.section-head h2,
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  margin: 0 0 .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.section-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}
.section-dark .section-head p { color: rgba(243, 239, 230, 0.7); }
.section-dark .section-head h2 { color: #fff; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.service-item {
  padding: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  background: transparent;
}
.service-item.is-in { opacity: 1; transform: none; }

.service-item .media-slot {
  margin-bottom: 1rem;
  border: 0;
}

.service-item .media-slot img {
  aspect-ratio: 16 / 10;
}

.service-item h3 {
  margin: 0 0 .45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--orange);
}
.service-item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .95rem;
}
.section-dark .service-item p { color: rgba(243, 239, 230, 0.72); }

.service-item .service-link {
  display: inline-block;
  margin-top: .7rem;
  color: var(--orange);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
}
.service-item .service-link:hover { color: var(--orange-soft); }

.service-list .service-item {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line-on-dark);
  margin-bottom: 1.75rem;
}
.service-list .service-item:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.service-list .service-item .media-slot { margin-bottom: 0; }
.service-list .service-item h3 { color: var(--orange); }

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.stat-block strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--orange);
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-block span {
  color: var(--ink-muted);
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

/* Bandeau preuves — au-dessus des métiers */
.stats-band {
  padding: 2.75rem 0;
  background: var(--white);
  border-block: 1px solid var(--line);
}
.stats-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.stat-proof {
  text-align: center;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.stat-proof.is-in {
  opacity: 1;
  transform: none;
}
.stat-proof + .stat-proof {
  border-left: 1px solid var(--line);
}
.stat-proof strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--orange);
  margin-bottom: .55rem;
}
.stat-proof > span {
  display: block;
  color: var(--ink-muted);
  font-size: .88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  max-width: 14rem;
  margin-inline: auto;
  line-height: 1.35;
}

/* Benefits */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.benefit {
  text-align: left;
}
.benefit-icon {
  width: 48px; height: 48px;
  margin-bottom: .9rem;
  color: var(--orange);
}
.benefit h3 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.benefit p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .95rem;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 2rem;
  align-items: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 .6rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; }
.cta-band .btn-light { justify-self: end; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.step {
  border-left: 3px solid var(--orange);
  padding-left: 1rem;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  color: var(--orange);
  margin-bottom: .4rem;
  font-size: 1.25rem;
  letter-spacing: .04em;
}
.step h3 {
  margin: 0 0 .35rem;
  font-size: 1.1rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.step p { margin: 0; color: var(--ink-muted); }
.step.is-current {
  border-left-color: var(--charcoal);
}
.step.is-current::before { color: var(--charcoal); }

.devis-parcours {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--line);
}
.devis-parcours .section-head { margin-bottom: 1.75rem; }

.devis-create { margin-bottom: 3rem; }
.devis-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
  margin: 2rem 0 0;
}
.devis-form-panel { margin: 0; }
.devis-preview-wrap {
  position: static;
}
.devis-preview-label {
  margin: 0 0 .65rem;
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
}
.pdf-sheet {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem 1rem;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--ink);
  max-height: none;
  overflow: visible;
}
.pdf-sheet--modele {
  font-family: Arial, Helvetica, sans-serif;
}
.pdf-top {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: .75rem;
  align-items: start;
  margin-bottom: .85rem;
}
.pdf-logo {
  display: block;
  width: min(100%, 140px);
  height: auto;
  margin: 0 auto .35rem;
}
.pdf-co-line {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: .65rem;
  line-height: 1.35;
}
.pdf-top-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: .35rem;
}
.pdf-title-bar {
  width: 100%;
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: .35rem .5rem;
  position: relative;
  box-shadow: inset 0 1px 0 #833c0c, inset 0 -1px 0 #833c0c;
}
.pdf-title-bar span {
  display: inline-block;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  padding: .2rem .7rem;
}
.pdf-validite {
  margin: .45rem 0 0;
  color: #833c0c;
  font-weight: 700;
  font-size: .72rem;
}
.pdf-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin-bottom: .7rem;
}
.pdf-box {
  border: 1px solid #833c0c;
}
.pdf-box-head {
  background: var(--orange);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .06em;
  padding: .28rem .4rem;
}
.pdf-box-body {
  min-height: 3.4rem;
  padding: .45rem .55rem;
}
.pdf-box-body p { margin: 0 0 .15rem; }
.pdf-meta-center {
  text-align: center;
  margin: .55rem 0 .7rem;
}
.pdf-num, .pdf-date {
  margin: 0;
  color: #833c0c;
  font-weight: 700;
  font-size: .78rem;
}
.pdf-date { margin-top: .15rem; }
.pdf-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #833c0c;
  margin-bottom: .7rem;
}
.pdf-table th {
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: .68rem;
  padding: .28rem .25rem;
  border-left: 1px solid #833c0c;
}
.pdf-table th:first-child { border-left: 0; }
.pdf-table td {
  border-top: 1px solid #833c0c;
  border-left: 1px solid #833c0c;
  padding: .35rem .3rem;
  vertical-align: top;
}
.pdf-table td:first-child { border-left: 0; }
.pdf-lot-row td {
  background: #ed7d31;
  color: #fff;
  text-align: center;
  font-weight: 700;
  letter-spacing: .04em;
  border-left: 0;
}
.pdf-empty-row td {
  color: var(--ink-muted);
  white-space: pre-wrap;
}
.pdf-preview-note {
  display: block;
  margin-top: .35rem;
  font-size: .65rem;
}
.pdf-subtotal-row td {
  background: #fce4d6;
  color: #833c0c;
  font-weight: 700;
}
.pdf-subtotal-row td:last-child { text-align: right; }
.pdf-totals {
  width: min(100%, 240px);
  margin-left: auto;
  margin-bottom: .75rem;
  border: 1px solid #833c0c;
}
.pdf-totals div {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.45);
}
.pdf-totals div:last-child { border-bottom: 0; }
.pdf-totals div span {
  padding: .28rem .55rem;
}
.pdf-totals .pdf-tot-val {
  border-left: 1px solid rgba(255,255,255,.7);
  text-align: right;
}
.pdf-accept {
  text-align: center;
  font-weight: 700;
  margin: .5rem 0 .65rem;
}
.pdf-accept p { margin: 0; }
.pdf-mention-label { margin: 0 0 .2rem; }
.pdf-mention-line {
  margin: 0 0 .7rem;
  color: #2759b8;
  font-style: italic;
  border-bottom: 1px solid var(--ink);
  padding-bottom: .2rem;
}
.pdf-signs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: .7rem;
}
.pdf-sign {
  border: 1px solid var(--ink);
  min-height: 4.2rem;
  padding: .35rem .45rem;
  font-size: .72rem;
}
.pdf-foot {
  text-align: center;
  font-size: .58rem;
  line-height: 1.35;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: .55rem;
}
.pdf-foot p { margin: 0; }
.pdf-sheet [data-row][hidden] { display: none !important; }

/* legacy helpers still used elsewhere */
.pdf-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .9rem;
}
.pdf-sheet-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}
.pdf-sheet-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .75rem;
}
.pdf-badge {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: .25rem .45rem;
}
.pdf-sheet-meta h2 {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pdf-sheet-meta p { margin: 0; color: var(--ink-muted); }
.pdf-sheet-block {
  margin-top: .95rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}
.pdf-sheet-block h3 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: .92rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange);
}
.pdf-sheet-block p { margin: 0 0 .25rem; }
.pdf-k { font-weight: 700; color: var(--ink); }
.pdf-desc {
  white-space: pre-wrap;
  color: var(--ink-muted);
  min-height: 3.2em;
}
.pdf-sheet-foot {
  margin-top: 1.1rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--line);
}
.pdf-sheet-foot p {
  margin: 0;
  font-size: .72rem;
  color: var(--ink-muted);
}

/* Auth / Forms */
.page-hero {
  background: var(--cream);
  color: var(--ink);
  padding: 3rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 .5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.page-hero p { margin: 0; color: var(--ink-muted); max-width: 42ch; }

/* —— Page Contact —— */
.contact-hero {
  position: relative;
  overflow: hidden;
  padding: 3.25rem 0 2.75rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(253, 102, 3, 0.14), transparent 38%),
    radial-gradient(circle at 8% 90%, rgba(26, 24, 20, 0.05), transparent 42%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}

.contact-hero-inner {
  display: grid;
  gap: 2.25rem;
}

.contact-hero-copy { max-width: 36rem; }

.contact-hero-brand {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: .85rem;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .85s var(--ease) .08s forwards;
}

.contact-hero h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  margin: 0 0 .85rem;
  max-width: 28ch;
  color: var(--ink);
  opacity: 0;
  transform: translateY(20px);
  animation: rise .85s var(--ease) .22s forwards;
}

.contact-hero-copy > p:not(.hero-brand) {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-muted);
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .85s var(--ease) .36s forwards;
}

.contact-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .85s var(--ease) .5s forwards;
}

.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--ink);
  border-top: 1px solid var(--line);
  transition: color .25s var(--ease);
}
.contact-channel:hover { color: var(--orange-deep); }

.contact-channel-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: var(--orange);
}

.contact-channel strong {
  display: block;
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .2rem;
  color: var(--orange);
}
.contact-channel span span {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}
.contact-channel:hover span span { color: var(--orange-deep); }

.contact-body {
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.contact-layout {
  max-width: 44rem;
  margin: 0 auto;
}

.contact-form-panel {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: clamp(1.35rem, 3vw, 2rem);
}

.contact-form-head {
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.contact-form-head .section-label { margin-bottom: .45rem; }
.contact-form-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.05;
  margin: 0 0 .55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.contact-form-head p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 40ch;
}

.contact-form textarea {
  min-height: 160px;
  background: var(--white);
}
.contact-form input {
  background: var(--white);
}

.contact-form .form-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.cta-band-actions {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.5rem;
  margin: 2rem 0 3rem;
  box-shadow: var(--shadow);
}
.panel-narrow { max-width: 520px; margin-inline: auto; }
.panel-register { max-width: 640px; }

.account-type,
.civilite-field {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}
.account-type legend,
.civilite-field legend {
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .65rem;
}
.account-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.account-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 48px;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .82rem;
}
.account-type-option:has(input:checked) {
  border-color: var(--orange);
  background: #fff;
  color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}
.account-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.form-section-label {
  margin: .35rem 0 0;
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
[data-entreprise-fields][hidden] { display: none !important; }
[data-entreprise-fields] {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 1px solid rgba(26, 24, 20, 0.18);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(232, 93, 4, 0.35);
  border-color: var(--orange);
}

.form-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  margin-top: 1.25rem;
}

.help { color: var(--ink-muted); font-size: .88rem; margin-top: .35rem; }
.help.is-error { color: var(--danger); }
.help.is-ok { color: var(--success); }
.errors {
  background: #fad7d4; color: #7a1c14; padding: .85rem 1rem; margin-bottom: 1rem;
  border-left: 3px solid var(--danger);
}
.errors ul { margin: 0; padding-left: 1.1rem; }

.auth-switch { margin-top: 1rem; color: var(--ink-muted); }

/* Dashboard / tables */
.dash-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - var(--header-h));
  width: 100%;
  margin: 0;
  align-items: stretch;
}

.dash-side {
  background: var(--charcoal);
  color: var(--cream);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  align-self: start;
  border-right: 1px solid var(--line-on-dark);
}

.dash-side-label {
  margin: 0 1.25rem 1rem;
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.45);
}

.dash-side-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dash-side a {
  display: block;
  text-decoration: none;
  color: rgba(243, 239, 230, 0.8);
  padding: .75rem 1.25rem;
  border: 0;
  border-left: 3px solid transparent;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}

.dash-side a:hover,
.dash-side a.is-active {
  color: #fff;
  background: rgba(255, 122, 47, 0.12);
  border-left-color: var(--orange);
}

.dash-side a.dash-nav-messages {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.dash-nav-dot {
  flex-shrink: 0;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.25);
}

.dash-side .dash-profil {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .55rem;
  border-top: 1px solid var(--line-on-dark);
  font-size: .9rem;
}

.dash-side .dash-profil svg {
  flex-shrink: 0;
}

.dash-side .dash-logout {
  color: rgba(243, 239, 230, 0.55);
  font-size: .9rem;
}

.dash-side .dash-logout:hover {
  color: #fff;
  background: transparent;
  border-left-color: transparent;
}

.dash-main {
  padding: 1.75rem clamp(1.25rem, 3vw, 2.5rem) 3rem;
  min-width: 0;
}

.dash-intro {
  margin: 0 0 1.5rem;
}

.dash-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 .35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.dash-intro p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 48ch;
}

.dash-panel {
  margin: 0;
}

.dash-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin: 0 0 1rem;
  font-size: .92rem;
  color: var(--ink-muted);
}

.dash-breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.dash-breadcrumb a:hover {
  color: var(--orange-deep);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.client-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  padding: 1.15rem 1.2rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}

.client-card:hover {
  transform: translateY(-2px);
  color: inherit;
  border-color: rgba(232, 93, 4, 0.35);
}

.client-card-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}

.client-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.client-card-type {
  display: inline-block;
  margin-top: .2rem;
  font-size: .78rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.client-card-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: .92rem;
}

.client-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: .55rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}

.client-card-cta {
  margin-top: .55rem;
  color: var(--orange-deep);
  font-weight: 600;
  font-size: .9rem;
}

.client-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.client-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.35rem 1.25rem 1.2rem;
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.05);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.client-profile-head {
  display: flex;
  gap: .9rem;
  align-items: center;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.client-profile-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(26, 24, 20, 0.07);
  color: var(--ink-muted);
}

.client-profile-identity {
  min-width: 0;
}

.client-profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.client-profile-type {
  margin: .25rem 0 0;
  color: var(--ink-muted);
  font-size: .9rem;
}

.client-profile-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.client-profile-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.client-profile-row-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.15rem;
  margin-top: .15rem;
  color: var(--ink-muted);
}

.client-profile-label {
  display: block;
  font-size: .78rem;
  color: var(--ink-muted);
  margin-bottom: .1rem;
}

.client-profile-value {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.35;
}

.client-profile-value a {
  color: inherit;
  text-decoration: none;
}

.client-profile-value a:hover {
  color: var(--orange-deep);
  text-decoration: underline;
}

.client-profile-sub {
  margin: .2rem 0 0;
  font-size: .8rem;
  color: var(--ink-muted);
}

.client-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.client-mini-stats > div {
  text-align: center;
}

.client-mini-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.client-mini-stats span {
  font-size: .75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.client-profile-card .client-mini-stats {
  gap: .55rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
}

.client-profile-card .client-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem .35rem .65rem;
  min-width: 0;
}

.client-profile-card .client-mini-stat strong {
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: .02em;
}

.client-profile-card .client-mini-stat > span:not(.client-mini-stat-icon) {
  font-size: .62rem;
  line-height: 1.25;
}

.client-profile-card .client-mini-stat-amount {
  font-size: .72rem !important;
  font-weight: 600;
  color: var(--ink) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.client-profile-card .client-mini-stat-icon {
  display: grid;
  place-items: center;
  margin-top: .35rem;
  color: var(--orange);
}

.client-profile-card .client-mini-stat-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}

.client-travaux-toolbar {
  align-items: center;
  margin-bottom: 1.25rem;
}

.toolbar-count {
  color: var(--ink-muted);
  font-weight: 600;
}

.travaux-group {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.15rem;
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.05);
}

.travaux-group-identity {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.travaux-group-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(253, 102, 3, 0.14);
  color: var(--orange);
}

.travaux-group-copy {
  min-width: 0;
}

.travaux-group-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .55rem;
  align-items: center;
  line-height: 1.25;
}

.travaux-group-meta {
  margin: .4rem 0 0;
  color: var(--ink-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.travaux-group-meta span {
  margin: 0 .15rem;
}

.travaux-group-devis {
  margin-top: 1rem;
  padding-top: .15rem;
}

.travaux-group-devis-title {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.travaux-group-empty {
  margin: 0;
  padding: .25rem 0 .35rem;
}

.devis-card-list {
  display: grid;
  gap: .75rem;
}

.devis-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.devis-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(26, 24, 20, 0.06);
  color: var(--ink-muted);
}

.devis-card-main {
  min-width: 0;
  flex: 1;
}

.devis-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .25rem;
}

.devis-card-title {
  margin: 0 0 .25rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.devis-card-meta {
  margin: .35rem 0 0;
  font-size: .88rem;
  color: var(--ink-muted);
}

.devis-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  flex-shrink: 0;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

/* Mes devis — tuiles verticales en ligne */
.devis-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  gap: 1.25rem;
  justify-content: start;
  align-items: stretch;
}

.devis-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #e8e4dc;
  border: 1px solid rgba(26, 24, 20, 0.1);
  box-shadow: 0 10px 28px rgba(26, 24, 20, 0.08);
  min-height: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.devis-tile:hover {
  border-color: rgba(253, 102, 3, 0.45);
  box-shadow: 0 16px 36px rgba(26, 24, 20, 0.12);
  transform: translateY(-2px);
}

.devis-tile-tag {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  margin: 0;
  max-width: 46%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(26, 24, 20, 0.12);
}

.devis-tile-head {
  padding: 1rem 5.5rem .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  align-items: flex-start;
  border-bottom: 1px solid rgba(26, 24, 20, 0.1);
  min-width: 0;
}

.devis-tile-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--ink);
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.devis-tile-preview {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: .85rem;
  background: transparent;
  flex: 1;
  min-width: 0;
}

.devis-mini {
  background: #fff;
  border: 1px solid rgba(26, 24, 20, 0.14);
  box-shadow: 0 6px 16px rgba(26, 24, 20, 0.08);
  padding: .55rem .5rem .65rem;
  font-size: .52rem;
  line-height: 1.25;
  color: var(--ink);
  aspect-ratio: 210 / 297;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  overflow: hidden;
}

.devis-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
}

.devis-mini-logo img {
  display: block;
  width: 58%;
  max-width: 92px;
  height: auto;
}

.devis-mini-devis {
  flex: 0 0 auto;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .2rem .45rem;
  font-size: .55rem;
}

.devis-mini-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .28rem;
}

.devis-mini-box {
  border: 1px solid #833c0c;
  min-height: 2.4rem;
}

.devis-mini-box strong {
  display: block;
  background: var(--orange);
  color: #fff;
  text-align: center;
  font-size: .48rem;
  letter-spacing: .06em;
  padding: .12rem 0;
}

.devis-mini-box span {
  display: block;
  padding: .15rem .25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.devis-mini-num {
  margin: 0;
  text-align: center;
  color: #833c0c;
  font-weight: 700;
  font-size: .55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devis-mini-table {
  border: 1px solid #833c0c;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.devis-mini-thead {
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: .15rem;
  font-weight: 600;
}

.devis-mini-lot {
  background: #ed7d31;
  color: #fff;
  text-align: center;
  font-weight: 700;
  padding: .12rem .25rem;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devis-mini-lines {
  padding: .35rem .3rem;
  display: grid;
  gap: .22rem;
}

.devis-mini-lines span {
  display: block;
  height: 3px;
  background: rgba(26, 24, 20, 0.12);
}

.devis-mini-lines span:nth-child(2) { width: 82%; }
.devis-mini-lines span:nth-child(3) { width: 64%; }

.devis-mini-totaux {
  margin-left: auto;
  width: 58%;
  background: var(--orange);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: .25rem;
  padding: .22rem .35rem;
  font-weight: 700;
  font-size: .55rem;
}

.devis-tile-foot {
  padding: .85rem 1rem 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: stretch;
}

.devis-tile-meta {
  margin: 0;
  font-size: .78rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devis-tile-foot .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.pdf-viewer {
  background: #2a2622;
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 75vh;
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: 75vh;
  border: 0;
  background: #525659;
}

.pdf-viewer--compact {
  min-height: 420px;
  margin-bottom: .85rem;
}

.pdf-viewer--compact iframe {
  height: 420px;
}

.pdf-viewer--admin {
  min-height: 70vh;
  margin-top: .35rem;
  border-radius: 10px;
}

.pdf-viewer--admin iframe {
  height: 70vh;
}

.devis-admin-preview {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.pdf-viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .85rem;
}

.client-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: end;
}

.client-search {
  flex: 1 1 16rem;
  min-width: min(100%, 16rem);
  max-width: 28rem;
}

.client-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.client-search-icon {
  position: absolute;
  left: .85rem;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  pointer-events: none;
  transition: color .2s var(--ease);
}

.client-search-field input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: .7rem 2.4rem .7rem 2.65rem;
  border: 1px solid rgba(26, 24, 20, 0.16);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    border-color .2s var(--ease),
    box-shadow .2s var(--ease),
    background-color .2s var(--ease);
}

.client-search-field input[type="search"]::placeholder {
  color: rgba(107, 100, 88, 0.72);
}

.client-search-field input[type="search"]::-webkit-search-decoration,
.client-search-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.client-search-field:focus-within .client-search-icon {
  color: var(--orange-deep);
}

.client-search-field input[type="search"]:hover {
  border-color: rgba(26, 24, 20, 0.28);
}

.client-search-field input[type="search"]:focus {
  outline: none;
  border-color: var(--orange);
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(253, 102, 3, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Legacy grid (au cas où) */
.dash-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  padding: 1rem;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: .35rem;
}
.stat span { color: var(--ink-muted); font-size: .9rem; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  background: var(--cream-2);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
table.data tr:hover td { background: rgba(232, 93, 4, 0.04); }

.badge {
  display: inline-block;
  padding: .2rem .55rem;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-muted { background: #e7e5e0; color: #444; }
.badge-warning { background: #fde7c7; color: #7a3e05; }
.badge-info { background: #d7e8f3; color: #13405a; }
.badge-success { background: #d8f3e3; color: #145a36; }
.badge-danger { background: #fad7d4; color: #7a1c14; }
.badge-dark { background: #222; color: #fff; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
  align-items: end; margin-bottom: 1rem;
}
.toolbar form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.25rem;
}

.muted { color: var(--ink-muted); }
.stack > * + * { margin-top: .75rem; }

.ligne-row {
  display: grid;
  grid-template-columns: 2fr 1.1fr .7fr .6fr .9fr .9fr auto;
  gap: .5rem;
  margin-bottom: .5rem;
  align-items: center;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: rgba(243, 239, 230, 0.78);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.footer-brand {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.6rem;
  margin: 0 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.footer-logo-wrap {
  display: inline-block;
  background: #fff;
  padding: .45rem .65rem;
  margin-bottom: .65rem;
  max-width: 100%;
}
.footer-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
.footer-tag { margin: 0; max-width: 34ch; }
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(243, 239, 230, 0.85);
}
.footer-social a:hover { color: var(--orange); }
.footer-social svg { display: block; }
.footer-label {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .75rem;
  font-weight: 700;
  margin: 0 0 .6rem;
}
.site-footer a { color: rgba(243, 239, 230, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-top: 1rem;
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  align-items: center;
}
.footer-bottom p { margin: 0; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.1rem;
}
.footer-legal a {
  color: rgba(243, 239, 230, 0.65);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer-legal a:hover { color: #fff; }

.legal-page {
  margin: 2rem auto 3.5rem;
}
.legal-content {
  margin: 0;
  max-width: 760px;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 1.75rem 0 .65rem;
  color: var(--orange);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p,
.legal-content li {
  color: var(--ink-muted);
  line-height: 1.65;
}
.legal-content ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
.legal-content a {
  color: var(--orange-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-layout,
  .services-grid,
  .steps,
  .stats,
  .stats-row,
  .stats-proof,
  .benefits,
  .cta-band,
  .dash-shell,
  .dash-layout,
  .client-detail-layout,
  .detail-grid,
  .footer-grid,
  .form-grid,
  .media-grid,
  .split-media,
  .devis-layout,
  .service-list .service-item { grid-template-columns: 1fr; }

  .client-profile-card {
    position: static;
  }

  .media-grid .media-slot:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .site-header .brand {
    position: relative;
    z-index: 60;
  }
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 60;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(9px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(4) {
    transform: translateY(-9px) rotate(-45deg);
  }
  .site-nav {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 55;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
    padding: calc(var(--header-h) + 1.5rem) 1.75rem 2.5rem;
    border-bottom: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition:
      transform .4s var(--ease),
      visibility .4s;
  }
  .site-nav.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }
  .site-nav a {
    font-size: 1.35rem;
    letter-spacing: .08em;
    text-align: center;
    padding: .35rem 0;
    opacity: 0;
    transform: translateX(2.5rem);
    transition:
      opacity .4s var(--ease),
      transform .4s var(--ease);
  }
  .site-nav.is-open a {
    opacity: 1;
    transform: translateX(0);
  }
  .site-nav.is-open a:nth-child(1) { transition-delay: .08s; }
  .site-nav.is-open a:nth-child(2) { transition-delay: .14s; }
  .site-nav.is-open a:nth-child(3) { transition-delay: .2s; }
  .site-nav.is-open a:nth-child(4) { transition-delay: .26s; }
  .site-nav.is-open a:nth-child(5) { transition-delay: .32s; }
  .site-nav.is-open a:nth-child(6) { transition-delay: .38s; }
  .site-nav:not(.is-open) a {
    transition-delay: 0s;
  }
  .site-nav .btn {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    margin-top: .5rem;
  }
  body.nav-open {
    overflow: hidden;
  }
  body.nav-open .site-header {
    background: var(--cream);
    backdrop-filter: none;
  }

  .ligne-row { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; padding-top: 2rem; }
  .hero-float { position: static; margin-top: 1rem; max-width: none; }
  .cta-band .btn-light,
  .cta-band-actions { justify-self: start; }
  .contact-channels { grid-template-columns: 1fr; gap: 0; }
  .contact-channel { padding: .9rem 0; }
  .contact-body { padding-top: 2.75rem; padding-bottom: 3rem; }
  .contact-hero { padding: 2.5rem 0 2rem; }

  .dash-side {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-on-dark);
  }

  .dash-side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dash-side a {
    border-left: 0;
    border-bottom: 3px solid transparent;
    padding: .65rem 1rem;
  }

  .dash-side a:hover,
  .dash-side a.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--orange);
  }

  .dash-side .dash-profil {
    margin-top: 0;
    border-top: 0;
    width: 100%;
  }

  .dash-side .dash-logout {
    width: 100%;
  }

  .devis-card {
    flex-direction: column;
    align-items: stretch;
  }

  .devis-card-icon {
    display: none;
  }

  .devis-card-actions {
    justify-content: flex-start;
  }

  .travaux-group-head {
    align-items: flex-start;
  }

  .travaux-group-actions {
    width: 100%;
  }

  .travaux-group-actions .btn-primary {
    flex: 1;
    justify-content: center;
  }

  .devis-tiles {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }

  .stat-proof + .stat-proof {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.35rem;
  }
  .stats-band { padding: 2.25rem 0; }
  .devis-preview-wrap { position: static; }
  .pdf-sheet { max-height: none; }
}

/* ============================================================
   Travaux + Gantt
   ============================================================ */
.dash-intro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}
.section-head-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.section-head-inline h2 { margin: 0; font-size: 1.15rem; }
.toolbar-title {
  margin: 0;
  font-size: 1.35rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.empty-state { text-align: center; padding: 2.5rem 1.5rem; }
.empty-state h2 { margin-top: 0; }

.facturation-soon {
  margin: 2rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.travaux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.travaux-card {
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: border-color .2s ease, transform .2s ease;
}
.travaux-card:hover {
  border-color: var(--accent, #fd6603);
  transform: translateY(-2px);
}
.travaux-card.is-late { border-color: #c44; }
.travaux-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.travaux-card-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}
.travaux-card-title a {
  color: inherit;
  text-decoration: none;
}
.travaux-card-title a:hover { color: var(--accent, #fd6603); }
.travaux-card-ref { margin: 0; font-size: .88rem; color: var(--ink-muted); }
.travaux-card-addr { margin: 0; font-size: .9rem; }
.travaux-card-meta {
  display: flex;
  gap: 1rem;
  font-size: .9rem;
  margin-top: .25rem;
}
.travaux-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
  padding-top: .6rem;
}

.travaux-detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.travaux-detail-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}
.travaux-detail-main > .panel {
  min-width: 0;
  max-width: 100%;
}

.suivi-chantier-bar {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
}
.suivi-chantier-bar-head h3 {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
}
.suivi-chantier-form {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: end;
}
.suivi-chantier-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 140px;
  flex: 0 1 auto;
}
.suivi-chantier-field label {
  margin: 0;
  font-size: .78rem;
}
.suivi-chantier-field--notes {
  flex: 1 1 220px;
  min-width: 180px;
}
.suivi-chantier-actions {
  display: flex;
  align-items: end;
  padding-bottom: 1px;
}
.suivi-chantier-actions .btn {
  white-space: nowrap;
}

.travaux-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.travaux-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}
.travaux-group-actions .inline-form {
  display: flex;
  margin: 0;
}
.travaux-group.is-late {
  border-color: rgba(196, 68, 68, .4);
  box-shadow: 0 0 0 1px rgba(196, 68, 68, .2), 0 8px 24px rgba(26, 24, 20, 0.05);
}
.client-travaux .badge {
  border-radius: 999px;
  padding: .22rem .65rem;
  font-size: .7rem;
}
.client-travaux .btn {
  border-radius: 8px;
}
.client-travaux .btn-icon-danger {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
}

/* Gantt v2 */
.gantt { margin-top: .5rem; }
.gantt-help { margin: 0 0 1rem; font-size: .92rem; }
.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.25rem;
  font-size: .82rem;
  margin-bottom: .85rem;
  color: var(--ink-muted);
}
.gantt-legend-dep { letter-spacing: .02em; }
.gantt-dot {
  display: inline-block;
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  margin-right: .35rem;
  vertical-align: middle;
}
.gantt-dot--ok { background: #fd6603; }
.gantt-dot--late { background: #c0392b; }
.gantt-dot--done { background: #1e8449; }

.gantt {
  min-width: 0;
  max-width: 100%;
}

.gantt-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  scrollbar-gutter: stable;
}
.gantt-scroll .gantt-head {
  overflow: visible;
}

.gantt-scroll::-webkit-scrollbar {
  height: 10px;
}
.gantt-scroll::-webkit-scrollbar-track {
  background: #f0ebe3;
}
.gantt-scroll::-webkit-scrollbar-thumb {
  background: rgba(26, 24, 20, 0.28);
  border-radius: 999px;
}
.gantt-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 24, 20, 0.42);
}

.gantt-chart {
  width: 100%;
  min-width: 100%;
  --gantt-days: 14;
  --gantt-label-w: 220px;
  --gantt-day-min: 30px;
  position: relative;
}
.gantt-head,
.gantt-row {
  display: grid;
  grid-template-columns: var(--gantt-label-w) 1fr;
  border-bottom: 1px solid var(--line);
}
.gantt-head {
  background: #f3efe6;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 78px;
  align-items: stretch;
}
.gantt-head .gantt-label-col {
  text-transform: uppercase;
  justify-content: flex-end;
  padding-bottom: .85rem;
}
.gantt-body { position: relative; }
.gantt-label-col {
  padding: .65rem .75rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  justify-content: center;
  background: #faf9f7;
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(26, 24, 20, 0.04);
}
.gantt-head .gantt-label-col {
  z-index: 4;
  background: #f3efe6;
}
.gantt-label-col strong { font-size: .92rem; line-height: 1.25; }
.gantt-meta { font-size: .8rem; color: var(--ink-muted); }
.gantt-dep-hint {
  font-size: .75rem;
  color: #8a5a00;
  background: #fff4e0;
  padding: .1rem .35rem;
  width: fit-content;
}
.gantt-row-actions { margin-top: .15rem; }
.gantt-edit-link {
  font-size: .78rem;
  color: var(--orange, #fd6603);
  text-decoration: none;
  font-weight: 600;
}
.gantt-edit-link:hover { text-decoration: underline; }

.gantt-timeline-head {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days), minmax(var(--gantt-day-min, 30px), 1fr));
  font-size: .65rem;
  color: var(--ink-muted);
  min-width: 0;
  align-items: stretch;
  overflow: visible;
}
.gantt-day {
  position: relative;
  padding: 0;
  text-align: center;
  border-left: 1px solid rgba(0,0,0,.05);
  min-width: 0;
  overflow: visible;
  height: 78px;
}
.gantt-day-label {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-35%) rotate(-48deg);
  transform-origin: left bottom;
  white-space: nowrap;
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  pointer-events: none;
}
.gantt-day.is-today { background: rgba(253, 102, 3, .14); }
.gantt-day.is-today .gantt-day-label { color: #a04000; }
.gantt-day.is-weekend { background: rgba(0,0,0,.03); }

.gantt-track {
  position: relative;
  min-height: 52px;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / var(--gantt-days) - 1px),
    rgba(0,0,0,.045) calc(100% / var(--gantt-days) - 1px),
    rgba(0,0,0,.045) calc(100% / var(--gantt-days))
  );
}
.gantt-bar {
  position: absolute;
  top: 12px;
  height: 28px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bar-color, #fd6603) 28%, white);
  border: 1px solid var(--bar-color, #fd6603);
  overflow: hidden;
  display: flex;
  align-items: center;
  min-width: 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  z-index: 1;
}
.gantt-bar.is-late { --bar-color: #c0392b; }
.gantt-bar.is-done { --bar-color: #1e8449; }
.gantt-bar-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 .45rem;
  font-size: .72rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
}

.gantt-deps {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.gantt-deps path {
  fill: none;
  stroke: #6b6458;
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
  opacity: .75;
}
.gantt-deps polygon { fill: #6b6458; opacity: .85; }

.gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--orange, #fd6603);
  z-index: 2;
  pointer-events: none;
  opacity: .7;
}

.gantt-editor {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.gantt-editor-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.gantt-delete-form { margin-top: .75rem; }

.gantt-form-title {
  margin: 1.5rem 0 .75rem;
  font-size: 1.05rem;
}
.inline-form { display: inline; margin: 0; }

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: flex-end;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none !important; }
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 20, .48);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
  padding: 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: #faf9f7;
  position: sticky;
  top: 0;
  z-index: 1;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
  padding: .15rem .4rem;
}
.modal-close:hover { color: var(--ink); }
.modal-body {
  padding: 1.15rem;
}
.modal-body .form-grid { margin: 0; }
body.modal-open { overflow: hidden; }

@media (max-width: 720px) {
  .gantt-chart { --gantt-label-w: 150px; }
  .gantt-day { height: 70px; }
  .gantt-head { min-height: 70px; }
  .gantt-day-label { font-size: .62rem; }
  .gantt-label-col strong { font-size: .84rem; }
  .gantt-bar-text { font-size: .65rem; }
  .modal-dialog { max-height: 92vh; }
}

/* Ouvriers */
.ouvriers-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.ouvriers-layout > .panel {
  min-width: 0;
  overflow: hidden;
}
.ouvriers-layout .form-grid {
  grid-template-columns: 1fr;
}
.ouvrier-list { display: flex; flex-direction: column; gap: .65rem; }
.ouvrier-card {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  background: #faf9f7;
}
.ouvrier-card.is-inactive { opacity: .55; }
.ouvrier-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.specialite-color-hint {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
}

/* Choix chantier / devis */
.chantier-choice,
.devis-details {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}
.chantier-choice legend,
.devis-details legend {
  font-family: var(--font-display, Oswald, sans-serif);
  font-size: 1.05rem;
  margin-bottom: .85rem;
  padding: 0;
  width: 100%;
}
.chantier-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}
.chantier-choice-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--line, #e5e1d8);
  background: #faf9f7;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.chantier-choice-card:hover {
  border-color: rgba(253, 102, 3, .45);
}
.chantier-choice-card.is-selected {
  border-color: var(--accent, #fd6603);
  background: rgba(253, 102, 3, .08);
}
.chantier-choice-card.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}
.chantier-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chantier-choice-card strong {
  font-size: 1rem;
}
.chantier-choice-card span {
  font-size: .88rem;
  color: var(--ink-muted);
  line-height: 1.4;
}
.chantier-existant-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line, #e5e1d8);
  background: #fff;
}
.chantier-resume {
  margin: .55rem 0 0;
  font-size: .9rem;
}
.chantier-lieu-title {
  margin: 0 0 .65rem;
  font-weight: 600;
  font-size: .95rem;
}
.chantier-lieu-block {
  padding-top: .25rem;
}
input.is-locked,
select.is-locked {
  background: #f0eee9;
  color: #555;
  cursor: default;
}

/* Wizard devis */
.wizard-page {
  padding: 2.5rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(253, 102, 3, .08), transparent 55%),
    linear-gradient(180deg, #f7f3eb 0%, var(--cream, #f3efe6) 100%);
}
.wizard-shell {
  max-width: 820px;
}
.wizard-intro {
  margin-bottom: 1.75rem;
}
.wizard-intro h1 {
  margin: .25rem 0 .5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.wizard-intro p { margin: 0; color: var(--ink-muted); max-width: 38rem; }
.wizard-errors { margin-bottom: 1rem; }

.wizard-progress {
  margin-bottom: 1.75rem;
}
.wizard-progress-bar {
  height: 4px;
  background: rgba(26, 24, 20, .1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.wizard-progress-bar span {
  display: block;
  height: 100%;
  background: var(--orange, #fd6603);
  transition: width .35s var(--ease, ease);
}
.wizard-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.wizard-step {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  opacity: .45;
  transition: opacity .2s ease;
}
.wizard-step.is-current,
.wizard-step.is-done {
  opacity: 1;
}
.wizard-step-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  background: #e7e2d8;
  color: var(--ink);
}
.wizard-step.is-current .wizard-step-num {
  background: var(--orange, #fd6603);
  color: #fff;
}
.wizard-step.is-done .wizard-step-num {
  background: var(--charcoal, #1c1a17);
  color: #fff;
}
.wizard-step-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.wizard-step-text strong {
  font-size: .88rem;
  line-height: 1.2;
}
.wizard-step-text small {
  color: var(--ink-muted);
  font-size: .75rem;
}

.wizard-form .panel {
  margin: 0 0 1.25rem;
  box-shadow: none;
}
.wizard-form .panel h2 {
  margin: 0 0 .4rem;
  font-size: 1.25rem;
}
.wizard-panel[hidden] { display: none !important; }

.wizard-recap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}
.wizard-recap-grid > div {
  padding: .75rem .85rem;
  background: #f7f4ef;
  border: 1px solid var(--line);
}
.wizard-recap-grid span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted);
  margin-bottom: .25rem;
}
.wizard-recap-grid strong {
  font-size: .95rem;
  font-weight: 600;
  word-break: break-word;
}

.wizard-preview {
  margin-top: .5rem;
}
.wizard-preview .pdf-sheet {
  max-height: none;
  margin: 0 auto;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.wizard-nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-left: auto;
}
.wizard-nav-right .btn[hidden],
.wizard-nav .btn[hidden],
button[data-wizard-prev][hidden],
button[data-wizard-next][hidden],
button[data-devis-submit][hidden] {
  display: none !important;
}
.wizard-hint {
  margin: .75rem 0 0;
  color: var(--danger, #b42318);
  min-height: 1.25rem;
}
.wizard-hint:empty,
.wizard-hint[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .chantier-choice-grid {
    grid-template-columns: 1fr;
  }
  .wizard-steps {
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
  }
  .wizard-recap-grid {
    grid-template-columns: 1fr;
  }
  .wizard-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .wizard-nav-right {
    margin-left: 0;
    width: 100%;
  }
  .wizard-nav-right .btn {
    flex: 1;
  }
}
.ouvrier-card-main { flex: 1; min-width: 140px; }
.ouvrier-card-main p { margin: .15rem 0 0; font-size: .88rem; }
.ouvrier-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.btn-icon-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .55rem;
  color: var(--danger, #b42318);
  border-color: rgba(180, 35, 24, .35);
}
.btn-icon-danger:hover {
  background: rgba(180, 35, 24, .08);
  color: #8f1a12;
  border-color: rgba(180, 35, 24, .55);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1.6rem;
}

@media (max-width: 900px) {
  .travaux-detail-layout,
  .ouvriers-layout {
    grid-template-columns: 1fr;
  }
  .gantt-head,
  .gantt-row {
    grid-template-columns: 150px 1fr;
  }
}

.field-label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.type-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .55rem;
  margin-top: .5rem;
}
.type-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  background: #faf9f7;
  cursor: pointer;
  font-size: .92rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.type-check:has(input:checked) {
  border-color: var(--orange, #fd6603);
  background: rgba(253, 102, 3, .08);
}
.type-check input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--orange, #fd6603);
}

/* =========================================================
   Admin — Statistiques
   ========================================================= */
.stats-kpis {
  grid-template-columns: repeat(4, 1fr);
}

.stats-money {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-money {
  background: var(--charcoal);
  color: var(--cream);
  padding: 1.15rem 1.2rem;
  border-top: 3px solid var(--orange);
}
.stat-money span {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(243, 239, 230, .7);
  margin-bottom: .4rem;
}
.stat-money strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 500;
}
.stat-money em {
  display: block;
  margin-top: .35rem;
  font-style: normal;
  font-size: .82rem;
  color: rgba(243, 239, 230, .55);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.stats-grid--secondary {
  margin-top: .25rem;
}
.stats-panel {
  margin: 0;
}
.stats-panel--wide {
  margin-bottom: 1rem;
}
.stats-panel-hint {
  margin: -.25rem 0 1rem;
  font-size: .9rem;
}

.stats-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .85rem;
}
.stats-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .3rem;
  font-size: .9rem;
}
.stats-bar-meta strong {
  font-variant-numeric: tabular-nums;
}
.stats-bar-track {
  height: 8px;
  background: var(--cream-2);
  overflow: hidden;
}
.stats-bar-fill {
  height: 100%;
  background: var(--orange);
  min-width: 0;
  transition: width .4s var(--ease);
}
.stats-bar-fill--charcoal {
  background: var(--charcoal);
}

.stats-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: .5rem 0;
}
.stats-donut {
  --part: 50;
  --ent: 50;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--orange) 0 calc(var(--part) * 1%),
    var(--charcoal) calc(var(--part) * 1%) 100%
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px));
  flex-shrink: 0;
}
.stats-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
  font-size: .92rem;
}
.stats-legend--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
}
.stats-legend li {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.stats-legend strong {
  margin-left: .15rem;
  font-variant-numeric: tabular-nums;
}
.stats-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.stats-swatch--orange { background: var(--orange); }
.stats-swatch--charcoal { background: var(--charcoal); }

.stats-evol {
  display: grid;
  grid-template-columns: repeat(var(--stats-evol-cols, 12), minmax(0, 1fr));
  gap: .5rem;
  align-items: end;
  min-height: 180px;
  padding-top: .5rem;
  overflow-x: auto;
}
.stats-evol-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}
.stats-evol-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 140px;
  width: 100%;
}
.stats-evol-bar {
  width: 42%;
  max-width: 14px;
  min-height: 4px;
  border-radius: 1px 1px 0 0;
}
.stats-evol-bar--devis { background: var(--orange); }
.stats-evol-bar--ca { background: var(--charcoal); }
.stats-evol-label {
  font-size: .68rem;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stats-evol-value {
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stats-dl {
  margin: 0;
  display: grid;
  gap: .85rem;
}
.stats-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.stats-dl > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.stats-dl dt {
  color: var(--ink-muted);
  font-size: .92rem;
}
.stats-dl dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.stats-dl dd em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-muted);
  font-size: .85rem;
}

@media (max-width: 900px) {
  .stats-kpis,
  .stats-money,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-evol {
    grid-template-columns: repeat(var(--stats-evol-cols, 12), minmax(48px, 1fr));
  }
}

@media (max-width: 560px) {
  .stats-kpis,
  .stats-money,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stats-period-toolbar {
  align-items: center;
  margin-bottom: 1.25rem;
}
.stats-period-form {
  flex: 1;
}
.stats-period-label {
  margin: 0;
}
.stats-period-custom[hidden] {
  display: none !important;
}

/* =========================================================
   Types de travaux + positions (création devis)
   ========================================================= */
.type-positions-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-top: .5rem;
}
.type-pos-block {
  border: 1px solid var(--line);
  background: #fff;
}
.type-pos-block.is-open {
  border-color: rgba(253, 102, 3, .45);
}
.type-check--toggle {
  width: 100%;
  border: 0;
  background: #faf9f7;
  justify-content: flex-start;
}
.type-pos-block.is-open .type-check--toggle {
  background: rgba(253, 102, 3, .08);
}
.type-pos-count {
  margin-left: auto;
  font-style: normal;
  font-size: .78rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.type-pos-panel {
  border-top: 1px solid var(--line);
  padding: .75rem .85rem 1rem;
  max-height: 22rem;
  overflow: auto;
  background: #fff;
}
.type-pos-panel[hidden] {
  display: none !important;
}
.type-pos-empty {
  margin: 0;
  font-size: .9rem;
}
.type-pos-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-bottom: .65rem;
}
.type-pos-filter {
  flex: 1 1 12rem;
  min-height: 2.25rem;
  margin: 0;
}
.type-pos-selected {
  font-size: .82rem;
}
.type-pos-group {
  border: 1px solid var(--line);
  margin-bottom: .45rem;
}
.type-pos-group[hidden] {
  display: none !important;
}
.type-pos-group summary {
  cursor: pointer;
  padding: .55rem .7rem;
  font-weight: 600;
  font-size: .9rem;
  background: #f7f5f2;
  list-style: none;
}
.type-pos-group summary::-webkit-details-marker {
  display: none;
}
.type-pos-group summary span {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: .82rem;
}
.type-pos-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.type-pos-items > li {
  border-top: 1px solid var(--line);
  padding: .45rem .7rem .55rem;
}
.type-pos-items > li[hidden] {
  display: none !important;
}
.type-pos-item {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
}
.type-pos-item input {
  width: auto;
  min-height: 0;
  margin: .15rem 0 0;
  accent-color: var(--orange, #fd6603);
}
.type-pos-item-main {
  flex: 1;
  font-size: .9rem;
  line-height: 1.35;
}
.type-pos-item-main strong {
  display: inline-block;
  min-width: 4.2rem;
  margin-right: .25rem;
  color: var(--charcoal);
  font-family: ui-monospace, monospace;
  font-size: .82rem;
}
.type-pos-item-meta {
  flex-shrink: 0;
  font-size: .78rem;
  color: var(--ink-muted);
}
.type-pos-desc {
  margin: .2rem 0 0 1.55rem;
  font-size: .78rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

/* =========================================================
   Admin — Bibliothèque positions (section Devis)
   ========================================================= */
.pos-admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.25rem;
}
.pos-admin-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: .86rem;
}
.pos-admin-chip span {
  font-size: .75rem;
  color: var(--ink-muted);
}
.pos-admin-chip.is-active {
  border-color: var(--orange, #fd6603);
  background: rgba(253, 102, 3, .08);
  font-weight: 600;
}
.pos-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.pos-admin-table th,
.pos-admin-table td {
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.pos-admin-table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted);
  background: #f7f5f2;
}
.pos-admin-table tr.is-inactive {
  opacity: .55;
}
.pos-admin-table code {
  font-size: .82rem;
}
.pos-admin-actions {
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  align-items: center;
}
.pos-admin-actions a,
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--charcoal);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
}
.linkish-danger {
  color: #a33;
}
@media (max-width: 900px) {
  .pos-admin-layout.ouvriers-layout {
    grid-template-columns: 1fr;
  }
}


