/*
 * Kinetic Ultra — Parcel Tracking page
 * Design: .stitch/designs/07-parcel-tracking.html ("Logistics Command Terminal")
 *
 * Mini-palette scoped sur .k-parcel-page pour respecter dark/light + DESIGN.md.
 * Aucune bordure 1px solide structurelle ; profondeur par tonal stacking +
 * glassmorphism. Pas de drop-shadow : neon underglow uniquement.
 */

.k-parcel-page {
    /* tokens scoped */
    --kp-bg:            #0e0e13;
    --kp-surface:       #19191f;
    --kp-surface-low:   #131319;
    --kp-surface-high:  #1f1f26;
    --kp-surface-top:   #25252d;
    --kp-surface-deep:  #000000;
    --kp-text:          #f9f5fd;
    --kp-text-muted:    #acaab1;
    --kp-outline:       rgba(72, 71, 77, .15);
    --kp-primary:       #00D4FF;
    --kp-primary-soft:  rgba(0, 212, 255, .18);
    --kp-secondary:     #7B61FF;
    --kp-secondary-soft:rgba(123, 97, 255, .18);
    --kp-tertiary:      #00FF88;
    --kp-tertiary-soft: rgba(0, 255, 136, .18);
    --kp-danger:        #FF3B5C;
    --kp-danger-soft:   rgba(255, 59, 92, .18);

    position: relative;
    min-height: 70vh;
    padding-block: clamp(1.25rem, 1rem + 1.5vw, 3rem) clamp(2rem, 1.5rem + 2vw, 4rem);
    padding-inline: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
    background: var(--kp-bg);
    color: var(--kp-text);
    overflow: hidden;
}

html[data-theme="light"] .k-parcel-page {
    --kp-bg:            #f5f6f9;
    --kp-surface:       #ffffff;
    --kp-surface-low:   #eef0f5;
    --kp-surface-high:  #ffffff;
    --kp-surface-top:   #f9fafd;
    --kp-surface-deep:  #e9ebf1;
    --kp-text:          #0d0f15;
    --kp-text-muted:    #5b6172;
    --kp-outline:       rgba(20, 22, 32, .12);
    --kp-primary-soft:  rgba(0, 130, 200, .12);
    --kp-secondary-soft:rgba(80, 60, 200, .12);
    --kp-tertiary-soft: rgba(0, 160, 90, .12);
    --kp-danger-soft:   rgba(200, 40, 60, .10);
}

.k-parcel-page .k-parcel-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, .75rem + 1vw, 1.75rem);
    max-width: 1320px;
    margin-inline: auto;
    width: 100%;
}

/* Ambient glows */
.k-parcel-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .55;
    z-index: 0;
}
.k-parcel-glow--tr { top: -10%; right: -10%; width: 40vw; height: 40vw; background: var(--kp-primary-soft); }
.k-parcel-glow--bl { bottom: -10%; left: -10%; width: 30vw; height: 30vw; background: var(--kp-secondary-soft); }

/* ───────── Notice marchand ───────── */
.k-parcel-notice {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--kp-surface-high);
    border-radius: 12px;
    align-items: flex-start;
}
.k-parcel-notice--danger {
    background: linear-gradient(135deg, var(--kp-danger-soft), transparent 60%), var(--kp-surface-high);
    box-shadow: inset 0 0 0 1px var(--kp-danger-soft);
}
.k-parcel-notice--danger .k-parcel-notice__icon { color: var(--kp-danger); }
.k-parcel-notice--danger .k-parcel-notice__title { color: var(--kp-danger); }
.k-parcel-notice__icon {
    color: var(--kp-primary);
    flex-shrink: 0;
}
.k-parcel-notice__title {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    color: var(--kp-text);
    margin: 0 0 .35rem;
}
.k-parcel-notice__msg {
    margin: 0;
    color: var(--kp-text-muted);
    font-size: 13.5px;
    line-height: 1.55;
}
.k-parcel-notice__cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .65rem;
    color: var(--kp-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
}
.k-parcel-notice__cta:hover { text-decoration: underline; }

