/* PM Listing Wizard — Parking Motors Store */
:root {
    --pm-cyan: #22D3EE;
    --pm-cyan-dark: #0e9fb3;
    --pm-black: #0f172a;
    --pm-border: #e2e8f0;
    --pm-text: #111827;
    --pm-muted: #64748b;
    --pm-danger: #dc2626;
    --pm-success: #16a34a;
    --pm-detected-bg: rgba(34, 211, 238, 0.08);
    --pm-detected-border: #22D3EE;
}

.pmlw-wizard {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    font-family: "League Spartan", sans-serif;
    box-sizing: border-box;
}

/* ─── Barre de progression ─── */
.pmlw-progress { display: flex; align-items: center; margin-bottom: 36px; }
.pmlw-step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: #e2e8f0; color: #94a3b8;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.3s; z-index: 1;
}
.pmlw-step-dot.active { background: var(--pm-cyan); color: #fff; }
.pmlw-progress-bar { flex: 1; height: 3px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.pmlw-progress-fill { height: 100%; width: 0%; background: var(--pm-cyan); border-radius: 2px; transition: width 0.4s ease; }

/* ─── Étapes ─── */
.pmlw-step { animation: pmlwFadeIn 0.3s ease; }
.pmlw-hidden { display: none !important; }
@keyframes pmlwFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pmlw-step-label { font-size: 13px; color: var(--pm-muted); margin: 0 0 6px; }
.pmlw-step-title { font-size: 24px; font-weight: 700; color: var(--pm-text); margin: 0 0 8px; }
.pmlw-step-desc { font-size: 14px; color: var(--pm-muted); margin: 0 0 20px; line-height: 1.6; }

/* ─── Textarea ─── */
.pmlw-textarea {
    width: 100%; box-sizing: border-box;
    padding: 14px 16px; font-size: 15px; line-height: 1.8;
    border: 1.5px solid var(--pm-border); border-radius: 12px;
    resize: vertical; font-family: inherit; outline: none;
    transition: border-color 0.2s; color: var(--pm-text);
}
.pmlw-textarea:focus { border-color: var(--pm-cyan); }

/* ─── Champs ─── */
.pmlw-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 4px; }
@media (max-width: 600px) { .pmlw-fields-grid { grid-template-columns: 1fr; } }
.pmlw-field { display: flex; flex-direction: column; gap: 5px; }
.pmlw-field.full { grid-column: 1 / -1; }
.pmlw-field label { font-size: 13px; font-weight: 600; color: var(--pm-muted); }
.pmlw-field input, .pmlw-field select, .pmlw-field textarea {
    padding: 9px 12px; font-size: 14px; border-radius: 8px;
    border: 1.5px solid var(--pm-border); font-family: inherit;
    outline: none; transition: border-color 0.2s, background 0.2s;
    color: var(--pm-text); background: #fff; width: 100%; box-sizing: border-box;
}
.pmlw-field input:focus, .pmlw-field select:focus, .pmlw-field textarea:focus { border-color: var(--pm-cyan); }
.pmlw-field.detected input, .pmlw-field.detected select, .pmlw-field.detected textarea {
    border-color: var(--pm-detected-border); background: var(--pm-detected-bg);
}
.pmlw-detected-badge { font-size: 11px; color: var(--pm-cyan-dark); font-weight: 600; }
.pmlw-missing-badge { font-size: 11px; color: var(--pm-danger); }
.pmlw-field.error input, .pmlw-field.error select { border-color: var(--pm-danger); }

/* ─── Upload zone ─── */
.pmlw-upload-zone {
    border: 2px dashed var(--pm-border); border-radius: 14px;
    padding: 40px 20px; text-align: center; cursor: pointer;
    transition: border-color 0.2s, background 0.2s; margin-bottom: 20px;
}
.pmlw-upload-zone:hover { border-color: var(--pm-cyan); background: var(--pm-detected-bg); }
.pmlw-upload-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.pmlw-upload-placeholder p { font-size: 16px; font-weight: 600; color: var(--pm-text); margin: 0 0 4px; }
.pmlw-upload-hint { font-size: 13px; color: var(--pm-muted); }

/* ─── Grille photos ─── */
.pmlw-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 600px) { .pmlw-photos-grid { grid-template-columns: repeat(3, 1fr); } }

