:root {
  --primary: #1a3a5c;
  --primary-light: #2563a8;
  --accent: #f97316;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #cbd5e1;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-sm: 0 1px 6px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ── */
.calc-header {
  background: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow);
}

.calc-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left  { display: flex; align-items: center; gap: 0.75rem; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }

.back-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.back-link:hover { color: white; }

.header-sep { color: rgba(255,255,255,0.3); }

.header-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  user-select: none;
  opacity: 0.95;
  transition: opacity 0.15s;
}
.header-title:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.btn-espace {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-espace:hover { background: rgba(255,255,255,0.22); }


.btn-settings {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-settings:hover { background: rgba(255,255,255,0.22); }
.btn-settings.hidden { display: none; }

/* ── SETTINGS PANEL ── */
.settings-panel {
  background: white;
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.settings-panel.hidden { display: none; }

.settings-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.settings-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.settings-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.settings-section:last-of-type { border-bottom: none; }

.settings-section h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.settings-field input {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
  width: 100%;
}
.settings-field input:focus { outline: none; border-color: var(--primary-light); }

.settings-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.input-euro {
  display: flex;
  align-items: center;
  gap: 0;
}
.input-euro input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-euro span {
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ── MAIN ── */
.calc-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── STEPS ── */
.calc-step { margin-bottom: 2rem; }
.calc-step.hidden { display: none; }

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.btn-step-back {
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-step-back:hover { border-color: var(--primary); color: var(--primary); }

/* ── SEARCH ── */
.search-bar-wrap {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  transition: border-color 0.15s;
  box-shadow: var(--shadow-sm);
}
.search-bar:focus-within { border-color: var(--primary-light); }

.search-icon { font-size: 1.1rem; flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
}

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.search-clear:hover { background: var(--bg); }
.search-clear.hidden { display: none; }

/* ── BRAND DROPDOWN ── */
.brand-dropdown {
  padding: 0.65rem 2rem 0.65rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-dropdown:focus { outline: none; border-color: var(--primary-light); }

/* ── STATUS ── */
.status-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.status-info    { background: #dbeafe; color: var(--primary); border: 1px solid #93c5fd; }
.status-success { background: #dcfce7; color: var(--success); border: 1px solid #86efac; }
.status-warn    { background: #fef3c7; color: var(--warning); border: 1px solid #fcd34d; }
.status-error   { background: #fee2e2; color: var(--danger);  border: 1px solid #fca5a5; }

/* ── PRODUCTS GRID ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.product-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  padding: 0;
}
.product-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.product-card.out-of-stock { opacity: 0.6; }

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #f8fafc;
  overflow: hidden;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
}
.stock-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.product-info {
  padding: 0.85rem;
}
.product-brand {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}
.product-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.variant-count {
  font-size: 0.72rem;
  background: #eff6ff;
  color: var(--primary-light);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}
.product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.5rem;
}

.empty-products {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* ── MODAL VARIANTE ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-box h3 { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin-bottom: 0.4rem; }
.modal-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.variant-modal-box { max-width: 480px; }

.variant-list { display: flex; flex-direction: column; gap: 0.6rem; }

.variant-btn {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.variant-btn:hover { border-color: var(--primary-light); background: #eff6ff; }
.variant-name { font-weight: 600; font-size: 0.9rem; }
.variant-price { font-weight: 800; color: var(--primary); font-size: 0.95rem; }
.variant-stock { font-size: 0.75rem; white-space: nowrap; }
.in-stock { color: var(--success); }
.no-stock { color: var(--danger); }

/* ── SELECTED PHONE CARD ── */
.selected-phone-card {
  background: white;
  border: 2px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.selected-phone-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.selected-phone-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: 0.4rem;
  flex-shrink: 0;
}
.selected-phone-placeholder {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.selected-vendor { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.selected-title  { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.selected-variant{ font-size: 0.85rem; color: var(--text-muted); margin-top: 0.15rem; }
.selected-base-price { font-size: 1.25rem; font-weight: 900; color: var(--text); margin-top: 0.3rem; }

/* ── ÉCRAN MAGASIN ── */
.screen-magasin {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.screen-magasin.hidden { display: none; }

.magasin-box {
  text-align: center;
  color: white;
}
.magasin-logo { font-size: 4rem; margin-bottom: 1rem; }
.magasin-title { font-size: 1.75rem; font-weight: 900; margin-bottom: 0.5rem; }
.magasin-sub { font-size: 1rem; color: rgba(255,255,255,0.7); margin-bottom: 2.5rem; }

.magasin-choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.magasin-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  background: var(--magasin-color, #2563a8);
  border: 3px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  width: 300px;
  transition: all 0.18s;
}
.magasin-btn:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.6); }
.magasin-btn-icon { font-size: 1.5rem; }

.header-magasin-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: white;
  opacity: 0.9;
  cursor: pointer;
  margin-left: 0.25rem;
}
.header-magasin-badge:hover { opacity: 1; }

/* ── PIN MODAL ── */
.pin-modal-box { max-width: 320px; text-align: center; }
.pin-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0;
}
.pin-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
}
.pin-digit:focus { border-color: var(--primary-light); }
.pin-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.pin-error.hidden { display: none; }

/* ── FORFAITS SETTINGS ── */
.forfait-setting-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.forfait-setting-row:last-child { border-bottom: none; }

.forfait-setting-name {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
}
.forfait-setting-name:focus { outline: none; border-color: var(--primary-light); }

.btn-delete-forfait {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-delete-forfait:hover { background: #fee2e2; }

.forfait-setting-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f8fafc;
}
.forfait-setting-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.forfait-setting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.option-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: white;
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
}
.option-toggle input { display: none; }
.option-toggle.active {
  background: #eff6ff;
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* ── OPTION BADGES (cartes forfait) ── */
.forfait-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 0.5rem 0;
  min-height: 1rem;
}
.option-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-light);
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

/* ── FORFAITS GRID ── */
.forfaits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.forfait-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.forfait-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

.forfait-icon    { font-size: 2.5rem; }
.forfait-label   { font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.forfait-sublabel{ font-size: 0.78rem; color: var(--text-muted); }
.forfait-remise  {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--success);
  background: #dcfce7;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.25rem;
}
.forfait-no-remise {
  color: var(--text-muted);
  background: #f1f5f9;
}
.forfait-prix-mois {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  margin-top: 0.25rem;
  line-height: 1;
}
.forfait-prix-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.forfait-prix-final {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  margin-top: 0.5rem;
  line-height: 1;
}
.forfait-ttc-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.forfait-card.selected {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,168,0.18);
}
.forfait-commentaire {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0.25rem 0;
  text-align: center;
}
.forfait-setting-comment {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text);
  margin-top: 0.5rem;
}
.forfait-setting-comment:focus { outline: none; border-color: var(--primary-light); }

.input-group-inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── OPTIONS PAR THÈME (settings) ── */
.forfait-setting-themes {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.theme-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.theme-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 180px;
  flex-shrink: 0;
}
.theme-input {
  flex: 1;
  padding: 0.4rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text);
  background: white;
}
.theme-input:focus { outline: none; border-color: var(--primary-light); }

/* ── ÉTAPE 2 : VARIANTES ── */
.variant-phone-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.variant-phone-img-wrap {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.variant-phone-img-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}
.variant-phone-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}

/* ── SÉLECTEURS STOCKAGE + COULEUR ── */
.variant-selectors {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.selector-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
  display: block;
}

.storage-select {
  width: 100%;
  max-width: 320px;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 1rem center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.storage-select:focus { outline: none; border-color: var(--primary-light); }

.color-section { margin-top: 0.25rem; }
.color-section.hidden { display: none; }

.color-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  min-width: 90px;
}
.color-btn:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.color-btn.out-of-stock { opacity: 0.5; }
.color-btn-label { font-size: 0.78rem; font-weight: 600; color: var(--text); text-align: center; line-height: 1.2; }
.color-btn-stock { font-size: 0.75rem; }

/* Pastille couleur */
.color-dot {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.color-dot-text {
  background: var(--bg);
  border-color: var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── LISTE VARIANTES (fallback liste simple) ── */
.variants-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.variant-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.variant-row-btn:hover { border-color: var(--primary-light); background: #eff6ff; transform: translateX(4px); }
.variant-row-btn.out-of-stock { opacity: 0.55; }
.variant-row-left  { display: flex; align-items: center; gap: 0.75rem; }
.variant-row-name  { font-size: 1rem; color: var(--text); }
.variant-row-name strong { font-weight: 800; color: var(--primary); }
.variant-row-stock { font-size: 0.82rem; white-space: nowrap; }

/* ── ÉTAPE 3 : RECAP TÉLÉPHONE AU-DESSUS DES FORFAITS ── */
.forfait-phone-recap {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 2px solid var(--primary-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.recap-inner { display: flex; align-items: center; gap: 1rem; }
.recap-img {
  width: 56px; height: 56px;
  object-fit: contain; padding: 0.3rem;
  background: #f8fafc; border-radius: var(--radius-sm); flex-shrink: 0;
}
.recap-img-placeholder {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: #f8fafc; border-radius: var(--radius-sm); flex-shrink: 0;
}
.recap-vendor  { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.recap-title   { font-size: 1rem; font-weight: 800; color: var(--primary); }
.recap-variant { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ── ÉTAPE 4 : RÉSULTAT ── */
.result-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 440px;
}

.result-phone-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  background: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem;
}
.result-phone-img {
  width: 72px; height: 72px;
  object-fit: contain; padding: 0.4rem;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.result-phone-placeholder {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.result-phone-info { flex: 1; }
.result-vendor  { font-size: 0.7rem; color: rgba(255,255,255,0.7); text-transform: uppercase; font-weight: 600; }
.result-title   { font-size: 1.05rem; font-weight: 800; color: white; }
.result-variant { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin-top: 0.1rem; }

.result-prix-tel {
  width: 100%;
  background: #eff6ff;
  border-left: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  padding: 1.75rem;
  text-align: center;
}
.result-prix-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; }
.result-prix-value { font-size: 3rem; font-weight: 900; color: var(--primary); line-height: 1; }
.result-prix-sub   { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-top: 0.25rem; }

.result-separator {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  padding: 0.5rem 0;
  width: 100%;
  text-align: center;
  background: white;
  border-left: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}

.result-forfait-block {
  width: 100%;
  background: white;
  border: 2px solid var(--primary);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.result-forfait-nom {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.result-prix-mois-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.result-mois-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── BUTTONS ── */
.btn {
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

/* ── ALERT ── */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; }
.alert-success { background: #dcfce7; color: var(--success); border: 1px solid #86efac; }
.alert-danger  { background: #fee2e2; color: var(--danger);  border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: var(--primary); border: 1px solid #93c5fd; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .forfaits-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-main { padding: 1rem; }
  .result-visual { max-width: 100%; }
}
@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
  .forfaits-grid { grid-template-columns: 1fr; }
}