/* ───────── Labels génériques ───────── */
.k-parcel-page .k-parcel-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--kp-text-muted);
    font-weight: 500;
}

.k-parcel-section-title {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 16px;
    color: var(--kp-text);
    margin: 0 0 1rem;
    padding-bottom: .6rem;
    box-shadow: inset 0 -1px 0 var(--kp-primary-soft);
}

/* ───────── Hero ───────── */
.k-parcel-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.25rem, .75rem + 2vw, 2rem);
    align-items: center;
    padding: clamp(1.25rem, .75rem + 2vw, 2rem);
    background: linear-gradient(135deg, rgba(123, 97, 255, .05), rgba(0, 212, 255, .04));
    border-radius: 16px;
    backdrop-filter: blur(20px);
}
.k-parcel-hero__eyebrow {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: 12px;
    color: var(--kp-primary);
    margin-bottom: 1rem;
}
.k-parcel-hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 1rem;
    color: var(--kp-text);
    letter-spacing: -.01em;
}
.k-parcel-hero__lede {
    color: var(--kp-text-muted);
    max-width: 38ch;
    line-height: 1.55;
    margin: 0;
}

.k-parcel-lookup {
    background: var(--kp-surface-high);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    backdrop-filter: blur(24px);
}
.k-parcel-lookup__field { display: flex; flex-direction: column; gap: .35rem; }
.k-parcel-lookup__label { font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--kp-text-muted); }
.k-parcel-lookup__input {
    background: var(--kp-surface-deep);
    color: var(--kp-text);
    padding: .75rem .85rem;
    border-radius: 10px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: box-shadow .18s ease;
}
.k-parcel-lookup__input:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--kp-primary), inset 0 0 8px var(--kp-primary-soft);
}
.k-parcel-lookup__help { font-size: 11.5px; color: var(--kp-text-muted); margin: .15rem 0 0; }
.k-parcel-lookup__cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    background: var(--kp-primary);
    color: #001620;
    border: none;
    padding: .85rem 1rem;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow .18s ease, transform .12s ease;
}
.k-parcel-lookup__cta:hover { box-shadow: 0 0 30px var(--kp-primary-soft); }
.k-parcel-lookup__cta:active { transform: translateY(1px); }

/* ───────── Status hero card ───────── */
.k-parcel-status {
    background: var(--kp-surface-high);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.k-parcel-status::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(123, 97, 255, .06), rgba(0, 212, 255, .06));
    pointer-events: none;
}
.k-parcel-status__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1.1fr .8fr;
    gap: 2rem;
    align-items: stretch;
}

.k-parcel-carrier { display: flex; gap: 1rem; align-items: center; }
.k-parcel-carrier__logo {
    width: 64px; height: 64px;
    background: var(--kp-surface-deep);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--kp-text);
    box-shadow: 0 0 18px var(--kp-primary-soft);
}
.k-parcel-carrier__logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .08em;
}
.k-parcel-carrier__name {
    margin: .25rem 0 0;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--kp-text);
    font-weight: 500;
}

.k-parcel-tracking { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.k-parcel-tracking__row { display: flex; align-items: center; gap: .65rem; }
.k-parcel-tracking__number {
    font-family: 'Inter', monospace, sans-serif;
    font-size: 18px;
    letter-spacing: .04em;
    color: var(--kp-text);
    background: transparent;
}
.k-parcel-tracking__copy {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--kp-surface-deep);
    color: var(--kp-text-muted);
    border: none;
    cursor: pointer;
    transition: color .15s ease, box-shadow .15s ease;
}
.k-parcel-tracking__copy:hover { color: var(--kp-primary); box-shadow: 0 0 12px var(--kp-primary-soft); }

