/**
 * Flydev - Demande de devis
 *
 * @author    Flydev
 * @copyright Flydev
 * @license   Commercial
 */

/* Pot de miel anti-robots : hors écran plutôt que display:none */
.flydevquote-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.flydevquote-intro {
  margin-bottom: 1.5rem;
}

.flydevquote .card {
  margin-bottom: 1.5rem;
}

.flydevquote-table td,
.flydevquote-table th {
  vertical-align: middle;
}

.flydevquote-product {
  display: flex;
  align-items: center;
}

.flydevquote-product-image {
  width: 60px;
  height: auto;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.flydevquote-confirmation-title .material-icons {
  color: #4cbb6c;
  vertical-align: middle;
}

.flydevquote-cart-notice {
  padding-bottom: 0;
}

.flydevquote-cart-notice .material-icons {
  font-size: 1.1em;
  vertical-align: text-bottom;
}

@media (max-width: 767px) {
  .flydevquote-product-image {
    width: 44px;
  }
}

.flydevquote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ==================================================================
 * Demande de devis express
 * ================================================================== */

.flydevquote-express-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.flydevquote-express-head .h4 {
  margin-bottom: 0;
}

.flydevquote-count {
  color: #7a7a7a;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

/* --- Recherche (combobox) --- */

.fq-search {
  position: relative;
  margin-bottom: 1.25rem;
}

.fq-search label {
  font-weight: 600;
}

.fq-search__field {
  position: relative;
}

.fq-search__icon {
  position: absolute;
  top: 50%;
  left: .75rem;
  transform: translateY(-50%);
  color: #7a7a7a;
  pointer-events: none;
}

.flydevquote-express .fq-search__input {
  height: auto;
  padding: .75rem 2.75rem .75rem 2.75rem;
  font-size: 1rem;
  border-radius: 6px;
}

.fq-search__spinner {
  position: absolute;
  top: 50%;
  right: .9rem;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(0, 0, 0, .15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: fq-spin .7s linear infinite;
}

.fq-search__help {
  margin: .4rem 0 0;
}

.fq-search__results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 420px;
  margin: 0;
  padding: .35rem;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 8px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .35);
}

.fq-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .6rem;
  border-radius: 6px;
  cursor: pointer;
}

.fq-option[aria-selected="true"] {
  background: #f1f3f5;
  box-shadow: inset 3px 0 0 currentColor;
}

