/* ================================================================
   DESCODCUSTOM — Configurateur Avancé — CSS v3.0
   Thème : Navy #1c2d4f + Gris + Accent Bleu #3b82f6
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --gc-primary:    #1c2d4f;   /* Navy foncé : tabs, header, CTA       */
  --gc-primary-dk: #14213a;   /* Navy très foncé : hover CTA           */
  --gc-accent:     #3b82f6;   /* Bleu vif : sélection, indicateur actif*/
  --gc-accent-dk:  #2563eb;   /* Bleu foncé : hover accent             */
  --gc-bg:         #f0f2f6;   /* Fond général                          */
  --gc-panel-bg:   #ffffff;   /* Fond cards/panel                      */
  --gc-border:     #e2e8f0;   /* Bordures                              */
  --gc-text:       #1a2035;   /* Texte principal                       */
  --gc-text-muted: #64748b;   /* Texte secondaire                      */
  --gc-radius:     14px;      /* Coins arrondis principaux             */
  --gc-radius-sm:  8px;       /* Coins petits éléments                 */
  --gc-shadow:     0 4px 28px rgba(28,45,79,.12);
  --gc-transition: .18s ease;
}

/* ── Wrapper global ─────────────────────────────────────────── */
.gc-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gc-bg);
  border-radius: var(--gc-radius);
  padding: 0;
  overflow: hidden;
  color: var(--gc-text);
  position: relative;
}

/* ── Header ─────────────────────────────────────────────────── */
.gc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 16px;
  background: var(--gc-panel-bg);
  border-bottom: 1px solid var(--gc-border);
  gap: 12px;
  flex-wrap: wrap;
}

.gc-product-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--gc-primary);
  letter-spacing: -.01em;
}

.gc-subtitle {
  font-size: .82rem;
  color: var(--gc-text-muted);
  margin: 0;
}

.gc-header__right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* Boutons header */
.gc-btn-reset,
.gc-btn-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--gc-border);
  border-radius: 30px;
  background: var(--gc-panel-bg);
  color: var(--gc-text);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--gc-transition);
  white-space: nowrap;
}
.gc-btn-reset:hover,
.gc-btn-summary:hover {
  border-color: var(--gc-accent);
  color: var(--gc-accent);
  background: #eff6ff;
}
.gc-btn-reset svg path,
.gc-btn-summary svg path { fill: currentColor; }

.gc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--gc-accent);
  color: #fff;
  border-radius: 10px;
}

/* ── Body ────────────────────────────────────────────────────── */
.gc-body {
  display: flex;
  gap: 0;
  min-height: 440px;
}

/* ── Canvas zone ─────────────────────────────────────────────── */
.gc-canvas-zone {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--gc-panel-bg);
  border-right: 1px solid var(--gc-border);
  overflow: hidden;
}

/* Zone image — prend tout l'espace dispo */
.gc-canvas-zone__img {
  flex: 1;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

/* Footer chips — barre de résumé visuel */
.gc-canvas-chips {
  border-top: 2px solid var(--gc-border);
  padding: 10px 16px;
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #f8fafc;
}
.gc-canvas-chips:empty::before {
  content: 'Aucun accessoire sélectionné';
  color: var(--gc-text-muted);
  font-size: .78rem;
  font-style: italic;
}

/* Vue toggle left/right */
.gc-view-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  background: var(--gc-bg);
  border-radius: 30px;
  padding: 3px;
  align-self: flex-start;
  flex-shrink: 0;
}
.gc-view-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 24px;
  background: transparent;
  color: var(--gc-text-muted);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  transition: all var(--gc-transition);
}
.gc-view-btn.active {
  background: var(--gc-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(28,45,79,.18);
}

/* Canvas image */
.gc-canvas {
  position: relative;
  overflow: hidden;
  border-radius: var(--gc-radius);
  background: #f8f9fb;
  border: 1.5px solid var(--gc-border);
  box-shadow: 0 2px 16px rgba(28,45,79,.07);
  display: block;
  width: 100% !important;   /* force pleine largeur dans le wrapper */
  max-width: 100% !important;
}

.gc-base-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  user-select: none;
}
.gc-base-img.active { opacity: 1; }

