/* ==============================================
   ANIMATIONS ET EFFETS SPÉCIAUX
   ============================================== */

/* Lightbox Gallery */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
}

/* Notification System */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    transition: right 0.3s ease;
    max-width: 350px;
}

.notification.show {
    right: 20px;
}

.notification-success {
    border-left: 4px solid #4CAF50;
}

.notification-error {
    border-left: 4px solid var(--tesla-red);
}

.notification-info {
    border-left: 4px solid var(--tesla-blue);
}

/* Hero Product Pages */
.hero-product {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.hero-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.badge-new-large {
    display: inline-block;
    background: var(--tesla-red);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-lead {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-highlight .feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-highlight strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 5px;
}

.feature-highlight p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.hero-price {
    background: var(--tesla-black);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.price-from {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.price-main {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.price-details {
    display: block;
    font-size: 14px;
    opacity: 0.9;
}

.hero-product-image {
    position: relative;
}

.hero-product-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.image-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255,255,255,0.95);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.benefit-card {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

/* Comparison Table */
.detailed-comparison {
    background: var(--bg-light);
    padding: 80px 0;
}

.comparison-table {
    overflow-x: auto;
    margin-bottom: 40px;
}

.comparison-table table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--tesla-gray);
    color: white;
    font-weight: 500;
}

.comparison-table th.featured {
    background: var(--tesla-red);
}

.comparison-table td.featured {
    background: rgba(232, 33, 39, 0.05);
    font-weight: 500;
}

.comparison-table tr.price-row {
    background: var(--bg-light);
}

.comparison-table tr.price-row td {
    font-size: 1.25rem;
    padding: 25px 20px;
}

.comparison-recommendation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.recommendation-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.recommendation-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommendation-card ul {
    list-style: none;
}

.recommendation-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.recommendation-card li:last-child {
    border-bottom: none;
}

.recommendation-card li:before {
    content: "→";
    color: var(--tesla-red);
    margin-right: 10px;
}

/* Upgrade Section */
.upgrade-section {
    padding: 80px 0;
    background: white;
}

.upgrade-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 40px;
}

.timeline-item {
    flex: 1;
    text-align: center;
    padding: 30px;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: var(--tesla-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 20px;
}

.timeline-arrow {
    font-size: 2rem;
    color: var(--tesla-red);
    flex: 0;
}

.upgrade-info {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

/* Savings Calculator */
.savings-calculator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

.savings-calculator .section-header h2,
.savings-calculator .section-subtitle {
    color: white;
}

.savings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.savings-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.savings-card h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.savings-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.savings-item:last-child {
    border-bottom: none;
}

.price-negative {
    color: #ff6b6b;
}

.price-positive {
    color: #51cf66;
}

.text-success {
    color: #51cf66;
}

.savings-result {
    grid-column: span 3;
    text-align: center;
    background: rgba(255,255,255,0.2);
    padding: 40px;
    border-radius: 12px;
}

.savings-amount {
    font-size: 4rem;
    font-weight: 600;
    display: block;
    margin: 20px 0;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.faq-item {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.faq-item h4 {
    font-size: 1.125rem;
    margin-bottom: 15px;
    color: var(--tesla-black);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section Gradient */
.cta-section-gradient {
    background: linear-gradient(135deg, var(--tesla-red) 0%, #D01F25 100%);
    color: white;
    padding: 100px 0;
}

.cta-content-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content-center h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.cta-content-center p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cta-features span {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    font-weight: 500;
}

.btn-white {
    background: white;
    color: var(--tesla-red);
}

.btn-white:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.cta-note {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 20px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 33, 39, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(232, 33, 39, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(232, 33, 39, 0);
    }
}

/* Slide animations */
.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-product-grid {
        grid-template-columns: 1fr;
    }
    
    .savings-grid {
        grid-template-columns: 1fr;
    }
    
    .savings-result {
        grid-column: span 1;
    }
    
    .comparison-recommendation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .upgrade-timeline {
        flex-direction: column;
    }
    
    .timeline-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-features {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 14px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px;
    }
}