:root {
    --bg: #050505;
    --accent: #a78bfa;
    --accent-glow: rgba(167, 139, 250, 0.3);
    --glass: linear-gradient(145deg, rgba(35, 38, 42, 0.7) 0%, rgba(15, 18, 20, 0.9) 100%);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #a0a5ab;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-tech: 'Rajdhani', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-video {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%; z-index: -3;
    object-fit: cover;
    opacity: 0.3;
    filter: grayscale(100%) contrast(1.2);
}

.dynamic-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background: linear-gradient(135deg, rgba(5,5,5,0.9) 0%, rgba(26,26,26,0.75) 40%, rgba(85,85,85,0.4) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.1; pointer-events: none; mix-blend-mode: overlay;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

header {
    position: fixed; top: 20px; width: 100%;
    display: flex; justify-content: center; z-index: 1000;
}
nav {
    width: 90%; max-width: 900px;
    padding: 0.8rem 2.5rem; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { width: 40px; }
.vibe-tag { font-size: 0.65rem; opacity: 0.4; letter-spacing: 1px; text-transform: uppercase; font-weight: 300; }

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; cursor: pointer; }
.nav-links a:hover { color: var(--accent); }
.btn-cta { border: 1px solid var(--accent); color: var(--accent) !important; padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: 600; transition: 0.3s; text-decoration: none; }
.btn-cta:hover { background: var(--accent); color: #000 !important; }

.section-padding { padding: 80px 5%; max-width: 1300px; margin: 0 auto; }
.section-title { font-size: 2.5rem; margin-bottom: 3rem; font-weight: 700; }

.hl { color: #ccd0d5; font-weight: 500; }
.hl-link { color: var(--accent); text-decoration: none; transition: 0.3s; font-weight: 600; cursor: pointer; }
.hl-link:hover { text-shadow: 0 0 10px var(--accent-glow); }

.gradient-text { background: linear-gradient(to right, #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-grid { display: grid; grid-template-columns: 2.2fr 3fr; gap: 3rem; align-items: flex-start; } /* Adjusted for taller video */
.hero-tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); margin-bottom: 1rem; }
h1 { 
    font-size: clamp(1.8rem, 4vw, 2.6rem); 
    font-weight: 300; 
    line-height: 1.3; 
    margin-bottom: 1.5rem; 
    font-family: var(--font-heading); 
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
}
h1 .gradient-text {
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: none; /* Garde le mot 'Autonomous' plus organique */
    display: inline-block;
    color: #fff;
}
.lead { font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }
.hero-sub { font-family: var(--font-main); font-size: 1.05rem; font-weight: 400; color: rgba(255,255,255,0.75); letter-spacing: 0.3px; line-height: 1.5; margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--glass-border); }

.banner-wrapper { position: relative; width: 100%; height: auto; aspect-ratio: 16/5; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: 0 20px 40px rgba(0,0,0,0.6); margin-bottom: 3rem; }
.hero-banner { width: 100%; height: 100%; object-fit: contain; background: #000; }
.banner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(5,5,5,0.1), rgba(5,5,5,0.6)); }

.hero-video-card { border-radius: 16px; overflow: hidden; padding: 1rem; position: relative; border: 1px solid var(--accent-glow); }
.video-label { position: absolute; top: 1.5rem; left: 1.5rem; z-index: 10; font-family: var(--font-heading); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; background: rgba(0,0,0,0.6); padding: 5px 10px; border-radius: 20px; display: flex; align-items: center; gap: 8px; backdrop-filter: blur(5px); }
.live-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.hero-video-card video { width: 100%; border-radius: 10px; display: block; object-fit: cover; aspect-ratio: 9/16; max-height: 600px; }

.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 1.5rem; }
.bento-item { border-radius: 16px; overflow: hidden; position: relative; transition: transform 0.3s ease, border-color 0.3s; cursor: pointer; }
.bento-item:hover { transform: translateY(-5px); border-color: rgba(167, 139, 250, 0.4); }

.large { grid-column: span 2; grid-row: span 2; }
.medium { grid-column: span 1; grid-row: span 2; }
.small { grid-column: span 1; grid-row: span 1; }

.flex-center { display: flex; align-items: center; justify-content: center; }

.bento-content { position: relative; z-index: 5; padding: 2rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 70%); }
.bento-media { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.35; transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1); mix-blend-mode: luminosity; }
.bento-item:hover .bento-media { opacity: 0.7; mix-blend-mode: normal; transform: scale(1.05); }
.bento-media img, .bento-media video { width: 100%; height: 100%; object-fit: cover; }

.btn-smart { font-family: var(--font-heading); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); display: flex; align-items: center; gap: 10px; font-weight: 700; transition: 0.3s; opacity: 0.8; }
.bento-item:hover .btn-smart { opacity: 1; gap: 15px; }
.btn-smart i { font-size: 0.8rem; }

