/* Demande de devis du theme (chantier 1, CRM 2420, 11/2026). Couleurs et bordures reprises du theme. */

/* Apercu administrateur, YITH encore actif : ses elements disparaissent de la fiche. */
body.nd-devis-apercu .yith-ywraq-add-to-quote,
body.nd-devis-apercu .wapf {
  display: none !important;
}

.nd-devis-fiche input[type="text"],
.nd-devis-fiche select,
.nd-devis-ligne input,
.nd-devis-ligne select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 10px;
  background: #fff;
  color: #000;
  font: inherit;
}

.nd-devis-dimensions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nd-devis-formats {
  margin: 10px 0 0;
  font-size: .9rem;
}

.nd-devis-format {
  margin: 4px 4px 0 0;
  padding: 2px 10px;
  border: 1px solid #d4c399;
  background: #fff;
  color: #5b6670;
  font-size: .9rem;
  cursor: pointer;
}

.nd-devis-format:hover,
.nd-devis-format:focus-visible {
  background: #d4c399;
  color: #000;
}

.nd-devis-libelle {
  display: block;
  margin: 15px 0 8px;
  font-weight: 500;
}

.nd-devis-actions {
  display: flex;
  gap: 5%;
  align-items: stretch;
  margin-top: 20px;
}

.nd-devis-actions .quantity {
  flex: 0 0 25%;
  display: flex;
}

.nd-devis-actions .quantity .qty {
  min-width: 0;
}

.nd-devis-ouvrir,
.nd-devis-flottant,
.nd-devis-envoi button {
  border: 1px solid #d5c399;
  border-radius: 0;
  background: #d5c399;
  color: #5b6670;
  text-transform: uppercase;
  letter-spacing: 1px;
  font: inherit;
  cursor: pointer;
}

.nd-devis-ouvrir:hover,
.nd-devis-flottant:hover,
.nd-devis-envoi button:hover {
  background: #d4c399;
  color: #000;
}

.nd-devis-ouvrir {
  flex: 1 1 auto;
  min-height: 60px;
  padding: 10px 20px;
}

.nd-devis-flottant {
  position: fixed;
  right: 85px;
  bottom: 20px;
  z-index: 1030;
  height: 50px;
  padding: 0 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.nd-devis-flottant[hidden] {
  display: none;
}

/* Fenetre */

html.nd-devis-ouverte {
  overflow: hidden;
}

.nd-devis-fenetre {
  width: calc(100% - 32px);
  max-width: 780px;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: #fff;
  color: #000;
}

.nd-devis-fenetre::backdrop {
  background: rgba(0, 0, 0, .55);
}

.nd-devis-fenetre-contenu {
  position: relative;
  padding: 30px;
}

.nd-devis-titre {
  margin: 0 40px 20px 0;
  font-size: 1.5rem;
}

.nd-devis-fermer {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* Formulaire (fenetre et page /demande-de-devis/) */

.nd-devis-page {
  background: #f7f7f7;
  padding: 30px;
}

.nd-devis-form fieldset {
  margin: 0 0 25px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.nd-devis-form legend {
  float: none;
  width: auto;
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 500;
}

.nd-devis-form label {
  font-weight: 500;
}

.nd-devis-form p {
  margin: 0 0 15px;
}

.nd-devis-form .form-control {
  border-radius: 0;
}

.nd-devis-form small {
  display: block;
  margin-top: 4px;
  color: #5b6670;
}

.nd-devis-form abbr {
  text-decoration: none;
  border: 0;
}

.nd-devis-vide {
  color: #5b6670;
}

.nd-devis-ligne {
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5;
}

.nd-devis-ligne:first-child {
  padding-top: 0;
}

.nd-devis-ligne-entete {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.nd-devis-ligne-entete img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex: 0 0 auto;
}

.nd-devis-ligne-nom {
  flex: 1 1 auto;
  margin: 0 !important;
  font-weight: 500;
}

.nd-devis-retirer {
  border: 0;
  background: transparent;
  color: #5b6670;
  text-decoration: underline;
  cursor: pointer;
}

.nd-devis-ligne-titre {
  margin: 0 0 6px !important;
  font-size: .9rem;
  font-weight: 500;
}

.nd-devis-ligne-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-top: 10px;
}

.nd-devis-ligne-options label {
  display: block;
  margin-bottom: 4px;
  font-size: .9rem;
}

.nd-devis-compteur {
  display: flex;
}

.nd-devis-compteur input {
  text-align: center;
  -moz-appearance: textfield;
}

.nd-devis-compteur input::-webkit-outer-spin-button,
.nd-devis-compteur input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.nd-devis-compteur button {
  flex: 0 0 44px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
}

.nd-devis-ajout {
  position: relative;
  margin-top: 15px;
}

.nd-devis-ajout label {
  display: block;
  margin-bottom: 6px;
}

.nd-devis-resultats {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #ddd;
  border-top: 0;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.nd-devis-resultats button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: #fff;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.nd-devis-resultats button:hover,
.nd-devis-resultats button:focus-visible {
  background: #f7f7f7;
}

.nd-devis-resultats img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.nd-devis-aucun {
  padding: 8px 10px;
  color: #5b6670;
}

.nd-devis-rgpd {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.nd-devis-rgpd input {
  margin-top: 5px;
  flex: 0 0 auto;
}

.nd-devis-rgpd label {
  font-weight: 400;
}

.nd-devis-piege {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nd-devis-erreur,
.nd-devis-message-champ {
  color: #b00020;
}

.nd-devis-message-champ {
  display: block;
  margin-top: 4px;
  font-size: .9rem;
}

.nd-devis-invalide .form-control,
.nd-devis-invalide input[type="checkbox"] {
  border-color: #b00020;
  outline-color: #b00020;
}

.nd-devis-envoi button {
  height: 50px;
  padding: 0 30px;
}

.nd-devis-envoi button[disabled] {
  opacity: .6;
  cursor: wait;
}

.nd-devis-merci {
  padding: 10px 0;
  font-size: 1.1rem;
}

.nd-devis-merci:focus {
  outline: none;
}

@media (max-width: 768px) {
  .nd-devis-actions .quantity {
    flex-basis: 35%;
  }

  .nd-devis-fenetre {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
  }

  .nd-devis-fenetre-contenu {
    padding: 20px 16px;
  }

  .nd-devis-page {
    padding: 20px 16px;
  }

  .nd-devis-ligne-options {
    grid-template-columns: 1fr;
  }

  .nd-devis-flottant {
    left: 16px;
    right: 80px;
    bottom: 16px;
    padding: 0 10px;
  }
}

/* Trois champs cote a cote ne laissent plus lire « Profondeur en cm » : un par ligne. */
@media (max-width: 480px) {
  .nd-devis-dimensions {
    grid-template-columns: 1fr;
  }
}
