/**
 * MINI CART STYLES - Wonder Park
 * Design moderne, soft et responsive mobile-first
 */

/* ==========================================================================
   BOUTON TRIGGER
   ========================================================================== */

.mini-cart-trigger {
    color: #4E5561;
    font-size: 20px;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.mini-cart-trigger:hover {
    color: #FF006F;
    background-color: rgba(255, 0, 111, 0.1) !important;
    transform: scale(1.05);
}

.mini-cart-trigger .count-icon {
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   OFFCANVAS GÉNÉRAL
   ========================================================================== */

/* Overlay backdrop */
.offcanvas-backdrop {
    z-index: 9998 !important;
}

#miniCartOffcanvas {
    width: 100vw !important;
    max-width: 400px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
}

#miniCartOffcanvas .offcanvas-header {
    background: linear-gradient(135deg, #FF006F 0%, #FD2692 100%);
    color: white;
    border-bottom: none;
}

#miniCartOffcanvas .offcanvas-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

#miniCartOffcanvas .btn-close {
    background: white;
    border-radius: 50%;
    opacity: 0.9;
    font-size: 0.8rem;
    width: 32px;
    height: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#miniCartOffcanvas .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

#miniCartOffcanvas .offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ==========================================================================
   NAVIGATION ONGLETS
   ========================================================================== */

#miniCartTabs {
    background: #F8F9FA;
    border-bottom: 1px solid #E4EBF1;
    margin: 0 !important;
    padding: 0.5rem;
}

#miniCartTabs .nav-link {
    border: none;
    background: transparent;
    color: #677788;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#miniCartTabs .nav-link:hover {
    background: #fff;
    color: #FF006F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 111, 0.15);
}

#miniCartTabs .nav-link.active {
    background: #fff;
    color: #FF006F;
    box-shadow: 0 4px 15px rgba(255, 0, 111, 0.2);
    transform: translateY(-2px);
}

#miniCartTabs .nav-link i {
    font-size: 1.1rem;
}

#miniCartTabs .nav-link .badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
}

/* ==========================================================================
   CONTENU DES ONGLETS
   ========================================================================== */

#miniCartOffcanvas .tab-content {
    flex: 1;
    overflow-y: auto;
}

/* États vides */
#miniCartOffcanvas .tab-pane .text-center {
    padding: 3rem 1rem !important;
}

#miniCartOffcanvas .tab-pane .text-center i {
    font-size: 3rem !important;
    color: #E4EBF1;
    opacity: 0.7;
    margin-bottom: 1rem !important;
}

#miniCartOffcanvas .tab-pane .text-center h6 {
    color: #677788;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#miniCartOffcanvas .tab-pane .text-center p {
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* Items des accessoires */
#miniCartOffcanvas .tab-pane .d-flex.align-items-center {
    background: #fff;
    border: 1px solid #F1F4F7;
    border-radius: 12px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

#miniCartOffcanvas .tab-pane .d-flex.align-items-center:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #FF006F;
}

#miniCartOffcanvas .tab-pane .bg-light {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #677788;
}

#miniCartOffcanvas .tab-pane h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212E47;
    margin-bottom: 0.25rem !important;
}

#miniCartOffcanvas .tab-pane small {
    font-weight: 500;
    color: #FF006F !important;
}

#miniCartOffcanvas .tab-pane .badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

/* Séparateur */
#miniCartOffcanvas .tab-pane hr {
    border-color: #E4EBF1;
    margin: 1.5rem 0;
}

/* ==========================================================================
   TICKET DESIGN - Style authentique
   ========================================================================== */

#miniCartOffcanvas .ticket-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

#miniCartOffcanvas .ticket-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 111, 0.08);
    border-color: #FF006F;
}

/* Header du ticket */
#miniCartOffcanvas .ticket-header {
    background: linear-gradient(135deg, #FF006F 0%, #FD2692 100%);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

#miniCartOffcanvas .ticket-header::before,
#miniCartOffcanvas .ticket-header::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #f8f9fa;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

#miniCartOffcanvas .ticket-header::before {
    left: -10px;
}

#miniCartOffcanvas .ticket-header::after {
    right: -10px;
}

#miniCartOffcanvas .ticket-logo {
    font-size: 1.5rem;
    opacity: 0.9;
}

#miniCartOffcanvas .ticket-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Contenu du ticket */
#miniCartOffcanvas .ticket-content {
    padding: 1.5rem;
    color: #222222;
}

