/* =============================================================================
   Espace client — s'appuie sur refonte.css (tokens, .btn, .wrap) et
   pages.css (.page-hero, .form-card, .field, .backlink).
   Ne redéfinit que ce qui lui est propre.
   ============================================================================= */

/* --- Écran de connexion ---------------------------------------------------- */
.acc-login{max-width:28.75rem;margin-inline:auto}
.acc-login .form-card{padding:2rem}
.acc-login h2{font-size:1.625rem;font-weight:900;margin-bottom:0.5rem}
.acc-login .sub{color:var(--muted);font-size:0.9375rem;line-height:1.6;margin-bottom:1.375rem}
.acc-note{font-size:0.8125rem;color:var(--muted);line-height:1.6;margin-top:1rem;text-align:center}

.acc-sent{text-align:center;padding:0.5rem 0}
.acc-sent .ic{width:4rem;height:4rem;border-radius:50%;background:var(--rose-100,var(--pink-100-2));color:var(--rose);
  display:grid;place-items:center;margin:0 auto 1.125rem;font-size:1.75rem}
.acc-sent h2{font-size:1.5rem;font-weight:900;margin-bottom:0.625rem}
.acc-sent p{color:var(--ink-700);line-height:1.7}

.acc-alert{background:var(--pink-050-2);border:1px solid var(--pink-100);color:var(--pink-700);border-radius:14px;
  padding:0.75rem 1rem;font-size:0.875rem;line-height:1.6;margin-bottom:1.125rem}
.acc-alert.ok{background:var(--green-050-2);border-color:var(--green-200-2);color:var(--green-800-2)}

/* --- En-tête du tableau de bord -------------------------------------------- */
.acc-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1.25rem;flex-wrap:wrap;margin-bottom:2rem}
.acc-head h1{font-size:clamp(2rem,4vw,2.75rem);font-weight:900;margin:0}
.acc-head .who{color:var(--muted);font-size:0.9375rem;margin-top:0.375rem}

.acc-tabs{display:flex;gap:0.375rem;background:var(--sand);padding:0.3125rem;border-radius:var(--radius-pill);margin-bottom:1.75rem;width:fit-content}
.acc-tab{border:0;background:none;font-family:var(--font);font-weight:700;font-size:0.9375rem;color:var(--ink-700);
  padding:0.5625rem 1.25rem;border-radius:var(--radius-pill);cursor:pointer;transition:.2s var(--ease)}
.acc-tab:hover{color:var(--rose)}
.acc-tab[aria-selected="true"]{background:var(--white);color:var(--ink);box-shadow:var(--shadow-sm)}

/* --- Liste des commandes ---------------------------------------------------- */
.acc-orders{display:grid;gap:0.875rem}
.acc-order{display:grid;grid-template-columns:1fr auto;gap:0.375rem 1.25rem;align-items:center;
  background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:1.25rem 1.375rem;
  cursor:pointer;text-align:left;font-family:var(--font);transition:.2s var(--ease);width:100%}
.acc-order:hover{border-color:var(--rose);box-shadow:var(--shadow-sm);transform:translateY(-1px)}
.acc-order .ref{font-weight:900;font-size:1.0625rem}
.acc-order .meta{color:var(--muted);font-size:0.875rem;grid-column:1;line-height:1.5}
.acc-order .amount{font-weight:900;font-size:1.125rem;text-align:right;white-space:nowrap}
.acc-order .chev{grid-row:1/3;grid-column:3;color:var(--muted);font-size:1.25rem}
@media(max-width:560px){
  .acc-order{grid-template-columns:1fr}
  .acc-order .amount{text-align:left}
  .acc-order .chev{display:none}
}

.acc-badge{display:inline-flex;align-items:center;gap:0.375rem;font-size:0.75rem;font-weight:800;
  padding:0.25rem 0.6875rem;border-radius:var(--radius-pill);background:var(--sand);color:var(--ink-700);white-space:nowrap}
