/* Template "electricite" — fiche produit (design TERRE). RESKIN du squelette
   standard : ids/classes fonctionnels (pd-*, .color, .pl-row, .size-qty,
   .thumb) pilotes par _product_configurator — ne pas les renommer. */

.el-crumb { padding-top: 20px; font-size: 13px; color: var(--el-ink-4); display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--el-font-mono); }
.el-crumb a { color: var(--el-ink-4); }
.el-crumb a:hover { color: var(--el-green); }
.el-crumb b { color: var(--el-ink); font-weight: 500; }

.el-pd .el-wrap { padding-top: 22px; padding-bottom: 62px; }
.el-pd-grid { display: flex; gap: clamp(26px, 4vw, 52px); flex-wrap: wrap; align-items: flex-start; }

/* ---- Galerie ---- */
.el-gallery { flex: 1 1 440px; min-width: 300px; position: sticky; top: 92px; }
.el-gallery .stage {
  position: relative; border-radius: 22px; overflow: hidden;
  background: #EFEFE9; aspect-ratio: 1 / 1.05; display: grid; place-items: center;
  border: 1px solid var(--el-line-soft);
}
/* object-fit CONTAIN obligatoire : la geometrie du zoom suppose une image non recadree. */
.el-gallery .stage img { width: 100%; height: 100%; object-fit: contain; }
.el-gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.el-gallery .thumbs .thumb {
  flex: 1 1 68px; max-width: 92px; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  background: #EFEFE9; border: 2px solid transparent; cursor: pointer; padding: 0; transition: border-color 0.15s;
}
.el-gallery .thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.el-gallery .thumbs .thumb.active { border-color: var(--el-ink); }
.pd-zoom-lens { position: absolute; top: 0; left: 0; display: none; border: 1.5px solid var(--el-ink); background: rgba(205, 245, 70, 0.18); pointer-events: none; }
.stage.is-zooming .pd-zoom-lens { display: block; }
.pd-zoom-pane {
  display: none; position: fixed; z-index: 60; width: 420px; height: 420px;
  border-radius: 18px; border: 1px solid var(--el-line); background: #fff no-repeat;
  box-shadow: 0 24px 48px -18px rgba(22, 25, 29, 0.28);
}
.pd-zoom-pane.is-on { display: block; }
.pd-zoom-pane.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 42px; height: 42px;
  border-radius: 999px; border: 3px solid var(--el-line);
  border-top-color: var(--el-green); animation: el-spin 0.8s linear infinite;
}
@keyframes el-spin { to { transform: rotate(360deg); } }
@media (max-width: 980px) { .pd-zoom-lens, .pd-zoom-pane { display: none; } }
@media (prefers-reduced-motion: reduce) { .pd-zoom-pane.is-loading::after { animation: none; } }

/* ---- Buybox ---- */
.el-buybox { flex: 1 1 400px; min-width: 300px; }
.el-buybox h1 {
  margin: 8px 0 0; font-family: var(--el-font-display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance;
}
.el-pd-offer {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--el-line); background: rgba(205, 245, 70, 0.16);
}
.el-pd-offer-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--el-green); color: #fff; flex: none; }
.el-pd-offer-ic svg { width: 15px; height: 15px; }
.el-pd-offer-txt { font-size: 13.5px; font-weight: 600; }
.el-pd-offer-name { color: var(--el-green); }

.el-pd-price { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.el-pd-price .now { font-family: var(--el-font-display); font-weight: 700; font-size: 38px; line-height: 1; letter-spacing: -0.04em; }
.el-pd-price .was { font-size: 17px; color: var(--el-ink-5); }
.el-pd-price .unit { font-family: var(--el-font-mono); font-size: 11px; color: var(--el-ink-4); }
.el-free-pill { display: inline-flex; align-items: center; background: var(--el-lime); font-family: var(--el-font-mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; }

.el-pd-bullets { margin: 16px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.6; color: var(--el-ink-2); }
.el-pd-bullets li { display: flex; gap: 8px; align-items: flex-start; }
.el-pd-bullets .pd-bullet-ic { flex: none; width: 16px; height: 16px; color: var(--el-green); margin-top: 4px; }

/* ---- Options (titres = la voix label mono de TERRE) ---- */
.el-opt { margin-top: 28px; }
.el-opt .opt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.el-opt .opt-head h2 {
  margin: 0; font-family: var(--el-font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--el-ink-4);
}
.el-opt .opt-head .pick { font-size: 13.5px; color: var(--el-ink-3); }
.el-opt .opt-head .pick b { color: var(--el-ink); font-weight: 600; }

/* ---- Coloris (.colors > .color > .color-band) ---- */
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors .color {
  width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: flex;
  padding: 0; cursor: pointer; border: 3px solid var(--el-card);
  box-shadow: 0 0 0 1px var(--el-line); transition: box-shadow 0.15s;
}
.colors .color .color-band { flex: 1; }
.colors .color.active { box-shadow: 0 0 0 2px var(--el-ink); }
.colors-toggle, .see-more { display: none; }
.color-compo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--el-ink-3); }
.color-compo .ca { display: inline-flex; align-items: center; gap: 6px; background: var(--el-chip); border-radius: 99px; padding: 4px 11px; }
.color-compo .ca i { width: 11px; height: 11px; border-radius: 99px; display: inline-block; border: 1px solid rgba(0, 0, 0, 0.1); }
.color-compo .ca b { color: var(--el-ink); font-weight: 600; }