.k-parcel-status__pill-wrap { margin-top: 1.25rem; }
.k-parcel-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.k-parcel-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: kpPulse 1.8s ease-in-out infinite; }
@keyframes kpPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.k-parcel-pill--progress { background: var(--kp-primary-soft); color: var(--kp-primary); box-shadow: 0 0 26px var(--kp-primary-soft); }
.k-parcel-pill--success  { background: var(--kp-tertiary-soft); color: var(--kp-tertiary); box-shadow: 0 0 26px var(--kp-tertiary-soft); }
.k-parcel-pill--warn     { background: rgba(255, 200, 0, .18); color: #FFC400; box-shadow: 0 0 26px rgba(255, 200, 0, .18); }
.k-parcel-pill--danger   { background: var(--kp-danger-soft); color: var(--kp-danger); box-shadow: 0 0 26px var(--kp-danger-soft); }
.k-parcel-pill--info     { background: var(--kp-secondary-soft); color: var(--kp-secondary); box-shadow: 0 0 26px var(--kp-secondary-soft); }

.k-parcel-status__sub {
    margin: .75rem 0 0;
    color: var(--kp-text-muted);
    font-size: 13px;
}

/* ETA dial */
.k-parcel-status__dial { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.k-parcel-dial { position: relative; width: 220px; height: 220px; }
.k-parcel-dial__svg { width: 100%; height: 100%; filter: drop-shadow(0 0 8px var(--kp-primary-soft)); }
.k-parcel-dial__center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    text-align: center;
}
.k-parcel-dial__date {
    margin: .1rem 0 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--kp-primary);
    line-height: 1.05;
}
.k-parcel-dial__window {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--kp-text);
}

.k-parcel-kpis {
    display: flex;
    gap: 1.5rem;
    padding: .75rem 1.25rem;
    background: rgba(0, 0, 0, .25);
    border-radius: 10px;
}
.k-parcel-kpi { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.k-parcel-kpi__value { font-family: 'Space Grotesk', sans-serif; color: var(--kp-primary); font-weight: 700; font-size: 16px; letter-spacing: .04em; }

/* Actions stack */
.k-parcel-status__actions { display: flex; flex-direction: column; gap: .65rem; align-items: stretch; }
.k-parcel-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem 1rem;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.k-parcel-action--primary {
    background: var(--kp-primary);
    color: #001620;
}
.k-parcel-action--primary:hover { box-shadow: 0 0 26px var(--kp-primary-soft); }
.k-parcel-action--primary:disabled { background: var(--kp-surface-top); color: var(--kp-text-muted); cursor: not-allowed; box-shadow: none; }
.k-parcel-action--secondary { background: var(--kp-surface); color: var(--kp-text); box-shadow: inset 0 0 0 1px var(--kp-secondary-soft); }
.k-parcel-action--secondary:hover { box-shadow: inset 0 0 0 1px var(--kp-secondary), 0 0 22px var(--kp-secondary-soft); }
.k-parcel-action--ghost { background: var(--kp-surface-deep); color: var(--kp-text-muted); }
.k-parcel-action--ghost:hover { color: var(--kp-text); box-shadow: 0 0 14px var(--kp-outline); }

.k-parcel-status__attribution { margin-top: .35rem; display: flex; flex-direction: column; gap: .25rem; }
.k-parcel-status__plugin {
    display: inline-block;
    padding: .35rem .65rem;
    background: var(--kp-surface);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--kp-text);
    align-self: flex-start;
}