.acc-badge.live{background:var(--pink-050);color:var(--rose)}
.acc-badge.done{background:var(--green-050-2);color:var(--green-800-2)}
.acc-badge.wait{background:var(--amber-050);color:var(--orange-700)}

/* --- Détail commande -------------------------------------------------------- */
.acc-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1.25rem;flex-wrap:wrap;margin:0.5rem 0 1.625rem}
.acc-detail-head h2{font-size:clamp(1.625rem,3vw,2.125rem);font-weight:900;margin:0 0 0.375rem}
.acc-detail-head .meta{color:var(--muted);font-size:0.9375rem}

.acc-panel{background:var(--white);border:1px solid var(--line);border-radius:var(--radius-lg);padding:1.625rem 1.75rem;margin-bottom:1.125rem}
.acc-panel h3{font-size:1.125rem;font-weight:900;margin:0 0 1.125rem}

/* Suivi de production — timeline verticale */
.acc-steps{display:grid;gap:0}
.acc-step{display:grid;grid-template-columns:2.125rem 1fr;gap:0.875rem;position:relative;padding-bottom:1.375rem}
.acc-step:last-child{padding-bottom:0}
.acc-step::before{content:"";position:absolute;left:1rem;top:1.875rem;bottom:0;width:0.125rem;background:var(--line)}
.acc-step:last-child::before{display:none}
.acc-step.done::before{background:var(--rose)}
.acc-step .dot{width:2.125rem;height:2.125rem;border-radius:50%;border:2px solid var(--line);background:var(--white);
  display:grid;place-items:center;font-size:0.875rem;font-weight:800;color:var(--muted);position:relative;z-index:1}
.acc-step.done .dot{background:var(--rose);border-color:var(--rose);color:var(--white)}
/* L'étape en cours ajoute un halo — sans toucher à la couleur du texte,
   sinon le chiffre passerait en rose sur fond rose. */
.acc-step.current .dot{border-color:var(--rose);box-shadow:0 0 0 5px var(--rose-100)}
.acc-step .lbl{font-weight:800;font-size:1rem;padding-top:0.375rem}
.acc-step.todo .lbl{color:var(--muted);font-weight:700}
.acc-step .hint{font-size:0.875rem;color:var(--muted);line-height:1.6;margin-top:0.25rem}

.acc-stage-unknown{background:var(--sand);border-radius:14px;padding:1rem 1.125rem;font-size:0.9375rem;line-height:1.6}

/* Lignes du récapitulatif */
.acc-line{display:flex;justify-content:space-between;gap:1.125rem;padding:0.875rem 0;border-bottom:1px solid var(--line)}
.acc-line:last-child{border-bottom:0}
.acc-line .cfg{color:var(--muted);font-size:0.875rem;line-height:1.6;margin-top:0.25rem}
.acc-line b{white-space:nowrap}
.acc-total{display:flex;justify-content:space-between;font-size:1.25rem;font-weight:900;
  border-top:2px solid var(--line);padding-top:1rem;margin-top:0.375rem}

.acc-actions{display:flex;gap:0.75rem;flex-wrap:wrap;margin-top:0.375rem}

/* --- États ------------------------------------------------------------------ */
.acc-empty{text-align:center;padding:3.5rem 1.25rem;background:var(--white);border:1px solid var(--line);border-radius:var(--radius-lg)}
.acc-empty .ic{font-size:2.5rem;margin-bottom:0.875rem}
.acc-empty h2{font-size:1.375rem;font-weight:900;margin-bottom:0.5rem}
.acc-empty p{color:var(--muted);line-height:1.7;margin-bottom:1.25rem}

.acc-skel{background:linear-gradient(90deg,var(--sand) 25%,var(--white) 50%,var(--sand) 75%);
  background-size:400% 100%;animation:accShimmer 1.4s infinite;border-radius:var(--radius);height:5.5rem}
.acc-skel + .acc-skel{margin-top:0.875rem}
@keyframes accShimmer{0%{background-position:100% 0}100%{background-position:0 0}}
@media(prefers-reduced-motion:reduce){.acc-skel{animation:none}}
