/* Fiche chèque cadeau (module lcm_chequecadeau) — tout est sous .lcm-cc ; couleurs = jetons du thème lcm_theme. */

.lcm-cc {
  --lcm-cc-trait: #9a9085;                          /* bord des champs et pastilles (maquette validée 15/11) */
  --lcm-cc-accent: var(--lcm-sepia, #46301c);       /* seul accent du chèque : la bande */
  --lcm-cc-erreur: #a12a37;
  --lcm-cc-aide: #5e5952;
  color: var(--lcm-charbon, #2c2c2c);
}

.lcm-cc [hidden] { display: none !important; }

.lcm-cc-regles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 26px;
  padding-left: 22px;
  list-style: disc;
}

.lcm-cc :focus-visible {
  outline: 2px solid var(--lcm-sepia, #46301c);
  outline-offset: 2px;
}

/* --- Formulaire --- */
.lcm-cc-form,
.lcm-cc-blocs {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.lcm-cc-blocs { gap: 20px; }

.lcm-cc-form { margin-bottom: 1.5rem; }

.lcm-cc .lcm-cc-bloc {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--lcm-beige, #e8e0d4);
  border-radius: var(--lcm-radius-lg, 12px);
  background: var(--lcm-blanc-pur, #fff);
  transition: border-color var(--lcm-transition-fast, .15s ease);
}

.lcm-cc .lcm-cc-bloc.is-actif {
  border-color: var(--lcm-or-champagne, #b89968);
  box-shadow: var(--lcm-shadow-card);
}

.lcm-cc .lcm-cc-bloc.has-erreur { border-color: var(--lcm-cc-erreur); }

/* Un seul chèque : pas de carton, le formulaire se lit comme celui d'une fiche ordinaire ; le carton revient dès 2 blocs. */
.lcm-cc .lcm-cc-bloc:only-child {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* Un seul chèque : pas de numéro, le titre « Chèque 1 » n'apporte rien et égare. Il revient dès le 2e bloc. */
.lcm-cc .lcm-cc-bloc:only-child .lcm-cc-bloc__tete { display: none; }

.lcm-cc-bloc__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.lcm-cc .lcm-cc-bloc__titre {
  margin: 0;
  font-family: var(--lcm-font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-lien {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--lcm-noir, #1a1a1a);
  font-size: 17px;
  text-decoration: underline;
  cursor: pointer;
}

.lcm-cc-groupe {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lcm-cc .lcm-cc-libelle {
  float: none;
  display: block;
  width: auto;
  margin: 0 0 9px;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-facultatif {
  font-weight: 400;
  color: var(--lcm-cc-aide);
}

/* Montants : radios natives (clavier : flèches), habillées en pastilles. */
.lcm-cc-montants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.lcm-cc-pastille {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid var(--lcm-cc-trait);
  border-radius: var(--lcm-radius, 8px);
  background: var(--lcm-blanc-pur, #fff);
  font-size: 17px;
  font-weight: 400;
  color: var(--lcm-noir, #1a1a1a);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--lcm-transition-fast, .15s ease), color var(--lcm-transition-fast, .15s ease);
}

.lcm-cc-pastille input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Survol plus léger que l'état choisi (2px noir) ; pas au toucher, où il resterait collé après le tap. */
@media (hover: hover) {
  .lcm-cc-pastille:hover,
  .lcm-cc-radio:hover { border-color: var(--lcm-cc-aide); background: var(--lcm-ecru, #f5f0e8); }
}

.lcm-cc-pastille:has(input:checked) {
  border: 2px solid var(--lcm-noir, #1a1a1a);
  color: var(--lcm-noir, #1a1a1a);
  font-weight: 600;
}

.lcm-cc-pastille:has(input:focus-visible) {
  outline: 2px solid var(--lcm-sepia, #46301c);
  outline-offset: 2px;
}

/* Champs texte */
.lcm-cc-champ {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lcm-cc-champ .lcm-cc-libelle { margin: 0; }

.lcm-cc .lcm-cc-saisie {
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--lcm-cc-trait);
  border-radius: var(--lcm-radius, 8px);
  font-size: 18px;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc .lcm-cc-saisie:hover { border-color: var(--lcm-cc-aide); }

.lcm-cc .lcm-cc-saisie[aria-invalid="true"] {
  padding: 0 13px;
  border: 2px solid var(--lcm-cc-erreur);
}

.lcm-cc textarea.lcm-cc-saisie {
  height: auto;
  min-height: 78px;
  padding-block: 12px;
  resize: vertical;
}

.lcm-cc-aide {
  font-size: 16px;
  color: var(--lcm-cc-aide);
}

/* Envoi : deux cartes radio, « Je le remets moi-même » cochée par défaut */
.lcm-cc-envois {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lcm-cc-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--lcm-cc-trait);
  border-radius: var(--lcm-radius, 8px);
  background: var(--lcm-blanc-pur, #fff);
  cursor: pointer;
}

.lcm-cc-radio:has(input:checked) {
  padding: 13px 15px;
  border: 2px solid var(--lcm-noir, #1a1a1a);
}

.lcm-cc-radio input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  accent-color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-radio__texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lcm-cc-radio__texte strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-radio__texte span {
  font-size: 16px;
  color: var(--lcm-cc-aide);
}

.lcm-cc-groupe .lcm-cc-erreur { margin-top: 9px; }

.lcm-cc-erreur {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--lcm-cc-erreur);
}

.lcm-cc-resume {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--lcm-cc-erreur);
  border-radius: var(--lcm-radius, 8px);
  background: var(--lcm-blanc-pur, #fff);
  font-weight: 600;
  color: var(--lcm-cc-erreur);
}

/* Bouton inversé : habillage .btn-outline-primary du thème ; bordure 2px et hauteur du CTA (texte long : peut passer sur 2 lignes). */
.lcm-cc .lcm-cc-ajouter {
  justify-content: center;
  width: 100%;
  min-height: var(--lcm-cta-h, 52px);
  border-width: 2px;
  background: var(--lcm-ecru, #f5f0e8);
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}

.lcm-cc-pied {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--lcm-beige, #e8e0d4);
}

.lcm-cc-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font-size: 18px;
}

.lcm-cc-total strong {
  font-family: var(--lcm-font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--lcm-noir, #1a1a1a);
}

/* Habillage = .btn-primary du thème (noir, capitales) ; seules la largeur et la hauteur sont propres à la fiche. */
.lcm-cc-cta {
  width: 100%;
  height: var(--lcm-cta-h, 52px);
}

/* --- Aperçu du chèque (colonne gauche, à la place des images) ; reste visible pendant la saisie sur grand écran --- */
.lcm-cc-apercu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;                               /* empilé sur mobile : la légende ne colle pas au titre */
}

@media (min-width: 768px) {
  .lcm-cc-apercu {
    position: sticky;
    top: calc(var(--lcm-header-height, 136px) + 16px); /* sous l'en-tête collant du thème */
    margin-bottom: 0;
  }
}

.lcm-cc-apercu__ecrin {
  padding: 26px;
  border-radius: var(--lcm-radius-lg, 12px);
  background: var(--lcm-ecru, #f5f0e8);
}

.lcm-cc-apercu__legende {
  margin: 0;
  font-size: 15px;
  color: var(--lcm-cc-aide);
}

.lcm-cc-cheque {
  border-left: 16px solid var(--lcm-cc-accent);
  background: var(--lcm-blanc-pur, #fff);
  box-shadow: 0 10px 28px rgba(70, 48, 28, .14);
}

.lcm-cc-cheque p { margin: 0; }

.lcm-cc-cheque__haut {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px 16px;
}

.lcm-cc-cheque__titre {
  font-family: var(--lcm-font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-cheque__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  font-size: 14px;
  color: var(--lcm-cc-aide);
}

.lcm-cc-cheque__montant {
  font-family: var(--lcm-font-display);
  font-size: 31px;
  font-weight: 500;
  color: var(--lcm-noir, #1a1a1a);
}

.lcm-cc-cheque__signature {
  min-width: 0;
  border-bottom: 1px dotted var(--lcm-cc-trait);
  font-size: 18px;
  font-weight: 600;
  color: var(--lcm-noir, #1a1a1a);
  overflow-wrap: anywhere;
}

.lcm-cc-cheque .lcm-cc-cheque__mot {
  color: var(--lcm-charbon, #2c2c2c);
  overflow-wrap: anywhere;
}

.lcm-cc-cheque__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 11px 22px;
  border-top: 1px solid var(--lcm-beige, #e8e0d4);
  font-size: 14px;
  color: var(--lcm-cc-aide);
}

.lcm-cc-cheque__boutique {
  font-size: 17px;
  color: var(--lcm-noir, #1a1a1a);
}

@media (prefers-reduced-motion: reduce) {
  .lcm-cc .lcm-cc-bloc,
  .lcm-cc-pastille { transition: none; }
}
