/* Purchase Page Specific Styles */
/* ============================= */

/* Background Pattern */
.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(34, 197, 94, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Hero Section Enhancements */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Investment Packs Grid */
.investment-packs {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pack-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pack-card:hover::before {
    transform: scaleX(1);
}

.pack-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.pack-header {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pack-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.pack-card:hover .pack-header::after {
    left: 100%;
}

.pack-price {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.pack-surface {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.9;
}

.pack-content {
    padding: 1.5rem;
}

.pack-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pack-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.pack-features li:last-child {
    border-bottom: none;
}

.pack-features li::before {
    content: '✓';
    color: #22c55e;
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Timeline Enhancements */
.timeline-line {
    background: linear-gradient(
        180deg,
        rgba(34, 197, 94, 0.2) 0%,
        rgba(34, 197, 94, 0.6) 50%,
        rgba(34, 197, 94, 0.2) 100%
    );
}

.timeline-step {
    transition: all 0.3s ease;
}

.timeline-step:hover {
    transform: translateX(8px);
}

.timeline-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.step-number {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.step-number:hover::before {
    left: 100%;
}

/* Card Enhancements */
.info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Payment Method Cards */
.payment-method {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-method::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.payment-method:hover::after {
    left: 100%;
}

.payment-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Crypto Address Display */
.crypto-address {
    position: relative;
    transition: all 0.3s ease;
}

.crypto-address:hover {
    background: rgba(34, 197, 94, 0.1);
    transform: scale(1.02);
}

.crypto-address .copy-button {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crypto-address:hover .copy-button {
    opacity: 1;
}

/* Form Enhancements */
.form-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.form-button:hover::before {
    left: 100%;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered Animation Delays */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Responsive Enhancements */
@media (max-width: 768px) {
    .timeline-line {
        left: 1rem;
    }
    
    .timeline-step {
        margin-left: 0;
    }
    
    .step-number {
        width: 3rem;
        height: 3rem;
        font-size: 0.875rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .investment-packs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .pack-price {
        font-size: 2rem;
    }
}

/* Dark Mode Enhancements */
.dark .bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
}

.dark .timeline-line {
    background: linear-gradient(
        180deg,
        rgba(34, 197, 94, 0.1) 0%,
        rgba(34, 197, 94, 0.3) 50%,
        rgba(34, 197, 94, 0.1) 100%
    );
}

.dark .pack-card {
    background: #1f2937;
    color: white;
}

.dark .pack-features li {
    border-bottom-color: #374151;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Focus States for Accessibility */
.focus-visible:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .step-number {
        border: 2px solid currentColor;
    }
    
    .info-card {
        border: 2px solid currentColor;
    }
    
    .pack-card {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in-up,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-scale-in {
        animation: none;
    }
    
    .timeline-step:hover {
        transform: none;
    }
    
    .info-card:hover {
        transform: none;
    }
    
    .pack-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .timeline-line,
    .form-section {
        display: none;
    }
    
    .info-card,
    .pack-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Category Filter Styles */
.category-filter {
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.category-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.category-filter.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Pack Category Badge */
.pack-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    display: inline-block;
}

/* Crypto Pack Headers */
.pack-card[data-category="crypto"] .pack-header {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.pack-card[data-category="crypto"]:nth-child(2) .pack-header {
    background: linear-gradient(135deg, #10b981, #3b82f6);
}

/* Other Packs Headers */
.pack-card[data-category="autres"] .pack-header {
    background: linear-gradient(135deg, #10b981, #0d9488);
}

.pack-card[data-category="autres"]:nth-child(2) .pack-header {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

/* Template Pack */
.pack-card[data-category="nouveau"] .pack-header {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* Add New Packs Section */
.add-new-packs {
    transition: all 0.3s ease;
    cursor: pointer;
}

.add-new-packs:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #22c55e;
}

.add-new-packs:hover .add-icon {
    transform: scale(1.1);
    color: #22c55e;
}

.add-icon {
    transition: all 0.3s ease;
}

/* Pack Card Hover Effects by Category */
.pack-card[data-category="immobilier"]:hover {
    border-color: #22c55e;
}

.pack-card[data-category="crypto"]:hover {
    border-color: #f59e0b;
}

.pack-card[data-category="autres"]:hover {
    border-color: #10b981;
}

/* Animation for filtered packs */
.pack-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pack-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

.pack-card[style*="display: block"] {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments for filters */
@media (max-width: 640px) {
    .category-filter {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .investment-packs {
        grid-template-columns: 1fr;
    }
}

/* Dark mode adjustments for new elements */
.dark .category-filter {
    background: #374151;
    color: #d1d5db;
}

.dark .category-filter:hover {
    background: #4b5563;
}

.dark .category-filter.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.dark .add-new-packs {
    background: #1f2937;
    border-color: #4b5563;
}

.dark .add-new-packs:hover {
    border-color: #22c55e;
    background: #111827;
}
