/* Linov Devis - front */

:root {
  /* Couleur de marque approximative d'après vos maquettes — ajustez cette
     seule variable pour un calage exact avec votre charte. */
  --linovdevis-red: #D4202C;
  --linovdevis-red-dark: #D4202C;
}

/* --- Bouton rouge commun (grand format produit / petit format header) --- */

.linovdevis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--linovdevis-red);
  color: rgb(255, 255, 255) !important;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 500 !important;
  font-size: 13px;
  line-height: 13px;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.linovdevis-btn:hover,
.linovdevis-btn:focus {
  background-color: var(--linovdevis-red-dark);
  color: #fff;
  text-decoration: none;
}

.linovdevis-btn .linovdevis-btn-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.linovdevis-btn-lg {
  padding: 16px 26px;
  text-transform: uppercase;
  /* Cible maquette : Inter ExtraLight 200, 16px, lettres espacées.
     (Nécessite que la police Inter soit chargée avec le weight 200 ;
     sinon le navigateur retombe sur la graisse la plus proche.) */
  font-weight: 200;
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 0.15em;
  flex: 1 1 auto;
}

.linovdevis-btn-sm {
  padding: 9px 18px;
}

.linovdevis-btn-md {
  padding: 12px 22px;
  font-size: 14px;
  line-height: 14px;
}

.linovdevis-btn-ghost {
  background: transparent;
  color: #1a1d21 !important;
  border: 1px solid #e8eaee;
}

.linovdevis-btn-ghost:hover,
.linovdevis-btn-ghost:focus {
  background: #f6f7f9;
  color: #1a1d21 !important;
}

/* --- Bloc fiche produit : stepper quantité + bouton --- */

.linovdevis-product-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.linovdevis-qty-stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid #d8dde3;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.linovdevis-qty-stepper .linovdevis-quantity-input {
  width: 48px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.linovdevis-qty-stepper .linovdevis-quantity-input::-webkit-outer-spin-button,
.linovdevis-qty-stepper .linovdevis-quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.linovdevis-qty-arrows {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #d8dde3;
}

.linovdevis-qty-arrows button {
  flex: 1 1 50%;
  width: 26px;
  border: none;
  background: #f5f6f8;
  color: #555;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.linovdevis-qty-arrows button:hover {
  background: #ebedf0;
}

.linovdevis-qty-arrows .linovdevis-qty-inc {
  border-bottom: 1px solid #d8dde3;
  border-top-right-radius: 10px;
}

.linovdevis-qty-arrows .linovdevis-qty-dec {
  border-bottom-right-radius: 10px;
}

.linovdevis-add-confirm {
  flex-basis: 100%;
  color: #2ecc71;
  font-size: 0.9em;
}

/* --- Widget header --- */

.linovdevis-cart-widget {
  display: inline-block;
}

.linovdevis-cart-widget .linovdevis-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.linovdevis-page {
  padding: 30px 0;
}

.linovdevis-cart-table img {
  max-width: 60px;
  height: auto;
}

.linovdevis-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.linovdevis-quotes-table .badge,
.linovdevis-cart-recap .badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* ===================================================================
   Page /request (demande de devis) + confirmation — refonte complète
   =================================================================== */

.linovdevis-req {
  --ldv-red: var(--linovdevis-red, #d4202c);
  --ldv-ink: #1a1d21;
  --ldv-muted: #6b7280;
  --ldv-line: #e8eaee;
  --ldv-soft: #f6f7f9;
  --ldv-radius: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 20px 72px;
  font-family: 'Inter', sans-serif;
  color: var(--ldv-ink);
  box-sizing: border-box;
}

.linovdevis-req *,
.linovdevis-req *::before,
.linovdevis-req *::after {
  box-sizing: border-box;
}

/* --- Hero --- */
.linovdevis-req-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.linovdevis-req-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  color: var(--ldv-red);
  margin-bottom: 14px;
}

.linovdevis-req-title {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ldv-ink);
}

.linovdevis-req-lead {
  color: var(--ldv-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.linovdevis-req-perks {
  list-style: none;
  display: flex;
  gap: 12px 28px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 24px 0 0;
}

.linovdevis-req-perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.linovdevis-req-perks svg {
  color: var(--ldv-red);
  flex-shrink: 0;
}

/* --- Grille formulaire / récap --- */
.linovdevis-req-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.linovdevis-req-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* --- Carte --- */
.linovdevis-card {
  background: #fff;
  border: 1px solid var(--ldv-line);
  border-radius: var(--ldv-radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.linovdevis-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 22px;
  color: var(--ldv-ink);
}

.linovdevis-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ldv-red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

/* --- Champs --- */
.linovdevis-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.linovdevis-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.linovdevis-field--full {
  grid-column: 1 / -1;
}

.linovdevis-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  /* !important : le thème PrestaShop right-aligne les labels de formulaire
     avec une spécificité plus forte. */
  text-align: left !important;
}

.linovdevis-field label .req {
  color: var(--ldv-red);
}

.linovdevis-field input,
.linovdevis-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ldv-line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ldv-ink);
  background: #fbfbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.linovdevis-field textarea {
  resize: vertical;
}

.linovdevis-field input::placeholder,
.linovdevis-field textarea::placeholder {
  color: #9aa1ac;
}

.linovdevis-field input:focus,
.linovdevis-field textarea:focus {
  outline: none;
  border-color: var(--ldv-red);
  box-shadow: 0 0 0 3px rgba(212, 32, 44, 0.12);
  background: #fff;
}

