@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@400;700;900&display=swap');

:root {
    --bg-primary: #0A0F1D; 
    --bg-secondary: #131A2D;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.1);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    
    --accent-safe: #10B981; /* Green */
    --accent-glow: rgba(16, 185, 129, 0.5);
    --accent-action: #F59E0B; /* Orange */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        linear-gradient(rgba(10, 15, 29, 0.85), rgba(19, 26, 45, 0.95)),
        url('../img/smart_home_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--accent-safe); }
.text-action { color: var(--accent-action); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-safe);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.7);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 29, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
    transition: var(--transition);
}

header.scrolled {
    padding: 1rem 5%;
    background: rgba(10, 15, 29, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-safe);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-safe);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--border-card);
}

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

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-col p, .footer-col ul li a {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.footer-col ul li a:hover {
    color: var(--accent-safe);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sections Global */
section {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero h1 span.highlight {
    background: linear-gradient(90deg, var(--accent-safe), #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Background effects */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(10, 15, 29, 0) 70%);
    top: -100px;
    right: -100px;
    z-index: 1;
    border-radius: 50%;
}

.bg-glow-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(10, 15, 29, 0) 70%);
    bottom: -200px;
    left: -100px;
    z-index: 1;
}

/* Cards (Features, Pillars) */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-safe);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Layout Split (Image + Text) */
.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.split-content {
    flex: 1;
}

.split-image {
    flex: 1;
    position: relative;
}

.split-image img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.split-layout.reversed {
    flex-direction: row-reverse;
}

/* Forms */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 3rem;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-safe);
    background: rgba(0, 0, 0, 0.4);
}

/* Multi-step form specific */
.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
}

.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.step-dot.active {
    background: var(--accent-safe);
    color: white;
    border-color: var(--accent-safe);
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* House 3D Map */
.house-map-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-card);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.house-map-image {
    width: 100%;
    display: block;
    height: auto;
}

.hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--accent-action);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pulse 2s infinite;
    z-index: 10;
}

.hotspot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.hotspot-card {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 250px;
    background: rgba(19, 26, 45, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent-action);
    padding: 1rem;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hotspot:hover .hotspot-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hotspot-card h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hotspot-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Interactive Simulator */
.interactive-sim-section {
    background: linear-gradient(135deg, rgba(10, 15, 29, 0.95), rgba(19, 26, 45, 0.95));
    border-radius: 20px;
    margin: 2rem 5%;
    padding: 4rem 2rem;
    border: 1px solid var(--border-card);
    transition: background 0.8s ease;
}

.simulator-container {
    display: flex;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.sim-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sim-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.sim-btn:hover {
    background: rgba(255,255,255,0.08);
}

.sim-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-safe);
    transform: translateX(10px);
}

.sim-icon {
    font-size: 2rem;
}

.sim-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.sim-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sim-dashboard-wrapper {
    flex: 1.5;
    perspective: 1000px;
}

.glass-dashboard {
    background: rgba(19, 26, 45, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: all 0.5s ease;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1rem;
}

.dash-time {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.dash-weather {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.dash-status-msg {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-safe);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-style: italic;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: var(--transition);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.dash-widget {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition);
}

.dash-widget.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.dash-widget.off {
    opacity: 0.6;
}

.widget-icon {
    font-size: 1.5rem;
}

.widget-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.widget-state {
    font-weight: 600;
    font-size: 1rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border-card);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-safe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: var(--accent-safe);
}

.time-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-safe);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.timeline-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.comparison-col {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-card);
    transition: var(--transition);
}

.comparison-col.before {
    border-top: 4px solid #EF4444; /* Red */
}

.comparison-col.after {
    border-top: 4px solid var(--accent-safe);
    background: rgba(16, 185, 129, 0.05);
}

.comp-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-card);
}

.comp-icon {
    font-size: 2rem;
}

.comp-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comp-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-safe);
}

.comparison-col.before .comp-list li::before {
    content: '→';
    color: #EF4444;
}

/* Infographie Local vs Cloud */
.infographic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid var(--border-card);
}
.info-box {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid;
    flex: 1;
}
.info-box.local {
    border-color: var(--accent-safe);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.info-box.cloud {
    border-color: #EF4444;
    opacity: 0.7;
}
.info-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
}

/* Mur des Technologies */
.tech-wall {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0;
    opacity: 0.7;
}
.tech-item {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}
.tech-item:hover {
    color: var(--text-primary);
    transform: scale(1.05);
}

/* ROI Simulator */
.roi-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.roi-slider {
    width: 100%;
    margin: 2rem 0;
    -webkit-appearance: none;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    outline: none;
}
.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--accent-safe);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-safe);
}
.roi-result {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--accent-safe);
    font-weight: bold;
    margin-top: 1rem;
}

/* Diagnostic Quiz */
.quiz-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
}
.quiz-step {
    display: none;
    animation: fadeIn 0.5s ease;
}
.quiz-step.active {
    display: block;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}
.quiz-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-card);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1.1rem;
}
.quiz-btn:hover {
    border-color: var(--accent-action);
    background: rgba(245, 158, 11, 0.1);
}

/* Tableau SAV */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pricing-card.premium {
    border-color: var(--accent-safe);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}
.pricing-card.premium::before {
    content: 'Recommandé';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--accent-safe);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: bold;
}
.price {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 1.5rem 0;
}
.price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Badge Offline */
.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-safe);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .split-layout, .split-layout.reversed {
        flex-direction: column;
        text-align: center;
    }
    
    .simulator-container {
        flex-direction: column;
    }
    .sim-dashboard-wrapper .glass-dashboard {
        transform: none;
    }
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 6rem 2rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-card);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }
    
    .form-container {
        padding: 1.5rem;
    }
}
