/* =================================
   Styles : adresse, commandes, médias
   (à charger APRÈS pages.css)
================================= */

.muted {
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Médias ---------- */

.slide video {
    object-fit: contain;
    background: #000;
}

.cart-thumb {
    overflow: hidden;
}

.cart-thumb img,
.cart-thumb video,
.product-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* ---------- Champ adresse (autocomplétion) ---------- */

.field-label {
    color: var(--muted);
    font-size: 13px;
}

.address-field {
    position: relative;
    display: grid;
    gap: 6px;
}

.suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 30;
    margin-top: 4px;
    overflow: hidden;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--surface-hover);
    list-style: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.suggestions li {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    cursor: pointer;
}

.suggestions li:last-child {
    border-bottom: 0;
}

.suggestions li:hover {
    background: rgba(139, 92, 246, 0.2);
}

.suggestions li.none {
    color: var(--muted);
    cursor: default;
}

.field-status {
    color: var(--muted);
    font-size: 12px;
}

.field-status.ok {
    color: #86efac;
}

.field-status.error {
    color: #fca5a5;
}

/* ---------- Livraison au plus vite ---------- */

.asap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 14px;
    border: 1px solid var(--accent);
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.15);
    font-weight: 700;
}

.asap small {
    color: #c0bdcc;
    font-size: 12px;
    font-weight: 400;
}

/* ---------- Commandes (profil) ---------- */

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 26px 0 12px;
}

.section-row h3 {
    font-size: 18px;
}

.section-row small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.refresh-button {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
}

.orders {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.order-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.order-head strong {
    font-size: 15px;
}

.order-date {
    color: var(--muted);
    font-size: 12px;
}

.badge {
    display: inline-block;
    margin: 6px 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.pending {
    background: rgba(250, 204, 21, 0.15);
    color: #fde047;
}

.badge.taken {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-light);
}

.badge.done {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.order-eta {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.order-items {
    margin: 6px 0;
    padding-left: 18px;
    color: #c0bdcc;
    font-size: 13px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

/* ---------- Bandeau mode développement ---------- */

.dev-banner {
    padding: 6px 12px;
    background: #facc15;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* ---------- Choix de livraison (au plus vite / une heure) ---------- */

.delivery-choice {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

.form label.choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
}

.form label.choice:has(input:checked) {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.15);
}

.form label.choice.disabled {
    opacity: 0.5;
}

.form label.choice input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    accent-color: var(--accent);
}

.form label.choice small {
    color: var(--muted);
    font-size: 12px;
}

.form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.form select[hidden] {
    display: none;
}

.form select:focus {
    border-color: var(--accent);
    outline: none;
}

/* ---------- Profil : pseudo seul / page "Mes commandes" ---------- */

.profile-card h3 {
    font-size: 18px;
}

.section-row .page-title {
    margin-bottom: 0;
}

.section-row .page-title small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.refresh-button:disabled {
    opacity: 0.6;
}

#orders-updated {
    margin-bottom: 12px;
    font-size: 12px;
}

.order-delivery {
    color: #c0bdcc;
    font-size: 13px;
}

/* ---------- Détail du panier dans "Mes commandes" ---------- */

.order-basket-title {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
}

.order-items {
    margin: 4px 0 8px;
    padding-left: 0;
    list-style: none;
}

.order-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
}

.order-items li span:last-child {
    flex-shrink: 0;
    color: var(--text);
}

/* ---------- Grille des quantités (4 à 6 par produit) ---------- */

/* 4 quantités : 2 x 2 ; 5 ou 6 quantités : 3 colonnes (réglage de base dans pages.css) */
.weights.weights-4 {
    grid-template-columns: repeat(2, 1fr);
}

.weights.weights-1,
.weights.weights-2 {
    grid-template-columns: repeat(2, 1fr);
}

.weight-option strong {
    white-space: nowrap;
}
