:root {
    --primary: #000000;
    --secondary: #1d1d1f;
    --bg: #ffffff;
    --gray-light: #f5f5f7;
    --gray-mid: #86868b;
    --accent: #0071e3;
    --container-width: 1200px;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--primary);
    font-family: var(--font-inter);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container.small {
    max-width: 800px;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 300;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}

.btn-premium {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium:hover {
    transform: scale(1.05);
}

/* Hero Section */
#hero {
    position: relative;
    height: 300vh; /* Pour le scroll */
    width: 100%;
}

.canvas-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #fff;
}

#hero-canvas {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.hero-content {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    pointer-events: none;
    margin-top: -100vh; /* Superpose le contenu sur le canvas dès le début */
    z-index: 10;
}

.step {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    opacity: 0;
}

.step h1, .step h2 {
    font-size: clamp(40px, 8vw, 120px);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.step p {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 400;
    color: var(--gray-mid);
}

/* Intro Section */
.section-padding {
    padding: 150px 0;
}

#intro h2 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 30px;
    line-height: 1.1;
}

#intro p {
    font-size: 24px;
    color: var(--gray-mid);
    max-width: 700px;
}

/* Technology Grid */
.section-header {
    margin-bottom: 80px;
}

.label {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tech-card {
    background: var(--gray-light);
    border-radius: 30px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    /* Transition de transformation gérée en JS pour plus de réactivité, transition par défaut pour le reset */
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.tech-card.large {
    grid-column: span 2;
    min-height: 600px;
    flex-direction: row;
    align-items: center;
}

.tech-card:hover {
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.08), 
        0 0 0 1px rgba(0, 113, 227, 0.15), 
        0 0 30px rgba(0, 113, 227, 0.05);
}

/* Reflet de lumière sur la carte */
.card-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: radial-gradient(
        circle at var(--shine-x, 50%) var(--shine-y, 50%),
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tech-card:hover .card-shine {
    opacity: 1;
}

.image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    transform: translateZ(50px); /* Soulèvement 3D de l'image */
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.image-wrapper img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.08)) drop-shadow(0 0 15px rgba(0, 113, 227, 0.02));
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), filter 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    /* Animation de flottement fluide en continu */
    animation: floatImage 6s ease-in-out infinite alternate;
}

/* Désynchronisation des animations de flottement */
.tech-card:nth-child(2) .image-wrapper img { animation-delay: -1s; animation-duration: 5.5s; }
.tech-card:nth-child(3) .image-wrapper img { animation-delay: -2s; animation-duration: 7s; }
.tech-card:nth-child(4) .image-wrapper img { animation-delay: -3.5s; animation-duration: 6.5s; }
.tech-card:nth-child(5) .image-wrapper img { animation-delay: -5s; animation-duration: 7.5s; }

.tech-card:hover .image-wrapper img {
    transform: scale(1.08);
    filter: drop-shadow(0 30px 50px rgba(0,0,0,0.12)) drop-shadow(0 0 25px rgba(0, 113, 227, 0.1));
}

/* Ligne de scanner holographique */
.scan-line {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 113, 227, 0) 0%, rgba(0, 113, 227, 0.8) 50%, rgba(0, 113, 227, 0) 100%);
    box-shadow: 0 0 8px rgba(0, 113, 227, 0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 6;
    top: 0;
}

.tech-card:hover .scan-line {
    animation: scanEffect 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Soulèvement des textes en 3D */
.card-content {
    z-index: 2;
    max-width: 400px;
    transform: translateZ(30px); /* Soulèvement 3D modéré des textes */
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Animations CSS */
@keyframes floatImage {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(0.5deg);
    }
    100% {
        transform: translateY(0px) rotate(-0.5deg);
    }
}

@keyframes scanEffect {
    0% {
        top: 10%;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        top: 90%;
        opacity: 0;
    }
}

.card-content {
    z-index: 1;
    max-width: 400px;
}

.tech-card.large .card-content {
    padding-left: 60px;
}

.tech-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.tech-card p {
    color: var(--gray-mid);
    font-size: 18px;
}

/* Detailed Specs & Software Section */
.split-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.text-side {
    flex: 1;
}

.text-side h2 {
    font-size: 48px;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.spec-list {
    list-style: none;
    margin-top: 30px;
}

.spec-list li {
    margin-bottom: 20px;
    font-size: 18px;
    padding-left: 30px;
    position: relative;
}

.spec-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.image-side {
    flex: 1;
}

.parallax-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.15));
}