/* Calques */
.gc-layers {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.gc-layer-img {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.gc-layer-in  { animation: gcFadeIn  .25s ease forwards; }
.gc-layer-out { animation: gcFadeOut .25s ease forwards; }
@keyframes gcFadeIn  { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:scale(1); } }
@keyframes gcFadeOut { from { opacity:1; transform:scale(1);   } to { opacity:0; transform:scale(.97); } }

/* Loading spinner */
.gc-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.7);
  align-items: center;
  justify-content: center;
  border-radius: var(--gc-radius);
  z-index: 10;
}
.gc-loading.active { display: flex; }
.gc-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gc-border);
  border-top-color: var(--gc-accent);
  border-radius: 50%;
  animation: gcSpin .7s linear infinite;
}
@keyframes gcSpin { to { transform: rotate(360deg); } }

/* Chips sélection */
/* gc-selected-thumbs = alias de gc-canvas-chips (même élément) */
.gc-selected-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.gc-thumb-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: .78rem;
  color: var(--gc-accent-dk);
  font-weight: 600;
}
.gc-thumb-chip img {
  width: 22px; height: 22px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #bfdbfe;
}
.gc-thumb-chip button {
  background: none; border: none;
  cursor: pointer;
  color: var(--gc-text-muted);
  font-size: .8rem;
  padding: 0 0 0 2px;
  line-height: 1;
  transition: color var(--gc-transition);
}
.gc-thumb-chip button:hover { color: var(--gc-primary); }

/* ── Panel accessoires ───────────────────────────────────────── */
.gc-panel {
  flex: 0 0 400px;
  max-width: 400px;
  background: var(--gc-panel-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Onglets navigation + flèches ─────────────────────────────── */
.gc-tabs-nav {
  position: relative;
  overflow: hidden;
  background: var(--gc-primary);
  flex-shrink: 0;
}

.gc-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--gc-primary);
}
.gc-tabs::-webkit-scrollbar { display: none; }

.gc-tab {
  flex: 1 0 auto;
  padding: 13px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: all var(--gc-transition);
  position: relative;
  white-space: nowrap;
}
.gc-tab:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); }
.gc-tab.active { color: #fff; }
.gc-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 3px;
  background: var(--gc-accent);
  border-radius: 2px 2px 0 0;
}
.gc-tab-icon { margin-right: 5px; }

/* Flèches scroll onglets */
.gc-tabs-arrow {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 34px;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 5;
  padding: 0;
}
.gc-tabs-arrow--left  { left:  0; background: linear-gradient(to right, var(--gc-primary) 55%, transparent); }
.gc-tabs-arrow--right { right: 0; background: linear-gradient(to left,  var(--gc-primary) 55%, transparent); }
.gc-tabs-arrow:hover { opacity: 1 !important; }

/* ── Liste accessoires ───────────────────────────────────────── */
.gc-accessory-list {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  max-height: 520px;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}
.gc-accessory-list.active { display: flex; }