/* ───────── Tabs multi-shipments ───────── */
.k-parcel-tabs { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.k-parcel-tabs__group { display: inline-flex; gap: .35rem; padding: .35rem; background: var(--kp-surface); border-radius: 12px; }
.k-parcel-tab {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .85rem;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--kp-text-muted);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.k-parcel-tab.is-active { background: var(--kp-primary-soft); color: var(--kp-primary); box-shadow: 0 0 22px var(--kp-primary-soft); }
.k-parcel-tab__tail { font-family: 'Inter', monospace; letter-spacing: .04em; opacity: .85; }
.k-parcel-tab__badge {
    margin-left: .3rem;
    padding: .15rem .45rem;
    background: rgba(0,0,0,.3);
    border-radius: 6px;
    font-size: 10px;
    color: var(--kp-text-muted);
}
.k-parcel-tab--combined {
    background: transparent;
    color: var(--kp-secondary);
    box-shadow: inset 0 0 0 1px var(--kp-secondary-soft);
}
.k-parcel-tab--combined:disabled { opacity: .55; cursor: not-allowed; }

/* ───────── Stepper ───────── */
.k-parcel-stepper__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .65rem;
}
.k-parcel-stepper__item { display: flex; flex-direction: column; gap: .45rem; }
.k-parcel-stepper__label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--kp-text-muted);
}
.k-parcel-stepper__bar {
    height: 6px;
    border-radius: 4px;
    background: var(--kp-surface-top);
    display: block;
}
.k-parcel-stepper__item--completed .k-parcel-stepper__label { color: var(--kp-text); }
.k-parcel-stepper__item--completed .k-parcel-stepper__bar { background: linear-gradient(90deg, var(--kp-primary), var(--kp-secondary)); }
.k-parcel-stepper__item--active .k-parcel-stepper__label { color: var(--kp-primary); }
.k-parcel-stepper__item--active .k-parcel-stepper__bar {
    background: linear-gradient(90deg, var(--kp-primary), var(--kp-secondary));
    box-shadow: 0 0 22px var(--kp-primary-soft);
    animation: kpBarPulse 2s ease-in-out infinite;
}
@keyframes kpBarPulse { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.k-parcel-stepper__item--warn .k-parcel-stepper__bar { background: linear-gradient(90deg, #FFC400, var(--kp-danger)); }
.k-parcel-stepper__item--warn .k-parcel-stepper__label { color: var(--kp-danger); }

/* ───────── 2-col main ───────── */
.k-parcel-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Timeline checkpoints */
.k-parcel-timeline { background: transparent; }
.k-parcel-timeline__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; position: relative; padding-left: 1.5rem; }
.k-parcel-timeline__list::before { content: ''; position: absolute; left: 11px; top: 1rem; bottom: 1rem; width: 2px; background: var(--kp-outline); border-radius: 2px; }
.k-parcel-timeline__empty { color: var(--kp-text-muted); }

.k-parcel-checkpoint {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--kp-surface-low);
    border-radius: 10px;
}
.k-parcel-checkpoint__node {
    position: absolute;
    left: -1.5rem;
    top: 1.15rem;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--kp-primary);
    box-shadow: 0 0 12px var(--kp-primary), 0 0 0 4px var(--kp-bg);
}
.k-parcel-checkpoint.is-current { box-shadow: inset 3px 0 0 var(--kp-primary), 0 0 22px var(--kp-primary-soft); }
.k-parcel-checkpoint.is-future { opacity: .6; background: var(--kp-surface-deep); }
.k-parcel-checkpoint.is-future .k-parcel-checkpoint__node { background: transparent; box-shadow: inset 0 0 0 2px var(--kp-text-muted), 0 0 0 4px var(--kp-bg); }

