/* =====================================================================
   Design system "Ma voiture" — fiche véhicule, wizard d'annonce, compte.
   Fichier additif et scoppé (chargé uniquement sur les 3 écrans concernés)
   pour ne pas affecter le reste du site déjà en production.
   Palette et typographie formalisées en tokens ci-dessous.
   ===================================================================== */

:root {
    /* --- Couleurs de marque (fournies) --- */
    --mv-primary: #FF5A36;
    --mv-primary-dark: #E64520;
    --mv-primary-soft: #FFEDE7;
    --mv-secondary: #12123A;
    --mv-secondary-soft: #F1F1F4;
    --mv-positive: #2ECC8F;
    --mv-positive-soft: #E4FAF1;
    --mv-bg: #F4F5F7;
    --mv-surface: #FFFFFF;

    /* --- Texte / bordures (dérivés, cohérents avec le reste du dashboard) --- */
    --mv-text: #12123A;
    --mv-text-muted: #7A7E8C;
    --mv-border: #E7E8EC;
    --mv-negative: #E63946;
    --mv-negative-soft: #FDEAEC;

    /* --- Couleurs fixes par catégorie de dépense (icône + couleur réutilisées
       partout : graphique, listes, formulaire) --- */
    --mv-cat-carburant: #FF5A36;
    --mv-cat-carburant-soft: #FFEDE7;
    --mv-cat-recharge: #2ECC8F;
    --mv-cat-recharge-soft: #E4FAF1;
    --mv-cat-entretien: #12123A;
    --mv-cat-entretien-soft: #ECECF2;
    --mv-cat-assurance: #3B6FE0;
    --mv-cat-assurance-soft: #E8EEFC;
    --mv-cat-taxe: #D9A441;
    --mv-cat-taxe-soft: #FBF1DF;
    --mv-cat-amende: #E63946;
    --mv-cat-amende-soft: #FDEAEC;
    --mv-cat-peage: #2C9AA6;
    --mv-cat-peage-soft: #E4F5F6;
    --mv-cat-autre: #8A8FA3;
    --mv-cat-autre-soft: #EEEFF3;

    /* --- Typographie : réutilise les polices déjà auto-hébergées du site --- */
    --mv-font-body: 'Plex Sans Arabic', 'Plex Sans', sans-serif;
    --mv-font-data: 'Plex Mono', monospace;

    /* --- Rythme / forme --- */
    --mv-radius-sm: 8px;
    --mv-radius-md: 14px;
    --mv-radius-lg: 20px;
    --mv-shadow-sm: 0 1px 3px rgba(18, 18, 58, .06);
    --mv-shadow-md: 0 6px 20px rgba(18, 18, 58, .08);
    --mv-shadow-lg: 0 12px 32px rgba(18, 18, 58, .14);
    --mv-tap-min: 44px;

    /* --- Empilement --- */
    --mv-z-bottomnav: 40;
    --mv-z-sticky: 30;
    --mv-z-sheet: 50;
    --mv-z-overlay: 60;
}

.mv-scope {
    font-family: var(--mv-font-body);
    color: var(--mv-text);
}

/* =====================================================================
   Utilitaires génériques
   ===================================================================== */

.mv-scope .mono {
    font-family: var(--mv-font-data);
    font-feature-settings: 'tnum' 1;
    font-variant-numeric: tabular-nums;
}

.mv-scope .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================================================================
   Icônes par catégorie — badge rond couleur fixe + icône Lucide
   ===================================================================== */

.mv-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mv-cat-icon .icon { width: 19px; height: 19px; }

.mv-cat-icon--carburant { background: var(--mv-cat-carburant-soft); color: var(--mv-cat-carburant); }
.mv-cat-icon--recharge  { background: var(--mv-cat-recharge-soft);  color: var(--mv-cat-recharge); }
.mv-cat-icon--entretien { background: var(--mv-cat-entretien-soft); color: var(--mv-cat-entretien); }
.mv-cat-icon--assurance { background: var(--mv-cat-assurance-soft); color: var(--mv-cat-assurance); }
.mv-cat-icon--taxe      { background: var(--mv-cat-taxe-soft);      color: var(--mv-cat-taxe); }
.mv-cat-icon--amende    { background: var(--mv-cat-amende-soft);    color: var(--mv-cat-amende); }
.mv-cat-icon--peage     { background: var(--mv-cat-peage-soft);     color: var(--mv-cat-peage); }
.mv-cat-icon--autre     { background: var(--mv-cat-autre-soft);     color: var(--mv-cat-autre); }

