/* =====================================================================
   BOUTIQUE — shop-account.css
   Espace client : connexion / inscription, tableau de bord, commandes,
   adresses, profil.
   ===================================================================== */

.ac-wrap { padding: 30px 0 46px; }

/* ── Authentification ──────────────────────────────────────────────── */
.ac-auth {
    max-width: 430px; margin: 0 auto;
    background: var(--shop-surface); border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-md); padding: 32px;
}
.ac-auth-head { text-align: center; margin-bottom: 24px; }
.ac-auth-head h1 {
    font-family: 'Montserrat', sans-serif; font-size: 1.45rem; font-weight: 800;
    letter-spacing: -.03em; color: var(--shop-ink); margin: 0 0 7px;
}
.ac-auth-head p { color: var(--shop-muted); font-size: .89rem; margin: 0; line-height: 1.55; }

.ac-auth-switch {
    display: flex; gap: 4px; padding: 4px; margin-bottom: 24px;
    background: var(--shop-surface-3); border-radius: 999px;
}
.ac-auth-switch a {
    flex: 1; text-align: center; padding: 9px; border-radius: 999px;
    font-size: .86rem; font-weight: 700; color: var(--shop-body); text-decoration: none;
    transition: all var(--shop-tr);
}
.ac-auth-switch a.is-active { background: var(--shop-surface); color: var(--shop-accent); box-shadow: var(--shop-sh-sm); }

.ac-auth-foot { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--shop-muted); }
.ac-auth-foot a { color: var(--shop-accent); font-weight: 700; text-decoration: none; }
.ac-auth-foot a:hover { text-decoration: underline; }

/* ── Layout espace client ───────────────────────────────────────────── */
.ac-layout {
    display: grid; grid-template-columns: 232px minmax(0, 1fr);
    gap: 26px; align-items: start;
}
@media (max-width: 860px) { .ac-layout { grid-template-columns: minmax(0, 1fr); } }

.ac-side {
    background: var(--shop-surface); border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-sm); padding: 20px; position: sticky; top: var(--shop-sticky-top);
}
@media (max-width: 860px) { .ac-side { position: static; } }

.ac-side-user { text-align: center; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--shop-line); }
.ac-avatar {
    width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--shop-accent), #8b5cc4);
    color: #fff; display: grid; place-items: center;
    font-family: 'Montserrat', sans-serif; font-size: 1.3rem; font-weight: 800;
}
.ac-side-name { font-size: .95rem; font-weight: 800; color: var(--shop-ink); }
.ac-side-mail { font-size: .78rem; color: var(--shop-muted); margin-top: 2px; word-break: break-all; }

.ac-nav { display: flex; flex-direction: column; gap: 2px; }
.ac-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--shop-radius-sm);
    font-size: .88rem; font-weight: 600; color: var(--shop-body); text-decoration: none;
    transition: all var(--shop-tr);
}
.ac-nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.ac-nav a:hover { background: var(--shop-surface-3); color: var(--shop-accent); }
.ac-nav a.is-active { background: var(--shop-accent); color: #fff; font-weight: 700; }
.ac-nav a.is-active svg { opacity: 1; }
.ac-nav .ac-nav-out { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--shop-line); color: var(--shop-ko); }
.ac-nav .ac-nav-out:hover { background: var(--shop-ko-bg); color: var(--shop-ko); }

/* ── Contenu ────────────────────────────────────────────────────────── */
.ac-panel {
    background: var(--shop-surface); border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-sm); padding: 24px;
}
.ac-panel + .ac-panel { margin-top: 16px; }
.ac-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.ac-panel-title {
    font-family: 'Montserrat', sans-serif; font-size: 1.08rem; font-weight: 800;
    color: var(--shop-ink); margin: 0; letter-spacing: -.02em;
}

.ac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 13px; margin-bottom: 18px; }
.ac-stat {
    background: var(--shop-surface); border-radius: var(--shop-radius);
    box-shadow: var(--shop-sh-sm); padding: 17px;
}
.ac-stat-label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--shop-muted); }
.ac-stat-value {
    font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 800;
    color: var(--shop-ink); letter-spacing: -.03em; margin-top: 6px; line-height: 1;
}
.ac-stat-sub { font-size: .77rem; color: var(--shop-muted); margin-top: 5px; }

/* ── Liste de commandes ─────────────────────────────────────────────── */
.ac-order {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px; align-items: center;
    padding: 15px 0; border-bottom: 1px solid var(--shop-line);
}
.ac-order:last-child { border-bottom: 0; }
.ac-order-num {
    font-family: 'Montserrat', sans-serif; font-size: .92rem; font-weight: 800;
    color: var(--shop-ink); text-decoration: none;
}
.ac-order-num:hover { color: var(--shop-accent); }
.ac-order-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 5px; }
.ac-order-date { font-size: .79rem; color: var(--shop-muted); }
.ac-order-items { font-size: .79rem; color: var(--shop-muted); }
.ac-order-right { text-align: right; }
.ac-order-total {
    font-family: 'Montserrat', sans-serif; font-size: 1.02rem; font-weight: 800;
    color: var(--shop-ink); font-variant-numeric: tabular-nums;
}
.ac-order-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 7px; }
.ac-order-actions a, .ac-order-actions button {
    font-size: .78rem; font-weight: 700; color: var(--shop-accent);
    text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0;
}
.ac-order-actions a:hover, .ac-order-actions button:hover { text-decoration: underline; }

/* ── Adresses ───────────────────────────────────────────────────────── */
.ac-addresses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
.ac-address {
    padding: 16px; border: 1.5px solid var(--shop-line); border-radius: var(--shop-radius-sm);
    position: relative;
}
.ac-address.is-default { border-color: var(--shop-accent); background: rgba(97,57,143,.04); }
.ac-address-badge {
    position: absolute; top: 12px; right: 12px;
    font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: var(--shop-accent);
}
.ac-address-label { font-size: .88rem; font-weight: 800; color: var(--shop-ink); margin-bottom: 6px; }
.ac-address-body { font-size: .84rem; color: var(--shop-body); line-height: 1.55; }
.ac-address-actions { display: flex; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--shop-line); }
.ac-address-actions a, .ac-address-actions button {
    font-size: .78rem; font-weight: 700; text-decoration: none;
    background: none; border: 0; cursor: pointer; padding: 0; color: var(--shop-accent);
}
.ac-address-actions .is-danger { color: var(--shop-ko); }

/* ══════════ FICHIERS ACHETÉS ══════════ */

.ac-dl {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 15px 0; border-bottom: 1px solid var(--shop-line);
}
.ac-dl:last-child { border-bottom: 0; }
.ac-dl.is-locked { opacity: .62; }

.ac-dl-ico {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--shop-surface-3); color: var(--shop-accent);
}
.ac-dl-ico svg { width: 21px; height: 21px; }

.ac-dl-body { flex: 1 1 220px; min-width: 0; }
.ac-dl-name {
    font-weight: 700; color: var(--shop-ink); font-size: .93rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-dl-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px;
    font-size: .76rem; color: var(--shop-muted);
}
.ac-dl-meta .is-warn { color: var(--shop-sale); font-weight: 600; }