.slideshow { position: absolute; inset: 0; width: 100%; height: 100%; }
.slideshow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease-in-out; }
.slideshow img.active { opacity: 1; }

.badge { font-family: var(--font-heading); font-size: 0.7rem; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; display: inline-block; letter-spacing: 1px; font-weight: 500; }
.badge-wip { color: #7a8490; }
.bento-wip { opacity: 0.75; cursor: default; }
.bento-wip:hover { transform: none; border-color: var(--glass-border); }
.bento-wip .btn-smart { color: #7a8490; }
.bento-wip:hover .btn-smart { gap: 10px; }

.bento-group-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.bento-group-sep { margin-top: 4rem; }
.group-label-line { flex: 1; height: 1px; background: var(--glass-border); }
.group-label-text { font-family: var(--font-tech); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 3px; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; gap: 8px; }

/* Prettier Bento Titles */
.bento-item h2, .bento-item h3 { 
    font-family: var(--font-heading); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    background: linear-gradient(to bottom, #fff 40%, #a0a5ab 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    margin-bottom: 0.5rem; 
}
.bento-item h2 { font-size: 2.1rem; font-weight: 900; }
.bento-item h3 { font-size: 1.25rem; font-weight: 700; }

.bento-item p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 1.5rem; }

.btn-p { background: var(--accent); color: #000; text-decoration: none; padding: 0.8rem 1.4rem; font-weight: 600; font-size: 0.85rem; border-radius: 8px; transition: 0.3s; display: inline-block; }
.btn-s { border: 1px solid var(--glass-border); color: #fff; text-decoration: none; padding: 0.8rem 1.4rem; font-weight: 500; font-size: 0.85rem; border-radius: 8px; transition: 0.3s; background: rgba(0,0,0,0.3); display: inline-block; }
.btn-s:hover { border-color: var(--accent); color: var(--accent); }

.timeline-v2 { display: flex; flex-direction: column; gap: 1rem; max-width: 900px; margin: 0 auto; }
.t-row { display: flex; align-items: center; gap: 3rem; padding: 2rem; border-radius: 16px; transition: 0.3s; cursor: default; }
.t-row:hover { background: rgba(255,255,255,0.03); transform: translateX(5px); }
.t-year { font-family: var(--font-heading); font-weight: 800; font-size: 1.8rem; color: var(--text); min-width: 120px; line-height: 1.2; }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.f-col h4 { color: var(--accent); font-size: 1rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); }
.f-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 0.8rem; font-size: 0.9rem; transition: 0.3s; cursor: pointer; }
.f-col a:hover { color: #fff; padding-left: 5px; }
.footer-bottom { text-align: center; padding: 1.5rem; border-top: 1px solid var(--glass-border); }

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.23, 1, 0.32, 1); }
.visible { opacity: 1; transform: translateY(0); }

/* Utility classes */
.mt-2 { margin-top: 1.5rem; }
.mt-4 { margin-top: 3rem; }
.text-center { text-align: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .large { grid-column: span 2; }
}

/* ── Mobile (≤640px) ── */
@media (max-width: 640px) {

    /* Navigation — garder seulement "Android Apps" et "Contact" */
    nav { padding: 0.6rem 1rem; width: 94%; }
    .nav-links { gap: 0.8rem; }
    .nav-links a { font-size: 0.72rem; letter-spacing: 0.3px; }
    .nav-links li:nth-child(1),
    .nav-links li:nth-child(3) { display: none; }

    /* Sections — réduire les marges */
    .section-padding { padding: 40px 4%; }
    #presentation { padding-top: 90px !important; }

    /* Hero */
    h1 { font-size: clamp(1.4rem, 6vw, 2rem); letter-spacing: 2px; }
    .hero-sub { font-size: 0.88rem; }
    .hero-video-card video { max-height: 280px; }
    .banner-wrapper { margin-bottom: 1.5rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .btn-p, .btn-s { width: 100%; text-align: center; }

    /* Bento */
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; gap: 1rem; }
    .large { grid-column: span 1; grid-row: span 2; }
    .medium { grid-column: span 1; grid-row: span 2; }
    .small { grid-column: span 1; grid-row: span 1; }
    .bento-item h2 { font-size: 1.5rem; }
    .bento-item h3 { font-size: 1.1rem; }
    .bento-group-sep { margin-top: 2.5rem; }
    .bento-content { padding: 1.2rem; }

    /* Timeline — empiler l'année au-dessus du texte */
    .section-title { font-size: 1.6rem; margin-bottom: 2rem; }
    .timeline-v2 { gap: 0.8rem; }
    .t-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 1.2rem 1.5rem; }
    .t-year { font-size: 1.4rem; min-width: unset; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer-grid .f-col:last-child { grid-column: span 2; }
}
