/* ============================================================
   Espace client — suivi de commande et compte.
   ============================================================ */

.acc-main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.acc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.6rem;
}
.acc-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin-bottom: .9rem; }
.acc-card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.2rem 0 .7rem; }

/* Suivi invité */
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; }
.track-form input {
  font: inherit;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  min-width: 0;
}
.track-form .btn-primary { margin-top: 0; padding: .6rem 1.3rem; }
@media (max-width: 560px) { .track-form { grid-template-columns: 1fr; } }

/* Auth */
.auth-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.auth-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 99px;
  padding: .45rem 1.1rem;
  font-weight: 600;
  color: var(--muted);
}
.auth-tabs button.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.auth-form { display: flex; flex-direction: column; gap: .8rem; max-width: 24rem; }
.auth-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; }
.auth-form input {
  font: inherit;
  font-weight: 400;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.auth-form .btn-primary { align-self: flex-start; margin-top: .2rem; }

.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.acc-head h2 { margin-bottom: 0; }
.acc-head-actions { display: flex; gap: .5rem; }

/* Commandes / suivi */
.acc-order {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: .7rem;
  background: var(--paper);
}
.acc-order-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.acc-order-code { font-family: var(--font-mono); font-weight: 600; }
.acc-order-when { color: var(--muted); font-size: .82rem; }
.acc-order-total { margin-left: auto; font-family: var(--font-mono); font-weight: 600; }
.acc-order-items { font-size: .85rem; color: var(--muted); margin: .4rem 0 .8rem; }
.acc-order-opts { font-size: .78rem; opacity: .8; }
.acc-order-sched {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .5rem;
}
.pay-badge {
  font-size: .72rem;
  font-weight: 600;
  border-radius: 99px;
  padding: .12rem .6rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.pay-badge.paid { background: #E3F0E5; color: #2F5D3A; }
.pay-badge.pending { background: #FBEEDB; color: #A96F1F; }

/* Timeline de suivi */
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: .4rem; }
.tl-step { display: flex; gap: .8rem; position: relative; padding-bottom: 1rem; }
.tl-step:last-child { padding-bottom: 0; }
.tl-dot {
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--line);
  flex-shrink: 0;
  margin-top: .15rem;
  z-index: 1;
}
.tl-step::before {
  content: '';
  position: absolute;
  left: .42rem;
  top: 1.1rem;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl-step:last-child::before { display: none; }
.tl-step.done .tl-dot { background: var(--accent, #2F5D3A); border-color: var(--accent, #2F5D3A); }
.tl-step.current .tl-dot {
  background: #fff;
  border-color: var(--accent, #2F5D3A);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, #2F5D3A) 20%, white);
}
.tl-label { font-weight: 600; font-size: .9rem; }
.tl-step:not(.done):not(.current) .tl-label { color: var(--muted); font-weight: 500; }
.tl-when { font-size: .78rem; color: var(--muted); }
.tl-cancelled { color: #B03A2E; font-weight: 600; margin-top: .4rem; }

.live-note {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .8rem;
}
.live-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #3E9B4F;
  animation: pulse 1.6s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.orders-empty { color: var(--muted); padding: 1rem 0; }
