/* ==============================================
   TESLA POWERWALL - STYLES PRINCIPAUX
   G2SUN 2025 - Design Premium Tesla
   ============================================== */

/* Fonts Tesla */
@font-face {
    font-family: 'Tesla Display';
    src: url('../assets/fonts/UniversalSans-Display-Medium-540 2.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Tesla Display';
    src: url('../assets/fonts/UniversalSans-Display-Regular-430.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Tesla Text';
    src: url('../assets/fonts/UniversalSansText-Medium_3440551577 2.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Tesla Text';
    src: url('../assets/fonts/UniversalSansText-Regular_3596454155 3.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* Variables CSS */
:root {
    --tesla-black: #000000;
    --tesla-white: #FFFFFF;
    --tesla-gray: #171A20;
    --tesla-gray-light: #393C41;
    --tesla-gray-lighter: #5C5E62;
    --tesla-red: #E82127;
    --tesla-blue: #3E6AE1;
    --text-primary: #171A20;
    --text-secondary: #5C5E62;
    --border-light: #D0D1D2;
    --bg-light: #F4F4F4;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tesla Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--tesla-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Tesla Display', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* Fallback pour logos manquants */
.logo-text-fallback {
    font-family: 'Tesla Display', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--tesla-red);
}

.badge-text-fallback {
    display: inline-block;
    padding: 8px 16px;
    background: var(--tesla-gray);
    color: white;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.tesla-logo {
    height: 32px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-family: 'Tesla Text', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    position: relative;
    padding: 8px 0;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--tesla-black);
}

.nav-link.active::after,
.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--tesla-red);
    transform-origin: left;
    animation: slideIn 0.3s ease;
}

.nav-link.highlight-new {
    color: var(--tesla-red);
    font-weight: 500;
}

.badge-new {
    background: var(--tesla-red);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: 600;
    vertical-align: super;
}

.nav-cta {
    background: var(--tesla-black);
    color: var(--tesla-white) !important;
    padding: 10px 24px !important;
    border-radius: 4px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background: var(--tesla-gray-light);
    transform: translateY(-2px);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--tesla-black);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* Hero Section avec Vidéo */
.hero-video {
    position: relative;
    margin-top: 72px;
}

/* Vidéo limitée en hauteur */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Hauteur fixe */
    overflow: hidden;
    background: #000;
}

.hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Section texte SOUS la vidéo */
.hero-text-section {
    background: white;
    padding: 60px 20px 80px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 500;
    margin: 0 0 10px;
    color: var(--tesla-black);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    color: var(--tesla-gray);
    margin: 0 0 20px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 auto 40px;
    max-width: 600px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-badges {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.badge-tesla {
    height: 50px;
    width: auto;
}

.badge-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--tesla-gray);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-wrapper {
        height: 250px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-text-section {
        padding: 40px 20px;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Tesla Text', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: none;
}

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

.btn-primary:hover {
    background: #D01F25;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--tesla-black);
}

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

.full-width {
    width: 100%;
}

/* Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, var(--tesla-red), #D01F25);
    color: white;
    padding: 20px 0;
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.announcement-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.announcement-bar h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.btn-announcement {
    background: white;
    color: var(--tesla-red);
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
    transition: all var(--transition-normal);
}

.btn-announcement:hover {
    transform: translateX(5px);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Product Showcase */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

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

.product-features {
    display: grid;
    gap: 30px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: start;
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* Comparison Section */
.comparison-section {
    background: var(--bg-light);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.comparison-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.comparison-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.comparison-card.featured {
    border: 2px solid var(--tesla-red);
}

.card-header {
    padding: 30px;
    text-align: center;
    color: white;
}

.card-header.backup {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.card-header.non-backup {
    background: linear-gradient(135deg, var(--tesla-red), #D01F25);
}

.card-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 10px;
}

.card-content {
    padding: 30px;
}

.feature-list {
    list-style: none;
    margin-bottom: 30px;
}

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

.feature-list li:last-child {
    border-bottom: none;
}

.card-price {
    text-align: center;
    margin-bottom: 25px;
}

.price-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.price-value {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--tesla-black);
    margin-bottom: 5px;
}

.price-info {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Gallery */
.installations-gallery {
    background: var(--tesla-white);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--tesla-black);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
    opacity: 0.7;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: all var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

.gallery-cta {
    text-align: center;
    margin-top: 50px;
}

/* Incentives Section */
.incentives-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.incentives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.incentive-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.incentive-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

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

.incentive-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.incentive-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.savings {
    display: inline-block;
    background: var(--tesla-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.incentives-cta {
    text-align: center;
}

.incentives-cta p {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

/* Certifications */
.certifications {
    background: var(--tesla-white);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.certification-item {
    text-align: center;
}

.certification-item img {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.certification-item h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.certification-item p {
    color: var(--text-secondary);
}

.company-info {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    background: var(--bg-light);
    border-radius: 12px;
}

.company-logo {
    height: 80px;
    width: auto;
}

.company-details h3 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.company-details p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Final CTA */
.final-cta {
    background: linear-gradient(135deg, var(--tesla-black), var(--tesla-gray));
    color: white;
    padding: 100px 0;
}

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

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

.cta-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.icon-phone {
    margin-right: 8px;
}

.cta-info {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: var(--tesla-gray);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition-fast);
}

.footer-column a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-legal p {
    margin-bottom: 10px;
}

.legal-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-links a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.legal-links a:hover {
    color: white;
}

.footer-badges {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-badges img {
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-badges img:hover {
    opacity: 1;
}

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

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease;
}

.animate-fade-up-delay {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.animate-fade-up-delay-2 {
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 3rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .announcement-content {
        flex-direction: column;
        text-align: center;
    }
    
    .company-info {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-badges {
        flex-direction: column;
    }
    
    .incentives-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}