/* ═══════════════════════════════════════════════════════════════
   RestoNoble SAV — Style
   ═══════════════════════════════════════════════════════════════ */

:root {
    --sav-primary: #1a3a5c;
    --sav-accent: #e8a838;
    --sav-light: #f8f9fa;
    --sav-border: #dee2e6;
    --sav-text: #333;
    --sav-muted: #6c757d;
    --sav-success: #28a745;
    --sav-danger: #dc3545;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--sav-light);
    color: var(--sav-text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Topbar ── */
.sav-topbar {
    background: var(--sav-primary);
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sav-topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.sav-logo img {
    border-radius: 6px;
    background: #fff;
    padding: 3px 6px;
}

.sav-logo span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.sav-contact {
    display: flex;
    gap: 1.25rem;
}

.sav-contact a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.sav-contact a:hover {
    color: #fff;
}

.sav-contact i {
    margin-right: 0.25rem;
}

/* ── Main ── */
.sav-main {
    flex: 1;
    padding: 2rem 0;
}

.sav-container {
    max-width: 720px;
    margin: 0 auto;
}

/* ── Page header ── */
.sav-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sav-page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sav-primary);
    margin-bottom: 0.5rem;
}

.sav-subtitle {
    color: var(--sav-muted);
    font-size: 1rem;
    margin: 0;
}

/* ── Boutons navigation ── */
.sav-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sav-btn {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--sav-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--sav-text);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer;
}

.sav-btn:hover {
    border-color: var(--sav-primary);
    box-shadow: 0 3px 12px rgba(26,58,92,0.12);
    transform: translateY(-1px);
    color: var(--sav-text);
    text-decoration: none;
}

.sav-btn-yellow {
    border-left: 4px solid var(--sav-accent);
}

.sav-btn-green {
    border-left: 4px solid #28a745;
}

.sav-btn-blue {
    border-left: 4px solid #0d6efd;
}

.sav-btn-orange {
    border-left: 4px solid #fd7e14;
}

.sav-btn-red-border {
    border-left: 4px solid var(--sav-danger);
}

.sav-btn-red {
    background: none;
    color: var(--sav-muted);
    border: 1px solid var(--sav-border);
    justify-content: center;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.sav-btn-red:hover {
    background: #f8f9fa;
    border-color: var(--sav-muted);
    color: var(--sav-text);
}

.sav-btn-label {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.sav-btn-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--sav-muted);
    margin-top: 0.2rem;
}

.sav-btn-red .sav-btn-desc {
    color: var(--sav-muted);
}

.sav-btn-arrow {
    font-size: 1.2rem;
    color: var(--sav-muted);
    margin-left: 0.75rem;
    flex-shrink: 0;
}

/* Quand label + desc, empiler */
.sav-btn .sav-btn-label + .sav-btn-desc {
    /* On emballe label + desc dans un span implicite */
}

/* En fait, on doit wrapper — simplifions : le label prend toute la place */
.sav-btn {
    flex-wrap: wrap;
}

.sav-btn .sav-btn-label {
    width: calc(100% - 2rem);
}

.sav-btn .sav-btn-desc {
    width: calc(100% - 2rem);
    flex: none;
}

.sav-btn .sav-btn-arrow {
    position: absolute;
    right: 1.25rem;
}

.sav-btn {
    position: relative;
    padding-right: 2.75rem;
}

/* ── Formulaire wrapper ── */
.sav-form-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sav-form-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sav-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--sav-light);
}

/* ── Steps indicator ── */
.sav-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0;
}

.sav-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sav-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.sav-step-dot.active {
    background: var(--sav-primary);
}

.sav-step-dot.done {
    background: var(--sav-success);
}

.sav-step-dot .sav-step-num {
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1;
}

.sav-step-line {
    height: 3px;
    width: 60px;
    background: var(--sav-border);
    transition: background 0.3s;
}

.sav-step-line.done {
    background: var(--sav-success);
}

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