#miniCartOffcanvas .ticket-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#miniCartOffcanvas .ticket-label {
    font-size: 0.875rem;
    color: #666666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#miniCartOffcanvas .ticket-value {
    font-size: 0.95rem;
    color: #222222;
    font-weight: 600;
    text-align: right;
}

#miniCartOffcanvas .ticket-price-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e0e0e0;
}

#miniCartOffcanvas .ticket-total {
    text-align: center;
}

#miniCartOffcanvas .ticket-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF006F;
    text-shadow: 0 1px 2px rgba(255, 0, 111, 0.05);
}

/* Perforations du ticket */
#miniCartOffcanvas .ticket-perforations {
    position: absolute;
    left: 0;
    right: 0;
    top: 70px; /* Position après le header */
    height: 2px;
    overflow: hidden;
}

#miniCartOffcanvas .perf-line {
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 5px,
        #e0e0e0 5px,
        #e0e0e0 10px
    );
}

/* Animation subtile */
#miniCartOffcanvas .ticket-card {
    animation: ticketSlideIn 0.5s ease-out;
}

@keyframes ticketSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

/* Style mobile responsive */
@media (max-width: 576px) {
    #miniCartOffcanvas .ticket-content {
        padding: 1rem;
    }
    
    #miniCartOffcanvas .ticket-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    #miniCartOffcanvas .ticket-value {
        text-align: left;
    }
}

/* ==========================================================================
   FOOTER ACTIONS
   ========================================================================== */

#miniCartOffcanvas .offcanvas-body > div:last-child {
    background: #F8F9FA;
    margin: 0 -1rem -1rem -1rem;
    padding: 1.5rem;
    border-top: 1px solid #E4EBF1;
    margin-top: auto;
}

/* Résumé détaillé */
#miniCartOffcanvas .cart-summary-details .text-muted {
    font-size: 0.875rem;
}

#miniCartOffcanvas .cart-summary-details .fw-medium {
    font-weight: 600;
    color: #212E47;
}

#miniCartOffcanvas .cart-summary-details hr {
    border-color: #E4EBF1;
    margin: 1rem 0 !important;
}

/* Total principal - plus gros et visible */
#miniCartOffcanvas .cart-summary-details .total-amount {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #FF006F !important;
    text-shadow: 0 1px 2px rgba(255, 0, 111, 0.1);
}

#miniCartOffcanvas .cart-summary-details .fs-4 {
    font-size: 1.25rem !important;
    color: #212E47;
}

#miniCartOffcanvas .offcanvas-body .text-primary {
    color: #FF006F !important;
}

#miniCartOffcanvas .offcanvas-body .btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#miniCartOffcanvas .offcanvas-body .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#miniCartOffcanvas .offcanvas-body .btn-outline-primary {
    border-color: #FF006F;
    color: #FF006F;
}

#miniCartOffcanvas .offcanvas-body .btn-outline-primary:hover {
    background: #FF006F;
    border-color: #FF006F;
    color: white;
}

#miniCartOffcanvas .offcanvas-body .btn-primary {
    background: linear-gradient(135deg, #FF006F 0%, #FD2692 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 0, 111, 0.3);
}

#miniCartOffcanvas .offcanvas-body .btn-primary:hover {
    box-shadow: 0 6px 25px rgba(255, 0, 111, 0.4);
    transform: translateY(-2px);
}

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

/* Mobile par défaut - déjà optimisé */

/* Tablettes */
@media (min-width: 768px) {
    #miniCartOffcanvas {
        max-width: 450px;
    }
    
    #miniCartTabs .nav-link {
        padding: 1rem 1.25rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    #miniCartOffcanvas {
        max-width: 420px;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

#miniCartOffcanvas .tab-pane .d-flex.align-items-center {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#miniCartOffcanvas .tab-pane .text-center {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   AMÉLIORATIONS VISUELLES
   ========================================================================== */

/* Effet glassmorphism subtil */
#miniCartOffcanvas .offcanvas-header {
    backdrop-filter: blur(10px);
}

/* Bordures arrondies */
#miniCartOffcanvas {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    overflow: hidden;
}

/* Focus states pour accessibilité */
.mini-cart-trigger:focus,
#miniCartTabs .nav-link:focus,
.offcanvas-body .btn:focus {
    outline: 2px solid #FF006F;
    outline-offset: 2px;
}

/* Réduction des animations pour ceux qui préfèrent */
@media (prefers-reduced-motion: reduce) {
    .mini-cart-trigger,
    #miniCartTabs .nav-link,
    .tab-pane .d-flex.align-items-center,
    .offcanvas-body .btn {
        transition: none;
    }
    
    .count-icon {
        animation: none;
    }
}
