/* Couleurs : à caler sur votre site */
.emc {
  --emc-bleu: #00446b;
  --emc-bleu-fonce: #002f4b;
  --emc-fond: #f3f6f8;
  --emc-texte: #1b2733;
  --emc-gris: #55626e;
  --emc-ligne: #dde3e8;
  container-type: inline-size;
  font-family: inherit;
  color: var(--emc-texte);
  font-size: 15px;
  line-height: 1.5;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: left;
}
.emc *, .emc *::before, .emc *::after { box-sizing: border-box; }
.emc [hidden] { display: none !important; }
.emc p { margin: 0; }
.emc small { font-size: 13px; font-weight: 400; color: var(--emc-gris); }
.emc abbr { color: #b3261e; text-decoration: none; border: 0; }

/* Titres */
.emc .emc-titre { margin: 0 0 4px; font-size: 20px; line-height: 1.3; color: var(--emc-bleu); }
.emc .emc-h { margin: 0; font-size: 17px; line-height: 1.3; display: flex; align-items: center; gap: 10px; color: var(--emc-bleu); }
.emc-num { width: 24px; height: 24px; border-radius: 50%; background: var(--emc-bleu); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Sections : simples séparateurs, pas de cadres */
.emc-sec { display: flex; flex-direction: column; gap: 14px; padding: 22px 0; border-top: 1px solid var(--emc-ligne); }
.emc-titre + .emc-sec { border-top: 0; padding-top: 12px; }
.emc-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.emc-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.emc-lab { font-weight: 600; font-size: 14px; }
.emc-lab small { margin-left: 4px; }
.emc-note { font-size: 14px; color: var(--emc-gris); }
.emc-note--accent { color: var(--emc-bleu); font-weight: 500; }
.emc-right { text-align: right; }

/* Champs */
.emc input[type=text], .emc input[type=number], .emc select, .emc textarea {
  font: inherit; font-size: 15px; color: var(--emc-texte); background: #fff;
  border: 1px solid #b8c2cb; border-radius: 6px; padding: 9px 12px; width: 100%;
  height: auto; min-height: 44px; margin: 0; box-shadow: none; max-width: none; line-height: 1.4;
}
.emc textarea { min-height: 84px; resize: vertical; }
.emc input:focus-visible, .emc select:focus-visible, .emc textarea:focus-visible, .emc button:focus-visible {
  outline: 2px solid var(--emc-bleu); outline-offset: 2px;
}
.emc input[type=checkbox], .emc input[type=radio] {
  width: 18px; height: 18px; min-height: 0; margin: 0; flex-shrink: 0; accent-color: var(--emc-bleu);
}

/* Cases à cocher / boutons radio : case alignée sur la 1re ligne de texte */
.emc-check { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: start; margin: 0; cursor: pointer; font-weight: 400; }
.emc-check > input { margin-top: 3px; }
.emc-check > span { display: flex; flex-direction: column; gap: 2px; }
.emc-radios { display: flex; flex-direction: column; gap: 10px; }
.emc-radios .emc-check > span { display: block; }

/* Autocomplétion */
.emc-ac { position: relative; }
.emc-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px; background: #fff; border: 1px solid var(--emc-ligne); border-radius: 6px; box-shadow: 0 8px 20px rgba(27, 39, 51, .12); max-height: 280px; overflow-y: auto; }
.emc-sugg li { margin: 0; padding: 9px 12px; border-radius: 4px; cursor: pointer; }
.emc-sugg li:hover, .emc-sugg li.is-active { background: var(--emc-fond); }

/* Période */
.emc-periode { font-size: 15px; }

/* Paramètres : tableau aligné (libellé à gauche, seuil à droite) */
.emc-params { border: 1px solid var(--emc-ligne); border-radius: 6px; }
.emc-param { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 12px; min-height: 52px; }
.emc-param + .emc-param { border-top: 1px solid var(--emc-ligne); }
.emc-param .emc-check { align-items: center; }
.emc-param .emc-check > input { margin-top: 0; }
.emc-seuil { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.emc .emc-seuil input[type=number] { width: 76px; min-height: 36px; padding: 5px 8px; text-align: right; }
.emc .emc-seuil select { width: 176px; min-height: 36px; padding: 5px 8px; }
.emc-op { width: 12px; text-align: center; color: var(--emc-gris); }
.emc-unit { width: 36px; color: var(--emc-gris); font-size: 14px; }
.emc-param.is-off .emc-seuil { opacity: .35; }
.emc-param.is-modif .emc-seuil input, .emc-param.is-modif .emc-seuil select { border-color: var(--emc-bleu); font-weight: 600; }

/* Options */
.emc-options { display: flex; flex-direction: column; gap: 12px; }
.emc-opt strong { font-weight: 600; }
.emc-plus { margin-left: 8px; font-size: 14px; font-weight: 600; color: var(--emc-bleu); white-space: nowrap; }
.emc-opt > span > strong, .emc-opt > span > .emc-plus { display: inline; }
.emc-opt > span { display: block; }
.emc-opt small { display: block; margin-top: 2px; }
.emc-warn { color: #6b4a00; }

/* Total */
.emc-recap { gap: 10px; }
.emc-lines { display: flex; flex-direction: column; gap: 6px; }
.emc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.emc-line div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.emc-line strong { font-weight: 500; white-space: nowrap; }
.emc-line--remise, .emc-line--remise strong { color: var(--emc-bleu); font-weight: 600; }
.emc-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--emc-ligne); font-weight: 600; }
.emc-total strong { font-size: 24px; line-height: 1.2; }
.emc-error { background: #fdecea; color: #8a1c14; border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.emc .emc-btn { display: block; width: 100%; min-height: 50px; margin-top: 6px; border: 0; border-radius: 6px; background: var(--emc-bleu); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; padding: 0 16px; text-align: center; }
.emc .emc-btn:hover { background: var(--emc-bleu-fonce); color: #fff; }
.emc .emc-btn:disabled { opacity: .6; cursor: wait; }

@container (min-width: 520px) {
  .emc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emc-row--3 { grid-template-columns: 1.2fr 0.9fr 1.5fr; }
}
@container (max-width: 460px) {
  .emc-param { flex-wrap: wrap; }
  .emc-seuil { margin-left: 28px; }
}

/* [em_prix_btp] */
.emc-prixbloc { font-size: 17px; margin: 0 0 12px; color: #1b2733; }
.emc-prixbloc s { color: #55626e; margin-right: 4px; }
.emc-prixbloc strong { font-size: 22px; color: #00446b; }
.emc-prixbloc__badge { display: inline-block; background: #00446b; color: #fff; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; }

/* Frise des mois */
.emc-timeline { display: flex; flex-wrap: wrap; gap: 6px; }
.emc-m { width: 52px; height: 42px; border-radius: 6px; background: var(--emc-bleu); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; line-height: 1.2; }
.emc-m b { font-weight: 600; }
.emc-m span { font-size: 11px; opacity: .85; }

/* Page produit : pas de titre « Configuration de votre demande » */
.single-product .emc .emc-titre { display: none; }
.single-product .emc > .emc-sec:first-of-type { border-top: 0; padding-top: 0; }