@keyframes savSlideDown {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 800px; }
}

.sav-step {
    animation: savFadeIn 0.3s ease-out;
}

.sav-express-found #express_status,
.sav-express-found .sav-express-products,
.sav-order-found,
.trk-order-header,
.trk-shipment,
.trk-products,
.trk-history {
    animation: savFadeIn 0.35s ease-out;
}

.sav-product-card {
    animation: savFadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.sav-product-card:nth-child(1) { animation-delay: 0s; }
.sav-product-card:nth-child(2) { animation-delay: 0.05s; }
.sav-product-card:nth-child(3) { animation-delay: 0.1s; }
.sav-product-card:nth-child(4) { animation-delay: 0.15s; }
.sav-product-card:nth-child(5) { animation-delay: 0.2s; }
.sav-product-card:nth-child(6) { animation-delay: 0.25s; }

.sav-prefilled {
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

/* ── Form fields ── */
.sav-field-group {
    margin-bottom: 1.25rem;
}

.sav-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--sav-text);
}

.sav-field-help {
    display: block;
    color: var(--sav-muted);
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}

.sav-field-group .form-control {
    border-radius: 8px;
    border: 1px solid var(--sav-border);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sav-field-group .form-control:focus {
    border-color: var(--sav-primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}

.sav-field-group .form-control.is-invalid {
    border-color: var(--sav-danger);
}

/* ── Radio / Checkbox ── */
.sav-radio-group,
.sav-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sav-radio-option,
.sav-checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: var(--sav-light);
    border: 1px solid var(--sav-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sav-radio-option:hover,
.sav-checkbox-option:hover {
    border-color: var(--sav-primary);
    background: #fff;
}

.sav-radio-option input:checked + .sav-radio-label,
.sav-checkbox-option input:checked + span {
    font-weight: 600;
    color: var(--sav-primary);
}

.sav-radio-option input,
.sav-checkbox-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--sav-primary);
    flex-shrink: 0;
}

/* ── Range ── */
.sav-range-wrap {
    padding: 0.5rem 0;
}

.sav-range-wrap .form-range {
    width: 100%;
}

.sav-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--sav-muted);
    padding: 0 2px;
}

/* ── Step navigation ── */
.sav-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sav-light);
}

.sav-step-nav .btn {
    border-radius: 8px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
}

.sav-btn-next,
.sav-btn-submit {
    margin-left: auto;
}

/* ── Success page ── */
.sav-success {
    text-align: center;
    padding: 3rem 1rem;
}

.sav-success-icon {
    font-size: 4rem;
    color: var(--sav-success);
    margin-bottom: 1rem;
}

.sav-success h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sav-primary);
    margin-bottom: 0.75rem;
}

