/*
 * LuminoMind — composants du design system (design-redesign.md §3).
 * Chargé après style.css. Toute couleur vient des jetons :root.
 * Aucun sélecteur d'élément nu : tout est porté par .lm- pour ne pas fuir
 * vers les pages hors périmètre (la-science, CGU/CGV/RGPD, contact).
 */

/* =========================================================
   3.1 Bouton .lm-btn (base + 3 variantes de couleur)
   ========================================================= */
.lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--lm-radius);
  font-family: var(--lm-font-sans);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 120ms ease-out,
    background-color 120ms ease-out,
    border-color 120ms ease-out,
    color 120ms ease-out;
}

.lm-btn:hover {
  text-decoration: none;
}

.lm-btn:active {
  transform: scale(.98);
}

.lm-btn:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}

.lm-btn--dark {
  color: var(--lm-on-dark);
  background: var(--lm-ink);
}

.lm-btn--dark:hover {
  background: var(--lm-ink-hover);
}

.lm-btn--accent {
  color: var(--lm-on-dark);
  background: var(--lm-accent);
}

.lm-btn--accent:hover {
  background: var(--lm-accent-hover);
}

.lm-btn--ghost {
  color: var(--lm-ink);
  background: transparent;
  border-color: var(--lm-line);
}

.lm-btn--ghost:hover {
  border-color: var(--lm-ink);
  background: rgba(0, 0, 0, .03);
}

/* Sur bande encre / pied de page : ghost inversé, focus blanc. */
.lm-section.is-dark .lm-btn--ghost,
.lm-section--dark .lm-btn--ghost,
.lm-footer .lm-btn--ghost {
  color: var(--lm-on-dark);
  border-color: rgba(255, 255, 255, .24);
}

.lm-section.is-dark .lm-btn--ghost:hover,
.lm-section--dark .lm-btn--ghost:hover,
.lm-footer .lm-btn--ghost:hover {
  background: rgba(255, 255, 255, .1);
}

.lm-section.is-dark .lm-btn:focus-visible,
.lm-section--dark .lm-btn:focus-visible,
.lm-footer .lm-btn:focus-visible {
  outline-color: var(--lm-on-dark);
}

.lm-btn:disabled,
.lm-btn[disabled],
.lm-btn[aria-disabled="true"] {
  color: var(--lm-on-dark-3);
  background: var(--lm-line);
  border-color: var(--lm-line);
  cursor: not-allowed;
  pointer-events: none;
}

.lm-btn:disabled:active,
.lm-btn[aria-disabled="true"]:active {
  transform: none;
}

/* =========================================================
   3.2 Lien .lm-link
   ========================================================= */
.lm-link {
  color: var(--lm-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease-out;
}

.lm-link:hover {
  color: var(--lm-accent-hover);
}

.lm-link:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}

.lm-section.is-dark .lm-link,
.lm-section--dark .lm-link,
.lm-footer .lm-link {
  color: var(--lm-accent-soft);
}

.lm-section.is-dark .lm-link:hover,
.lm-section--dark .lm-link:hover,
.lm-footer .lm-link:hover {
  color: var(--lm-on-dark);
}

/* Lien isolé : cible ≥ 44px (WCAG 2.2). */
.lm-link--block {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* =========================================================
   3.3 Champ texte .lm-field
   ========================================================= */
.lm-field {
  display: grid;
  gap: var(--lm-space-2);
}

.lm-field > label,
.lm-field > .lm-label {
  color: var(--lm-ink);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.lm-field input[type="text"],
.lm-field input[type="email"],
.lm-field input[type="tel"],
.lm-field input[type="number"] {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  color: var(--lm-ink);
  background: var(--lm-surface);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  font-family: var(--lm-font-sans);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.4;
  transition: border-color 120ms ease-out;
}

.lm-field input::placeholder {
  color: var(--lm-muted);
}

.lm-field input:focus-visible {
  border-color: var(--lm-accent);
  outline: 2px solid var(--lm-accent);
  outline-offset: 1px;
}

.lm-field.is-error input,
.lm-field input[aria-invalid="true"] {
  border-color: var(--lm-error);
}

.lm-field .lm-field__error {
  color: var(--lm-error);
  font-size: .9375rem;
}

/* =========================================================
   3.4 Select .lm-select (chevron natif conservé)
   ========================================================= */
.lm-select {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  color: var(--lm-ink);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  font-family: var(--lm-font-sans);
  font-size: 1.0625rem;
  font-weight: 300;
  transition: border-color 120ms ease-out;
}

.lm-select:focus-visible {
  border-color: var(--lm-accent);
  outline: 2px solid var(--lm-accent);
  outline-offset: 1px;
}

/* =========================================================
   3.5 Stepper quantité .lm-stepper
   ========================================================= */
.lm-stepper {
  display: inline-flex;
  align-items: stretch;
  background: var(--lm-surface);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
}

.lm-stepper > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  min-height: 48px;
  padding: 0;
  color: var(--lm-ink);
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}

.lm-stepper > button:hover {
  background: rgba(0, 0, 0, .04);
}

.lm-stepper > button:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: -2px;
}

.lm-stepper > input[type="number"] {
  width: 64px;
  min-height: 48px;
  padding: 0 4px;
  color: var(--lm-ink);
  background: transparent;
  border: 0;
  border-inline: 1px solid var(--lm-line);
  font-family: var(--lm-font-sans);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}

.lm-stepper > input[type="number"]::-webkit-outer-spin-button,
.lm-stepper > input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.lm-stepper > input:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: -2px;
}

/* =========================================================
   3.6 Section .lm-section + bandes
   ========================================================= */
