/* ================================
   FASTPANEL - PAGE PANIER
   Design professionnel 2024
   Style cohérent avec index.php
   ================================ */

/* Variables CSS */
:root {
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;
    --primary-400: #94a3b8;
    --primary-300: #cbd5e1;
    --primary-200: #e2e8f0;
    --primary-100: #f1f5f9;

    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --blue-300: #93c5fd;

    --green-500: #22c55e;
    --green-400: #4ade80;

    --red-500: #ef4444;
    --red-400: #f87171;

    --white: #ffffff;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ================================
   HERO SECTION
   ================================ */

.cart-hero-section {
    background: linear-gradient(135deg, var(--primary-900) 0%, #0c1929 50%, var(--primary-800) 100%);
    position: relative;
    overflow: hidden;
    padding: 140px 0 30px;
    min-height: auto;
}

/* Fondu en bas du hero */
.cart-hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(15, 23, 42, 0.3) 30%,
        rgba(15, 23, 42, 0.7) 60%,
        var(--primary-900) 100%
    );
    z-index: 3;
    pointer-events: none;
}

.cart-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 40%);
}

.cart-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cart-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--blue-400);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s ease-in-out infinite;
}

.cart-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.cart-particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 3s; }
.cart-particle:nth-child(3) { top: 30%; left: 80%; animation-delay: 6s; }
.cart-particle:nth-child(4) { top: 70%; left: 70%; animation-delay: 9s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50% { transform: translateY(-30px) translateX(10px); opacity: 0.5; }
}

.cart-gradient-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    animation: pulseOrb 6s ease-in-out infinite;
}

.cart-orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
}

.cart-orb-2 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes pulseOrb {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.cart-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Badge */
.cart-badge {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.cart-badge i {
    color: var(--blue-400);
    font-size: 14px;
}

.cart-badge span {
    color: var(--blue-300);
    font-size: 14px;
    font-weight: 600;
}

/* Title */
.cart-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.cart-title-gradient {
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Breadcrumb */
.cart-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    margin-top: 20px;
}

.cart-breadcrumb a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-300);
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart-breadcrumb a:hover {
    color: var(--blue-400);
}

.cart-breadcrumb .fa-chevron-right {
    color: var(--primary-500);
    font-size: 10px;
}

/* ================================
   MAIN SECTION
   ================================ */

.cart-main-section {
    background: var(--primary-900);
    padding: 30px 0 100px;
    position: relative;
}

.cart-glass-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* ================================
   CART ITEMS
   ================================ */

.cart-item {
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 24px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cart-item:last-child {
    border-bottom: none;
}

/* Header : logo + détails (prend tout l'espace dispo sur desktop) */
.cart-item-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

/* Footer : qty + prix + × sur une ligne */
.cart-item-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cart-item-logo {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.cart-item-specs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cart-item-spec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--primary-400);
}

.cart-item-spec i {
    color: var(--blue-400);
    font-size: 12px;
}

.cart-item-quantity {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: center;
    flex-shrink: 0;
}

.cart-qty-label {
    font-size: 0.6875rem;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cart-qty-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    color: var(--blue-300);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.cart-qty-btn:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(59, 130, 246, 0.7);
    color: var(--white);
    text-decoration: none;
}

.cart-item-price {
    text-align: right;
    flex-shrink: 0;
}

.cart-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-400);
}

.cart-price-period {
    font-size: 0.875rem;
    color: var(--primary-500);
    font-weight: 400;
}

.cart-item-remove {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red-400);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--red-500);
}

/* ================================
   SUMMARY SECTION
   ================================ */