/* =====================================================================
   Odomètre — signature visuelle : chiffres façon compteur kilométrique,
   animation de montée au montage (voir vehicle-interactions.js)
   ===================================================================== */

.mv-odometer {
    display: inline-flex;
    direction: ltr; /* les chiffres se lisent toujours de gauche à droite, même en RTL */
    gap: 2px;
    unicode-bidi: isolate;
}
.mv-odometer__digit {
    font-family: var(--mv-font-data);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mv-secondary);
    color: #fff;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35);
    position: relative;
    overflow: hidden;
}
.mv-odometer__digit::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 45%;
    background: linear-gradient(rgba(255, 255, 255, .12), transparent);
    pointer-events: none;
}
.mv-odometer__digit.is-sep {
    background: none;
    box-shadow: none;
    color: var(--mv-text-muted);
    width: auto !important;
    font-weight: 700;
}
.mv-odometer--lg .mv-odometer__digit { width: 26px; height: 36px; font-size: 20px; }
.mv-odometer--md .mv-odometer__digit { width: 15px; height: 22px; font-size: 13px; border-radius: 3px; }
.mv-odometer--accent .mv-odometer__digit { background: var(--mv-primary); }

/* Compteur simple (dinars, kilomètres agrégés) : pas de "fenêtres", juste le
   chiffre animé en police data, utilisé dans les cartes stats. */
.mv-counter {
    font-family: var(--mv-font-data);
    font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Carte statistique — compteur animé, hover/tap élévation + teinte
   ===================================================================== */

.mv-stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 992px) {
    .mv-stat-cards { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
.mv-stat-card {
    background: var(--mv-surface);
    border-radius: var(--mv-radius-md);
    box-shadow: var(--mv-shadow-sm);
    padding: 16px;
    min-height: var(--mv-tap-min);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    cursor: default;
}
.mv-stat-card:hover, .mv-stat-card:active {
    transform: translateY(-3px);
    box-shadow: var(--mv-shadow-md);
    background: var(--mv-primary-soft);
}
.mv-stat-card__icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--mv-primary-soft);
    color: var(--mv-primary);
    margin-bottom: 10px;
}
.mv-stat-card__icon .icon { width: 18px; height: 18px; }
.mv-stat-card--positive .mv-stat-card__icon { background: var(--mv-positive-soft); color: var(--mv-positive); }
.mv-stat-card--alert .mv-stat-card__icon { background: var(--mv-negative-soft); color: var(--mv-negative); }
.mv-stat-card__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--mv-secondary);
    display: block;
    line-height: 1.2;
}
.mv-stat-card__label {
    font-size: 12.5px;
    color: var(--mv-text-muted);
    margin: 4px 0 0;
}

/* =====================================================================
   Chips sélectionnables (équipements), groupées par catégorie
   ===================================================================== */

.mv-chip-category { margin-bottom: 18px; }
.mv-chip-category__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mv-text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 10px;
}
.mv-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    min-height: var(--mv-tap-min);
    border-radius: 999px;
    border: 1.5px solid var(--mv-border);
    background: var(--mv-surface);
    color: var(--mv-text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .1s ease;
}
.mv-chip:active { transform: scale(.97); }
.mv-chip .icon { width: 15px; height: 15px; opacity: .8; }
.mv-chip input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.mv-chip:has(input:checked), .mv-chip.is-selected {
    border-color: var(--mv-primary);
    background: var(--mv-primary);
    color: #fff;
}
.mv-chip:has(input:checked) .icon, .mv-chip.is-selected .icon { opacity: 1; }
.mv-chip:has(input:focus-visible) {
    outline: 2px solid var(--mv-primary);
    outline-offset: 2px;
}

/* =====================================================================
   Navigation basse (mobile) + tiroir "plus"
   ===================================================================== */

