/* EVA² – Configurateur de devis broderie
   Couleur d'accent : modifiez --eva-accent et --eva-accent-rgb ci-dessous.
   Taille de police : modifiez font-size sur .eva2-cfg (tout le reste suit, en "em"). */
.eva2-cfg {
  --eva-accent: #d81b60;
  --eva-accent-rgb: 216, 27, 96;
  --eva-text: #2b2b33;
  --eva-muted: #5f6370;
  --eva-line: #e4e6ec;
  --eva-bg: #f6f7fa;
  --eva-radius: 14px;
  container-type: inline-size;
  color: var(--eva-text);
  font-size: 16px;
  line-height: 1.5;
  max-width: 1100px;
  margin: 0 auto;
}
.eva2-cfg *, .eva2-cfg *::before, .eva2-cfg *::after { box-sizing: border-box; }
.eva2-cfg [hidden] { display: none !important; }
.eva2-cfg button { font: inherit; cursor: pointer; }
.eva2-cfg small { color: var(--eva-muted); font-weight: 400; font-size: .85em; }

/* Focus bien visible (navigation au clavier : TAB / Maj+TAB, flèches dans les listes) */
.eva2-cfg :focus-visible {
  outline: 3px solid var(--eva-accent);
  outline-offset: 2px;
}
.eva2-cfg input:focus-visible, .eva2-cfg textarea:focus-visible { outline-offset: 0; }

.eva2-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.eva2-sec {
  background: #fff;
  border: 1px solid var(--eva-line);
  border-radius: var(--eva-radius);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04);
}
.eva2-h {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; font-size: 1.3em; line-height: 1.2;
}
.eva2-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--eva-accent); color: #fff; font-size: .95em; font-weight: 700; flex: none;
}

/* champs */
.eva2-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.eva2-f { display: block; position: relative; }
.eva2-f > span { display: block; font-size: 1em; font-weight: 600; margin-bottom: 6px; }
.eva2-f i { color: var(--eva-accent); font-style: normal; }
.eva2-cfg input[type=text], .eva2-cfg input[type=email], .eva2-cfg input[type=tel],
.eva2-cfg input[type=number], .eva2-cfg textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px !important;
  border: 1.5px solid #b9bdc7;
  border-radius: 12px;
  background: #fff;
  color: var(--eva-text);
  font-family: inherit !important;
  font-size: 1em !important;
  line-height: 1.35 !important;
  box-shadow: none;
}
.eva2-cfg textarea { resize: vertical; }
.eva2-cfg input::placeholder, .eva2-cfg textarea::placeholder { color: #8a8e99; opacity: 1; }
.eva2-cfg input:focus, .eva2-cfg textarea:focus { border-color: var(--eva-accent); }
.eva2-f.has-err input { border-color: #c62828; }
.eva2-err { display: block; color: #c62828; font-size: .9em; font-style: normal; margin-top: 4px; }
.eva2-f--wide { margin-bottom: 16px; }

.eva2-check { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 18px; font-size: 1em; cursor: pointer; }
.eva2-check input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--eva-accent); flex: none; }
.eva2-check--pro {
  align-items: center; margin: 22px 0 0; padding: 14px 16px;
  border: 1.5px solid #b9bdc7; border-radius: 12px; background: var(--eva-bg);
}
.eva2-check--pro:has(input:checked) { border-color: var(--eva-accent); background: rgba(var(--eva-accent-rgb), .06); }
.eva2-pro {
  margin-top: 14px; padding: 18px; border-left: 4px solid var(--eva-accent);
  background: var(--eva-bg); border-radius: 0 12px 12px 0;
}
.eva2-pro > .eva2-check { margin-top: 0; }
.eva2-pro > .eva2-grid { margin-top: 4px; }

/* boutons */
.eva2-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 22px; border: 0; border-radius: 999px;
  background: var(--eva-text); color: #fff; font-size: 1em; font-weight: 700; transition: transform .1s, opacity .2s;
}
.eva2-btn:hover { opacity: .9; }
.eva2-btn:active { transform: scale(.98); }
.eva2-btn:disabled { opacity: .6; cursor: wait; }
.eva2-btn--primary { background: var(--eva-accent); width: 100%; font-size: 1.1em; padding: 16px 24px; }
.eva2-link { background: none; border: 0; color: var(--eva-muted); text-decoration: underline; padding: 8px; font-size: 1em; }
.eva2-addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eva2-addrow .eva2-btn { flex: 1 1 auto; background: var(--eva-accent); }