/* ---- Emplacements (.pl-row en cartes TERRE) ---- */
.placements { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.pl-row { display: contents; }
.pl-toggle {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  padding: 14px 8px 12px; cursor: pointer; border-radius: 14px; background: var(--el-card);
  border: 1px solid var(--el-line); transition: border-color 0.15s, background 0.15s;
  font-family: var(--el-font-body);
}
.pl-row.is-active .pl-toggle { border-color: var(--el-ink); background: rgba(205, 245, 70, 0.22); }
.pl-row.is-unavailable .pl-toggle { opacity: 0.38; cursor: not-allowed; }
.pl-toggle .pl-check { display: none; }
.pl-toggle .pl-vis { width: 42px; height: 46px; border-radius: 8px; background: #EFEFE9; position: relative; }
.pl-toggle .pl-vis::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 99px; background: var(--el-green); top: 10px; left: 9px; }
.pl-toggle .pl-vis.placement-vis--dos::after { width: 15px; height: 15px; top: 15px; left: 13px; }
.pl-toggle .pl-label { font-size: 13.5px; font-weight: 600; margin-top: 4px; color: var(--el-ink); }
.pl-toggle .pl-hint { font-family: var(--el-font-mono); font-size: 10px; color: var(--el-ink-5); }
.pl-logos { grid-column: 1 / -1; background: var(--el-card); border: 1px solid var(--el-line-soft); border-radius: 12px; padding: 12px 14px; }
.opt.is-visual-only .pl-toggle,
.opt.is-visual-only .pl-logos-label { display: none; }
.opt.is-visual-only .pl-logos { background: none; border: 0; border-radius: 0; padding: 0; }
.pl-logos-label { display: block; font-family: var(--el-font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--el-ink-4); margin-bottom: 8px; }
.pl-logos-list { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-chip { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; border: 2px solid var(--el-line); background: var(--el-card); cursor: pointer; padding: 0; }
.logo-chip img { width: 100%; height: 100%; object-fit: contain; }
.logo-chip.is-active { border-color: var(--el-ink); }
.logo-chip.is-unavailable { opacity: 0.35; }
.logo-chip .logo-chip-check { display: none; }
.logo-chip-ph { font-weight: 700; color: var(--el-ink-4); }

/* ---- Grille tarifaire (mono, palier courant en lime) ---- */
.el-grid-wrap { overflow-x: auto; border: 1px solid var(--el-line-soft); border-radius: 14px; background: var(--el-card); }
#pd-grid { width: 100%; border-collapse: collapse; font-family: var(--el-font-mono); font-size: 11.5px; }
#pd-grid td { padding: 10px 12px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--el-line-faint); font-variant-numeric: tabular-nums; }
#pd-grid tr:last-child td { border-bottom: none; }
#pd-grid td:first-child { text-align: left; font-family: var(--el-font-body); font-weight: 600; font-size: 13px; }
#pd-grid .gt-remise td { color: var(--el-green); }
#pd-grid td.is-current { background: rgba(205, 245, 70, 0.28); font-weight: 700; }

/* ---- Quantites par taille ---- */
#pd-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 10px; }
.size-qty { display: flex; flex-direction: column; align-items: center; gap: 5px; background: var(--el-card); border: 1px solid var(--el-line); border-radius: 12px; padding: 10px 6px; }
.size-qty label { font-family: var(--el-font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.size-qty-input { width: 100%; height: 40px; text-align: center; border: 1px solid var(--el-line); border-radius: 9px; font-size: 15px; font-weight: 600; font-family: var(--el-font-body); background: var(--el-card-alt); color: var(--el-ink); }
.size-qty-input:focus { outline: none; border-color: var(--el-ink); }
.size-qty-price { font-family: var(--el-font-mono); font-size: 10.5px; color: var(--el-ink-4); min-height: 14px; }
.size-qty-badge { display: inline-block; width: 100%; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--el-lime); color: var(--el-ink); font-family: var(--el-font-mono); font-size: 10px; font-weight: 500; }

/* ---- Mode « une taille + une quantite » ---- */
.el-size-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.el-size-chip {
  min-width: 50px; height: 46px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; cursor: pointer; font-size: 14.5px; font-weight: 600; font-family: var(--el-font-body);
  background: var(--el-card); color: var(--el-ink); border: 1px solid var(--el-line); transition: background 0.15s, color 0.15s;
}
.el-size-chip.is-active { background: var(--el-dark); color: var(--el-bg); border-color: var(--el-dark); }
.el-qty-stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--el-line);
  border-radius: 12px; overflow: hidden; background: var(--el-card); flex: none;
}
.el-qty-stepper button { width: 46px; height: 54px; border: none; background: var(--el-card); font-size: 22px; color: var(--el-ink); cursor: pointer; }
.el-qty-stepper [data-qty-val] { width: 42px; text-align: center; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }

/* ---- Logo perso (echo de la dropzone du hero, version claire) ---- */
.el-perso { margin-top: 26px; background: var(--el-card); border: 1.5px dashed #DCDCD5; border-radius: 16px; padding: 16px 18px; }
.el-perso h2 { margin: 0; font-size: 15px; font-weight: 600; }
.el-perso p { margin: 3px 0 10px; font-size: 13px; color: var(--el-ink-3); }
.el-perso .hint { display: block; margin-top: 6px; font-family: var(--el-font-mono); font-size: 10.5px; color: var(--el-ink-5); }

/* ---- CTA ---- */
.el-buy { display: flex; gap: 12px; align-items: stretch; margin-top: 28px; flex-wrap: wrap; }
.el-pd-cta { flex: 1 1 240px; height: 54px; font-size: 15.5px; justify-content: center; border: none; cursor: pointer; }
.el-pd-cta[disabled] { opacity: 0.5; cursor: not-allowed; }
.el-buy .buy-devis { height: 54px; cursor: pointer; }

/* ---- Reassurance ---- */
.el-pd-reassure { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--el-line); }
.el-pd-reassure .re { display: flex; gap: 10px; align-items: flex-start; }
.el-pd-reassure .re svg, .el-pd-reassure .re img { width: 19px; height: 19px; color: var(--el-green); flex: none; margin-top: 2px; }
.el-pd-reassure .re b { display: block; font-weight: 600; font-size: 13.5px; }
.el-pd-reassure .re span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--el-ink-3); }

