/**
 * 2025 Rework Agency
 * RW - Demandes de devis : styles front.
 */
.rwq-cart-cta {
  margin: 16px 0;
  padding: 16px;
  border: 1px dashed #cbd5e0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}
.rwq-cart-cta__btn,
.rwq-product-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rwq-cart-cta__hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: #718096;
}
.rwq-product-cta {
  margin-top: 10px;
    text-align: center;
}

/* Request form */
.rwq-request__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 767px) {
  .rwq-request__grid { grid-template-columns: 1fr; }
}
.rwq-preview {
  width: 100%;
  border-collapse: collapse;
}
.rwq-preview th, .rwq-preview td {
  padding: 8px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
}
.rwq-note { color: #718096; font-size: 13px; margin-top: 10px; }
.rwq-row { display: flex; gap: 12px; }
.rwq-row .form-group { flex: 1; }
.rwq-loggedas { background: #f0fff4; padding: 10px 12px; border-radius: 8px; }
.rwq-consent { font-size: 14px; }
.rwq-submit { margin-top: 8px; }

/* Badges */
.rwq-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #edf2f7;
  color: #4a5568;
}
.rwq-badge--warning { background: #fefcbf; color: #975a16; }
.rwq-badge--info { background: #bee3f8; color: #2a4365; }
.rwq-badge--primary { background: #ebf4ff; color: #2b6cb0; }
.rwq-badge--success { background: #c6f6d5; color: #276749; }
.rwq-badge--danger { background: #fed7d7; color: #c53030; }
.rwq-badge--default { background: #edf2f7; color: #4a5568; }

/* Detail */
.rwq-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.rwq-detail__actions { display: flex; gap: 8px; }
.rwq-detail__meta { color: #718096; font-size: 13px; margin-bottom: 16px; display: flex; gap: 18px; }
.rwq-detail__message { background: #f7fafc; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.rwq-ref { color: #718096; font-size: 12px; }
.rwq-totals { max-width: 360px; margin-left: auto; margin-top: 12px; }
.rwq-totals .rwq-trow { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px solid #edf2f7; }
.rwq-trow--strong { font-weight: 700; }
.rwq-trow--big { font-size: 18px; font-weight: 800; color: #2b6cb0; border-bottom: 0; }

.rwq-activate-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.rwq-activate-cta p { margin: 4px 0 0; font-size: 13px; color: #2c5282; }
.rwq-empty { color: #718096; }

/* Messaging (front) */
.rwq-messages { margin-top: 28px; }
.rwq-thread { margin-bottom: 14px; }
.rwq-msg {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  max-width: 80%;
  font-size: 14px;
}
.rwq-msg--employee { background: #ebf4ff; margin-right: auto; }
.rwq-msg--customer { background: #f1f5f9; margin-left: auto; }
.rwq-msg--system { background: #fffaf0; color: #975a16; font-style: italic; max-width: 100%; text-align: center; }
.rwq-msg__head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #718096; margin-bottom: 4px; }
.rwq-msg__author { font-weight: 700; }
.rwq-compose textarea { margin-bottom: 10px; }

/* Product page: add-to-quote */
.rwq-product-cta { margin-top: 10px; }
.rwq-product-cta__btn { display: inline-flex; align-items: center; }
.rwq-add-feedback { margin-top: 8px; font-size: 13px; min-height: 1em; }
.rwq-add-feedback.is-ok { color: #276749; }

/* Header badge */
.rwq-nav-basket { display: inline-block; }
.rwq-nav-basket__link { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.rwq-nav-basket__count {
  background: #4f46e5;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
}
.rwq-nav-basket__count.is-empty { background: #cbd5e0; color: #4a5568; }

/* ============================================================
   Basket page — Ma sélection devis (refonte premium)
   ============================================================ */
.rwq-quote { max-width: 1120px; margin: 0 auto; padding: 6px 0 44px; color: #3C3C3C; font-size: 15px; }

.rwq-quote__head { margin-bottom: 26px; }
.rwq-quote__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: #3492f4; }
.rwq-quote__title { font-size: 30px; font-weight: 800; color: #123a63; margin: 6px 0 8px; line-height: 1.15; }
.rwq-quote__sub { color: #5b6b7c; font-size: 15px; max-width: 640px; margin: 0; line-height: 1.5; }

.rwq-quote__grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
@media (max-width: 991px) { .rwq-quote__grid { grid-template-columns: 1fr; } }

.rwq-card { background: #fff; border: 1px solid #e6ecf3; border-radius: 16px; padding: 22px 24px; box-shadow: 0 18px 50px -34px rgba(18,58,99,.4); }
.rwq-card + .rwq-card { margin-top: 20px; }
.rwq-card__title { font-size: 17px; font-weight: 800; color: #123a63; margin: 0; }

/* Items list */
.rwq-items__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #eef2f7; margin-bottom: 4px; }
.rwq-items__count { font-size: 13px; color: #7F7F7F; background: #f5f8fd; border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.rwq-items__list { list-style: none; margin: 0; padding: 0; }

.rwq-item { display: grid; grid-template-columns: 72px 1fr auto auto auto; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid #f0f3f7; }
.rwq-item:last-child { border-bottom: 0; }
.rwq-item.is-removing { opacity: .4; pointer-events: none; }
.rwq-item__img { display: block; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid #eceef1; background: #fff; align-self: start; }
.rwq-item__img img { width: 100%; height: 100%; object-fit: cover; }
.rwq-item__noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #c4ccd6; font-size: 24px; }
.rwq-item__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rwq-item__name { font-size: 15px; font-weight: 700; color: #123a63; text-decoration: none; line-height: 1.3; }
.rwq-item__name:hover { color: #3492f4; }
.rwq-item__ref { font-size: 12px; color: #98a4b3; }
.rwq-item__unit { font-size: 13px; color: #7F7F7F; }
.rwq-item__unit small { color: #98a4b3; }

.rwq-item__total { text-align: right; display: flex; flex-direction: column; gap: 2px; min-width: 96px; }
.rwq-item__total-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #98a4b3; }
.rwq-item__total-value { font-size: 16px; font-weight: 800; color: #123a63; }

.rwq-item__remove { border: 0; background: none; color: #c0cad6; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 8px; transition: .15s; line-height: 1; }
.rwq-item__remove:hover { color: #e5484d; background: #fdecec; }

/* Quantity stepper */
.rwq-stepper { display: inline-flex; align-items: center; border: 1.5px solid #e6ecf3; border-radius: 10px; overflow: hidden; background: #fff; }
.rwq-stepper__btn { border: 0; background: #f5f8fd; width: 34px; height: 38px; cursor: pointer; color: #123a63; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: .15s; }
.rwq-stepper__btn:hover { background: #e7f0fd; color: #3492f4; }
.rwq-stepper__input { width: 54px; height: 38px; border: 0; text-align: center; font-size: 15px; font-weight: 700; color: #123a63; -moz-appearance: textfield; }
.rwq-stepper__input::-webkit-outer-spin-button, .rwq-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.rwq-continue { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: #3492f4; font-weight: 600; font-size: 14px; text-decoration: none; }
.rwq-continue:hover { color: #123a63; }

/* Summary / aside */
.rwq-quote__aside { position: sticky; top: 20px; }
@media (max-width: 991px) { .rwq-quote__aside { position: static; } }
.rwq-summary__row { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0 12px; }
.rwq-summary__row span { color: #5b6b7c; font-size: 14px; }
.rwq-summary__row strong { font-size: 24px; font-weight: 800; color: #123a63; }
.rwq-summary__note { display: flex; gap: 8px; font-size: 12.5px; color: #8a97a6; background: #f7fafd; border-radius: 10px; padding: 10px 12px; margin: 0 0 18px; line-height: 1.45; }
.rwq-summary__note i { color: #3492f4; margin-top: 1px; font-size: 15px; flex: none; }

.rwq-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rwq-trust li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #3C3C3C; }
.rwq-trust i { color: #00B67A; font-size: 18px; width: 22px; text-align: center; flex: none; }

/* Request form */
.rwq-loggedas { display: flex; gap: 10px; align-items: flex-start; background: #f0fbf5; border: 1px solid #cdeede; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; line-height: 1.4; }
.rwq-loggedas i { color: #00B67A; font-size: 18px; flex: none; }
.rwq-loggedas small { color: #7F7F7F; }

.rwq-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.rwq-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rwq-field label { font-size: 13px; font-weight: 600; color: #123a63; }
.rwq-field input, .rwq-field textarea { width: 100%; border: 1.5px solid #e6ecf3; border-radius: 10px; padding: 11px 14px; font-size: 15px; font-family: inherit; color: #3C3C3C; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rwq-field input:focus, .rwq-field textarea:focus { outline: 0; border-color: #3492f4; box-shadow: 0 0 0 4px rgba(52,146,244,.14); }
.rwq-field textarea { resize: vertical; min-height: 92px; }

.rwq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #5b6b7c; margin: 4px 0 16px; cursor: pointer; line-height: 1.4; }
.rwq-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: #3492f4; flex: none; }

/* Buttons */
.rwq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 22px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; transition: .16s; font-family: inherit; }
.rwq-btn--primary { background: #3492f4; color: #fff; box-shadow: 0 12px 26px -12px rgba(52,146,244,.7); }
.rwq-btn--primary:hover { background: #2b83e0; color: #fff; }
.rwq-btn--block { width: 100%; }
.rwq-form__secure { display: flex; gap: 7px; align-items: center; justify-content: center; font-size: 12px; color: #98a4b3; margin: 12px 0 0; text-align: center; line-height: 1.4; }
.rwq-form__secure i { color: #00B67A; flex: none; }

/* Alert */
.rwq-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: 14px; }
.rwq-alert--error { background: #fff1f2; border: 1px solid #ffd0d4; color: #c0303a; }
.rwq-alert ul { margin: 0; padding-left: 16px; }
.rwq-alert i { font-size: 18px; margin-top: 1px; flex: none; }

/* Empty state */
.rwq-empty { text-align: center; background: #fff; border: 1px solid #e6ecf3; border-radius: 16px; padding: 56px 24px; box-shadow: 0 18px 50px -34px rgba(18,58,99,.4); }
.rwq-empty__icon { width: 76px; height: 76px; border-radius: 50%; background: #f5f8fd; color: #3492f4; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.rwq-empty h2 { font-size: 20px; color: #123a63; font-weight: 800; margin: 0 0 8px; }
.rwq-empty p { color: #7F7F7F; margin: 0 0 22px; }

/* Responsive items */
@media (max-width: 575px) {
  .rwq-item { grid-template-columns: 60px 1fr auto; grid-template-areas: "img info remove" "img qty total"; gap: 8px 14px; }
  .rwq-item__img { width: 60px; height: 60px; grid-area: img; }
  .rwq-item__info { grid-area: info; }
  .rwq-item__qty { grid-area: qty; }
  .rwq-item__total { grid-area: total; align-self: end; }
  .rwq-item__remove { grid-area: remove; align-self: start; justify-self: end; }
}

/* Slide-in sidebar */
body.rwq-sb-lock { overflow: hidden; }
.rwq-sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.45);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 10000;
}
.rwq-sidebar-backdrop.is-open { opacity: 1; visibility: visible; }
.rwq-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 92vw;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
  z-index: 10001;
  display: flex; flex-direction: column;
}
.rwq-sidebar.is-open { transform: translateX(0); }
.rwq-sidebar__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #eceef1;
}
.rwq-sidebar__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.rwq-sidebar__close { border: 0; background: none; font-size: 18px; cursor: pointer; color: #6b7280; line-height: 1; }
.rwq-sidebar__body { flex: 1; overflow-y: auto; padding: 8px 0; }
.rwq-sb-loading, .rwq-sb-empty { padding: 30px 18px; text-align: center; color: #6b7280; }

.rwq-sb-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f3f4f6; align-items: center; }
.rwq-sb-item__img img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #eceef1; }
.rwq-sb-item__info { flex: 1; min-width: 0; }
.rwq-sb-item__name { display: block; font-size: 13px; font-weight: 600; color: #111827; text-decoration: none; margin-bottom: 6px; }
.rwq-sb-item__meta { display: flex; align-items: center; justify-content: space-between; }
.rwq-sb-item__price { font-weight: 700; font-size: 13px; }
.rwq-sb-qty { display: inline-flex; align-items: center; border: 1px solid #e6e8ee; border-radius: 8px; overflow: hidden; }
.rwq-sb-qty button { border: 0; background: #f7f8fb; width: 26px; height: 28px; cursor: pointer; font-size: 15px; color: #374151; }
.rwq-sb-qty input { width: 40px; height: 28px; border: 0; text-align: center; -moz-appearance: textfield; }
.rwq-sb-item__remove { border: 0; background: none; color: #c53030; cursor: pointer; font-size: 14px; }
.rwq-sb-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-top: 1px solid #eceef1; font-size: 15px; }
.rwq-sb-cta { display: block; margin: 0 18px 18px; text-align: center; }

/* Accept / refuse */
.rwq-decide {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.rwq-decide > span { font-weight: 700; margin-right: auto; }
.rwq-choices { border: 0; margin: 16px 0; padding: 0; }
.rwq-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.rwq-choice:hover { background: #f7fafc; }
