/* Connexion, inscription, mot de passe */
.auth-card {
    max-width: 480px; margin: 0 auto; padding: 2rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.auth-card--large { max-width: 640px; }
.auth-card--center { text-align: center; }
.auth-card--center .btn { margin-top: .5rem; }
.auth-card--inline { max-width: 480px; margin: 0; }
.auth-card .section-title { margin-top: 0; }
.auth-card .checkout-form { margin-top: 1rem; }
.auth-card .checkout-form .btn { justify-self: start; }
.auth-card__icon {
    display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: .5rem;
    color: var(--blue-600); background: var(--blue-50); border-radius: 50%;
}
.auth-card__alt { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: center; }
.checkbox { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.checkbox input { width: 1.15rem; height: 1.15rem; accent-color: var(--blue-600); }
.checkout-form .help-text a { font-weight: 600; }

/* Espace client */
.account { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.account-nav { position: sticky; top: 6rem; padding: 1.25rem; background: var(--bg-soft); border-radius: var(--radius); }
.account-nav__name { margin: 0 0 .75rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.account-nav ul { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.account-nav a { display: block; padding: .55rem .75rem; color: var(--text); border-radius: var(--radius-sm); text-decoration: none; }
.account-nav a:hover { background: var(--bg); color: var(--blue-700); }
.account-nav a[aria-current="page"] { background: var(--bg); color: var(--blue-700); font-weight: 700; box-shadow: var(--shadow-sm); }
.account-content > .section-title:first-child { margin-top: 0; }
.account-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.account-card { padding: 1.25rem 1.5rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.account-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.account-card p { margin: 0 0 .5rem; }
.account-card__value { font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; color: var(--blue-700); }
.account-section { margin: 2rem 0; }
.account-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.account-section__head h2, .account-section__head h3 { margin: 0; }
.account-totals { max-width: 360px; margin: 1.25rem 0 0 auto; }

.orders { overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.orders-table th { padding: .6rem .75rem; text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.orders-table td { padding: .85rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.orders-table td small { display: block; color: var(--muted); }
.orders-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orders-table__action { text-align: right; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

.status { display: inline-block; padding: .2rem .65rem; font-size: .8rem; font-weight: 700; border-radius: 999px; color: var(--blue-900); background: var(--blue-50); white-space: nowrap; }
.status--terminee, .status--expediee { color: #14532d; background: #dcfce7; }
.status--payee, .status--en_preparation { color: #1e3a5f; background: #e0ecf8; }
.status--en_attente_paiement, .status--en_attente_reglement, .status--expediee_non_payee { color: #92400e; background: #fef3c7; }
.status--annulee, .status--remboursee, .status--anomalie_livraison { color: #991b1b; background: #fee2e2; }

@media (max-width: 860px) {
    .account { grid-template-columns: 1fr; gap: 1.5rem; }
    .account-nav { position: static; }
    .account-nav ul { display: flex; flex-wrap: wrap; }
}
@media (max-width: 640px) {
    .auth-card { padding: 1.25rem; }
    .account-cards { grid-template-columns: 1fr; }
    /* Tableaux en cartes sur mobile */
    .orders-table thead { display: none; }
    .orders-table tr { display: grid; gap: .25rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
    .orders-table td { display: flex; justify-content: space-between; gap: 1rem; padding: 0; border: 0; }
    .orders-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
    .orders-table .num { text-align: right; }
    .orders-table__action { justify-content: flex-end !important; margin-top: .4rem; }
    .account-totals { max-width: none; }
}

/* Carnet d’adresses */
.address-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.address-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem 1.5rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.address-card h3 { margin: 0; font-size: 1.05rem; }
.address-card address { font-style: normal; line-height: 1.55; }
.address-card__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.address-card__badges:empty { display: none; }
.address-card__actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: auto; padding-top: .5rem; font-size: .9rem; }
.address-card__actions form { margin: 0; }
.link-button--danger { color: var(--danger); }
.checkout-carnet { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.checkout-carnet__label { width: 100%; margin: 0; font-size: .9rem; color: var(--muted); }
