:root {
    --lego-red: #D92328;
    --lego-blue: #006CB7;
    --lego-yellow: #FFCF00;
    --lego-green: #00852B;
    --text-dark: #1e293b;
    --text-grey: #64748b;
    --bg-base: #f4f7f6;
    --card-bg: #ffffff;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Inter', sans-serif;
    --header-height: 90px;
}

.cart-wrapper {
    min-height: calc(100vh - var(--header-height));
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(#e2e8f0 2px, transparent 2.5px), 
        radial-gradient(#e2e8f0 2px, transparent 2.5px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    padding: 60px 20px;
    font-family: var(--font-body);
    color: var(--text-dark);
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-header {
    margin-bottom: 40px;
}
.cart-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    color: var(--text-dark);
}
.cart-header p {
    color: var(--text-grey);
    font-size: 1.1rem;
}

.empty-cart-state {
    text-align: center;
    background: white;
    padding: 80px 20px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.empty-illustration {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

.empty-cart-state h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.btn-create {
    display: inline-block;
    background-color: var(--lego-blue);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 30px;
    box-shadow: 0 4px 0 #004c82;
    transition: all 0.1s;
    font-family: var(--font-heading);
}
.btn-create:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #004c82; }
.btn-create:active { transform: translateY(2px); box-shadow: none; }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.cart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.style-cheap::before { background-color: var(--lego-green); }
.style-rupture::before { background-color: var(--lego-blue); }
.style-default::before { background-color: var(--lego-red); }
.style-stock::before { background-color: var(--lego-yellow); }

.card-visual {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    margin-left: 10px;
}
.card-visual img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-info {
    flex: 1;
    padding: 0 25px;
}

.info-top h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0 0 8px 0;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    background: #f1f5f9;
    color: var(--text-grey);
}
.badge-cheap { color: var(--lego-green); background: #f0fdf4; }
.badge-rupture { color: var(--lego-blue); background: #eff6ff; }
.badge-default { color: var(--lego-red); background: #fef2f2; }
.badge-stock { color: #854d0e; background: #fefce8; }

.specs-grid {
    display: flex; gap: 20px; margin-top: 10px;
}
.spec { font-size: 0.9rem; }
.spec .label { color: var(--text-grey); margin-right: 5px; }
.spec .val { font-weight: 600; }

.card-price-action {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80px;
    padding-right: 10px;
}

.price {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.btn-buy-one {
    border: none;
    background-color: var(--lego-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 3px 0 #004c82;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-buy-one:hover {
    background-color: #007bd1;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #004c82;
}

.btn-buy-one:active {
    transform: translateY(2px);
    box-shadow: none;
}

.btn-remove {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.btn-remove:hover {
    color: var(--lego-red);
    transform: scale(1.1);
}

.btn-remove svg {
    width: 20px;
    height: 20px;
}

.cart-summary {
    position: sticky;
    top: 20px;
}

.summary-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.02);
}

.summary-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.summary-row {
    display: flex; justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-grey);
}

.summary-row.highlight .value.free {
    font-weight: 700;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
    border-radius: 1px;
}

.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px;
}
.summary-total span:first-child { font-weight: 600; color: var(--text-dark); }
.total-amount {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--lego-blue);
}

.btn-checkout {
    display: flex; justify-content: center; align-items: center;
    width: 90%;
    background-color: var(--lego-green);
    color: white;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 5px 0 #00601f;
    transition: all 0.1s;
    font-family: var(--font-heading);
}
.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #00601f;
    background-color: #009e33;
}
.btn-checkout:active {
    transform: translateY(3px);
    box-shadow: none;
}

.secure-info {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-grey);
    opacity: 0.8;
}

.style-rentabilite .card-visual { border-left: 5px solid var(--lego-green, #27ae60); }
.badge-rentabilite { background-color: var(--lego-green, #27ae60); color: white; }

.style-libre .card-visual { border-left: 5px solid var(--lego-red, #e74c3c); }
.badge-libre { background-color: var(--lego-red, #e74c3c); color: white; }

.style-stock .card-visual { border-left: 5px solid var(--lego-yellow, #f1c40f); }
.badge-stock { background-color: var(--lego-yellow, #f1c40f); color: #333; }

.style-minimisation .card-visual { border-left: 5px solid var(--lego-blue, #2980b9); }
.badge-minimisation { background-color: var(--lego-blue, #2980b9); color: white; }

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-visual {
        width: 100%;
        height: 150px;
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    .card-info { padding: 0; width: 100%; margin-bottom: 15px; }
    
    .card-price-action {
        width: 100%;
        flex-direction: row;
        align-items: center;
        height: auto;
        padding: 0;
    }
    
    .action-buttons {
        flex-direction: row;
        align-items: center;
    }
}