/* =========================================================================
   Page formulaire de devis (Formmaker) — habillage charte
   Chargé uniquement sur la page du formulaire via <link> conditionnel
   (themes/hummingbird/templates/_partials/head.tpl).
   Les couleurs proviennent des variables --lbe-* du thème : la page s'adapte
   donc automatiquement à chaque boutique (LBE bleu / SML rouge).
   ========================================================================= */

.form-maker-form {
  --fm-primary: var(--lbe-primary, #1e5a8e);
  --fm-cta: var(--lbe-cta, #d97639);
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 12px 0 56px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.form-maker-form .page-subheading {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--fm-primary);
  text-transform: none;
  margin: 0 0 8px;
}

.form-maker-form .rte {
  color: #5b6675;
  font-size: .98rem;
  margin: 0 0 26px;
}

/* Champs sur 2 colonnes pour exploiter toute la largeur du container */
.form-maker-form .row {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}
.form-maker-form .row > .form-group { grid-column: 1 / -1; }
.form-maker-form .row > .form-group:has(> input[type="text"]) { grid-column: auto; }
.form-maker-form .row > .fm-recap-card { grid-column: 1 / -1; }

@media (max-width: 768px) {
  .form-maker-form .row { grid-template-columns: 1fr; }
  .form-maker-form .row > .form-group { grid-column: 1 / -1; }
}

/* Champs */
.form-maker-form .form-group { margin-bottom: 18px; padding: 0; }
.form-maker-form .form-group > label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: #2b3645;
  margin-bottom: 7px;
}
.form-maker-form .form-group sup,
.form-maker-form .fm-required-note sup { color: var(--fm-cta); font-weight: 700; }

.form-maker-form input[type=text],
.form-maker-form input[type=email],
.form-maker-form input[type=tel],
.form-maker-form input[type=password],
.form-maker-form .form-control,
.form-maker-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 15px;
  font-size: .95rem;
  color: #364153;
  background: #fff;
  border: 1px solid #d4dae1;
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.form-maker-form textarea { min-height: 120px; resize: vertical; }
.form-maker-form input:focus,
.form-maker-form textarea:focus,
.form-maker-form .form-control:focus {
  outline: none;
  border-color: var(--fm-primary);
  box-shadow: 0 0 0 3px rgba(30, 90, 142, .12);
}

/* Radios & cases personnalisées */
.form-maker-form .values-container .radio,
.form-maker-form .values-container .checkbox {
  display: flex;
  align-items: flex-start;
  margin: 9px 0;
}
.form-maker-form .custom-radio,
.form-maker-form .custom-checkbox {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 1px 10px 0 0;
}
.form-maker-form .values-container label { margin: 0; line-height: 1.45; }
.form-maker-form .custom-radio input,
.form-maker-form .custom-checkbox input {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.form-maker-form .custom-radio > span,
.form-maker-form .custom-checkbox > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #c4ccd5;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.form-maker-form .custom-radio > span { border-radius: 50%; }
.form-maker-form .custom-checkbox > span { border-radius: 6px; }
.form-maker-form .custom-radio input:checked + span { border-color: var(--fm-primary); }
.form-maker-form .custom-radio input:checked + span::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fm-primary);
}
.form-maker-form .custom-checkbox input:checked + span {
  border-color: var(--fm-primary);
  background: var(--fm-primary);
}
.form-maker-form .custom-checkbox > span i { display: none !important; }
.form-maker-form .custom-checkbox input:checked + span::after {
  content: '';
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-maker-form .values-container label,
.form-maker-form .radio label,
.form-maker-form .checkbox label {
  font-weight: 500;
  color: #2b3645;
  cursor: pointer;
  vertical-align: middle;
}
/* Libellé d'élément masqué pour les cases newsletter / consentement
   (seul le texte de la case s'affiche) */
.form-maker-form .js-fm-prechecked > label,
.form-maker-form .js-fm-gdpr > label { display: none; }

/* Titre de section "Vos coordonnées :" + note champs obligatoires */
.form-maker-form .fm-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fm-primary);
  margin: 30px 0 6px;
  padding-top: 20px;
  border-top: 1px solid #eef1f4;
}
.form-maker-form .fm-required-note { color: #8a94a2; font-size: .85rem; margin: 4px 0 0; }

/* Bouton fichier */
.form-maker-form .fileinput {
  background: #f1f4f8;
  color: var(--fm-primary);
  border: 1px dashed #b9c4d0;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s;
}
.form-maker-form .fileinput:hover { background: #e7eef6; }
.form-maker-form .upload-data { margin-top: 8px; font-size: .85rem; color: #5b6675; }

/* Bouton d'envoi */
.form-maker-form .form-footer { text-align: left; margin-top: 30px; }
.form-maker-form #fmSubmit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fm-cta);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.form-maker-form #fmSubmit:hover { filter: brightness(1.07); }
.form-maker-form #fmSubmit:active { transform: translateY(1px); }
.form-maker-form #fmSubmit.disabled,
.form-maker-form #fmSubmit[disabled] { opacity: .6; cursor: default; }

/* Messages */
.form-maker-form .alert,
.alert.form-upload-message { border-radius: 10px; padding: 12px 16px; margin: 6px 0; }

/* Carte récapitulatif "Votre sélection" */
.fm-recap-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid #e3e6ea;
  border-left: 4px solid var(--fm-primary, #1e5a8e);
  border-radius: 12px;
  padding: 18px;
  background: #f8fafc;
  margin: 0 0 26px;
}
.fm-recap-card__media { flex: 0 0 104px; }
.fm-recap-card__media img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e3e6ea;
  background: #fff;
  display: block;
}
.fm-recap-card__body { flex: 1 1 auto; min-width: 0; }
.fm-recap-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--fm-cta, #d97639);
  margin: 0 0 4px;
}
.fm-recap-card__title { font-weight: 700; font-size: 1.1rem; line-height: 1.25; margin: 0 0 2px; color: #1f2937; }
.fm-recap-card__ref { color: #6b7280; font-size: .82rem; margin: 0 0 12px; }
.fm-recap-card__list { list-style: none; margin: 0; padding: 0; }
.fm-recap-card__list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid #eaeef2;
  font-size: .9rem;
}
.fm-recap-card__list li:first-child { border-top: 0; }
.fm-recap-card__k { color: #6b7280; }
.fm-recap-card__v { font-weight: 600; text-align: right; color: #2b3645; }

@media (max-width: 600px) {
  .form-maker-form { padding: 24px 18px; margin: 16px auto 36px; border-radius: 12px; }
  .fm-recap-card { flex-direction: column; }
  .fm-recap-card__media { flex-basis: auto; }
  .fm-recap-card__list li { flex-direction: column; gap: 2px; }
  .fm-recap-card__v { text-align: left; }
}