/* ── Mode GRILLE (display_mode = grid) ───────────────────────── */
.gc-accessory-list--grid {
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 12px;
}
.gc-accessory-list--grid .gc-accessory-item {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: calc(33.333% - 8px);
  min-width: 80px;
  max-width: 120px;
  padding: 8px 6px;
  gap: 4px;
  text-align: center;
}
.gc-accessory-list--grid .gc-accessory-item .gc-accessory-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--gc-radius-sm);
  flex-shrink: 0;
}
.gc-accessory-list--grid .gc-accessory-item .gc-accessory-info {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gc-accessory-list--grid .gc-accessory-item .gc-accessory-name {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.gc-accessory-list--grid .gc-accessory-item .gc-accessory-price {
  font-size: .75rem;
  color: var(--gc-accent);
  font-weight: 700;
}
.gc-accessory-list--grid .gc-accessory-item.selected {
  background: var(--gc-accent);
  color: #fff;
}
.gc-accessory-list--grid .gc-accessory-item.selected .gc-accessory-price {
  color: #fff;
}
.gc-accessory-list--grid .gc-accessory-item.unavailable {
  opacity: .45;
  pointer-events: none;
}

.gc-accessory-list::-webkit-scrollbar { width: 4px; }
.gc-accessory-list::-webkit-scrollbar-track { background: #f8fafc; }
.gc-accessory-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.gc-accessory-list::-webkit-scrollbar-thumb:hover { background: var(--gc-accent); }

/* Item accessoire */
.gc-accessory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gc-border);
  transition: background var(--gc-transition);
  cursor: default;
  border-left: 3px solid transparent;
}
.gc-accessory-item:last-child { border-bottom: none; }
.gc-accessory-item:hover { background: #f8faff; }

/* Item sélectionné */
.gc-accessory-item.gc-selected {
  background: #eff6ff;
  border-left-color: var(--gc-accent);
}

/* Thumbnail */
.gc-acc-thumb {
  position: relative;
  flex: 0 0 64px;
  height: 64px;
  border-radius: var(--gc-radius-sm);
  overflow: hidden;
  background: var(--gc-bg);
  border: 1.5px solid var(--gc-border);
  flex-shrink: 0;
}
.gc-acc-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gc-acc-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  color: var(--gc-border);
}

/* Badge stock */
.gc-stock-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 0;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f59e0b;
  color: #fff;
}
.gc-stock-badge--oos {
  background: #dc2626 !important;
}
.gc-stock-badge--low {
  background: #f59e0b !important;
}

/* Infos */
.gc-acc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gc-acc-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gc-acc-desc {
  font-size: .75rem;
  color: var(--gc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions */
.gc-acc-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.gc-acc-price {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gc-accent-dk);
  white-space: nowrap;
}

/* Bouton Ajouter */
.gc-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid var(--gc-primary);
  border-radius: var(--gc-radius-sm);
  background: transparent;
  color: var(--gc-primary);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  transition: all var(--gc-transition);
  white-space: nowrap;
}
.gc-btn-add svg path { fill: currentColor; }
.gc-btn-add:hover {
  background: var(--gc-primary);
  color: #fff;
}
.gc-btn-add:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Bouton Hors stock */
.gc-btn-oos {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: .72rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--gc-radius-sm);
  white-space: nowrap;
  cursor: default;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Item vide */
.gc-empty {
  padding: 24px;
  text-align: center;
  color: var(--gc-text-muted);
  font-size: .88rem;
}

/* ── Hors stock + Dernière pièce ─────────────────────────────── */
.gc-out-of-stock {
  opacity: .55;
  background: #fafafa;
  pointer-events: none;
}
.gc-out-of-stock .gc-acc-thumb img {
  filter: grayscale(65%);
}

.gc-last-stock {
  border-left-color: #f59e0b !important;
}

/* ── Récapitulatif drawer ─────────────────────────────────────── */
.gc-summary-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 380px; max-width: 95vw;
  height: 100vh;
  background: var(--gc-panel-bg);
  box-shadow: -4px 0 32px rgba(28,45,79,.18);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 30px));
  transition: transform .3s ease;
  will-change: transform;
}
.gc-summary-drawer.open {
  transform: translateX(0) !important;
}

.gc-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--gc-primary);
  color: #fff;
}
.gc-summary-header strong { font-size: 1rem; font-weight: 700; letter-spacing: .02em; }
.gc-summary-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0;
  transition: color var(--gc-transition);
}
.gc-summary-close:hover { color: #fff; }

.gc-summary-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.gc-summary-empty {
  color: var(--gc-text-muted);
  font-size: .9rem;
  text-align: center;
  padding: 28px 0;
}

.gc-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gc-border);
  font-size: .88rem;
}
.gc-summary-item img {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: var(--gc-radius-sm);
  border: 1px solid var(--gc-border);
  flex-shrink: 0;
}
.gc-summary-item-name { flex: 1; font-weight: 600; color: var(--gc-text); }
.gc-summary-item-price { font-weight: 700; white-space: nowrap; color: var(--gc-accent-dk); }

.gc-summary-footer {
  padding: 16px 20px;
  border-top: 1.5px solid var(--gc-border);
  background: #f8fafc;
}

