/**
 * Styles pour les pages compte et commandes
 * Utilisé dans: mon-compte.php, compte-cmd.php
 */

/* ========================================
   COMMANDE CARD
======================================== */
.commande_card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.last_order_section .commande_card {
    margin-top: 15px;
}

/* ========================================
   COMMANDE HEADER
======================================== */
.commande_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.commande_header_left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.commande_number {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.commande_date {
    font-size: 13px;
    color: #666;
}

/* ========================================
   STATUTS DE COMMANDE
======================================== */
.commande_status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-preparing { background: #fff3e0; color: #f57c00; }
.status-shipped { background: #e8f5e9; color: #388e3c; }
.status-delivery { background: #f3e5f5; color: #7b1fa2; }
.status-delivered { background: #c8e6c9; color: #2e7d32; }
.status-pending { background: #fff8e1; color: #ffa000; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-unknown { background: #eeeeee; color: #616161; }

/* ========================================
   COMMANDE BODY - PRODUITS
======================================== */
.commande_body {
    padding: 20px;
}

.commande_products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product_item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.product_item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product_image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
}

.product_info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product_name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.product_variation {
    font-size: 12px;
    color: #888;
}

.product_brand {
    font-size: 12px;
    color: #666;
}

.product_qty_price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product_qty {
    font-size: 13px;
    color: #666;
}

.product_price {
    font-weight: 600;
    color: #333;
}

/* ========================================
   COMMANDE FOOTER - TOTAUX
======================================== */
.commande_footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.commande_totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.total_row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.total_row.total_final {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-top: 5px;
}

/* ========================================
   ADRESSE DE LIVRAISON
======================================== */
.commande_shipping {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.shipping_address {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.shipping_label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

/* ========================================
   LISTE DES COMMANDES
======================================== */
.block_commandes {
    padding: 20px 0 60px;
}

.commandes_list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* ========================================
   ETAT VIDE - AUCUNE COMMANDE
======================================== */
.no_commandes {
    text-align: center;
    padding: 60px 20px;
    background: #f8f8f8;
    border-radius: 12px;
}

.last_order_section .no_commandes {
    padding: 40px 20px;
    margin-top: 15px;
}

.no_commandes_icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.no_commandes_text {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.btn_shop {
    display: inline-block;
    padding: 12px 30px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn_shop:hover {
    background: #555;
    color: #fff;
}

/* ========================================
   MESSAGE D'ERREUR
======================================== */
.error_message {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* ========================================
   PAGINATION
======================================== */
.pagination_commandes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination_numbers {
    display: flex;
    gap: 5px;
}

.pagination_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination_link:hover {
    background: #f5f5f5;
    border-color: #333;
    color: #333;
}

.pagination_link.pagination_current {
    background: #333;
    border-color: #333;
    color: #fff;
}

.pagination_prev,
.pagination_next {
    gap: 8px;
}

.pagination_prev i,
.pagination_next i {
    font-size: 12px;
}

.pagination_ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 40px;
    color: #888;
    font-size: 14px;
}

.pagination_info {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: #888;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .commande_header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product_item {
        flex-direction: column;
    }

    .product_image {
        width: 100%;
        height: 150px;
    }

    .pagination_commandes {
        flex-direction: column;
        gap: 15px;
    }

    .pagination_prev,
    .pagination_next {
        order: 2;
    }

    .pagination_numbers {
        order: 1;
    }
}