.sav-success p {
    color: var(--sav-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0.5rem auto;
}

/* ── Page succès : éléments enrichis ── */
.sav-ticket-ref {
    font-size: 1.1rem;
    color: var(--sav-primary);
    margin: 0.75rem 0;
}
.sav-next-steps {
    text-align: left;
    max-width: 420px;
    margin: 1.5rem auto;
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
}
.sav-next-title {
    font-weight: 700;
    color: var(--sav-primary);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}
.sav-next-steps ul {
    margin: 0; padding-left: 1.2rem;
}
.sav-next-steps li {
    margin-bottom: 0.25rem;
    color: var(--sav-text);
}

/* ── Prochaines étapes : cartes numérotées ── */
.sav-steps-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.sav-step-card {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.4rem;
}
.sav-step-card .sav-step-num {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: var(--sav-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 auto 0.4rem;
}
.sav-step-text {
    font-size: 0.8rem;
    color: var(--sav-text);
    line-height: 1.35;
}
@media (max-width: 576px) {
    .sav-steps-row {
        gap: 0.4rem;
    }
    .sav-step-card .sav-step-num {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.85rem;
    }
    .sav-step-text {
        font-size: 0.72rem;
    }
}
.sav-success-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.sav-satisfaction-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sav-border);
}
.sav-satisfaction-link p {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

/* ── Waiter overlay (envoi formulaire) ── */
.sav-waiter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 58, 92, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sav-waiter-overlay.visible { opacity: 1; }

.sav-waiter {
    text-align: center;
    color: #fff;
    animation: savFadeIn 0.4s ease-out;
}
.sav-waiter-spinner {
    width: 56px; height: 56px;
    margin: 0 auto 1.2rem;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #e8a838;
    border-radius: 50%;
    animation: savSpin 0.8s linear infinite;
}
@keyframes savSpin { to { transform: rotate(360deg); } }

.sav-waiter-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.sav-waiter-sub {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ── Barre progression upload ── */
.sav-upload-progress {
    margin-top: 1.2rem;
    width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.sav-upload-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.sav-upload-progress-fill {
    height: 100%;
    width: 0;
    background: #e8a838;
    border-radius: 3px;
    transition: width 0.2s ease;
}

.sav-upload-progress-text {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.8;
}

/* ── Notice brouillon restauré ── */
.sav-autosave-notice {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: savFadeIn 0.3s ease-out;
}

.sav-autosave-notice i {
    font-size: 1rem;
}

.sav-autosave-clear {
    background: none;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    color: #1e40af;
    font-size: 0.78rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    margin-left: auto;
}

.sav-autosave-clear:hover {
    background: #dbeafe;
}

/* ── Erreurs serveur inline ── */
.sav-server-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    animation: savFadeIn 0.3s ease-out;
}

.sav-server-errors-title {
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.sav-server-errors-title i {
    margin-right: 0.3rem;
}

.sav-server-errors ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #b91c1c;
    font-size: 0.9rem;
}

.sav-server-errors li {
    margin-bottom: 0.25rem;
}

/* ── Footer ── */
.sav-footer {
    background: var(--sav-primary);
    color: rgba(255,255,255,0.5);
    padding: 0.5rem 0;
    margin-top: auto;
    font-size: 0.75rem;
}

.sav-footer p {
    margin: 0.15rem 0;
}

.sav-footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.sav-footer a:hover {
    color: #fff;
}

/* ── Express identification ── */
.sav-express {
    margin-bottom: 1.5rem;
    border: 2px solid #e3edf7;
    border-radius: 10px;
    overflow: hidden;
}

.sav-express-header {
    background: #e3edf7;
    color: var(--sav-primary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.sav-express-header i {
    margin-right: 0.3rem;
}

.sav-express-body {
    padding: 0.75rem 1rem;
}

.sav-express-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sav-express-field {
    flex: 1;
    min-width: 0;
}

.sav-express-or {
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--sav-muted);
    position: relative;
}

.sav-express-or span {
    background: #fff;
    padding: 0 0.75rem;
    position: relative;
    z-index: 1;
}

.sav-express-or::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--sav-border);
}

.sav-express.sav-express-found {
    border-color: var(--sav-success);
}

.sav-express.sav-express-found .sav-express-header {
    background: #e8f5e9;
    color: #2e7d32;
}

.sav-express.sav-express-found .sav-express-or {
    display: none;
}

@media (max-width: 576px) {
    .sav-express-row {
        flex-wrap: wrap;
    }
    .sav-express-field {
        flex: 1 1 100%;
    }
}

/* ── Product selection ── */
.sav-order-found {
    margin-top: 0.5rem;
}

.sav-order-info {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: #2e7d32;
}

.sav-product-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sav-product-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: var(--sav-light);
    border: 2px solid var(--sav-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sav-product-card:hover {
    border-color: var(--sav-primary);
    background: #fff;
}

.sav-product-card.selected {
    border-color: var(--sav-primary);
    background: #eef3f8;
    box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
}

.sav-product-card input[type="radio"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--sav-primary);
    flex-shrink: 0;
}

.sav-product-card-body {
    flex: 1;
    min-width: 0;
}

.sav-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.sav-comp-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.sav-product-qty-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--sav-border);
}