/* Total line dans drawer */
.gc-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.gc-summary-total span { font-size: .88rem; color: var(--gc-text-muted); }
.gc-summary-total strong { font-size: 1.25rem; font-weight: 800; color: var(--gc-primary); }

/* Alma / PayPal dans drawer */
.gc-installments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius-sm);
}
.gc-installment-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--gc-text-muted);
}
.gc-installment-line strong {
  color: var(--gc-text);
  font-weight: 700;
}
.gc-installment-logo {
  font-size: .7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: .02em;
}
.gc-installment-logo--alma   { background: #ff414d; color: #fff; }
.gc-installment-logo--paypal { background: #003087; color: #fff; }

/* Bouton panier drawer */
.gc-btn-cart--full {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--gc-radius-sm);
  background: var(--gc-primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  text-transform: uppercase;
  transition: background var(--gc-transition);
}
.gc-btn-cart--full:hover { background: var(--gc-primary-dk); }

/* ── Overlay ─────────────────────────────────────────────────── */
.gc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,45,79,.35);
  z-index: 9998;
  backdrop-filter: blur(2px);
}
.gc-overlay.active { display: block; }

/* ── Barre sticky ─────────────────────────────────────────────── */
.gc-sticky-bar {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  background: var(--gc-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  z-index: 100;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(28,45,79,.18);
}

.gc-sticky-total {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gc-sticky-label {
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.gc-sticky-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
}

/* Alma + PayPal dans sticky */
.gc-sticky-installments {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.gc-sticky-inst-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
}
.gc-sticky-inst-line strong {
  color: #fff;
  font-weight: 700;
}

/* Bouton panier sticky */
.gc-btn-cart--sticky {
  padding: 12px 26px;
  border: none;
  border-radius: var(--gc-radius-sm);
  background: var(--gc-accent);
  color: #fff;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  text-transform: uppercase;
  transition: background var(--gc-transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.gc-btn-cart--sticky:hover { background: var(--gc-accent-dk); }

/* ── Toast ───────────────────────────────────────────────────── */
.gc-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gc-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10000;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(28,45,79,.25);
}
.gc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.gc-toast.success { background: #16a34a; }
.gc-toast.error   { background: #dc2626; }
.gc-toast.info    { background: var(--gc-primary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .gc-body { flex-direction: column; }
  .gc-canvas-zone { border-right: none; border-bottom: 1px solid var(--gc-border); padding: 14px; }
  .gc-panel { flex: none; max-width: 100%; width: 100%; }
  .gc-sticky-installments { display: none; }  /* masqué sur mobile, trop serré */
}

@media (max-width: 520px) {
  .gc-header { padding: 14px 16px; }
  .gc-product-name { font-size: 1.1rem; }
  .gc-acc-name { font-size: .82rem; }
  .gc-btn-add { font-size: .72rem; padding: 5px 9px; }
  .gc-acc-price { font-size: .8rem; }
  .gc-tab { padding: 11px 10px; font-size: .72rem; }
  .gc-sticky-price { font-size: 1.1rem; }
}

/* ══════════════════════════════════════════════════════════════════
   BOUTON "CONFIGURER" — version produit page (popup trigger)
   ════════════════════════════════════════════════════════════════ */
.gc-configure-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px;
  height: 46px;
  background: linear-gradient(135deg, #1c2d4f 0%, #2d4a7a 100%);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 4px 16px rgba(28, 45, 79, .35);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
  font-family: inherit;
}
.gc-configure-btn:hover,
.gc-configure-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 45, 79, .45);
  filter: brightness(1.15);
  color: #fff !important;
  text-decoration: none !important;
  outline: none;
}
.gc-configure-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(28, 45, 79, .3);
}
.gc-configure-btn svg {
  flex-shrink: 0;
  opacity: .9;
}

/* ══════════════════════════════════════════════════════════════════
   MODAL OVERLAY
   ════════════════════════════════════════════════════════════════ */
#gc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, .7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
#gc-modal-overlay.gc-open {
  display: flex;
  animation: gcOverlayIn .22s ease;
}
@keyframes gcOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#gc-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: min(99vw, 1440px);
  max-height: 97vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255,255,255,.06);
  animation: gcDialogIn .3s cubic-bezier(.34, 1.4, .64, 1);
  outline: none;
}
@keyframes gcDialogIn {
  from { transform: translateY(36px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1);      opacity: 1; }
}