/* Dark Mode Section */
.dark {
    background-color: var(--primary);
    color: white;
}

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

.spec-detailed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 100px;
}

.spec-group h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--gray-mid);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.spec-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}

.spec-line span:last-child {
    font-weight: 600;
    color: var(--gray-mid);
}

.spec-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
    padding: 100px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.spec-item .value {
    display: block;
    font-size: 100px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    margin-bottom: 10px;
    background: linear-gradient(180deg, #fff 0%, #86868b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.spec-item .unit {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer Premium */
footer {
    background-color: #000;
    color: white;
    padding: 100px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-info p {
    color: var(--gray-mid);
    margin-top: 20px;
    max-width: 300px;
    font-size: 14px;
}

.footer-links h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: white;
}

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

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--gray-mid);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: white;
}

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

.footer-bottom p {
    color: var(--gray-mid);
    font-size: 13px;
}

.signature {
    color: var(--gray-mid);
}

.iacomm-link {
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.iacomm-link:hover {
    opacity: 0.7;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 1024px) {
    :root {
        --container-width: 95%;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-card.large {
        grid-column: span 1;
        flex-direction: column;
        padding: 40px;
        min-height: 500px;
    }

    .tech-card.large .card-content {
        padding-left: 0;
        text-align: center;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }

    #main-header .nav-links {
        display: none; /* On cache les liens sur mobile pour rester minimaliste */
    }

    .step h1 {
        font-size: 50px;
    }

    .step p {
        font-size: 18px;
    }

    #intro h2 {
        font-size: 32px;
    }

    #intro p {
        font-size: 18px;
    }

    .split-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .text-side h2 {
        font-size: 32px;
    }

    .spec-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 15px 0;
    }

    .spec-line span:first-child {
        font-size: 12px;
        text-transform: uppercase;
        color: var(--gray-mid);
    }

    .spec-line span:last-child {
        color: white;
        font-size: 18px;
    }

    .spec-detailed-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .spec-numbers {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .spec-item .value {
        font-size: 72px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .footer-info p {
        margin: 20px auto 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    footer {
        padding: 60px 0 40px;
    }
}

@media (max-width: 480px) {
    #main-header .container {
        padding: 0 15px;
    }

    .btn-premium {
        padding: 5px 12px;
        font-size: 11px;
    }

    .step {
        padding: 0 20px;
    }

    .step h1 {
        font-size: 36px;
        text-shadow: 0 0 20px rgba(255,255,255,0.8), 0 0 40px rgba(255,255,255,0.5);
    }

    .step h2 {
        font-size: 32px;
        text-shadow: 0 0 20px rgba(255,255,255,0.8);
    }

    .step p {
        font-size: 16px;
        color: var(--primary);
        font-weight: 500;
    }

    .tech-card, 
    .tech-card.large {
        padding: 40px 20px;
        min-height: 450px;
    }

    .image-wrapper {
        padding: 0;
        margin-bottom: 30px;
        height: 250px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: scale(1.2);
    }

    footer {
        padding-bottom: 60px;
    }
}

/* --- MODAL RESERVATION --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    z-index: 2001;
    overflow-y: auto;
    max-height: 90vh;
}

.modal.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.modal-header p {
    color: var(--gray-mid);
    font-size: 14px;
}

#reservation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
}

.form-group input, 
.form-group textarea {
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: var(--font-inter);
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.btn-premium.full {
    width: 100%;
    padding: 18px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

.form-note {
    font-size: 11px;
    color: var(--gray-mid);
    text-align: center;
    line-height: 1.4;
}

/* Success Message State */
.hidden {
    display: none !important;
}

#success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: 0 auto 25px;
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}

/* Loading State Improvements */
.loading-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.05);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.loading-bar-container.active {
    display: block;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width 1.5s ease-in-out;
}

.btn-premium.loading {
    background: var(--gray-mid);
    cursor: not-allowed;
    pointer-events: none;
}

#success-message h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

#success-message p {
    color: var(--gray-mid);
    margin-bottom: 30px;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .modal-container {
        padding: 30px 20px;
    }
    
    .modal-header h2 {
        font-size: 24px;
    }
}