.lm-section {
  padding-block: clamp(40px, 4.5vw, 64px);
}

.lm-section.is-paper,
.lm-section--paper {
  background: var(--lm-bg);
}

.lm-section.is-white,
.lm-section--white {
  background: var(--lm-surface);
}

.lm-section.is-tint,
.lm-section--tint {
  background: var(--lm-tint);
}

.lm-section.is-dark,
.lm-section--dark {
  color: var(--lm-on-dark);
  background: var(--lm-dark);
}

/* =========================================================
   3.7 Récapitulatif de commande .lm-order-summary (<dl>)
   ========================================================= */
.lm-order-summary {
  padding: var(--lm-space-6);
  background: var(--lm-surface);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius-card);
}

.lm-order-summary dl {
  margin: 0;
}

.lm-order-summary dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lm-space-6);
  padding: var(--lm-space-3) 0;
  border-top: 1px solid var(--lm-line);
}

.lm-order-summary dl > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.lm-order-summary dt {
  color: var(--lm-muted);
  font-size: .9375rem;
  font-weight: 500;
}

.lm-order-summary dd {
  margin: 0;
  color: var(--lm-ink);
  font-size: 1.0625rem;
  font-weight: 300;
  text-align: right;
}

.lm-order-summary__total {
  border-top: 1px solid var(--lm-ink);
}

.lm-order-summary__total dt {
  color: var(--lm-ink);
  font-weight: 500;
}

.lm-order-summary__total dd {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Contrainte plugin : le prix barré reste dans le DOM, masqué en CSS. */
#lm-order-compare-line {
  display: none;
}

/* =========================================================
   3.8 Item FAQ .lm-faq-item (details / summary natifs)
   ========================================================= */
.lm-faq-item {
  border-top: 1px solid var(--lm-line);
}

.lm-faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-6);
  min-height: 44px;
  padding: var(--lm-space-6) 0;
  color: var(--lm-ink);
  font-family: var(--lm-font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.lm-faq-item > summary::-webkit-details-marker {
  display: none;
}

.lm-faq-item > summary::marker {
  content: "";
}

.lm-faq-item > summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 200ms cubic-bezier(.16, 1, .3, 1);
}

.lm-faq-item[open] > summary::after {
  transform: rotate(45deg);
}

.lm-faq-item > summary:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}

.lm-faq-item > :not(summary) {
  max-width: 68ch;
  margin: 0;
  padding-bottom: var(--lm-space-6);
  color: var(--lm-muted);
  font-size: 1.0625rem;
  font-weight: 300;
}

/* =========================================================
   3.9 Bandeau de réassurance .lm-reassurance
   ========================================================= */
.lm-reassurance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  background: var(--lm-bg);
}

.lm-reassurance.is-tint,
.lm-reassurance--tint {
  background: var(--lm-tint);
}

/* Faits en rangée dense : chaque fait épouse son texte (pas de cellules vides
   étirées), les filets verticaux marquent les séparations ; la rangée reste
   centrée dans le conteneur 1100 px. */
.lm-reassurance > * {
  flex: 0 1 auto;
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-4);
  color: var(--lm-muted);
  border-inline-start: 1px solid var(--lm-line);
  font-size: .9375rem;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
}

.lm-reassurance > *:first-child {
  border-inline-start: 0;
}

@media (max-width: 768px) {
  .lm-reassurance > * {
    flex-basis: 100%;
    border-inline-start: 0;
    border-top: 1px solid var(--lm-line);
  }

  .lm-reassurance > *:first-child {
    border-top: 0;
  }
}

/* =========================================================
   3.10 Bloc commande .lm-order-block (partagé, §6a)
   Deux colonnes égales (intro | carte formulaire), repli < 900 px.
   La typographie vient de l'échelle globale : aucune famille/taille ici.
   ========================================================= */
.lm-order-block {
  padding-block: clamp(40px, 4.5vw, 64px);
}

.lm-order-block__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--lm-space-6);
  margin: 0;
}

.lm-order-block__grid > .wp-block-column {
  min-width: 0;
  margin: 0;
}

/* Colonne intro : titre, chapô, photo, prix, livraison, mention. */
.lm-order-block__intro > * {
  margin-block: 0;
}

.lm-order-block__intro > * + * {
  margin-top: var(--lm-space-4);
}

.lm-order-block__intro figure,
.lm-order-block__intro .wp-block-image {
  margin: 0;
}

.lm-order-block__intro img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--lm-radius-card);
  /* Les visuels produit ont un fond blanc : sur la bande papier, le multiply
     les fond dans le fond au lieu de dessiner une carte blanche. */
  mix-blend-mode: multiply;
}

/* Le prix reste un prix unitaire, aligné en chiffres tabulaires. */
.lm-order-block__price {
  font-variant-numeric: tabular-nums;
}

/* Colonne formulaire : la carte du design system. */
.lm-order-block__form {
  padding: var(--lm-space-6);
  background: var(--lm-surface);
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius-card);
  box-shadow: var(--lm-shadow);
}

.lm-order-block__form > * {
  margin-block: 0;
}

.lm-order-block__form > * + * {
  margin-top: var(--lm-space-6);
}

@media (max-width: 900px) {
  .lm-order-block__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   Niveaux typographiques §1.3 sans règle globale jusque-là.
   Seule source autorisée pour ces deux niveaux : ne pas les
   redéfinir dans les feuilles de page.
   ========================================================= */

/* Chapô : phrase d'introduction sous un titre. */
.lm-lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
}

/* Prix : montant mis en avant, chiffres alignés. */
.lm-price {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
