/* Stickers Letters Designer — Webcria */

/* === Bandeau titre module === */
.sl-module-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2e4a;
  border-radius: 12px 12px 0 0;
  padding: 18px 24px;
  margin-bottom: 0;
}
.sl-module-banner-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  opacity: .92;
}

/* === Titre produit — collé sous le bandeau === */
.sl-product-header {
  padding: 16px 20px 14px;
  border-bottom: none;
  margin-bottom: 0;
  background: #f0f4f9;
}
.sl-product-name {
  font-size: 1.6em;
  font-weight: 700;
  color: #1a2e4a;
  margin: 0;
  line-height: 1.2;
  text-align: center;
}
.sl-product-desc {
  font-size: 1em;
  color: #555;
  line-height: 1.6;
}

/* === Configurateur === */
.sl-designer {
  font-family: Arial, sans-serif;
  padding: 0 0 40px;
  margin-top: 0;
}
.sl-designer > .sl-section:first-child {
  margin-bottom: 20px;
  margin-top: 0;
}
.sl-designer > .sl-section:first-child .sl-text-heading {
  margin-top: 0;
  margin-bottom: 14px;
}
.sl-section { margin-bottom: 20px; }
.sl-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #333;
  font-size: 1.1em;
  text-align: left;
}

/* Police + upload côte à côte */
.sl-row { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.sl-col { flex: 1 1 240px; }

/* === Canvas === */
.sl-preview-section { margin-bottom: 12px; }
.sl-preview-toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.sl-preview-label { font-size: .85em; color: #666; font-weight: 600; }
.sl-preview-toolbar input[type="color"] {
  width: 36px; height: 30px; padding: 2px;
  border: 1px solid #ccc; border-radius: 4px; cursor: pointer;
}
.sl-select-sm {
  padding: 4px 8px; border: 1px solid #ccc;
  border-radius: 4px; font-size: .85em;
}
.sl-canvas {
  display: block; width: 100%;
  border: 1px solid #ddd; border-radius: 6px; background: #fff;
}

/* === Titre section texte === */
.sl-text-heading {
  background: #4a7fb5;
  border-radius: 0 0 10px 10px;
  padding: 12px 20px;
  margin-top: 0;
  margin-bottom: 14px;
  text-align: center;
}
.sl-text-title {
  margin: 0;
  font-size: 1em;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .92;
}

/* === Bouton petit style foncé (upload font, identique cm/in) === */
.sl-btn-dark-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a2e4a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 10px;
  height: 32px;
  font-size: .78em;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0 !important;
}
.sl-btn-dark-sm:hover { opacity: .85; }

/* === Inputs === */
.sl-input, .sl-select {
  width: 100%; max-width: 420px;
  padding: 8px 12px; border: 1px solid #ccc;
  border-radius: 4px; font-size: 1em;
}

/* === Lignes multi-texte === */
.sl-line-row {
  margin-bottom: 10px !important;
  border: 1px solid #eee !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  background: #fafafa !important;
}
.sl-line-row-top {
  display: flex !important; align-items: center !important;
  gap: 8px !important; margin-bottom: 6px !important;
}
.sl-line-row-bottom {
  display: flex !important; align-items: center !important;
  gap: 10px !important; flex-wrap: nowrap !important;
}
.sl-line-row-bottom .sl-btn-upload-font {
  margin-left: auto !important;
}
.sl-line-row .sl-line-input {
  flex: 1 1 200px !important; min-width: 0 !important; margin-bottom: 0 !important;
  max-width: none !important;
}
.sl-line-row .sl-line-font {
  flex: 1 1 160px !important; min-width: 120px !important;
  padding: 6px 8px !important; border: 1px solid #ccc !important;
  border-radius: 4px !important; font-size: .88em !important;
}
.sl-btn-upload-font {
  flex-shrink: 0 !important; white-space: nowrap !important;
  padding: 6px 10px !important; font-size: .82em !important;
}
/* === Sens miroir — tuiles === */
.sl-direction-row {
  display: flex; gap: 10px; align-items: stretch;
}
.sl-dir-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  background: #f5f6f8;
  border: 2px solid #e0e2e6;
  border-radius: 10px;
  cursor: pointer;
  font-size: .88em; font-weight: 600; color: #444;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  user-select: none;
}
.sl-dir-preview {
  font-size: .82em;
  font-weight: 800;
  letter-spacing: .04em;
  color: #1a2e4a;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}
.sl-dir-preview-mirror {
  transform: scaleX(-1);
}
.sl-dir-btn.sl-dir-active .sl-dir-preview {
  color: #fff;
}
.sl-dir-label {
  font-size: .8em;
  font-weight: 600;
  color: inherit;
  opacity: .8;
}
.sl-dir-btn:hover {
  background: #eaecf2; border-color: #bbbfc8;
}
.sl-dir-btn.sl-dir-active {
  background: #1a2e4a; border-color: #1a2e4a; color: #fff;
  box-shadow: 0 4px 12px rgba(26,46,74,.28);
}
.sl-dir-btn.sl-dir-active svg text { fill: #fff; }

/* === Interligne === */
.sl-spacing-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sl-spacing-slider {
  flex: 1 1 200px; max-width: 320px;
  accent-color: #333; cursor: pointer;
}
.sl-spacing-val {
  font-size: .9em; color: #555; min-width: 52px;
}
.sl-spacing-hint {
  font-size: 1em; font-weight: 700; color: #888; line-height: 1;
}

.sl-line-h-wrap {
  display: flex !important; align-items: center !important;
  gap: 4px !important; flex-shrink: 0 !important;
}
.sl-line-h-lbl { font-size: .82em !important; color: #666 !important; white-space: nowrap !important; }
.sl-line-h { width: 90px !important; }
.sl-line-h-unit { font-size: .8em !important; color: #888 !important; }
.sl-line-w-val  { font-size: .88em !important; color: #444 !important; font-weight: 600 !important; min-width: 36px !important; display: inline-block !important; }
.sl-btn-line {
  flex-shrink: 0 !important;
  width: 30px !important; height: 30px !important; padding: 0 !important;
  border-radius: 50% !important; border: 1px solid #ccc !important;
  font-size: 1.2em !important; line-height: 1 !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  transition: background .15s, border-color .15s;
}
.sl-btn-add-line    { background: #1a2e4a !important; border: none !important; color: #fff !important; border-radius: 6px !important; width: 32px !important; height: 32px !important; font-size: 1.2em !important; }
.sl-btn-add-line:hover { opacity: .85 !important; background: #1a2e4a !important; }
.sl-btn-remove-line { background: #7b1a1a !important; border: none !important; color: #fff !important; border-radius: 6px !important; width: 32px !important; height: 32px !important; font-size: 1.2em !important; }
.sl-btn-remove-line:hover { opacity: .85 !important; background: #7b1a1a !important; }

/* === Swatches === */
.sl-color-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.sl-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.sl-swatch {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid #ccc;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: block;
}
.sl-swatch:hover { transform: scale(1.1); }
.sl-swatch-active .sl-swatch {
  border-color: #333 !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,.18);
  transform: scale(1.12);
}
.sl-swatch-label { font-size: .75em; color: #555; text-align: center; max-width: 60px; word-break: break-word; }

/* === Dimensions — grille 3 colonnes === */
.sl-dims-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 56px;
  gap: 8px;
  width: 100%;
}
.sl-dims-col {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f5f6f8; border: 1.5px solid #e0e2e6; border-radius: 10px;
  padding: 12px 8px; gap: 4px; text-align: center;
}
.sl-dims-col-label {
  font-size: .72em; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #888;
}
.sl-dims-col-value {
  font-size: 1.1em; font-weight: 800; color: #1a2e4a;
}
.sl-dims-col-unit {
  background: #1a2e4a; border-color: #1a2e4a; cursor: pointer;
}
.sl-unit-toggle-btn {
  width: 100%; height: 100%; border: none; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.sl-unit-toggle-btn span {
  font-size: 1em; font-weight: 800; color: #fff; letter-spacing: .06em;
}
.sl-unit-toggle-btn:hover { opacity: .85; }
.sl-dim-lbl  { font-size: .9em; color: #555; }
.sl-unit-lbl { font-size: .85em; color: #888; }
.sl-dim-input { width: 80px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; text-align: center; font-size: 1em; }

.sl-lock-btn {
  /* surcharge par sl-btn-dark-sm — juste ajuster opacite deverrouille */
  line-height: 1;
  transition: background .15s, opacity .15s;
}
.sl-lock-btn.sl-locked { opacity: 1; }
.sl-lock-btn:not(.sl-locked) { opacity: .55; }
.sl-lock-btn:hover { opacity: 1 !important; }

/* === Boutons === */
.sl-btn-secondary {
  padding: 6px 14px; border: 1px solid #ccc; border-radius: 4px;
  background: #f8f8f8; cursor: pointer; font-size: .9em; transition: background .15s;
}
.sl-btn-secondary:hover { background: #ebebeb; }
.sl-unit-toggle { font-size: .82em; }

/* === Prix === */
.sl-price { font-size: 1.5em; font-weight: 700; color: #c00; margin-left: 6px; }
.sl-surcharge-info { font-size: .82em; color: #888; margin-left: 8px; }

/* === Panier === */
.sl-btn-cart { margin-top: 6px; padding: 12px 30px; font-size: 1em; }

/* W auto (cadenas verrouillé) : visuel grisé mais pas disabled */
.sl-dim-auto {
  opacity: 0.45;
  background: #f0f0f0;
}

/* Affichage lecture seule sans input */
.sl-dim-display {
  font-size: 1em; font-weight: 700; color: #333;
  min-width: 40px; display: inline-block;
}

/* === Hint cadenas === */
.sl-dims-section { margin-top: 4px; }
.sl-lock-hint {
  margin: 6px 0 0 0; font-size: .8em; color: #888; font-style: italic;
}

/* === Tooltip CSS pur sur [title] dans le designer === */
#sl-fullpage [title] { position: relative; }
#sl-fullpage [title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2e4a;
  color: #fff;
  font-size: .75em;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
  pointer-events: none;
  z-index: 9999;
  max-width: 220px;
  white-space: normal;
  text-align: center;
}
#sl-fullpage [title]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a2e4a;
  pointer-events: none;
  z-index: 9999;
}
/* Exclure les elements ou le tooltip serait gene (swatches, canvas) */
#sl-fullpage .sl-swatch[title]:hover::after,
#sl-fullpage .sl-swatch[title]:hover::before,
#sl-fullpage canvas[title]:hover::after,
#sl-fullpage canvas[title]:hover::before { display: none; }

/* === Image produit === */
.sl-product-img-section { margin-top: 28px; }
.sl-product-img { max-width: 480px; width: 100%; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.10); }

/* ===================================================
   RESPONSIVE MOBILE
   =================================================== */
@media (max-width: 600px) {

  /* Ligne : row-bottom passe en 2 rangées :
     rangée 1 → dimensions (h-wrap)
     rangée 2 → police + import */
  .sl-line-row-bottom {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .sl-line-h-wrap {
    width: 100% !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
  }
  .sl-line-h-wrap + .sl-line-font,
  .sl-line-row-bottom .sl-line-font {
    flex: 1 1 140px !important;
    min-width: 0 !important;
  }
  .sl-btn-upload-font {
    margin-left: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Dimensions globales en colonne */
  .sl-dim-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* Inputs pleine largeur */
  .sl-input, .sl-select {
    max-width: 100% !important;
  }

  /* Canvas */
  .sl-canvas { border-radius: 4px; }

  /* Prix */
  .sl-price { font-size: 1.3em; }

  /* Bouton panier pleine largeur */
  .sl-btn-cart { width: 100%; padding: 14px 16px; font-size: 1em; }

  /* Swatches plus petits */
  .sl-swatch { width: 34px; height: 34px; }
  .sl-swatch-label { font-size: .7em; max-width: 50px; }

  /* Interligne */
  .sl-spacing-slider { max-width: 100%; }
}

/* ════════════════════════════════════════════════
   Bloc Tarif / quantite / panier — v1.2.0
   ════════════════════════════════════════════════ */

.sl-bottom-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  border-radius: 12px;
  overflow: visible;
}

/* ── Ligne 1 : Tarif — 1 seule ligne centree ── */
.sl-price-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding: 20px 22px 36px;
  background: #1a2e4a;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
}
.sl-price-label {
  font-size: .85em;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  letter-spacing: .03em;
}
.sl-price-label #sl-price-qty-label {
  color: #fff;
  font-weight: 700;
}
.sl-price {
  font-size: 1.6em;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.sl-surcharge-info { display: none !important; }

/* ── Ligne 2 : 4 tuiles quantite ── */
.sl-qty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
}

.sl-qty-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 28px 8px 20px;
  cursor: pointer;
  user-select: none;
  min-height: 140px;
  background: #f5f6f8;
  border-top: none;
  border-bottom: none;
  border-right: 1px solid #e0e2e6;
  border-left: none;
  box-sizing: border-box;
  transition: background .15s, transform .13s, box-shadow .15s;
}
.sl-qty-tile:first-child { border-left: none; }
.sl-qty-tile:last-child  { border-right: none; }

.sl-qty-tile:hover {
  background: #eaecf2;
  z-index: 1;
}

.sl-qty-tile.sl-qty-active {
  background: #1a2e4a !important;
  transform: translateY(-4px);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(26,46,74,.35);
  border-right-color: transparent;
}
.sl-qty-tile.sl-qty-active .sl-qty-num,
.sl-qty-tile.sl-qty-active .sl-qty-sub,
.sl-qty-tile.sl-qty-active .sl-qty-price {
  color: #fff !important;
}
.sl-qty-tile.sl-qty-active .sl-qty-unit-label {
  color: rgba(255,255,255,.6) !important;
}

.sl-qty-c1::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:#2196f3; }
.sl-qty-c2::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:#9c27b0; }
.sl-qty-c3::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:#ff6f00; }
.sl-qty-c4::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:#2e7d32; }
.sl-qty-tile.sl-qty-active::before { opacity: 0; }

.sl-qty-num {
  font-size: 3.6em; font-weight: 900; line-height: 1; color: #1a2e4a;
}
.sl-qty-sub {
  font-size: .82em; font-weight: 600; color: #666; letter-spacing: .03em; margin-bottom: 4px;
}
.sl-qty-price {
  font-size: 1.2em; font-weight: 900; color: #1a2e4a; line-height: 1;
}
.sl-qty-unit-label {
  font-size: .68em; font-weight: 500; color: #999; margin-top: 1px;
}

/* ── Ruban remise ── */
.sl-qty-ribbon {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1em; font-weight: 900;
  padding: 4px 14px; border-radius: 30px; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
  letter-spacing: .04em; pointer-events: none; z-index: 4;
}
.sl-ribbon-c2 { background: #9c27b0; }
.sl-ribbon-c3 { background: #e65100; }
.sl-ribbon-c4 { background: #2e7d32; }

/* ── Bouton panier ── */
.sl-btn-cart {
  display: block; width: 100%; padding: 0 24px; height: 72px;
  background: linear-gradient(180deg, #d63031 0%, #c0392b 100%);
  color: #fff; font-size: 1.2em; font-weight: 700;
  text-align: center; letter-spacing: .08em; text-transform: uppercase;
  border: none; border-bottom: 4px solid #96281b;
  border-radius: 0 0 12px 12px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 3px 8px rgba(192,57,43,.35);
  position: relative; overflow: hidden; margin-top: 2px; line-height: 1;
}
.sl-btn-cart:hover  { background: linear-gradient(180deg, #e03c3c 0%, #c0392b 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 5px 14px rgba(192,57,43,.45); transform: translateY(-1px); }
.sl-btn-cart:active { background: linear-gradient(180deg, #c0392b 0%, #a93226 100%); border-bottom-width: 1px; transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.15); }
.sl-btn-cart:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Mobile ── */
@media (max-width: 560px) {
  .sl-price-box    { padding: 14px 16px 30px; }
  .sl-price        { font-size: 1.25em; }
  .sl-price-label  { font-size: .75em; }
  .sl-qty-tile     { min-height: 112px; padding: 22px 4px 14px; }
  .sl-qty-num      { font-size: 2.6em; }
  .sl-qty-price    { font-size: 1em; }
  .sl-qty-sub      { font-size: .72em; }
  .sl-qty-ribbon   { font-size: .88em; padding: 3px 10px; top: -12px; }
  .sl-btn-cart     { height: 58px; font-size: 1.05em; }
  .sl-dims-grid    { grid-template-columns: 1fr 1fr 44px; gap: 6px; }
  .sl-direction-row { gap: 8px; }
  .sl-dir-btn      { padding: 10px 8px; font-size: .8em; }
}