.fq-option__price {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.fq-option__add {
  flex-shrink: 0;
  margin-left: .5rem;
  padding: .15rem .6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  opacity: 0;
}

.fq-option__price + .fq-option__add {
  margin-left: .75rem;
}

.fq-option:not(:has(.fq-option__price)) .fq-option__add {
  margin-left: auto;
}

.fq-option[aria-selected="true"] .fq-option__add {
  opacity: 1;
}

.fq-search__message {
  margin: .5rem 0 0;
  color: #7a4b00;
}

/* --- Vignettes et textes communs --- */

.flydevquote-express .fq-thumb {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 6px;
}

.flydevquote-express .fq-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flydevquote-express .fq-thumb__empty {
  font-weight: 700;
  color: #7a7a7a;
  text-transform: uppercase;
}

.fq-item__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fq-item__name {
  font-weight: 600;
  color: #232323;
  overflow-wrap: anywhere;
}

.fq-item__meta {
  color: #7a7a7a;
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

/* --- Lignes de la demande --- */

.fq-lines__empty {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #7a7a7a;
  border: 1px dashed rgba(0, 0, 0, .18);
  border-radius: 8px;
}

.fq-lines__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.fq-line {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.fq-line .fq-item__text {
  flex: 1 1 auto;
}

.fq-line--new {
  animation: fq-line-in .6s ease-out;
}

@keyframes fq-line-in {
  from { background-color: rgba(36, 185, 215, .16); }
  to { background-color: transparent; }
}

.fq-line__price {
  white-space: nowrap;
  color: #4a4a4a;
  font-variant-numeric: tabular-nums;
}

.fq-qty {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 6px;
  overflow: hidden;
}

.fq-qty__btn {
  width: 2.25rem;
  border: 0;
  background: #f6f6f6;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.fq-qty__btn:hover:not(:disabled) {
  background: #ebebeb;
}

.fq-qty__btn:disabled {
  color: #bbb;
  cursor: default;
}

.flydevquote .fq-qty__input {
  width: 4.25rem;
  padding: .45rem .25rem;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, .18);
  border-right: 1px solid rgba(0, 0, 0, .18);
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.flydevquote .fq-qty__input::-webkit-outer-spin-button,
.flydevquote .fq-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fq-line__remove {
  flex-shrink: 0;
  display: inline-flex;
  padding: .4rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7a7a7a;
  cursor: pointer;
}

.fq-line__remove:hover {
  background: #f1f1f1;
  color: #c0392b;
}

.flydevquote-express button:focus-visible,
.flydevquote-summary button:focus-visible,
.flydevquote .fq-qty__input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.fq-lines__note {
  margin: .75rem 0 0;
}

@keyframes fq-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 575px) {
  .fq-line {
    flex-wrap: wrap;
  }

  .fq-line .fq-item__text {
    flex-basis: calc(100% - 64px);
  }

  .fq-line__price {
    margin-left: 62px;
  }

  .fq-qty {
    margin-left: auto;
  }

  .fq-option__add {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fq-line--new,
  .fq-search__spinner {
    animation: none;
  }
}

/* ==================================================================
 * Demande de devis (panier) : quantités modifiables
 * ================================================================== */

.flydevquote-summary .fq-qty-cell {
  white-space: nowrap;
}

.flydevquote-summary .fq-qty {
  vertical-align: middle;
}

.flydevquote-summary .fq-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fq-remove {
  display: block;
  margin: .35rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7a7a7a;
  font-size: .8125rem;
  text-decoration: underline;
  cursor: pointer;
}

.fq-remove:hover {
  color: #c0392b;
}

.flydevquote-summary tr.is-busy {
  opacity: .55;
  transition: opacity .15s ease;
}

.flydevquote-summary tr.is-busy .fq-qty {
  pointer-events: none;
}

.fq-line-error {
  margin: .35rem 0 0;
  color: #b3261e;
}

.fq-flash-value {
  animation: fq-flash-value .6s ease-out;
}

@keyframes fq-flash-value {
  from { background-color: rgba(36, 185, 215, .2); }
  to { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .fq-flash-value {
    animation: none;
  }
}

/* ==================================================================
 * Adresse de livraison (pages « Demande de devis » et « express »)
 * ================================================================== */

.flydevquote-address {
  margin: .5rem 0 1.25rem;
  padding: 1rem 1.25rem .25rem;
  border: 1px solid #e6e7ec;
  border-radius: 6px;
  background: #fafafb;
  min-width: 0;
}

.flydevquote-address__title {
  width: auto;
  margin: 0 0 .25rem;
  padding: 0 .4rem;
  border: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #232323;
}

.flydevquote-address__opt {
  font-weight: 400;
  color: #6b7080;
  font-size: .875rem;
}

.flydevquote-address__help {
  margin: 0 0 1rem;
  color: #6b7080;
  font-size: .875rem;
}

@media (max-width: 767px) {
  .flydevquote-address {
    padding: .75rem .75rem 0;
  }
}

/* ==================================================================
 * Sécurité Sociale et Mutuelle (questions Oui / Non + pièces jointes)
 * ================================================================== */

.flydevquote-documents {
  margin: .5rem 0 1.25rem;
  padding: 1rem 1.25rem .5rem;
  border: 1px solid #e6e7ec;
  border-radius: 6px;
  background: #fafafb;
  min-width: 0;
}

.flydevquote-documents__title {
  width: auto;
  margin: 0 0 .5rem;
  padding: 0 .4rem;
  border: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #232323;
}

.flydevquote-question {
  padding: .75rem 0;
  border-top: 1px solid #ececf0;
}

.flydevquote-documents__title + .flydevquote-question {
  border-top: 0;
  padding-top: 0;
}

.flydevquote-question__label {
  margin: 0 0 .5rem;
  color: #232323;
  font-size: .9375rem;
  font-weight: 600;
}

.flydevquote-question__label.required::after {
  content: " *";
  color: #ff4c4c;
}

.flydevquote-question__choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.flydevquote-choice {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  color: #232323;
  cursor: pointer;
}

.flydevquote-question.has-error .flydevquote-question__label {
  color: #c4161c;
}

.flydevquote-question.has-error .custom-radio {
  border-color: #c4161c;
}

.flydevquote-attachment {
  margin-top: .875rem;
  padding: .875rem 1rem;
  border-left: 3px solid #24b9d7;
  background: #fff;
  animation: flydevquote-reveal .2s ease-out;
}

.flydevquote-attachment[hidden] {
  display: none;
}

.flydevquote-attachment .form-control[type="file"] {
  height: auto;
  padding: .45rem .75rem;
  background: #fff;
}

.flydevquote-attachment .form-control.is-invalid {
  border-color: #c4161c;
}

.flydevquote-attachment__current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  margin: 0 0 .5rem;
  font-size: .875rem;
  color: #2e7d32;
}

.flydevquote-attachment__current .material-icons {
  font-size: 1.1rem;
}

.flydevquote-attachment__error {
  margin: .4rem 0 0;
  font-size: .875rem;
  color: #c4161c;
}

.flydevquote-documents__privacy {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin: .25rem 0 .5rem;
  font-size: .8125rem;
  color: #6b7080;
}

.flydevquote-documents__privacy .material-icons {
  font-size: 1rem;
  line-height: 1.25;
}

@keyframes flydevquote-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .flydevquote-attachment {
    animation: none;
  }
}

@media (max-width: 767px) {
  .flydevquote-documents {
    padding: .75rem .75rem .25rem;
  }
}

/* ==================================================================
 * Page « Accepter / Refuser le devis » (lien de l'e-mail)
 * ================================================================== */

.flydevquote-decision__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.flydevquote-decision__eyebrow {
  margin: 0;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7080;
}

.flydevquote-decision__total {
  margin: .25rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #232323;
  font-variant-numeric: tabular-nums;
}

.flydevquote-decision__total span {
  font-size: 1rem;
  font-weight: 600;
  color: #6b7080;
}

.flydevquote-decision__meta {
  margin: .25rem 0 0;
  color: #6b7080;
}

.flydevquote-decision__pdf {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.flydevquote-decision__lines {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #ececf0;
}

.flydevquote-decision__lines li {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid #ececf0;
}

.flydevquote-decision__qty {
  flex: 0 0 3rem;
  color: #6b7080;
  font-variant-numeric: tabular-nums;
}

.flydevquote-decision__qty .material-icons {
  font-size: 1.1rem;
  vertical-align: middle;
}

.flydevquote-decision__name {
  flex: 1 1 auto;
  min-width: 0;
  color: #232323;
}

.flydevquote-decision__name small {
  display: block;
  color: #6b7080;
}

.flydevquote-decision__price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #232323;
}

.flydevquote-decision__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: 1rem;
}

.flydevquote-decision .flydevquote-decision__accept {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #1f8a5b;
  border-color: #1f8a5b;
  color: #fff;
}

.flydevquote-decision .flydevquote-decision__accept:hover,
.flydevquote-decision .flydevquote-decision__accept:focus {
  background: #17683f;
  border-color: #17683f;
  color: #fff;
}

.flydevquote-decision .flydevquote-decision__refuse {
  border: 2px solid #b3261e;
  background: #fff;
  color: #b3261e;
}

.flydevquote-decision .flydevquote-decision__refuse:hover,
.flydevquote-decision .flydevquote-decision__refuse:focus {
  background: #fdf0ef;
  color: #8c1d17;
}

.flydevquote-decision__switch {
  font-size: .875rem;
  text-decoration: underline;
}

.flydevquote-decision__result {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.flydevquote-decision__result > .material-icons {
  font-size: 2.25rem;
  color: #6b7080;
}

.flydevquote-decision__result--ok > .material-icons {
  color: #1f8a5b;
}

.flydevquote-decision__result p {
  margin-bottom: .75rem;
}

@media (max-width: 575px) {
  .flydevquote-decision__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