.mv-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: var(--mv-z-bottomnav);
    background: var(--mv-surface);
    border-top: 1px solid var(--mv-border);
    box-shadow: 0 -4px 16px rgba(18, 18, 58, .06);
    display: flex;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 992px) {
    .mv-bottom-nav { display: none; }
}
.mv-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    color: var(--mv-text-muted);
    font-size: 11px;
    background: none;
    border: none;
    position: relative;
}
.mv-bottom-nav__item .icon { width: 22px; height: 22px; }
.mv-bottom-nav__item.is-active { color: var(--mv-primary); }
.mv-bottom-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 28px; height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--mv-primary);
}
.mv-bottom-nav__badge {
    position: absolute;
    top: 4px;
    inset-inline-start: calc(50% + 6px);
    background: var(--mv-negative);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

/* Espace réservé en bas de page mobile pour ne pas passer sous la bottom-nav */
.mv-scope.mv-has-bottom-nav { padding-bottom: 74px; }
@media (min-width: 992px) {
    .mv-scope.mv-has-bottom-nav { padding-bottom: 0; }
}

/* Tiroir "plus" (profil / sécurité / déconnexion) */
.mv-sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(18, 18, 58, .45);
    z-index: var(--mv-z-sheet);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.mv-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.mv-sheet {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: calc(var(--mv-z-sheet) + 1);
    background: var(--mv-surface);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--mv-shadow-lg);
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.32,.72,0,1);
}
.mv-sheet.is-open { transform: translateY(0); }
.mv-sheet__handle {
    width: 40px; height: 4px;
    background: var(--mv-border);
    border-radius: 999px;
    margin: 6px auto 14px;
}
.mv-sheet a, .mv-sheet button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: var(--mv-tap-min);
    padding: 0 8px;
    background: none;
    border: none;
    font-size: 15px;
    color: var(--mv-text);
    text-align: start;
}
.mv-sheet .icon { width: 20px; height: 20px; color: var(--mv-text-muted); }

/* =====================================================================
   Cartes empilées (mobile) vs tableau (desktop)
   ===================================================================== */

.mv-row-cards { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 768px) {
    .mv-row-cards { display: none; }
}
.mv-table-wrap { display: none; }
@media (min-width: 768px) {
    .mv-table-wrap { display: block; }
}

/* Ligne "swipe to delete/edit" (mobile uniquement) */
.mv-swipe {
    position: relative;
    border-radius: var(--mv-radius-md);
    overflow: hidden;
    background: var(--mv-surface);
    box-shadow: var(--mv-shadow-sm);
}
.mv-swipe__actions {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    display: flex;
    /* En RTL, les actions swipe apparaissent du côté gauche (sens de balayage
       miroir de LTR) : on les ancre logiquement à "end", qui pointe à gauche
       en RTL grâce à inset-inline-end. */
}
.mv-swipe__action {
    width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    color: #fff;
    font-size: 11px;
}
.mv-swipe__action .icon { width: 18px; height: 18px; }
.mv-swipe__action--edit { background: var(--mv-secondary); }
.mv-swipe__action--delete { background: var(--mv-negative); }
.mv-swipe__card {
    position: relative;
    background: var(--mv-surface);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform .22s cubic-bezier(.22,1,.36,1);
    touch-action: pan-y;
}
.mv-swipe__body { flex: 1; min-width: 0; }
.mv-swipe__title { font-weight: 600; font-size: 14.5px; color: var(--mv-secondary); }
.mv-swipe__meta { font-size: 12.5px; color: var(--mv-text-muted); margin-top: 2px; }
.mv-swipe__value { font-family: var(--mv-font-data); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.mv-swipe__hint {
    text-align: center;
    font-size: 11.5px;
    color: var(--mv-text-muted);
    margin: -2px 0 10px;
}
.mv-swipe__hint .icon { width: 12px; height: 12px; vertical-align: -2px; }

/* =====================================================================
   États vides
   ===================================================================== */

.mv-empty {
    text-align: center;
    padding: 44px 20px;
}
.mv-empty__icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--mv-secondary-soft);
    color: var(--mv-text-muted);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.mv-empty__icon .icon { width: 26px; height: 26px; }
.mv-empty__title { font-weight: 700; color: var(--mv-secondary); margin-bottom: 4px; }
.mv-empty__hint { font-size: 13.5px; color: var(--mv-text-muted); margin-bottom: 16px; }

/* =====================================================================
   Bloc d'information (explication d'une règle/quota, pas une erreur)
   ===================================================================== */

