
/* ============================================
   PANIER — MÊME STYLE QUE LA PAGE ACHAT
   ============================================ */

/* Masquer le titre et la zone blanche du template WordPress */
.site-main > article,
.site-main > .page,
.entry-header,
.entry-title,
.page-header { display: none !important; }
.site-main { padding: 0 !important; margin: 0 !important; background: transparent !important; }

/* ── Messages WooCommerce (notices) ── */
.woocommerce-notices-wrapper {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 20px !important;
    position: relative;
    z-index: 10;
}

.woocommerce-message,
.woocommerce-info {
    background: rgba(255,255,255,0.1) !important;
    border-top: 3px solid #00AFEF !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 14px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    list-style: none !important;
}

.woocommerce-message a,
.woocommerce-info a {
    color: #00AFEF !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

/* Masquer le message panier vide natif WooCommerce */
p.cart-empty,
.cart-empty,
.return-to-shop,
.woocommerce-info.cart-empty,
.woocommerce-cart .woocommerce > p,
.woocommerce-cart .woocommerce > a.button {
    display: none !important;
}

.cart-theme-global {
    background: #002060;
    min-height: 100vh;
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
}

/* Cercles décoratifs */
.cart-bg-circle {
    position: absolute;
    width: 500px;
    height: 650px;
    border-radius: 9999px;
    pointer-events: none;
    opacity: 0.1;
    z-index: 0;
}
.cart-bg-circle-right { right: -250px; top: 10%;    background: #4DC4FF; }
.cart-bg-circle-left  { left: -250px;  bottom: 5%;  background: #00AFEF; }

/* Wrapper central */
.cart-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ── En-tête ── */
.cart-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.cart-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
}

.cart-badge {
    background: rgba(255,255,255,0.12);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ── Panier vide ── */
.cart-empty-card {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.cart-empty-icon {
    color: #002060;
    opacity: 0.2;
    margin-bottom: 20px;
}

.cart-empty-card h2 {
    color: #002060;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.cart-empty-card p {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* ── Layout 2 colonnes ── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* ── Card articles ── */
.cart-items-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr 130px 110px 36px;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s ease;
}

.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: #fafbfc; }

/* Image */
.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 6px;
}

/* Détails */
.cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #002060;
    margin-bottom: 6px;
}
.cart-item-name a {
    color: #002060;
    text-decoration: none;
}
.cart-item-name a:hover { text-decoration: underline; }

.cart-item-price {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

/* Quantité */
.cart-item-qty .quantity input {
    width: 64px;
    height: 38px;
    padding: 0 10px;
    border: 1.5px solid #dde1ea;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #002060;
    background: white;
    transition: border-color 0.2s;
}
.cart-item-qty .quantity input:focus {
    outline: none;
    border-color: #002060;
}

/* Sous-total */
.cart-item-subtotal {
    font-size: 1rem;
    font-weight: 800;
    color: #002060;
    text-align: right;
}

/* Supprimer */
.cart-item-remove .remove-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #aaa;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.cart-item-remove .remove-item:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ── Actions ── */
.cart-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ── Boutons ── */
.cart-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #002060;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}
.cart-btn-primary:hover { background: #001a4d; color: white; }

.cart-btn-secondary {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.cart-btn-secondary:hover { color: white; }

.cart-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.cart-btn-ghost:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

/* ── Card récapitulatif ── */
.cart-summary-card {
    background: white;
    border-radius: 16px;
    padding: 28px 28px 32px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}

.cart-summary-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #002060;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
    color: #555;
}
.summary-line span:last-child { font-weight: 600; color: #002060; }

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 20px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #002060;
    border-top: 2px solid #002060;
    margin-top: 4px;
}

/* Code promo */
.coupon-section { margin: 16px 0; }

.coupon-toggle summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
    list-style: none;
    padding: 8px 0;
    transition: color 0.2s;
}
.coupon-toggle summary:hover { color: #002060; }
.coupon-toggle summary::-webkit-details-marker { display: none; }

.coupon-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #dde1ea;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #333;
    transition: border-color 0.2s;
}
.coupon-input:focus { outline: none; border-color: #002060; }

.coupon-btn {
    background: #002060;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.coupon-btn:hover { background: #001a4d; }

.remove-coupon {
    color: #ef4444;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 700;
}

/* Bouton commande */
.cart-btn-checkout {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    font-size: 1rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
    box-sizing: border-box;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cart-title { font-size: 1.5rem; }

    .cart-item {
        grid-template-columns: 64px 1fr 36px;
        grid-template-rows: auto auto auto;
        gap: 10px;
        padding: 16px;
    }

    .cart-item-image { grid-row: 1 / 3; }
    .cart-item-details { grid-column: 2; }
    .cart-item-remove { grid-column: 3; grid-row: 1; justify-self: end; }
    .cart-item-qty { grid-column: 2; }
    .cart-item-subtotal { grid-column: 2; font-size: 0.95rem; text-align: left; }

    .cart-actions { flex-wrap: wrap; }
    .cart-btn-ghost { margin-left: 0; }
}

body.woocommerce-cart,
body.woocommerce-cart #page,
body.woocommerce-cart #content,
body.woocommerce-cart .site-content {
	background: #002060 !important;
}
body.woocommerce-cart .woocommerce-notices-wrapper {
	max-width: 1200px;
	margin: 0 auto !important;
	padding: 20px 20px 0 !important;
}
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info {
	background: rgba(255,255,255,0.06) !important;
	border: 1px solid rgba(255,255,255,0.12) !important;
	border-top: none !important;
	color: rgba(255,255,255,0.8) !important;
	border-radius: 10px !important;
	padding: 11px 18px !important;
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	box-shadow: none !important;
	list-style: none !important;
}
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before {
	display: none !important;
}
body.woocommerce-cart .woocommerce-message a,
body.woocommerce-cart .woocommerce-info a {
	color: white !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(255,255,255,0.35) !important;
	transition: border-color 0.2s !important;
}
body.woocommerce-cart .woocommerce-message a:hover,
body.woocommerce-cart .woocommerce-info a:hover {
	border-bottom-color: white !important;
}