.sav-qty-label {
    font-size: 0.78rem;
    color: var(--sav-muted);
    font-weight: 600;
    white-space: nowrap;
}

.sav-qty-picker {
    max-width: 120px;
    font-size: 0.82rem !important;
    padding: 0.2rem 0.4rem !important;
}

.sav-product-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--sav-text);
}

.sav-product-ref {
    font-size: 0.82rem;
    color: var(--sav-muted);
    margin-top: 0.15rem;
}

.sav-product-components {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--sav-border);
}

.sav-comp-list {
    margin: 0.2rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.82rem;
}

.sav-comp-list li {
    margin-bottom: 0.1rem;
}

/* Champ prérempli automatiquement */
.sav-prefilled {
    background-color: #f0f7ff !important;
    border-color: #90caf9 !important;
}

/* ── Tracking page ── */
.trk-order-header {
    background: var(--sav-primary);
    color: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.trk-order-ref {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.trk-order-meta {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.trk-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.trk-badge-green { background: var(--sav-success); }
.trk-badge-blue { background: #0d6efd; }
.trk-badge-orange { background: #fd7e14; }

/* ── Carrier highlight (header, transit) ── */
.trk-carrier-highlight {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.4rem;
    color: #fff;
    letter-spacing: 0.02em;
}
.trk-carrier-highlight i {
    margin-right: 0.3rem;
}

.trk-carrier-name {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    margin-right: 0.4rem;
}
.trk-carrier-name i {
    margin-right: 0.25rem;
}

/* ── Contact transporteur (dans shipment) ── */
.trk-contact {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin: 0.6rem 0;
    font-size: 0.85rem;
}
.trk-contact-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--sav-primary);
    margin-bottom: 0.35rem;
}
.trk-contact-title i { margin-right: 0.25rem; }
.trk-contact-line {
    margin-bottom: 0.2rem;
}
.trk-contact-line i {
    width: 16px;
    text-align: center;
    margin-right: 0.3rem;
    color: var(--sav-primary);
}
.trk-contact-line a {
    color: var(--sav-primary);
    font-weight: 600;
    text-decoration: none;
}
.trk-contact-line a:hover { text-decoration: underline; }
.trk-contact-info {
    margin-top: 0.35rem;
    color: var(--sav-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.trk-shipment {
    background: #fff;
    border: 1px solid var(--sav-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.trk-shipment-header {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.trk-shipment-header i {
    color: var(--sav-primary);
    margin-right: 0.3rem;
}

.trk-status {
    font-size: 0.9rem;
    color: var(--sav-text);
    margin-bottom: 0.4rem;
}

.trk-tracking-id {
    margin-bottom: 0.4rem;
}

.trk-tracking-id code {
    background: var(--sav-light);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.trk-tracking-link {
    margin: 0.5rem 0;
}

.trk-timeline {
    border-left: 3px solid var(--sav-border);
    margin: 0.75rem 0 0.5rem 0.75rem;
    padding-left: 1rem;
}

.trk-event {
    position: relative;
    padding-bottom: 0.75rem;
}

.trk-event:last-child { padding-bottom: 0; }

.trk-event-dot {
    position: absolute;
    left: -1.45rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sav-border);
    border: 2px solid #fff;
}

.trk-event-current .trk-event-dot {
    background: var(--sav-primary);
    width: 12px;
    height: 12px;
    left: -1.5rem;
}

.trk-event-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
    font-size: 0.82rem;
}

.trk-event-date {
    color: var(--sav-muted);
    font-weight: 600;
    min-width: 110px;
}

.trk-event-status {
    color: var(--sav-text);
}

.trk-event-current .trk-event-status {
    font-weight: 600;
    color: var(--sav-primary);
}

.trk-event-loc {
    color: var(--sav-muted);
    font-size: 0.78rem;
}

.trk-updated {
    margin-top: 0.5rem;
    text-align: right;
}

.trk-no-transport {
    text-align: center;
    padding: 1.5rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    color: #f57f17;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.trk-no-transport i {
    margin-right: 0.3rem;
}

.trk-products {
    margin-bottom: 1rem;
}

.trk-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--sav-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--sav-light);
}

.trk-section-title i {
    margin-right: 0.3rem;
}

.trk-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sav-light);
}

.trk-product:last-child { border-bottom: none; }

.trk-product-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--sav-light);
    border: 1px solid var(--sav-border);
    flex-shrink: 0;
}

.trk-product-body {
    flex: 1;
    min-width: 0;
}

.trk-product-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.trk-product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--sav-muted);
}