/* ---- Note financement (partial standard) ---- */
.cf-product-note { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.cf-product-tag { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 13px; border-radius: 99px; background: var(--el-chip); font-size: 13px; font-weight: 600; }
.cf-product-tag svg { width: 15px; height: 15px; color: var(--el-green); }
.cf-product-ship { font-family: var(--el-font-mono); font-size: 10.5px; color: var(--el-ink-4); }

/* ---- Description ---- */
.el-pd-desc .el-wrap { padding-bottom: 56px; }
.el-pd-desc h2 { margin: 0 0 10px; font-family: var(--el-font-display); font-weight: 700; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -0.03em; }
.el-pd-desc p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--el-ink-2); max-width: 62em; }

/* ---- Modal « ajouté » (partial standard _added_modal) ---- */
.da-modal { margin: auto; inset: 0; position: fixed; border: none; border-radius: 20px; padding: 0; max-width: 420px; width: calc(100vw - 40px); box-shadow: 0 30px 70px -20px rgba(22, 25, 29, 0.4); background: var(--el-card); color: var(--el-ink); }
.da-modal::backdrop { background: rgba(22, 25, 29, 0.45); backdrop-filter: blur(2px); }
.da-card { padding: 30px 26px 24px; text-align: center; font-family: var(--el-font-body); }
.da-ic { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: var(--el-lime); color: var(--el-ink); display: grid; place-items: center; }
.da-ic svg { width: 26px; height: 26px; }
.da-card h2 { margin: 14px 0 0; font-family: var(--el-font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.025em; }
.da-card p { margin: 8px 0 0; font-size: 14.5px; color: var(--el-ink-2); line-height: 1.55; }
.da-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.da-actions .btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; padding: 13px 16px; border-radius: 11px; font-weight: 600; font-size: 14.5px; cursor: pointer; font-family: var(--el-font-body); }
.da-actions .btn-primary { background: var(--el-dark); color: var(--el-bg); border: none; }
.da-actions .btn-primary:hover { background: var(--el-green); }
.da-actions .btn-ghost { background: var(--el-card); color: var(--el-ink); border: 1px solid #DCDCD5; }

/* ---- Embed (modal d'achat campagne) ---- */
body.pd-embed .el-crumb { display: none; }
body.pd-embed .el-pd .el-wrap { padding-top: 4px; }
body.pd-embed .el-pd-grid { flex-wrap: nowrap; gap: clamp(18px, 3vw, 34px); }
body.pd-embed .el-gallery { position: static; top: auto; flex: 0 0 44%; min-width: 0; }
body.pd-embed .el-buybox { min-width: 0; flex: 1 1 auto; }
body.pd-embed .el-pd-reassure { display: none; }