.mv-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--mv-secondary-soft);
    border-radius: var(--mv-radius-md);
    margin-bottom: 18px;
}
.mv-notice__icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--mv-primary-soft);
    color: var(--mv-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mv-notice__icon .icon { width: 17px; height: 17px; }
.mv-notice__body { font-size: 13px; line-height: 1.55; color: var(--mv-text); }
.mv-notice__title { font-weight: 700; color: var(--mv-secondary); margin-bottom: 2px; }
.mv-notice--warning .mv-notice__icon { background: var(--mv-cat-taxe-soft); color: var(--mv-cat-taxe); }

/* =====================================================================
   Préchargeur plein écran (soumission du formulaire d'annonce) — l'envoi se
   fait par POST classique (multipart, pas d'AJAX), donc pas de vraie barre
   de progression possible ; on rassure juste l'utilisateur pendant l'upload
   des photos, potentiellement long, et on bloque tout second clic.
   ===================================================================== */

.mv-submit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--mv-z-overlay);
    background: rgba(18, 18, 58, .55);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.mv-submit-overlay.is-visible { display: flex; }
.mv-submit-overlay__box {
    background: var(--mv-surface);
    border-radius: var(--mv-radius-lg);
    padding: 32px 28px;
    box-shadow: var(--mv-shadow-lg);
    max-width: 300px;
}
.mv-submit-overlay__spinner {
    width: 40px; height: 40px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 4px solid var(--mv-secondary-soft);
    border-top-color: var(--mv-primary);
    animation: mv-spin .8s linear infinite;
}
.mv-submit-overlay__title { font-weight: 700; color: var(--mv-secondary); margin-bottom: 4px; }
.mv-submit-overlay__hint { font-size: 13px; color: var(--mv-text-muted); margin: 0; }
@keyframes mv-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Boutons
   ===================================================================== */

.mv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--mv-tap-min);
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.mv-btn .icon { width: 17px; height: 17px; }
.mv-btn:active { transform: scale(.97); }
.mv-btn--primary { background: var(--mv-primary); color: #fff; box-shadow: 0 4px 14px rgba(255, 90, 54, .3); }
.mv-btn--primary:hover { background: var(--mv-primary-dark); }
.mv-btn--ghost { background: var(--mv-secondary-soft); color: var(--mv-secondary); }
.mv-btn--icon { width: var(--mv-tap-min); height: var(--mv-tap-min); padding: 0; border-radius: 50%; background: var(--mv-secondary-soft); color: var(--mv-secondary); }

/* Bouton "générer" : doit se remarquer spontanément dans le formulaire (pas
   juste au survol) — halo pulsé en continu, désactivé pour qui préfère moins
   de mouvement. */
.mv-btn--generate {
    background: var(--mv-primary);
    color: #fff;
    font-size: 13px;
    min-height: 34px;
    padding: 0 14px;
    animation: mv-generate-pulse 2.2s ease-out infinite;
}
.mv-btn--generate:hover { background: var(--mv-primary-dark); }
.mv-btn--generate .icon { animation: mv-generate-spark 2.2s ease-in-out infinite; }

@keyframes mv-generate-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 90, 54, .55); }
    70% { box-shadow: 0 0 0 11px rgba(255, 90, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0); }
}
@keyframes mv-generate-spark {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.18) rotate(-8deg); }
}
@media (prefers-reduced-motion: reduce) {
    .mv-btn--generate, .mv-btn--generate .icon { animation: none; }
}

/* =====================================================================
   Cartes / sections génériques (remplace common-card dans le nouveau scope)
   ===================================================================== */

.mv-card {
    background: var(--mv-surface);
    border-radius: var(--mv-radius-md);
    box-shadow: var(--mv-shadow-sm);
    padding: 18px;
    margin-bottom: 16px;
    overflow: hidden;
}
.mv-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    /* Bande d'en-tête pleine largeur, colorée, distincte du corps blanc de la carte :
       déborde du padding de .mv-card sur les 3 côtés puis reprend son propre padding. */
    margin: -18px -18px 14px -18px;
    padding: 14px 18px;
    background: var(--mv-primary);
}
.mv-card__title {
    font-size: 15.5px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mv-card__title .icon { width: 18px; height: 18px; color: #fff; }

/* Bouton "+ إضافة" dans un en-tête orange : inversé (fond blanc, texte orange)
   pour rester lisible, sinon il se fondrait dans le fond de l'en-tête. */
.mv-card__header .mv-btn--primary {
    background: #fff;
    color: var(--mv-primary);
    box-shadow: none;
}
.mv-card__header .mv-btn--primary:hover { background: var(--mv-bg); }

/* =====================================================================
   Onglets (fiche véhicule : السجل / الإحصائيات)
   ===================================================================== */

.mv-tabs {
    display: flex;
    gap: 6px;
    background: var(--mv-bg);
    padding: 4px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.mv-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--mv-tap-min);
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--mv-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.mv-tab .icon { width: 16px; height: 16px; }
.mv-tab.is-active {
    background: var(--mv-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 90, 54, .3);
}
.mv-tab-panel { display: none; }
.mv-tab-panel.is-active { display: block; animation: mv-step-in .2s ease; }

/* =====================================================================
   Graphiques : légende cliquable
   ===================================================================== */

.mv-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}
.mv-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--mv-bg);
    border: none;
    cursor: pointer;
    color: var(--mv-text);
    transition: opacity .15s ease, background-color .15s ease;
}
.mv-legend__item:active { transform: scale(.97); }
.mv-legend__swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mv-legend__item.is-hidden { opacity: .4; text-decoration: line-through; }