/* ── Timeline phases horizontale ── */
.trk-phases {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.2rem 0 1.5rem;
    padding: 0.75rem 0;
}

.trk-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.trk-phase-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--sav-light);
    color: var(--sav-muted);
    border: 2px solid var(--sav-border);
    transition: all 0.3s ease;
}

.trk-phase-label {
    font-size: 0.7rem;
    margin-top: 0.3rem;
    color: var(--sav-muted);
    text-align: center;
    font-weight: 500;
}

.trk-phase-done .trk-phase-icon {
    background: var(--sav-success);
    color: #fff;
    border-color: var(--sav-success);
}

.trk-phase-done .trk-phase-label {
    color: var(--sav-success);
    font-weight: 600;
}

.trk-phase-active .trk-phase-icon {
    background: var(--sav-primary);
    color: #fff;
    border-color: var(--sav-primary);
    box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.15);
    animation: trkPulse 2s infinite;
}

.trk-phase-active .trk-phase-label {
    color: var(--sav-primary);
    font-weight: 700;
}

@keyframes trkPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.15); }
    50% { box-shadow: 0 0 0 8px rgba(26, 58, 92, 0.08); }
}

.trk-phase-line {
    flex: 1;
    height: 3px;
    background: var(--sav-border);
    margin: 0 0.3rem;
    margin-bottom: 1.2rem;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.trk-line-done {
    background: var(--sav-success);
}

@media (max-width: 480px) {
    .trk-phase-icon { width: 32px; height: 32px; font-size: 0.85rem; }
    .trk-phase-label { font-size: 0.6rem; }
    .trk-phase { min-width: 45px; }
}

/* ── Montant et paiement dans header ── */
.trk-order-total {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.3rem 0;
}

.trk-order-payment {
    margin-top: 0.2rem;
    opacity: 0.8;
}

/* ── Historique vertical (timeline) ── */
.trk-history {
    margin-bottom: 1rem;
}

.trk-hist-timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

.trk-hist-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--sav-border);
}

.trk-hist-step {
    position: relative;
    padding-bottom: 1rem;
    padding-left: 0.5rem;
}

.trk-hist-step:last-child { padding-bottom: 0; }

.trk-hist-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.15rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--sav-border);
    z-index: 1;
}

.trk-hist-step-current .trk-hist-dot {
    width: 14px;
    height: 14px;
    left: calc(-1.5rem - 1px);
    border-width: 3px;
}

.trk-hist-state {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sav-text);
}

.trk-hist-step-current .trk-hist-state {
    color: var(--sav-primary);
}

.trk-hist-date {
    font-size: 0.78rem;
    color: var(--sav-muted);
}

.trk-cta {
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid var(--sav-light);
}

/* ── FAQ contextuelle ── */
.sav-faq {
    margin-bottom: 1.25rem;
    border: 1px solid #e3edf7;
    border-radius: 8px;
    overflow: hidden;
}

.sav-faq-toggle {
    background: #fff8e1;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #f57f17;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
}

.sav-faq-toggle:hover { background: #fff3c4; }

.sav-faq-arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.sav-faq.open .sav-faq-arrow { transform: rotate(180deg); }

.sav-faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    padding: 0 1rem;
}