.k-parcel-checkpoint__headline { margin: 0; font-family: 'Inter', sans-serif; font-weight: 500; color: var(--kp-text); }
.k-parcel-checkpoint__location { margin: .25rem 0 0; color: var(--kp-text-muted); font-size: 13px; }
.k-parcel-checkpoint__substatus {
    display: inline-block;
    margin-top: .5rem;
    padding: .15rem .5rem;
    background: rgba(0,0,0,.2);
    border-radius: 6px;
    font-size: 10.5px;
    color: var(--kp-text-muted);
    font-family: 'Inter', monospace;
}
.k-parcel-checkpoint__time { text-align: right; display: flex; flex-direction: column; gap: .15rem; }
.k-parcel-checkpoint__hour { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--kp-primary); }
.k-parcel-checkpoint.is-future .k-parcel-checkpoint__hour { color: var(--kp-text-muted); }
.k-parcel-checkpoint__date { font-size: 11.5px; color: var(--kp-text-muted); }
.k-parcel-checkpoint__upcoming { font-family: 'Space Grotesk', sans-serif; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--kp-text-muted); }

/* Sidecar */
.k-parcel-sidecar { display: flex; flex-direction: column; gap: .75rem; }
.k-parcel-panel {
    background: var(--kp-surface);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.k-parcel-panel__title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--kp-text-muted);
}
.k-parcel-panel__row { display: flex; justify-content: space-between; align-items: center; }
.k-parcel-panel__edit { color: var(--kp-secondary); font-size: 12.5px; text-decoration: none; }
.k-parcel-panel__edit:hover { text-decoration: underline; }

.k-parcel-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.k-parcel-item { display: flex; gap: .85rem; align-items: center; }
.k-parcel-item--empty { color: var(--kp-text-muted); font-size: 13px; }
.k-parcel-item__thumb { width: 48px; height: 48px; flex-shrink: 0; background: var(--kp-surface-top); border-radius: 8px; overflow: hidden; }
.k-parcel-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-parcel-item__meta { display: flex; flex-direction: column; gap: .15rem; }
.k-parcel-item__name { color: var(--kp-text); font-size: 14px; text-decoration: none; }
.k-parcel-item__name:hover { color: var(--kp-primary); }
.k-parcel-item__qty { color: var(--kp-text-muted); font-size: 12px; }

.k-parcel-panel__footer { padding-top: .85rem; box-shadow: inset 0 1px 0 var(--kp-outline); display: flex; flex-direction: column; gap: .25rem; }
.k-parcel-panel__meta { margin: 0; font-size: 12px; color: var(--kp-text-muted); }
.k-parcel-panel__link { color: var(--kp-primary); font-size: 13px; text-decoration: none; }
.k-parcel-panel__link:hover { text-decoration: underline; }

.k-parcel-address__name { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 17px; color: var(--kp-text); }
.k-parcel-address__lines { font-style: normal; font-size: 13.5px; color: var(--kp-text-muted); line-height: 1.6; margin: 0; }

.k-parcel-mini-map {
    position: relative;
    height: 110px;
    background:
        radial-gradient(circle at 30% 70%, rgba(0, 212, 255, .12), transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(123, 97, 255, .12), transparent 40%),
        var(--kp-surface-deep);
    border-radius: 10px;
    overflow: hidden;
}
.k-parcel-mini-map__pin {
    position: absolute;
    left: 18%;
    top: 70%;
    width: 12px; height: 12px;
    background: var(--kp-primary);
    border-radius: 50%;
    box-shadow: 0 0 18px var(--kp-primary), 0 0 0 4px rgba(0, 212, 255, .15);
    animation: kpPulse 1.8s ease-in-out infinite;
}
.k-parcel-mini-map__route { position: absolute; inset: 0; width: 100%; height: 100%; }

.k-parcel-panel--help { box-shadow: inset 0 0 0 1px var(--kp-secondary-soft); }
.k-parcel-help__status { display: inline-flex; align-items: center; gap: .35rem; color: var(--kp-tertiary); font-size: 11px; font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.k-parcel-help__dot { width: 6px; height: 6px; background: var(--kp-tertiary); border-radius: 50%; box-shadow: 0 0 12px var(--kp-tertiary); }
.k-parcel-help__lede { margin: 0; color: var(--kp-text-muted); font-size: 13px; }
.k-parcel-help__cta { justify-content: center; }

/* Empty state */
.k-parcel-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--kp-surface);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.k-parcel-empty__icon { color: var(--kp-primary); filter: drop-shadow(0 0 20px var(--kp-primary-soft)); }
.k-parcel-empty__title { font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .14em; font-size: 18px; color: var(--kp-text); margin: 0; }
.k-parcel-empty__lede { color: var(--kp-text-muted); max-width: 52ch; margin: 0; line-height: 1.6; }
.k-parcel-empty__cta-row { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }

