/* Adresse assistée — liste de suggestions sous le champ adresse */
.aa-anchor { position: relative; }
.aa-list {
    position: absolute;
    z-index: 1060;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 340px;
    margin-top: 4px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
    text-align: left;
}
.aa-list[hidden] { display: none !important; }
.aa-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.aa-item:last-child { border-bottom: 0; }
.aa-item:hover, .aa-item:focus, .aa-item.is-active { background: #f3f4f6; outline: none; }
.aa-item strong { display: block; font-weight: 600; color: #111; }
.aa-item span { display: block; font-size: 12px; color: #6b7280; }
.aa-keep { background: #fafafa; }
.aa-keep strong { font-weight: 500; }
@media (max-width: 575px) {
    .aa-list { max-height: 260px; }
    .aa-item { padding: 11px 12px; }
}

/* ---------------- Parcours de la commande ---------------- */
.aa-journey {
    --aa-c: #6d28d9;
    --aa-muted: #6b7280;
    --aa-line: #e5e7eb;
    margin: 0 0 1.5rem;
    padding: 1.25rem 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--aa-line);
    border-radius: 12px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}
.aa-journey svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aa-j-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.aa-j-title { margin: 0 0 .15rem; font-size: 1.25rem; font-weight: 700; color: #111827; text-transform: none; }
.aa-j-sub { margin: 0; color: var(--aa-muted); font-size: 13px; }
.aa-j-status { padding: .25rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--aa-c) 10%, #fff); color: var(--aa-c); font-size: 12px; font-weight: 600; white-space: nowrap; }

.aa-j-steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 .5rem; padding: 0; list-style: none; }
.aa-j-steps::before, .aa-j-steps::after { content: ""; position: absolute; top: 19px; left: 10%; height: 3px; border-radius: 3px; }
.aa-j-steps::before { right: 10%; background: var(--aa-line); }
.aa-j-steps::after { width: calc(80% * var(--aa-p) / 100); background: var(--aa-c); transition: width .6s ease; }
.aa-j-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 0 .25rem; text-align: center; }
.aa-j-dot { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--aa-line); border-radius: 50%; background: #fff; color: #9ca3af; }
.aa-j-step.is-done .aa-j-dot { border-color: var(--aa-c); background: var(--aa-c); color: #fff; }
.aa-j-step.is-current .aa-j-dot { border-color: var(--aa-c); color: var(--aa-c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--aa-c) 15%, transparent); }
.aa-j-step.is-current .aa-j-dot::after { content: ""; position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--aa-c); animation: aa-pulse 2s ease-out infinite; }
@keyframes aa-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .aa-j-step.is-current .aa-j-dot::after { animation: none; display: none; } .aa-j-steps::after { transition: none; } }
.aa-j-label { display: flex; flex-direction: column; gap: .1rem; }
.aa-j-label b { font-size: 13px; font-weight: 600; color: #9ca3af; }
.aa-j-step.is-done .aa-j-label b, .aa-j-step.is-current .aa-j-label b { color: #111827; }
.aa-j-label small { font-size: 12px; color: var(--aa-muted); }
.aa-j-label em { margin-top: .2rem; font-size: 12px; font-style: normal; color: var(--aa-c); }

.aa-j-alert { margin: 0 0 .75rem; padding: .75rem 1rem; border-radius: 8px; background: #fef3f2; color: #b42318; }
.aa-journey.is-special .aa-j-title { color: #b42318; }

.aa-j-track { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; padding: .75rem 1rem; border-radius: 10px; background: #f9fafb; }
.aa-j-track-info { display: flex; align-items: center; gap: .75rem; }
.aa-j-track-info svg { flex: none; color: var(--aa-c); width: 26px; height: 26px; }
.aa-j-track code { padding: 0 .3rem; border-radius: 4px; background: #fff; color: #111827; font-size: 13px; }
.aa-j-btn { display: inline-block; padding: .55rem 1rem; border-radius: 8px; background: var(--aa-c); color: #fff !important; font-weight: 600; text-decoration: none !important; }
.aa-j-btn:hover { filter: brightness(1.08); }

.aa-j-history { margin-top: 1rem; border-top: 1px solid var(--aa-line); padding-top: .75rem; }
.aa-j-history summary { cursor: pointer; color: var(--aa-muted); font-size: 13px; }
.aa-j-history ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.aa-j-history li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--aa-line); }
.aa-j-history time { color: var(--aa-muted); white-space: nowrap; font-size: 12px; }

.aa-j-share { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 1rem 0 0; font-size: 12px; color: var(--aa-muted); }
.aa-j-share input { flex: 1 1 220px; min-width: 0; padding: .35rem .5rem; border: 1px solid var(--aa-line); border-radius: 6px; font-size: 12px; color: #374151; }
.aa-j-copy { padding: .35rem .7rem; border: 1px solid var(--aa-line); border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }

/* Version compacte (back-office) */
.aa-journey.is-compact { padding: 1rem; }
.aa-journey.is-compact .aa-j-title { font-size: 1rem; }
.aa-journey.is-compact .aa-j-label small, .aa-journey.is-compact .aa-j-label em { display: none; }

/* Téléphone (et colonne étroite) : étapes verticales */
@media (max-width: 640px) {
    .aa-j-steps { grid-template-columns: 1fr; gap: 1rem; padding-left: 0; }
    .aa-j-steps::before, .aa-j-steps::after { top: 20px; left: 19px; right: auto; width: 3px; height: auto; }
    .aa-j-steps::before { bottom: 20px; }
    .aa-j-steps::after { height: calc((100% - 40px) * var(--aa-p) / 100); width: 3px; transition: height .6s ease; }
    .aa-j-step { flex-direction: row; align-items: flex-start; text-align: left; gap: .85rem; padding: 0; }
    .aa-j-dot { flex: none; }
    .aa-j-label { padding-top: .45rem; }
}
.aa-journey.is-compact .aa-j-steps { grid-template-columns: 1fr; gap: .6rem; }
.aa-journey.is-compact .aa-j-steps::before, .aa-journey.is-compact .aa-j-steps::after { top: 20px; left: 19px; right: auto; width: 3px; height: auto; }
.aa-journey.is-compact .aa-j-steps::before { bottom: 20px; }
.aa-journey.is-compact .aa-j-steps::after { height: calc((100% - 40px) * var(--aa-p) / 100); width: 3px; }
.aa-journey.is-compact .aa-j-step { flex-direction: row; align-items: center; text-align: left; gap: .75rem; padding: 0; }