.sav-faq.open .sav-faq-body {
    max-height: 500px;
    padding: 0.75rem 1rem;
}

.sav-faq-item {
    margin-bottom: 0.6rem;
}

.sav-faq-item:last-child { margin-bottom: 0; }

.sav-faq-q {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sav-primary);
}

.sav-faq-q i {
    color: var(--sav-accent);
    margin-right: 0.2rem;
}

.sav-faq-a {
    font-size: 0.82rem;
    color: var(--sav-muted);
    margin-top: 0.15rem;
    padding-left: 1.2rem;
}

.sav-faq-doc {
    display: inline-block;
    margin: 0.4rem 0.5rem 0 0;
    padding: 0.2rem 0.6rem;
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 4px;
    font-size: 0.78rem;
}
.sav-faq-doc i { color: var(--sav-primary); margin-right: 0.2rem; }
.sav-faq-doc a { color: var(--sav-primary); text-decoration: none; font-weight: 500; }
.sav-faq-doc a:hover { text-decoration: underline; }

/* ── Upload photo ── */
.sav-upload-zone {
    border: 2px dashed var(--sav-border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--sav-light);
}

.sav-upload-zone:hover,
.sav-upload-zone.dragover {
    border-color: var(--sav-primary);
    background: #eef3f8;
}

.sav-upload-icon {
    font-size: 2rem;
    color: var(--sav-primary);
    margin-bottom: 0.25rem;
}

.sav-upload-text {
    font-size: 0.9rem;
    color: var(--sav-text);
    font-weight: 500;
}

.sav-upload-hint {
    font-size: 0.8rem;
    color: var(--sav-accent);
    margin-top: 0.25rem;
    font-weight: 600;
}

.sav-upload-hint i { margin-right: 0.2rem; }

.sav-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.sav-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.sav-upload-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid var(--sav-border);
    animation: savFadeIn 0.3s ease-out;
}

.sav-upload-file {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #fff;
    border: 1px solid var(--sav-border);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    animation: savFadeIn 0.3s ease-out;
}

/* ── Bouton capture photo (mobile only) ── */
.sav-upload-capture {
    display: none; /* masqué par défaut (desktop) */
    margin-top: 0.5rem;
    text-align: center;
}
.sav-capture-btn i { margin-right: 0.3rem; }

@media (max-width: 768px) {
    .sav-upload-capture { display: block; }
}

/* ── Warning 48h CGV ── */
.sav-cgv-warning {
    margin: 0.6rem 0;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
    animation: savFadeIn 0.3s ease-out;
}
.sav-cgv-danger {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #dc3545;
    color: #664d03;
}
.sav-cgv-danger i { color: #dc3545; margin-right: 0.3rem; }
.sav-cgv-ok {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    border-left: 4px solid #198754;
    color: #0f5132;
}
.sav-cgv-ok i { color: #198754; margin-right: 0.3rem; }

/* ── Info phase commande ── */
.sav-phase-info {
    margin: 0.4rem 0 0.6rem;
    padding: 0.4rem 0.7rem;
    background: #f0f4ff;
    border-radius: 6px;
    border-left: 3px solid #0d6efd;
}

/* ── Récap avant envoi ── */
.sav-recap {
    background: var(--sav-light);
    border: 1px solid var(--sav-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    animation: savFadeIn 0.3s ease-out;
}

.sav-recap-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--sav-primary);
    margin-bottom: 0.5rem;
}

.sav-recap-title i { margin-right: 0.3rem; }

.sav-recap-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.82rem;
}

.sav-recap-row:last-child { border-bottom: none; }

.sav-recap-label {
    color: var(--sav-muted);
    flex-shrink: 0;
    max-width: 40%;
}

