/* ============================================================
   SUIVI EXPÉDITION — Mobile-first
   Architecture identique à nos-agences
   ============================================================ */

/* ── Section wrapper ────────────────────────────────────────── */
.page-wrap {
    padding-top: 24px;
    padding-bottom: 80px;
}

/* ── Kicker (pastille) ──────────────────────────────────────── */
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: var(--brand-50);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Status hero-card (résultat) ────────────────────────────── */
.trk-status-bar {
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    border-radius: var(--radius-lg);
    padding: clamp(18px, 5vw, 28px) clamp(16px, 4vw, 28px);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.trk-status-bar::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}

.trk-status-bar::after {
    content: '';
    position: absolute;
    left: -20px;
    bottom: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

.trk-status-bar__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 600px) {
    .trk-status-bar__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.trk-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .50);
    margin-bottom: 4px;
}

.trk-number {
    font-size: clamp(17px, 4.5vw, 24px);
    font-weight: 700;
    color: #fff;
    word-break: break-all;
    line-height: 1.2;
}

.trk-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .20);
    width: fit-content;
}

.trk-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(1.25);
    }
}

.trk-badge__text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* ── Timeline card ──────────────────────────────────────────── */
.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.timeline-card__head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timeline-card__head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-card__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-600);
}

.timeline-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.timeline-count {
    background: var(--brand-800);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-body {
    padding: clamp(16px, 4vw, 28px);
}

/* ── Timeline items ─────────────────────────────────────────── */
.timeline-list {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: clamp(10px, 3vw, 16px);
    padding-bottom: clamp(16px, 4vw, 28px);
    animation: fadeUp .35s ease both;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:last-child .tl-line {
    display: none;
}

.timeline-item:nth-child(1) {
    animation-delay: .04s;
}

.timeline-item:nth-child(2) {
    animation-delay: .10s;
}

.timeline-item:nth-child(3) {
    animation-delay: .16s;
}

.timeline-item:nth-child(4) {
    animation-delay: .22s;
}

.timeline-item:nth-child(5) {
    animation-delay: .28s;
}

.timeline-item:nth-child(n+6) {
    animation-delay: .34s;
}

.tl-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 16px;
}

.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-800);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 3px var(--brand-800);
    flex-shrink: 0;
    z-index: 1;
    transition: transform .2s;
}

.timeline-item:hover .tl-dot {
    transform: scale(1.15);
}

.tl-line {
    flex: 1;
    width: 2px;
    background: var(--border);
    margin-top: 4px;
    min-height: 24px;
}

.tl-content {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: clamp(12px, 3.5vw, 18px) clamp(13px, 3.5vw, 20px);
    transition: box-shadow .2s, transform .2s;
    min-width: 0;
}

.tl-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

.tl-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 6px;
}

.tl-date svg {
    flex-shrink: 0;
}

.tl-type {
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: clamp(8px, 2vw, 12px);
    line-height: 1.35;
}

.tl-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tl-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.tl-row svg {
    flex-shrink: 0;
    color: var(--brand-400);
    margin-top: 1px;
}

.tl-relais-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(23, 104, 90, .08);
    color: var(--brand-600);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 100px;
    margin-top: 2px;
}

.tl-observation {
    margin-top: 10px;
    padding: 8px 11px;
    background: var(--surface);
    border-left: 2.5px solid var(--brand-400);
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

/* ── Search form card (état vide) ───────────────────────────── */
.search-form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(20px, 5vw, 32px);
    width: min(520px, 100%);
    margin-inline: auto;
}

.search-form-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-600);
    margin-bottom: 14px;
}

.search-form-card__title {
    font-size: clamp(15px, 4vw, 17px);
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 6px;
}

.search-form-card__desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Input */
.search-input-wrap {
    position: relative;
    margin-bottom: 12px;
}

.search-input-wrap .input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.search-input-wrap input[type="tel"] {
    width: 100%;
    padding: 13px 13px 13px 42px;
    border: 1.5px solid var(--border-md);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--text-main);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}

.search-input-wrap input[type="tel"]::placeholder {
    color: var(--text-muted);
}

.search-input-wrap input[type="tel"]:focus {
    border-color: var(--brand-400);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 104, 90, .12);
}

/* Tip */
.search-tip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    background: #FEFCE8;
    border: 1px solid #FDE68A;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.search-tip svg {
    flex-shrink: 0;
    color: #92400E;
    margin-top: 1px;
}

.search-tip p {
    font-size: 12px;
    color: #78350F;
    line-height: 1.5;
    margin: 0;
}

/* Error */
.error-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #B91C1C;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-sm);
}

/* Submit */
.btn-trk-submit {
    width: 100%;
    padding: 14px 20px;
    background: var(--brand-800);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background .2s, transform .15s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-trk-submit:hover {
    background: var(--brand-600);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(9, 45, 38, .28);
}

.btn-trk-submit:active {
    transform: scale(.98);
}

.btn-trk-submit .btn-arrow {
    display: flex;
    transition: transform .25s;
}

.btn-trk-submit:hover .btn-arrow {
    transform: translateX(3px);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp .4s ease forwards;
}

.fade-up:nth-child(2) {
    animation-delay: .07s;
}

/* ── Responsive desktop ─────────────────────────────────────── */
@media (min-width: 1024px) {
    .tl-content {
        padding: 18px 22px;
    }

    .tl-date {
        font-size: 12px;
    }

    .tl-type {
        font-size: 15px;
    }

    .tl-row {
        font-size: 13px;
    }
}