/* =====================================================================
   Wizard multi-étapes (formulaire d'annonce)
   ===================================================================== */

.mv-wizard-header {
    position: sticky;
    top: 0;
    z-index: var(--mv-z-sticky);
    background: var(--mv-surface);
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--mv-border);
}
.mv-wizard-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.mv-wizard-progress__seg {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--mv-border);
    overflow: hidden;
}
.mv-wizard-progress__seg::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: var(--mv-primary);
    border-radius: 999px;
    transition: width .3s ease;
}
.mv-wizard-progress__seg.is-done::after,
.mv-wizard-progress__seg.is-current::after { width: 100%; }
.mv-wizard-progress__seg.is-current::after { background: var(--mv-primary); }
.mv-wizard-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.mv-wizard-step-label {
    font-size: 12.5px;
    color: var(--mv-text-muted);
}
.mv-wizard-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--mv-secondary);
    margin: 2px 0 0;
}

.mv-wizard-step { display: none; padding: 18px 16px calc(140px + env(safe-area-inset-bottom, 0)); }
.mv-wizard-step.is-active { display: block; animation: mv-step-in .25s ease; }
@keyframes mv-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mv-wizard-nav {
    position: fixed;
    inset-inline: 0;
    /* Flotte au-dessus de la barre de navigation basse du compte (.mv-bottom-nav,
       58px de haut + l'encoche éventuelle) au lieu de la recouvrir : les deux
       restent visibles et utilisables sur mobile. */
    bottom: calc(58px + env(safe-area-inset-bottom, 0));
    z-index: var(--mv-z-sticky);
    background: var(--mv-surface);
    border-top: 1px solid var(--mv-border);
    box-shadow: 0 -2px 10px rgba(18, 18, 58, .05);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
}
.mv-wizard-nav .mv-btn { flex: 1; }
.mv-wizard-nav .mv-btn--ghost { flex: 0 0 auto; width: var(--mv-tap-min); padding: 0; }

@media (min-width: 992px) {
    #listing-wizard {
        background: var(--mv-surface);
        border-radius: var(--mv-radius-md);
        box-shadow: var(--mv-shadow-sm);
        padding: 25px;
    }
    .mv-wizard-header { position: static; border-bottom: none; padding: 0 0 20px; }
    .mv-wizard-step { padding: 0 0 20px; }
    .mv-wizard-nav { position: static; border-top: none; padding: 20px 0 0; background: none; }
    .mv-wizard-nav .mv-btn--ghost { flex: 0 0 auto; width: auto; padding: 0 20px; }
}

/* Champ avec icône contextuelle (calendrier, compteur...) */
.mv-field-icon { position: relative; }
.mv-field-icon .icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: var(--mv-text-muted);
    pointer-events: none;
}
.mv-field-icon input, .mv-field-icon select {
    padding-inline-start: 40px !important;
}

/* Checklist choix multiple (ex : types d'entretien dans la modale dépense) */
.mv-check-list {
    border: 1.5px solid var(--mv-border);
    border-radius: var(--mv-radius-sm);
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}
.mv-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.mv-check-item:hover {
    background: var(--mv-bg);
}
.mv-check-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--mv-primary);
    flex-shrink: 0;
}
.mv-check-item span {
    font-size: 14px;
    color: var(--mv-text);
}

@media (prefers-reduced-motion: reduce) {
    .mv-stat-card, .mv-chip, .mv-btn, .mv-swipe__card, .mv-sheet, .mv-sheet-backdrop {
        transition: none !important;
    }
    .mv-wizard-step.is-active { animation: none !important; }
}
