/**
 * Styles pour le système de panier
 * Mini-panier + Sidebar + Items
 * 
 * @package PhotoClass_Pro
 * Couleur principale : #0693e3
 */

/* ========================================
   MINI-PANIER (Icône + Compteur)
   ======================================== */

.pcp-mini-cart {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 9999;
}

.pcp-mini-cart-toggle {
    position: relative;
    width: 56px;
    height: 56px;
    background: #0693e3;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(6, 147, 227, 0.4);
    transition: all 0.3s;
}

.pcp-mini-cart-toggle:hover {
    background: #0577c2;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(6, 147, 227, 0.6);
}

.pcp-mini-cart-toggle svg {
    color: white;
}

.pcp-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    animation: cartBounce 0.5s;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   SIDEBAR DU PANIER
   ======================================== */

.pcp-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.pcp-cart-sidebar.active {
    pointer-events: all;
}

.pcp-cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.pcp-cart-sidebar.active .pcp-cart-sidebar-overlay {
    opacity: 1;
}

.pcp-cart-sidebar-content {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(100%);
    width: 100%;
    max-width: 340px;
    height: 60vh;
    max-height: 650px;
    background: white;
    border-radius: 12px 0 0 12px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.pcp-cart-sidebar.active .pcp-cart-sidebar-content {
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   HEADER DU PANIER
   ======================================== */

.pcp-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0693e3 0%, #0577c2 100%);
    color: white;
}

.pcp-cart-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.pcp-cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.pcp-cart-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   BODY DU PANIER (Items)
   ======================================== */

.pcp-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.pcp-cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.pcp-cart-empty p {
    font-size: 18px;
    margin: 0 0 8px 0;
}

.pcp-cart-empty small {
    font-size: 14px;
}

/* Groupe d'items par enfant (scolaire) */
.pcp-cart-child-group {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0693e3;
}

.pcp-cart-child-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

.pcp-cart-child-header strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.pcp-cart-child-header small {
    color: #6c757d;
    font-size: 13px;
}

/* Item individuel - Layout vertical */
.pcp-cart-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pcp-cart-item-info {
    width: 100%;
}

.pcp-cart-item-info strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 3px;
    line-height: 1.3;
}

.pcp-cart-item-info small {
    display: block;
    font-size: 11px;
    color: #6c757d;
    line-height: 1.3;
    margin-top: 2px;
}

/* Ligne de contrôles (quantité, prix, suppression) */
.pcp-cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.pcp-cart-item-left-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Quantité */
.pcp-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcp-qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.pcp-qty-btn:hover {
    background: #0693e3;
    color: white;
    border-color: #0693e3;
}

.pcp-qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

/* Prix */
.pcp-cart-item-price {
    font-weight: 600;
    color: #0693e3;
    font-size: 16px;
}

/* Bouton supprimer */
.pcp-cart-item-remove {
    width: 26px;
    height: 26px;
    border: none;
    background: #fee;
    color: #dc3545;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.pcp-cart-item-remove:hover {
    background: #dc3545;
    color: white;
}

/* ========================================
   FOOTER DU PANIER (Total + Checkout)
   ======================================== */

.pcp-cart-footer {
    padding: 20px 24px;
    border-top: 2px solid #e9ecef;
    background: #f8f9fa;
}

.pcp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
}

.pcp-cart-total strong {
    font-size: 24px;
    color: #0693e3;
}

.pcp-cart-checkout-btn {
    width: 100%;
    padding: 16px;
    background: #0693e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pcp-cart-checkout-btn:hover {
    background: #0577c2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 147, 227, 0.4);
}

.pcp-cart-checkout-btn:active {
    transform: translateY(0);
}

.pcp-cart-checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .pcp-mini-cart {
        top: auto;
        bottom: 80px;
        right: 15px;
        transform: none;
    }
    
    .pcp-mini-cart-toggle {
        width: 50px;
        height: 50px;
    }
    
    .pcp-cart-sidebar-content {
        max-width: 100%;
    }
    
    .pcp-cart-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pcp-cart-item-quantity,
    .pcp-cart-item-price,
    .pcp-cart-item-remove {
        justify-self: flex-end;
    }
}