/* Wrapper photo + contrôles */
.pmlw-photo-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Vignette photo */
.pmlw-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
}
.pmlw-photo-thumb.main { border-color: var(--pm-cyan); }
.pmlw-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Bouton supprimer */
.pmlw-photo-remove {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff;
    border: none; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}

/* Badge principale */
.pmlw-photo-main-badge {
    position: absolute; bottom: 4px; left: 4px;
    background: var(--pm-cyan); color: #fff;
    font-size: 9px; font-weight: 700;
    padding: 2px 6px; border-radius: 999px;
}

/* Bouton "Définir comme principale" */
.pmlw-photo-set-main {
    position: absolute; bottom: 4px; left: 4px;
    background: rgba(0,0,0,0.55); color: #fff;
    font-size: 9px; font-weight: 700;
    padding: 2px 6px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer; white-space: nowrap;
    transition: background 0.15s;
}
.pmlw-photo-set-main:hover {
    background: var(--pm-cyan); color: #fff; border-color: var(--pm-cyan);
}

/* Contrôles sous la photo : numéro + flèches */
.pmlw-photo-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.pmlw-photo-num {
    background: var(--pm-cyan);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pmlw-photo-controls button {
    background: #f1f5f9; color: #334155;
    border: none; cursor: pointer; font-size: 10px;
    width: 20px; height: 20px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; padding: 0;
    flex-shrink: 0;
}
.pmlw-photo-controls button:hover { background: var(--pm-cyan); color: #fff; }

/* ─── Upload progress ─── */
.pmlw-upload-progress { margin-bottom: 12px; }
.pmlw-upload-bar { height: 4px; background: var(--pm-border); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.pmlw-upload-fill { height: 100%; width: 0%; background: var(--pm-cyan); border-radius: 2px; transition: width 0.3s; }
#pmlw-upload-text { font-size: 13px; color: var(--pm-muted); }

/* ─── Récap photos ─── */
.pmlw-recap-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.pmlw-recap-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* ─── Boutons ─── */
.pmlw-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.pmlw-btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--pm-cyan); color: #fff; font-weight: 700; font-size: 15px;
    padding: 12px 28px; border-radius: 999px; border: none; cursor: pointer;
    text-decoration: none; font-family: inherit; transition: background 0.18s;
}
.pmlw-btn-primary:hover { background: var(--pm-cyan-dark); }
.pmlw-btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: var(--pm-text); font-weight: 600; font-size: 15px;
    padding: 12px 24px; border-radius: 999px; border: 1.5px solid var(--pm-border);
    cursor: pointer; text-decoration: none; font-family: inherit; transition: border-color 0.18s;
}
.pmlw-btn-secondary:hover { border-color: var(--pm-cyan); }
.pmlw-btn-publish {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--pm-black); color: #fff; font-weight: 700; font-size: 15px;
    padding: 12px 32px; border-radius: 999px; border: none; cursor: pointer;
    font-family: inherit; transition: background 0.18s;
}
.pmlw-btn-publish:hover { background: #1e293b; }
.pmlw-btn-publish:disabled { opacity: 0.6; cursor: default; }

/* ─── Erreurs ─── */
.pmlw-error { font-size: 13px; color: var(--pm-danger); margin-top: 8px; display: none; }
.pmlw-error.show { display: block; }

/* ─── Succès ─── */
.pmlw-success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: #dcfce7; color: var(--pm-success); font-size: 28px;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}

/* ─── Login notice ─── */
.pmlw-login-notice { text-align: center; padding: 60px 20px; font-family: "League Spartan", sans-serif; }
.pmlw-login-notice p { font-size: 16px; color: var(--pm-muted); margin-bottom: 16px; }