.sav-recap-value {
    color: var(--sav-text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

@media (max-width: 576px) {
    .sav-recap {
        padding: 0.6rem 0.75rem;
    }
    .sav-recap-row {
        flex-direction: column;
        gap: 0.15rem;
        padding: 0.45rem 0;
    }
    .sav-recap-label {
        max-width: 100%;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: var(--sav-muted);
    }
    .sav-recap-value {
        text-align: left;
        font-size: 0.82rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .sav-recap-title {
        font-size: 0.85rem;
        padding-bottom: 0.3rem;
        border-bottom: 1px solid var(--sav-border);
        margin-bottom: 0.3rem;
    }
}

/* ── Success page mobile ── */
@media (max-width: 576px) {
    .sav-success {
        padding: 2rem 0.75rem;
    }
    .sav-success-icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }
    .sav-success h1 {
        font-size: 1.25rem;
    }
    .sav-success p {
        font-size: 0.92rem;
    }
    .sav-next-steps {
        max-width: 100%;
        margin: 1rem auto;
        font-size: 0.8rem;
    }
    .sav-success-actions {
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 1.25rem;
    }
    .sav-success-actions .btn {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    .sav-ticket-ref {
        font-size: 0.95rem;
    }
    .sav-satisfaction-link {
        margin-top: 1.5rem;
    }
}

/* ── Bouton Suivi mis en avant ── */
.sav-suivi-cta {
    display: block;
    max-width: 420px;
    margin: 1.25rem auto 0;
    background: linear-gradient(135deg, var(--sav-primary), #2c5282);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.25rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.sav-suivi-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.3);
    color: #fff;
    text-decoration: none;
}
.sav-suivi-cta i {
    margin-right: 0.4rem;
}

/* ── Mon espace ── */
.ms-client-header {
    background: var(--sav-primary);
    color: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    animation: savFadeIn 0.3s ease-out;
}

.ms-client-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.ms-client-company {
    font-size: 0.85rem;
    opacity: 0.8;
}

.ms-client-email {
    font-size: 0.82rem;
    opacity: 0.7;
}

.ms-section {
    margin-bottom: 1.25rem;
    animation: savFadeIn 0.35s ease-out;
}

.ms-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--sav-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--sav-light);
}

.ms-section-title i { margin-right: 0.3rem; }

.ms-order {
    background: #fff;
    border: 1px solid var(--sav-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    animation: savFadeIn 0.3s ease-out both;
}

.ms-order-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.ms-order-ref {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--sav-primary);
}

.ms-order-date {
    font-size: 0.82rem;
    color: var(--sav-muted);
}

.ms-order-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--sav-muted);
    margin-bottom: 0.4rem;
}

.ms-carrier i { margin-right: 0.15rem; }

.ms-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ms-order-actions .btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.ms-sav-item {
    background: var(--sav-light);
    border: 1px solid var(--sav-border);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.4rem;
    animation: savFadeIn 0.3s ease-out both;
}

.ms-sav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.ms-sav-type {
    font-weight: 600;
    font-size: 0.9rem;
}

.ms-sav-date {
    font-size: 0.78rem;
    color: var(--sav-muted);
}

.ms-sav-ref, .ms-sav-ticket {
    font-size: 0.82rem;
    color: var(--sav-muted);
}

.ms-sav-ticket i { margin-right: 0.2rem; }

.ms-order-filter {
    margin-bottom: 0.6rem;
}
.ms-order-filter select {
    border-color: var(--sav-border);
    color: var(--sav-muted);
}

.ms-no-sav {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--sav-muted);
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .sav-topbar .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .sav-logo span {
        display: none;
    }

    .sav-contact {
        flex-direction: row;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .sav-main {
        padding: 1rem 0;
    }

    .sav-form-wrapper {
        padding: 1.25rem;
        border-radius: 0;
        box-shadow: none;
    }

    .sav-page-header h1 {
        font-size: 1.3rem;
    }

    .sav-btn {
        padding: 0.85rem 1rem;
        padding-right: 2.5rem;
    }

    .sav-step-line {
        width: 30px;
    }
}