.eva2-msg { margin: 10px 0 0; font-size: 1em; min-height: 1.2em; }
.eva2-msg.err { color: #c62828; }
.eva2-msg.ok { color: #1b6e3a; }
.eva2-small { font-size: .9em; color: var(--eva-muted); margin: 8px 0 0; }
.eva2-note {
  margin: 12px 0 0; padding: 10px 12px; font-size: .88em; line-height: 1.45; color: var(--eva-muted);
  background: var(--eva-bg); border-left: 3px solid #b9bdc7; border-radius: 0 8px 8px 0;
}
.eva2-alert { padding: 12px; background: #fff4e5; border-radius: 8px; }

/* zone configurateur */
.eva2-stage { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.eva2-preview {
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--eva-bg) 75%);
  border: 1px solid var(--eva-line); border-radius: var(--eva-radius); padding: 14px;
}
.eva2-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.eva2-seg { display: inline-flex; background: #fff; border: 1px solid var(--eva-line); border-radius: 999px; padding: 3px; }
.eva2-seg button {
  border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; font-size: 1em; font-weight: 600; color: var(--eva-muted);
}
.eva2-seg button[aria-pressed=true] { background: var(--eva-text); color: #fff; }
.eva2-canvas { max-width: 420px; margin: 0 auto; }
.eva2-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 12px rgba(20, 20, 40, .16)); overflow: visible; }
.eva2-hint { text-align: center; font-size: .9em; color: var(--eva-muted); margin: 6px 0 0; }

.eva2-svg .gm { stroke: rgba(0, 0, 0, .5); stroke-width: 2.4; stroke-linejoin: round; }
.eva2-svg .gg { pointer-events: none; }
.eva2-svg .d { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eva2-svg .d.rib { stroke-width: 5; }
.eva2-svg .ds { fill: var(--shade); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.eva2-svg .dk { fill: rgba(0, 0, 0, .22); stroke: none; }
.eva2-svg .btn { fill: var(--ink); stroke: none; }
.eva2-svg .z { cursor: pointer; outline: none; }
.eva2-svg .zb { fill: none; stroke: #fff; stroke-width: 3.6; opacity: .9; }
.eva2-svg .zr { fill: rgba(var(--eva-accent-rgb), .07); stroke: var(--eva-accent); stroke-width: 1.6; stroke-dasharray: 4 3; transition: fill .15s; }
.eva2-svg .z:hover .zr, .eva2-svg .z:focus .zr { fill: rgba(var(--eva-accent-rgb), .22); stroke-width: 2.4; }
.eva2-svg .z.on .zr { stroke-dasharray: none; fill: rgba(var(--eva-accent-rgb), .12); }
.eva2-svg .zp { fill: var(--eva-accent); font: 700 14px sans-serif; pointer-events: none; }
.eva2-svg .zt { fill: var(--eva-accent); font: 700 8px sans-serif; letter-spacing: .5px; pointer-events: none; }

.eva2-ctrl { min-width: 0; }
.eva2-blk { margin-bottom: 22px; }
.eva2-blk h4 { margin: 0 0 10px; font-size: 1em; text-transform: uppercase; letter-spacing: .04em; }
.eva2-cname { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--eva-muted); }

.eva2-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.eva2-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; border: 2px solid var(--eva-line); border-radius: 12px; padding: 8px 4px; font-size: .92em; font-weight: 600; color: var(--eva-text);
}
.eva2-item__ic { width: 50px; height: 56px; display: block; }
.eva2-item__ic svg { width: 100%; height: 100%; display: block; filter: none; }
.eva2-item[aria-pressed=true] { border-color: var(--eva-accent); background: rgba(var(--eva-accent-rgb), .06); }

.eva2-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.eva2-sw {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #b9bdc7;
  padding: 0; position: relative;
}
.eva2-sw[aria-pressed=true] { box-shadow: 0 0 0 3px var(--eva-accent); }

.eva2-zgrp { margin-bottom: 10px; }
.eva2-zgrp__t { display: block; font-size: .8em; font-weight: 700; color: var(--eva-muted); text-transform: uppercase; margin-bottom: 4px; }
.eva2-zchk {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 6px 8px 0; padding: 9px 14px;
  border: 1.5px solid #b9bdc7; border-radius: 999px; font-size: .95em; cursor: pointer; background: #fff;
}
.eva2-zchk input { accent-color: var(--eva-accent); margin: 0; width: 18px; height: 18px; }
.eva2-zchk.on { border-color: var(--eva-accent); background: rgba(var(--eva-accent-rgb), .08); font-weight: 600; }

.eva2-drop {
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; position: relative;
  border: 2px dashed #9da2ae; border-radius: 12px; padding: 18px; background: var(--eva-bg);
}
.eva2-drop:hover { border-color: var(--eva-accent); }
.eva2-drop:focus-within { border-color: var(--eva-accent); outline: 3px solid var(--eva-accent); outline-offset: 2px; }
.eva2-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.eva2-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--eva-line); border-radius: 12px; padding: 8px 10px; background: var(--eva-bg); }
.eva2-chip img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--eva-line); }
.eva2-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95em; }
.eva2-chip button { border: 0; background: none; color: #c62828; text-decoration: underline; font-size: 1em; }

.eva2-qty input { max-width: 150px; }
.eva2-cfg select {
  width: 100%; min-height: 46px; padding: 9px 12px !important; border: 1.5px solid #b9bdc7; border-radius: 12px;
  background: #fff; color: var(--eva-text); font-family: inherit !important; font-size: 1em !important; line-height: 1.35 !important;
}
.eva2-cfg select:focus { border-color: var(--eva-accent); }
.eva2-textzone { margin-top: 12px; }
.eva2-opts { margin-bottom: 10px; }
.eva2-mode { display: flex; justify-content: center; margin-top: 10px; }
.eva2-zonesbox { border: 1px solid var(--eva-line); border-radius: 12px; padding: 0; background: #fff; }
.eva2-zonesbox > summary {
  cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: .95em; color: var(--eva-text);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.eva2-zonesbox > summary::-webkit-details-marker { display: none; }
.eva2-zonesbox > summary::before { content: '▸'; color: var(--eva-accent); transition: transform .15s; }
.eva2-zonesbox[open] > summary::before { transform: rotate(90deg); }
.eva2-zonesbox > div { padding: 4px 14px 10px; }
.eva2-zcount { color: var(--eva-accent); font-weight: 600; }
.eva2-sizes { margin-top: 12px; }
.eva2-sizes summary { cursor: pointer; font-size: 1em; color: var(--eva-accent); font-weight: 600; }
.eva2-sizes__g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.eva2-sizes__g label { display: block; text-align: center; font-size: .9em; font-weight: 600; }
.eva2-cfg .eva2-sizes__g input { padding: 10px 4px !important; text-align: center; min-height: 48px; }

/* panier */
.eva2-cart { margin-top: 26px; border-top: 1px dashed var(--eva-line); padding-top: 18px; }
.eva2-cart h4 { margin: 0 0 12px; font-size: 1.1em; }
.eva2-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eva2-line {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center;
  border: 1px solid var(--eva-line); border-radius: 12px; padding: 10px; background: #fff;
}
.eva2-line.is-edit { border-color: var(--eva-accent); box-shadow: 0 0 0 2px rgba(var(--eva-accent-rgb), .15); }
.eva2-line__th { width: 76px; height: 86px; background: var(--eva-bg); border-radius: 8px; padding: 4px; }
.eva2-line__th svg { width: 100%; height: 100%; filter: none; }
.eva2-line__tx { font-size: .95em; min-width: 0; }
.eva2-line__ac { grid-column: 1 / -1; display: flex; gap: 16px; justify-content: flex-end; }
.eva2-line__ac button { border: 0; background: none; color: var(--eva-muted); text-decoration: underline; padding: 4px; font-size: .95em; }
.eva2-line__ac button[data-act=del] { color: #c62828; }
.eva2-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #999; vertical-align: -1px; }

/* confirmation */
.eva2-done { text-align: center; background: #fff; border: 1px solid var(--eva-line); border-radius: var(--eva-radius); padding: 40px 22px; }
.eva2-done__ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #1b6e3a; color: #fff; font-size: 34px; line-height: 64px; }
.eva2-done h3 { margin: 0 0 10px; }

/* grands écrans (selon la largeur du conteneur) */
@container (min-width: 560px) {
  .eva2-grid { grid-template-columns: 1fr 1fr; }
  .eva2-line { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .eva2-line__ac { grid-column: auto; flex-direction: column; gap: 4px; align-items: flex-end; }
}
@container (min-width: 820px) {
  .eva2-stage { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .eva2-preview { position: sticky; top: 24px; }
}
@media (max-width: 480px) {
  .eva2-sec { padding: 16px; }
}
