/* =====================================================================
   NAWCAR — WIDGET D'ESTIMATION · styles (classes préfixées nwe-)
   Fond #0D0E10 · rouge #E11D18 · vert #25D366 · texte #FFFFFF · bordures #24272C
   Aucun style global : tout est scopé sous .nwe
   ===================================================================== */

@keyframes nwe-spin { to { transform: rotate(360deg) } }
@keyframes nwe-scan { 0% { top: 0 } 100% { top: 100% } }
@keyframes nwe-in   { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.nwe {
  max-width: 520px; margin: 0 auto; padding: 20px 20px 24px;
  background: #0D0E10; color: #FFFFFF; border: 1px solid #24272C; border-radius: 10px;
  font-family: 'Rubik', sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.nwe *, .nwe *::before, .nwe *::after { box-sizing: border-box; }
.nwe [hidden] { display: none !important; }
.nwe button { font-family: inherit; }

/* ---------- En-tête ---------- */
.nwe-top { display: flex; align-items: center; gap: 14px; min-height: 36px; margin-bottom: 20px; }
.nwe-back {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px;
  border: 1px solid #24272C; border-radius: 4px; background: transparent; color: #FFFFFF;
  font-size: 14px; font-weight: 500; line-height: 1; cursor: pointer;
}
.nwe-back:hover { border-color: #FFFFFF; }
.nwe-back svg { display: block; flex: none; }
.nwe-progress { flex: 1; display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.nwe-progress span { height: 3px; border-radius: 2px; background: #24272C; transition: background .25s; }
.nwe-progress span.is-on { background: #E11D18; }
.nwe-stepno { flex: none; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: #8D929A; }
.nwe-stepno b { color: #FFFFFF; font-weight: 600; }

/* ---------- Écrans ---------- */
.nwe-screen { animation: nwe-in .3s ease; }
.nwe-h {
  margin: 0 0 6px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  text-transform: uppercase; font-size: clamp(28px,7vw,34px); line-height: 1; letter-spacing: .005em;
}
.nwe-sub { margin: 0 0 22px; color: #C5C8CD; font-size: 16px; text-wrap: pretty; }
.nwe-center { text-align: center; }
.nwe-label {
  display: block; margin: 0 0 8px; font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: #A9AFB7;
}
.nwe-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: #6B7079; }
.nwe-err { margin: 6px 0 0; font-size: 14px; color: #FF5247; }

/* ---------- Boutons ---------- */
.nwe-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 24px; }
.nwe-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px;
  padding: 0 20px; border: none; border-radius: 4px; text-decoration: none; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-size: 19px; letter-spacing: .05em; text-transform: uppercase;
  transition: background .15s, opacity .15s;
}
.nwe-btn--main { background: #E11D18; color: #FFFFFF; border-bottom: 3px solid #9E120E; }
.nwe-btn--main:hover { background: #FF352C; }
.nwe-btn--main:disabled { background: #2A2D33; border-bottom-color: #1E2024; color: #6B7079; cursor: not-allowed; }
.nwe-btn.is-loading { pointer-events: none; }
.nwe-btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #FFFFFF;
  border-radius: 50%; animation: nwe-spin .7s linear infinite;
}
.nwe-btn--wa { background: #25D366; color: #0D0E10; }
.nwe-btn--wa:hover { background: #3BE37A; color: #0D0E10; }
.nwe-btn--call { background: #E11D18; color: #FFFFFF; }
.nwe-btn--call:hover { background: #FF352C; color: #FFFFFF; }

/* lien discret (« continuer sans… ») */
.nwe-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: none; background: none;
  color: #A9AFB7; font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: #3A3E45; cursor: pointer;
}
.nwe-link:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }
.nwe-link--ext { margin-top: 14px; gap: 7px; color: #FFFFFF; text-decoration-color: #E11D18; }
.nwe-link--ext svg { flex: none; color: #E11D18; }

/* ---------- Écran 1 : plaque ---------- */
.nwe-plate {
  display: flex; align-items: stretch; height: 62px; background: #FFFFFF; border-radius: 6px;
  border: 2px solid #FFFFFF; overflow: hidden; transition: box-shadow .15s;
}
.nwe-plate:focus-within { box-shadow: 0 0 0 3px rgba(225,29,24,.55); }
.nwe-plate-eu {
  flex: none; width: 40px; background: #1F4FBF; color: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 7px;
  font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 17px; line-height: 1;
}
.nwe-plate-eu i { font-style: normal; font-size: 11px; color: #FFD400; margin-bottom: 6px; }
.nwe-plate-eu--r { width: 40px; }
.nwe-plate-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent; text-align: center;
  color: #0D0E10; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 32px;
  letter-spacing: .08em; text-transform: uppercase;
}
.nwe-plate-input::placeholder { color: #C5C8CD; }

.nwe-car {
  display: flex; gap: 14px; align-items: center; margin-top: 16px; padding: 12px;
  border: 1px solid #24272C; border-radius: 8px; background: #121316; animation: nwe-in .3s ease;
}
.nwe-car-media {
  flex: none; position: relative; width: 112px; height: 76px; border-radius: 6px; overflow: hidden; background: #1A1C20;
}
.nwe-car-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.nwe-car-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.nwe-car-ph::before { /* silhouette voiture simple, à défaut de photo */
  content: ""; width: 64px; height: 22px; border-radius: 12px 16px 6px 6px; border: 2px solid #3A3E45; border-bottom-width: 3px;
}
.nwe-car-info { min-width: 0; }
.nwe-car-brandrow { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nwe-car-logo { height: 18px; width: auto; display: block; }
.nwe-car-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #25D366; }
.nwe-car-check::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #25D366; }
.nwe-car-name {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: 26px; line-height: 1.02; overflow-wrap: anywhere;
}
.nwe-car-meta { margin-top: 3px; font-size: 13.5px; color: #8D929A; }
.nwe-car-wrong { margin-top: 6px; font-size: 14px; }

/* ---------- Écran 2 : photo ---------- */
.nwe-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 170px; padding: 20px; text-align: center; cursor: pointer;
  border: 2px dashed #3A3E45; border-radius: 8px; background: #121316; transition: border-color .15s, background .15s;
}
.nwe-drop:hover, .nwe-drop.is-over { border-color: #E11D18; background: #16181C; }
.nwe-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nwe-drop-ico { /* appareil photo dessiné en CSS */
  position: relative; width: 44px; height: 32px; margin-bottom: 6px; border: 3px solid #E11D18; border-radius: 6px;
}
.nwe-drop-ico::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 3px solid #E11D18; border-radius: 50%; }
.nwe-drop-ico::after { content: ""; position: absolute; left: 7px; top: -8px; width: 12px; height: 5px; background: #E11D18; border-radius: 2px 2px 0 0; }
.nwe-drop-t { font-weight: 500; font-size: 16px; }
.nwe-drop-s { font-size: 13.5px; color: #8D929A; }

.nwe-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px,1fr)); gap: 8px; margin-top: 12px; }
.nwe-thumbs:empty { display: none; }
.nwe-thumb { position: relative; aspect-ratio: 1/1; border-radius: 6px; overflow: hidden; background: #1A1C20; animation: nwe-in .25s ease; }
.nwe-thumb img, .nwe-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nwe-thumb-x {
  position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; padding: 0; border: none; border-radius: 50%;
  background: rgba(13,14,16,.85); color: #FFFFFF; font-size: 15px; line-height: 24px; cursor: pointer;
}
.nwe-thumb-tag {
  position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 3px; background: rgba(13,14,16,.85);
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Écran 3 : analyse / résultat ---------- */
.nwe-scan { position: relative; aspect-ratio: 4/3; margin: 16px 0 12px; border-radius: 8px; overflow: hidden; background: #1A1C20; }
.nwe-scan-img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) brightness(.8); }
.nwe-scan-line {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #E11D18;
  box-shadow: 0 0 18px 4px rgba(225,29,24,.55); animation: nwe-scan 1.6s ease-in-out infinite alternate;
}
.nwe-scan-txt { margin: 0; text-align: center; color: #C5C8CD; font-size: 15px; }

.nwe-res-photo { aspect-ratio: 16/10; margin: 14px 0 18px; border-radius: 8px; overflow: hidden; background: #1A1C20; }
.nwe-res-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nwe-sev { padding: 14px 0; border-top: 1px solid #24272C; }
.nwe-sev-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nwe-sev-head .nwe-label { margin: 0; }
.nwe-sev-word { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 20px; letter-spacing: .03em; }
.nwe-sev-bar { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin-top: 10px; }
.nwe-sev-bar span { height: 6px; border-radius: 3px; background: #24272C; }
.nwe-sev[data-level="1"] .nwe-sev-bar span:nth-child(-n+1),
.nwe-sev[data-level="2"] .nwe-sev-bar span:nth-child(-n+2),
.nwe-sev[data-level="3"] .nwe-sev-bar span:nth-child(-n+3) { background: #E11D18; }

.nwe-obs { list-style: none; margin: 0; padding: 14px 0; border-top: 1px solid #24272C; display: flex; flex-direction: column; gap: 10px; }
.nwe-obs li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #E3E5E9; }
.nwe-obs li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px; background: #E11D18; border-radius: 1px; }

.nwe-price { padding: 16px; border: 1px solid #24272C; border-radius: 8px; background: #121316; }
.nwe-price-val { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 38px; line-height: 1; }
.nwe-price-note { margin: 8px 0 0; font-size: 13.5px; color: #8D929A; }

/* ---------- Écran 4 : coordonnées ---------- */
.nwe-form .nwe-label { margin-top: 16px; }
.nwe-form .nwe-label:first-child { margin-top: 0; }
.nwe-input {
  width: 100%; height: 52px; padding: 0 14px; border: 1px solid #2E3137; border-radius: 4px;
  background: #121316; color: #FFFFFF; font-family: 'Rubik', sans-serif; font-size: 16px; outline: none;
}
.nwe-input::placeholder { color: #6B7079; }
.nwe-input:focus { border-color: #E11D18; }
.nwe-input.is-bad { border-color: #FF5247; }

.nwe-seg { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.nwe-seg label { position: relative; }
.nwe-seg input { position: absolute; opacity: 0; pointer-events: none; }
.nwe-seg span {
  display: flex; align-items: center; justify-content: center; height: 46px; border: 1px solid #2E3137; border-radius: 4px;
  font-size: 15px; color: #C5C8CD; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.nwe-seg input:checked + span { border-color: #E11D18; color: #FFFFFF; background: rgba(225,29,24,.12); }
.nwe-seg input:focus-visible + span { box-shadow: 0 0 0 2px #FFFFFF; }

.nwe-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: #A9AFB7; cursor: pointer; }
.nwe-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #E11D18; }

/* ---------- Écran 5 : merci ---------- */
.nwe-done-ico {
  width: 60px; height: 60px; margin: 6px auto 16px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
}
.nwe-recap { width: 100%; margin: 6px 0 0; border-collapse: collapse; font-size: 15px; }
.nwe-recap th, .nwe-recap td { padding: 11px 0; border-bottom: 1px solid #24272C; text-align: left; vertical-align: top; }
.nwe-recap th { width: 40%; padding-right: 12px; font-weight: 400; color: #8D929A; }
.nwe-recap td { font-weight: 500; }
.nwe-urgent { margin: 24px 0 12px; text-align: center; color: #C5C8CD; font-size: 15px; }
.nwe-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }   /* même largeur */
.nwe-duo .nwe-btn { font-size: 17px; padding: 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .nwe-screen, .nwe-car, .nwe-thumb { animation: none; }
  .nwe-scan-line { animation: none; top: 50%; }
}
