[x-cloak] {
  display: none !important;
}

.ac-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- En-tête compte (connecté) ---------- */
.ac-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.ac-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
}
.ac-head-txt {
  flex: 1;
  min-width: 0;
}
.ac-head-txt h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.ac-head-txt p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.ac-logout {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ac-logout:hover {
  background: var(--band);
}
.ac-logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Onglets ---------- */
.ac-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ac-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ac-tab svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ac-tab:hover {
  color: var(--ink);
}
.ac-tab.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.ac-tab .ac-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--band);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
}
.ac-tab.is-active .ac-badge {
  background: var(--blue);
  color: #fff;
}

/* ---------- Commandes (liste) ---------- */
.ac-orders {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ac-order {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ac-order:hover {
  border-color: #b9c8e4;
  box-shadow: 0 10px 26px rgba(8, 45, 115, 0.08);
}
.ac-order-main {
  min-width: 0;
}
.ac-order-code {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
}
.ac-order-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}
.ac-order-side {
  text-align: right;
}
.ac-order-total {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
}
.ac-order-count {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}
.ac-order-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ac-order-chevron {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 500;
}
.ac-order-chevron svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Badge de statut ---------- */
.ac-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.ac-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ac-status.is-pending {
  background: #fff4e0;
  color: #9a6700;
}
.ac-status.is-progress {
  background: #e4f0ff;
  color: #1352b7;
}
.ac-status.is-transit {
  background: #e6f6ff;
  color: #0b74a8;
}
.ac-status.is-done {
  background: #e4f7ea;
  color: #1f8f49;
}
.ac-status.is-cancel {
  background: #fdecea;
  color: #c0392b;
}

/* ---------- Détail commande ---------- */
.ac-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
}
.ac-detail-back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ac-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ac-detail-head h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

/* Timeline de suivi du statut */
.ac-timeline {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}
.ac-timeline li {
  position: relative;
  padding: 0 0 18px 28px;
  color: var(--muted);
  font-size: 0.9rem;
}
.ac-timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
}
.ac-timeline li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.ac-timeline li:last-child::after {
  display: none;
}
.ac-timeline li.is-done::before {
  border-color: var(--blue);
  background: var(--blue);
}
.ac-timeline li.is-current::before {
  border-color: var(--blue);
  background: var(--yellow);
}
.ac-timeline li.is-done,
.ac-timeline li.is-current {
  color: var(--ink);
  font-weight: 500;
}
.ac-timeline li.is-cancel::before {
  border-color: #c0392b;
  background: #c0392b;
}

.ac-detail-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.ac-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.ac-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--band);
  display: grid;
  place-items: center;
}
.ac-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ac-item-thumb .card-media-empty {
  width: 26px;
  height: 26px;
  opacity: 0.4;
}
.ac-item-name {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}
.ac-item-qty {
  color: var(--muted);
  font-size: 0.83rem;
  margin-top: 2px;
}
.ac-item-price {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Connexion (non connecté) ---------- */
.ac-login {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}
.ac-login-ic {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #f4f8ff;
  display: grid;
  place-items: center;
}
.ac-login-ic svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ac-login h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.ac-login p {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.55;
}
.ac-login .co-phone {
  text-align: left;
  margin-bottom: 16px;
}

/* ---------- États ---------- */
.ac-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}
.ac-empty svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  opacity: 0.5;
  margin-bottom: 12px;
}
.ac-empty h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.ac-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.ac-spin {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  animation: ac-spin 0.85s linear infinite;
}
@keyframes ac-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Favoris (lien) ---------- */
.ac-fav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.ac-fav-link:hover {
  border-color: #b9c8e4;
}
.ac-fav-link .ac-fav-ic {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--band);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.ac-fav-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.9;
}
.ac-fav-copy strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.ac-fav-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Commande « Payer en boutique » (PAY_IN_STORE) */
.ac-pickup-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--blue-deep);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