.linovdevis-field input[type="file"] {
  padding: 10px 12px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.linovdevis-field .hint {
  font-size: 12px;
  color: var(--ldv-muted);
}

/* --- Récap (aside sticky) --- */
.linovdevis-req-aside {
  position: sticky;
  top: 20px;
}

.linovdevis-summary-count {
  margin-left: auto;
  background: var(--ldv-soft);
  color: var(--ldv-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
}

.linovdevis-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.linovdevis-cart-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--ldv-line);
}

.linovdevis-cart-line:first-child {
  border-top: none;
  padding-top: 4px;
}

.linovdevis-line-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--ldv-line);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.linovdevis-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.linovdevis-line-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.linovdevis-line-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.linovdevis-line-ref {
  font-size: 12px;
  color: var(--ldv-muted);
}

.linovdevis-cart-line .linovdevis-qty-stepper {
  margin-top: 6px;
  align-self: flex-start;
}

.linovdevis-cart-remove {
  border: none;
  background: none;
  color: #b6bcc6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  align-self: flex-start;
  transition: color 0.15s ease;
}

.linovdevis-cart-remove:hover {
  color: var(--ldv-red);
}

/* Stepper compact dans le récap */
.linovdevis-qty-stepper--sm .linovdevis-quantity-input {
  width: 40px;
  font-size: 14px;
}

.linovdevis-qty-stepper--sm .linovdevis-qty-arrows button {
  width: 22px;
  font-size: 10px;
}

.linovdevis-summary-submit {
  width: 100%;
  margin-top: 22px;
}

.linovdevis-summary-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--ldv-muted);
  line-height: 1.5;
  margin: 14px 0 0;
}

/* --- État vide --- */
.linovdevis-req-empty {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ldv-line);
  border-radius: var(--ldv-radius);
  padding: 56px 32px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.linovdevis-req-empty-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 32, 44, 0.08);
  color: var(--ldv-red);
}

.linovdevis-req-empty-icon svg {
  width: 30px;
  height: 38px;
}

.linovdevis-req-empty h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 10px;
}

.linovdevis-req-empty p {
  color: var(--ldv-muted);
  line-height: 1.6;
  margin: 0 0 26px;
}

/* --- Confirmation --- */
.linovdevis-confirm {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0 40px;
}

.linovdevis-confirm-badge {
  width: 88px;
  height: 88px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.12);
  color: #24a35a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.linovdevis-confirm-badge svg {
  width: 42px;
  height: 42px;
}

.linovdevis-confirm h1 {
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 700;
  margin: 0 0 12px;
}

.linovdevis-confirm-ref {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--ldv-muted);
}

.linovdevis-confirm-num {
  font-weight: 600;
  color: var(--ldv-red);
  background: rgba(212, 32, 44, 0.08);
  padding: 3px 12px;
  border-radius: 999px;
}

.linovdevis-confirm p {
  color: var(--ldv-muted);
  line-height: 1.65;
  font-size: 16px;
  margin: 0 auto;
  max-width: 480px;
}

.linovdevis-confirm-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 0;
}

.linovdevis-confirm-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ldv-soft);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
}

.linovdevis-confirm-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ldv-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.linovdevis-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .linovdevis-req-grid {
    grid-template-columns: 1fr;
  }
  .linovdevis-req-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  .linovdevis-req {
    padding: 28px 16px 56px;
  }
  .linovdevis-req-hero {
    margin-bottom: 28px;
  }
  .linovdevis-req-lead {
    font-size: 15px;
  }
  /* Boutons plein format un peu plus compacts pour éviter tout débordement. */
  .linovdevis-btn-lg {
    padding: 15px 20px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 520px) {
  .linovdevis-field-grid {
    grid-template-columns: 1fr;
  }
  .linovdevis-card {
    padding: 20px;
  }
  .linovdevis-req-perks {
    gap: 8px 18px;
  }
  .linovdevis-req-perks li {
    font-size: 13px;
  }
  .linovdevis-card-title {
    font-size: 17px;
  }
  .linovdevis-confirm-steps {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===================================================================
   Modale « produit ajouté au devis »
   =================================================================== */

.linovdevis-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 18, 20, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.linovdevis-modal-overlay.is-open {
  display: flex;
}

body.linovdevis-modal-open {
  overflow: hidden;
}

.linovdevis-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: linovdevis-modal-in 0.18s ease;
}

@keyframes linovdevis-modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.linovdevis-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #b6bcc6;
  cursor: pointer;
  padding: 4px;
}

.linovdevis-modal-close:hover {
  color: var(--linovdevis-red);
}

.linovdevis-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-right: 24px;
}

.linovdevis-modal-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.12);
  color: #24a35a;
  flex-shrink: 0;
}

.linovdevis-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #1a1d21;
}

.linovdevis-modal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}

.linovdevis-modal-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #eef0f3;
}

.linovdevis-modal-line:first-child {
  border-top: none;
}

.linovdevis-modal-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #eef0f3;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.linovdevis-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.linovdevis-modal-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.linovdevis-modal-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d21;
  line-height: 1.3;
}

.linovdevis-modal-ref {
  font-size: 12px;
  color: #6b7280;
}

.linovdevis-modal-qty {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.linovdevis-modal-actions {
  display: flex;
  gap: 10px;
}

.linovdevis-modal-actions .linovdevis-btn {
  flex: 1 1 0;
  justify-content: center;
}

@media (max-width: 420px) {
  .linovdevis-modal-overlay {
    padding: 12px;
  }
  .linovdevis-modal-dialog {
    padding: 24px 18px;
  }
  .linovdevis-modal-actions {
    flex-direction: column-reverse;
  }
}