#gc-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, .08);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
  color: #444;
  padding: 0;
}
#gc-modal-close:hover {
  background: rgba(0, 0, 0, .18);
  transform: scale(1.08);
}

#gc-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  /* Scrollbar visible */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
#gc-modal-body::-webkit-scrollbar { width: 6px; }
#gc-modal-body::-webkit-scrollbar-track { background: transparent; }
#gc-modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Dans le modal : on retire la hauteur min fixe de .gc-root */
#gc-modal-body .gc-root {
  min-height: unset;
  border-radius: 0;
  box-shadow: none;
}

/* ── Loading spinner ─────────────────────────────────────────── */
.gc-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  gap: 18px;
  color: #94a3b8;
  font-size: .92rem;
}
.gc-modal-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: gcSpin .75s linear infinite;
}
@keyframes gcSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  #gc-modal-dialog {
    border-radius: 14px;
    max-height: 98vh;
  }
}

/* ══════════════════════════════════════════════════════════════════
   FORFAIT DE MONTAGE — toggle dans la sticky bar
   ════════════════════════════════════════════════════════════════ */
.gc-forfait-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .15s;
}
.gc-forfait-wrap:hover {
  background: rgba(255,255,255,.16);
}

/* Toggle switch */
.gc-forfait-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}
.gc-forfait-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.gc-forfait-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.25);
  border-radius: 22px;
  transition: background .2s;
}
.gc-forfait-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.gc-forfait-toggle input:checked + .gc-forfait-slider {
  background: #22c55e;
}
.gc-forfait-toggle input:checked + .gc-forfait-slider::before {
  transform: translateX(18px);
}

/* Label forfait */
.gc-forfait-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.gc-forfait-price {
  font-weight: 700;
  color: #86efac;
  margin-left: 2px;
}

/* Récap drawer — ligne forfait */
.gc-summary-forfait {
  padding: 8px 16px;
  border-top: 1px solid var(--gc-border);
  background: #f0fdf4;
}
.gc-summary-forfait__line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #15803d;
  font-size: .85rem;
}
.gc-summary-forfait__price {
  margin-left: auto;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   REGLES DE COMPATIBILITE — accessoires bloques
   ════════════════════════════════════════════════════════════════ */
.gc-accessory-item.gc-rule-blocked {
  opacity: .5;
  pointer-events: none;
  border-left-color: #dc2626 !important;
  background: rgba(220, 38, 38, .04);
}
.gc-accessory-item.gc-rule-blocked .gc-btn-add {
  display: none;
}
.gc-rule-label {
  font-size: .75rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gc-rule-label::before {
  content: '⚠';
}

/* v3.7.0 — Onglet catégorie obligatoire non rempli */
.gc-tab.gc-tab--required-missing {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  animation: gc-tab-shake .35s ease;
}
@keyframes gc-tab-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  60%      { transform: translateX(4px); }
}

/* v3.7.0 — Pièce par défaut — léger surlignage doré */
.gc-accessory-item[data-is-default="1"]:not(.gc-selected) {
  border-left: 3px solid #f59e0b;
}

/* Règle mode avertissement (warn) — jaune, bouton reste actif */
.gc-accessory-item.gc-rule-warn {
  border-left-color: #f59e0b !important;
  background: rgba(245, 158, 11, .04);
}
.gc-accessory-item.gc-rule-warn .gc-rule-label {
  color: #d97706;
}

/* Détail prix par catégorie (#gcPriceDetail) */
.gc-price-detail {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.12);
  width: 100%;
}
.gc-price-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  padding: 1px 0;
}
.gc-price-detail-cat {
  font-weight: 500;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-price-detail-amt {
  font-weight: 600;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   POPUP FORFAIT (pre-ajout panier)
   ════════════════════════════════════════════════════════════════ */
.gc-forfait-popup {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,.65);
  backdrop-filter: blur(4px);
  z-index: