/* ═══════════════════════════════════════════════════════
   B.EASE Configurator — Mobile Wizard UI
   Active uniquement ≤ 768px
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {

/* ── Bloquer le scroll du body quand wizard actif ── */
body.bmw-active {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
}

/* ── Masquer l'UI desktop ── */
.bease-icon-nav,
.bease-panel,
.bease-viewport,
.bease-bottom-bar,
.bease-main {
    display: none !important;
}

/* ── Wrapper fullscreen ── */
.bease-configurator-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bease-app {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* ── Wizard container plein écran ── */
#bease-mobile-wizard {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 9999;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   WIZARD HEADER — fixe dark
   ═══════════════════════════════════════════════════════ */
.bmw-header {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 16px 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.bmw-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bmw-step-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.bmw-btn-3d {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: background .15s;
}
.bmw-btn-3d:active {
    background: #2563eb;
}

/* ── Barre de progression ── */
.bmw-progress {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bmw-progress-step {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: background .2s;
}
.bmw-progress-step.done {
    background: #22c55e;
}
.bmw-progress-step.active {
    background: #3b82f6;
}

.bmw-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}
.bmw-progress-lbl {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: color .2s;
}
.bmw-progress-lbl.done {
    color: #22c55e;
}
.bmw-progress-lbl.active {
    color: #fff;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   WIZARD BODY — scrollable
   ═══════════════════════════════════════════════════════ */
.bmw-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: 80px; /* espace pour le footer fixe */
}

/* ── Step panels ── */
.bmw-step {
    display: none;
}
.bmw-step.active {
    display: block;
}

.bmw-step h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 14px;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 1 — Designs (grille 2 colonnes)
   ═══════════════════════════════════════════════════════ */
.bmw-design-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bmw-design-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.bmw-design-card.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.bmw-design-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.bmw-design-card-name {
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category filter */
.bmw-cat-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.bmw-cat-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all .15s;
}
.bmw-cat-btn.active {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 2 — Couleurs par zone
   ═══════════════════════════════════════════════════════ */
.bmw-zone-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bmw-zone-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.bmw-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.bmw-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: transform .1s, border-color .15s;
    padding: 0;
    outline: none;
}
.bmw-swatch:active {
    transform: scale(0.9);
}
.bmw-swatch.selected {
    border-color: #1f2937;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f2937;
}

.bmw-swatch-custom {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px dashed #9ca3af;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0;
}
.bmw-swatch-custom input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* BG type toggle */
.bmw-bg-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.bmw-bg-btn {
    flex: 1;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: all .15s;
}
.bmw-bg-btn.active {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

/* Gradient controls */
.bmw-gradient-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.bmw-gradient-row label {
    font-size: 12px;
    color: #6b7280;
    width: 50px;
    flex-shrink: 0;
}
.bmw-gradient-row input[type="color"] {
    width: 36px;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
}

.bmw-gradient-dirs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bmw-grad-dir {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    padding: 0;
    font-family: inherit;
}
.bmw-grad-dir.active {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 3 — Logos
   ═══════════════════════════════════════════════════════ */
.bmw-logo-upload {
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 14px;
    transition: border-color .15s;
}
.bmw-logo-upload:active {
    border-color: #3b82f6;
}
.bmw-logo-upload-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.bmw-logo-upload p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}
.bmw-logo-upload input[type="file"] {
    display: none;
}

/* Logos placés */
.bmw-logo-item {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bmw-logo-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f3f4f6;
    overflow: hidden;
    flex-shrink: 0;
}
.bmw-logo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bmw-logo-controls {
    flex: 1;
    min-width: 0;
}

.bmw-logo-positions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.bmw-pos-btn {
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
    transition: all .15s;
}
.bmw-pos-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.bmw-logo-scale {
    width: 100%;
    margin: 4px 0;
    accent-color: #3b82f6;
}

.bmw-logo-delete {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
}

/* ── Bouton "Placer sur le short" ── */
.bmw-place-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 8px;
    transition: background .15s;
}
.bmw-place-btn:active {
    background: #2563eb;
}
.bmw-place-btn-icon {
    font-size: 16px;
}

/* Quick positions label */
.bmw-quick-positions {
    margin-bottom: 8px;
}
.bmw-quick-label {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 6px;
}

/* Placement confirmation */
.bmw-place-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.bmw-place-confirm-msg {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
}
.bmw-place-close3d {
    margin-left: auto;
    background: #1f2937;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.bmw-place-close3d:active {
    background: #374151;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 4 — Textes & Numéros
   ═══════════════════════════════════════════════════════ */
.bmw-text-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.bmw-text-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s;
    text-align: left;
    width: 100%;
}
.bmw-text-toggle.active {
    border-color: #3b82f6;
    background: #eff6ff;
}
.bmw-text-toggle-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.bmw-text-toggle-info {
    flex: 1;
    min-width: 0;
}
.bmw-text-toggle-info strong {
    font-size: 14px;
    display: block;
    color: #1f2937;
}
.bmw-text-toggle-info span {
    font-size: 11px;
    color: #6b7280;
}
.bmw-text-toggle-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all .15s;
}
.bmw-text-toggle.active .bmw-text-toggle-check {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.bmw-add-text-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 14px;
}

/* Text item in list */
.bmw-text-item {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bmw-text-item label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-bottom: 4px;
}

.bmw-text-item input[type="text"],
.bmw-text-item select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 8px;
    background: #f9fafb;
    box-sizing: border-box;
}

.bmw-text-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.bmw-text-row input[type="color"] {
    width: 36px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.bmw-text-row input[type="range"] {
    flex: 1;
    accent-color: #3b82f6;
}

.bmw-text-delete {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 5 — Roster compact
   ═══════════════════════════════════════════════════════ */
.bmw-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bmw-roster-table th {
    background: #f3f4f6;
    padding: 8px 6px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
}

.bmw-roster-table td {
    padding: 6px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.bmw-roster-table input[type="text"],
.bmw-roster-table input[type="number"],
.bmw-roster-table select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}

.bmw-roster-table input[type="number"] {
    width: 50px;
}

.bmw-roster-del {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.bmw-roster-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
}

.bmw-roster-summary {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bmw-roster-summary strong {
    color: #1f2937;
}

/* ═══════════════════════════════════════════════════════
   ÉTAPE 6 — Récap
   ═══════════════════════════════════════════════════════ */
.bmw-recap-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 14px;
}

.bmw-recap-preview {
    height: 220px;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.bmw-recap-preview canvas {
    max-height: 100%;
    max-width: 100%;
}

.bmw-recap-details {
    padding: 14px;
}

.bmw-recap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}
.bmw-recap-row:last-child {
    border-bottom: none;
}
.bmw-recap-row .label {
    color: #6b7280;
}
.bmw-recap-row .value {
    font-weight: 600;
    color: #1f2937;
}

.bmw-recap-price {
    background: #1f2937;
    color: #fff;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   WIZARD FOOTER — navigation prev/next
   ═══════════════════════════════════════════════════════ */
.bmw-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

.bmw-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background .15s;
    text-align: center;
}

.bmw-btn-prev {
    background: #f3f4f6;
    color: #374151;
    flex: 0.4;
}
.bmw-btn-prev:active {
    background: #e5e7eb;
}

.bmw-btn-next {
    background: #3b82f6;
    color: #fff;
}
.bmw-btn-next:active {
    background: #2563eb;
}

.bmw-btn-order {
    background: #22c55e;
    color: #fff;
}
.bmw-btn-order:active {
    background: #16a34a;
}

/* ═══════════════════════════════════════════════════════
   VUE 3D PLEIN ÉCRAN (toggle)
   ═══════════════════════════════════════════════════════ */
.bmw-3d-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: #f0f4f8;
    display: none;
    flex-direction: column;
}
.bmw-3d-fullscreen.open {
    display: flex;
}

.bmw-3d-topbar {
    background: #1a1a2e;
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.bmw-3d-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmw-3d-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.bmw-3d-view-btns {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.bmw-3d-view-btn {
    padding: 10px 24px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background .15s;
}
.bmw-3d-view-btn:active {
    background: #e5e7eb;
}
.bmw-3d-view-btn.active {
    background: #1f2937;
    color: #fff;
}

} /* end @media */
