/* Demande de prix partagée — catalogue + secteurs */

body.has-quote-dock {
  padding-bottom: 76px;
}

.quote-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.quote-dock[hidden] { display: none !important; }

.quote-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(12, 61, 92, 0.28);
}
.quote-dock-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.quote-backdrop {
  position: fixed;
  inset: 0;
  z-index: 315;
  background: rgba(12, 40, 60, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.quote-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.quote-backdrop[hidden] { display: none !important; }

.quote-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 320;
  max-height: 92vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 60px rgba(12, 61, 92, 0.2);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.quote-panel.open { transform: translateY(0); }
.quote-panel[hidden] { display: none !important; }

.quote-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.quote-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.quote-panel-lead {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}
.quote-panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}

.quote-panel-body {
  padding: 16px 20px 28px;
  overflow-y: auto;
}

.quote-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-empty {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 8px 0;
}
.quote-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.quote-line-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-line-info strong {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.quote-line-info span {
  font-size: 0.75rem;
  color: var(--muted);
}
.quote-colisage {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.78rem !important;
  font-weight: 700;
  color: var(--blue-deep) !important;
}

.quote-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.quote-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text);
}
.quote-qty-input {
  width: 56px;
  height: 32px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
}
.quote-unit {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0 6px;
  max-width: 120px;
}
.quote-remove {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
}
.quote-remove:hover { color: #b42318; background: rgba(180, 35, 24, 0.08); }

.quote-clear {
  display: inline-block;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  margin: 0 0 18px;
  padding: 0;
}

.quote-form {
  position: relative;
  margin-top: 8px;
}
.quote-form h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}
.quote-b2b {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 14px;
}
.quote-field {
  margin-bottom: 12px;
}
.quote-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.quote-field input,
.quote-field select,
.quote-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.quote-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.quote-form .btn-primary {
  width: 100%;
  margin-top: 4px;
}
.quote-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}
.quote-status {
  margin: 10px 0 0;
  min-height: 1.3em;
  font-size: 0.88rem;
  font-weight: 600;
}
.quote-status.is-ok { color: #157347; }
.quote-status.is-err { color: #b42318; }

.form-turnstile {
  min-height: 65px;
  margin: 0.35rem 0 0.85rem;
}

.form-turnstile:empty {
  min-height: 0;
  margin: 0;
}
.quote-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 8px 0 0;
}

@media (max-width: 640px) {
  .quote-line {
    grid-template-columns: 1fr auto;
  }
  .quote-line .quote-qty {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .quote-panel {
    left: auto;
    right: 20px;
    top: 50%;
    bottom: auto;
    width: min(460px, calc(100% - 40px));
    max-height: 88vh;
    border-radius: 20px;
    transform: translateY(-50%) translateX(24px);
    opacity: 0;
    pointer-events: none;
  }
  .quote-panel.open {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}

[data-theme="dark"] .quote-dock {
  background: rgba(15, 23, 42, 0.92);
}
[data-theme="dark"] .quote-line,
[data-theme="dark"] .quote-field input,
[data-theme="dark"] .quote-field select,
[data-theme="dark"] .quote-field textarea,
[data-theme="dark"] .quote-qty-input,
[data-theme="dark"] .quote-unit,
[data-theme="dark"] .quote-qty-btn {
  background: var(--card);
}