.cart-summary-section {
    padding: 28px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-summary-row:last-child {
    border-bottom: none;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-summary-label {
    font-size: 0.9375rem;
    color: var(--primary-400);
    font-weight: 500;
}

.cart-summary-value {
    font-size: 1rem;
    color: var(--primary-200);
    font-weight: 600;
}

.cart-summary-row:last-child .cart-summary-label {
    font-size: 1rem;
    color: var(--white);
    font-weight: 600;
}

.cart-summary-row:last-child .cart-summary-value {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.cart-checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    color: var(--white);
}

/* ================================
   EMPTY STATE
   ================================ */

.cart-empty-state {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty-icon {
    width: 100px;
    height: 100px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: var(--blue-400);
}

.cart-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.cart-empty-text {
    font-size: 1rem;
    color: var(--primary-400);
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.cart-empty-btn {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.cart-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    color: var(--white);
}

/* ================================
   RESPONSIVE
   ================================ */

/* Tablette large */
@media (max-width: 992px) {
    .cart-hero-section { padding: 120px 0 60px; }
    .cart-title { font-size: 2.25rem; }
}

/* Tablette : items compacts mais toujours horizontaux */
@media (max-width: 768px) {
    .cart-hero-section { padding: 100px 0 50px; min-height: auto; }
    .cart-title { font-size: 1.875rem; }
    .cart-badge { padding: 8px 16px; gap: 8px; }
    .cart-badge span { font-size: 12px; }
    .cart-breadcrumb { font-size: 12px; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .cart-main-section { padding: 40px 0 70px; }
    .cart-glass-container { border-radius: var(--radius-lg); }
    .cart-summary-section { padding: 24px 20px; }

    .cart-item { padding: 16px 20px; gap: 12px; }
    .cart-item-logo { width: 48px; height: 48px; }
    .cart-item-quantity { padding: 10px 14px; }
    .cart-price-value { font-size: 1.125rem; }
    .cart-item-remove { width: 34px; height: 34px; }
}

/* Espacement entre la liste et le récapitulatif quand les colonnes s'empilent */
@media (max-width: 991px) {
    .col-lg-4 .cart-glass-container {
        margin-top: 24px;
    }
}

/* Mobile : layout 2 lignes
   Ligne 1 : [Logo] [Nom / 1 vCPU · 2GB · 20GB]
   Ligne 2 :                     [−][1][+] 12€ [×]
*/
@media (max-width: 580px) {
    /* cart-item passe en colonne : header au-dessus, footer en-dessous */
    .cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }

    /* Header reste en ligne (logo à gauche, détails à droite) */
    .cart-item-header {
        gap: 10px;
    }

    .cart-item-logo {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .cart-item-name  { font-size: 0.875rem; margin-bottom: 4px; }

    /* Specs : retour à la ligne autorisé */
    .cart-item-specs { flex-wrap: wrap; gap: 6px; }
    .cart-item-spec  { font-size: 0.7rem; }

    /* Footer : qty + prix + × poussés à droite */
    .cart-item-footer {
        justify-content: flex-end;
        gap: 8px;
    }

    .cart-item-quantity { padding: 4px 8px; }
    .cart-qty-label     { display: none; }
    .cart-qty-btn       { width: 28px; height: 28px; font-size: 0.95rem; }
    .cart-qty-value     { font-size: 0.9375rem; }

    .cart-item-price   { text-align: right; }
    .cart-price-value  { font-size: 0.9375rem; }
    .cart-price-period { font-size: 0.7rem; }

    .cart-item-remove  { width: 30px; height: 30px; font-size: 11px; }
}

/* Très petit mobile */
@media (max-width: 380px) {
    .cart-hero-section { padding: 90px 0 40px; }
    .cart-title { font-size: 1.5rem; }
    .cart-item { padding: 12px; }
    .cart-item-logo { width: 34px; height: 34px; }
    .cart-item-name { font-size: 0.8125rem; }
    .cart-empty-state { padding: 60px 16px; }
    .cart-empty-icon { width: 80px; height: 80px; font-size: 32px; }
    .cart-empty-title { font-size: 1.25rem; }
    .cart-empty-text  { font-size: 0.875rem; }
}

/* ================================
   ACCOUNT INFO MESSAGE
   ================================ */

.cart-account-info {
    margin-top: 24px;
    padding: 16px;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cart-account-info i {
    color: #4fc3f7;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.cart-account-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}