/* Integrations banner */
.k-parcel-integrations {
    background: var(--kp-surface);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.k-parcel-integrations__eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: 11px;
    color: var(--kp-text-muted);
}
.k-parcel-integrations__chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.k-parcel-chip {
    padding: .4rem .85rem;
    background: var(--kp-surface-low);
    border-radius: 8px;
    font-family: 'Inter', monospace, sans-serif;
    font-size: 12px;
    color: var(--kp-text-muted);
    box-shadow: inset 0 0 0 1px var(--kp-outline);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.k-parcel-chip.is-active { background: var(--kp-primary-soft); color: var(--kp-primary); box-shadow: inset 0 0 0 1px var(--kp-primary), 0 0 22px var(--kp-primary-soft); }
.k-parcel-chip__dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.k-parcel-chip--custom { color: var(--kp-secondary); box-shadow: inset 0 0 0 1px var(--kp-secondary-soft); }
.k-parcel-integrations__tagline { margin: 0; color: var(--kp-text-muted); font-size: 13.5px; max-width: 64ch; line-height: 1.6; }

/* ───────── Fluid baselines (mobile first refinements) ───────── */

/* Tab strip : autorise wrap + scroll horizontal si débordement */
.k-parcel-tabs { row-gap: .5rem; }
.k-parcel-tabs__group {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.k-parcel-tabs__group::-webkit-scrollbar { height: 4px; }
.k-parcel-tabs__group::-webkit-scrollbar-thumb { background: var(--kp-outline); border-radius: 2px; }
.k-parcel-tab { white-space: nowrap; }

/* KPIs : autorise wrap si le dial est étroit */
.k-parcel-kpis { flex-wrap: wrap; justify-content: center; row-gap: .35rem; }

/* Status / hero : padding fluide global */
.k-parcel-status { padding: clamp(1.25rem, .75rem + 2vw, 2rem); }
.k-parcel-status__grid { gap: clamp(1.25rem, .75rem + 1.5vw, 2rem); }
.k-parcel-hero__title { font-size: clamp(1.65rem, 1.1rem + 2.5vw, 2.75rem); }
.k-parcel-empty { padding: clamp(2rem, 1rem + 4vw, 4rem) clamp(1rem, .5rem + 3vw, 2rem); }
.k-parcel-integrations { padding: clamp(1.25rem, .75rem + 2vw, 2rem); }
.k-parcel-panel { padding: clamp(1rem, .75rem + 1vw, 1.25rem); }

/* Sidecar : sticky sur grand écran (proximité dial / actions) */
@media (min-width: 1100px) {
    .k-parcel-sidecar {
        position: sticky;
        top: clamp(5rem, 4rem + 2vw, 7rem);
        align-self: start;
    }
}

/* ───────── Breakpoint 1024 — tablet landscape ───────── */
@media (max-width: 1024px) {
    /* Status hero passe en 2 colonnes : identity à gauche, dial+actions stack à droite */
    .k-parcel-status__grid {
        grid-template-columns: 1fr 1fr;
    }
    .k-parcel-status__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .k-parcel-status__actions .k-parcel-action { flex: 1 1 calc(33% - .5rem); min-width: 180px; }
    .k-parcel-status__attribution { flex-basis: 100%; }

    .k-parcel-main { grid-template-columns: 1fr; }
    .k-parcel-hero { grid-template-columns: 1fr; }
    .k-parcel-stepper__list { grid-template-columns: repeat(5, minmax(80px, 1fr)); gap: .5rem; }
}

/* ───────── Breakpoint 768 — tablet portrait ───────── */
@media (max-width: 768px) {
    .k-parcel-status__grid { grid-template-columns: 1fr; }
    .k-parcel-status__actions { flex-direction: column; }
    .k-parcel-status__actions .k-parcel-action { flex: 1 1 100%; min-width: 0; }
    .k-parcel-section-title { font-size: 14px; }
    .k-parcel-carrier { gap: .85rem; }
    .k-parcel-carrier__logo { width: 56px; height: 56px; }
    .k-parcel-mini-map { height: 90px; }
}

/* ───────── Breakpoint 640 — mobile landscape ───────── */
@media (max-width: 640px) {
    .k-parcel-stepper__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
    .k-parcel-stepper__label { font-size: 9px; letter-spacing: .08em; line-height: 1.15; }
    .k-parcel-dial { width: clamp(150px, 50vw, 200px); height: clamp(150px, 50vw, 200px); }
    .k-parcel-dial__date { font-size: clamp(22px, 5vw, 28px); }
    .k-parcel-checkpoint {
        grid-template-columns: 1fr;
        padding: .9rem 1rem;
    }
    .k-parcel-checkpoint__time { text-align: left; flex-direction: row; gap: .65rem; flex-wrap: wrap; }
    .k-parcel-timeline__list { padding-left: 1.25rem; }
    .k-parcel-timeline__list::before { left: 5px; }
    .k-parcel-checkpoint__node { left: -1.25rem; }

    .k-parcel-tracking__number { font-size: 16px; word-break: break-all; }
    .k-parcel-tracking__row { flex-wrap: wrap; }

    .k-parcel-hero__lede { max-width: none; }
    .k-parcel-lookup { padding: 1rem; }
    .k-parcel-lookup__cta { width: 100%; }

    .k-parcel-notice { flex-direction: column; gap: .65rem; }
    .k-parcel-notice__icon { width: 32px; }

    .k-parcel-status__attribution { align-items: flex-start; }
}

/* ───────── Breakpoint 400 — small phones ───────── */
@media (max-width: 400px) {
    .k-parcel-pill { font-size: 11.5px; padding: .4rem .75rem; }
    .k-parcel-tab { padding: .5rem .65rem; font-size: 10.5px; }
    .k-parcel-tab__tail { display: none; }
    .k-parcel-tab__badge { font-size: 9px; padding: .1rem .35rem; }
    .k-parcel-stepper__label {
        /* labels masqués visuellement, gardés pour SR ; les barres restent visibles */
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
    }
    .k-parcel-stepper__item { position: relative; }
    .k-parcel-stepper__bar { height: 8px; }
    .k-parcel-status { padding: 1rem; }
    .k-parcel-hero { padding: 1rem; }
    .k-parcel-empty__icon svg { width: 48px; height: 48px; }
    .k-parcel-integrations__chips { gap: .35rem; }
    .k-parcel-chip { font-size: 11px; padding: .35rem .65rem; }
}

/* ───────── Touch devices — touch targets 44px min ───────── */
@media (pointer: coarse) {
    .k-parcel-tracking__copy { width: 44px; height: 44px; }
    .k-parcel-action { min-height: 44px; }
    .k-parcel-lookup__cta { min-height: 48px; }
    .k-parcel-tab { min-height: 40px; }
    .k-parcel-panel__edit, .k-parcel-panel__link { padding: .25rem 0; }
}

/* ───────── Motion preference ───────── */
@media (prefers-reduced-motion: reduce) {
    .k-parcel-pill__dot,
    .k-parcel-stepper__item--active .k-parcel-stepper__bar,
    .k-parcel-mini-map__pin {
        animation: none;
    }
    .k-parcel-action,
    .k-parcel-lookup__input,
    .k-parcel-tab { transition: none; }
}
