/* ==========================================================================
   CSS Variables & Core Setup
   ========================================================================== */
:root {
    --bg-primary: #0A0F1C;
    --bg-secondary: #0F1629;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-highlight {
    color: var(--accent-cyan);
}

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 6rem 0;
    position: relative;
    z-index: 10;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

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

.mt-4 {
    margin-top: 2rem;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-medium);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.link-btn {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.link-btn:hover {
    color: white;
    gap: 0.8rem;
}

/* ==========================================================================
   Dynamic Background Animation
   ========================================================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-purple);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    animation-direction: alternate-reverse;
}

.blob-3 {
    top: 30%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    opacity: 0.2;
    animation-duration: 30s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 150px) scale(1.1);
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    padding: 1rem 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    padding-top: 8rem;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

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

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-image {
    flex: 1;
    padding: 1rem;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex: 1.2;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Services Section 
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    padding: 2.5rem 2rem;
    transition: var(--transition-medium);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
}

.card-list {
    list-style: none;
    margin-top: 1.5rem;
}

.card-list li {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Creations (Portfolio) & Articles
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-item {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-img {
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Specific placeholders for visual distinctness */
.placeholder-sora {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
}

.placeholder-video {
    background: linear-gradient(135deg, #064e3b, #065f46);
}

.placeholder-audio {
    background: linear-gradient(135deg, #4c1d95, #5b21b6);
}

.placeholder-book {
    background: linear-gradient(135deg, #7c2d12, #9a3412);
}


.gallery-img.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-img.video-thumb {
    overflow: hidden;
}

.gallery-img.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-img.video-thumb img {
    transform: scale(1.04);
}

.gallery-content {
    padding: 2rem;
}

.gallery-item h3 {
    margin-bottom: 0.5rem;
}

/* Articles */
.articles-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    padding: 2rem;
    text-decoration: none;
    transition: var(--transition-medium);
    display: block;
}

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

.article-card p {
    margin-bottom: 0;
}

.article-card:hover {
    transform: translateX(10px);
    background: rgba(30, 41, 59, 0.8);
}

/* ==========================================================================
   Contact & Footer
   ========================================================================== */
.contact-box {
    padding: 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-box p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-note {
    font-size: 0.9rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

footer {
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: var(--transition-fast);
}

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

/* ==========================================================================
   Animations (Triggered by JS)
   ========================================================================== */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
    }

    .about-image {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: 95%;
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* Add JS toggle for mobile menu later if robust enough */
    }

    .hamburger {
        display: block;
        color: white;
    }

    h1 {
        font-size: 2.5rem;
    }

    .contact-box {
        padding: 2.5rem 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }
}

/* ==========================================================================
   IA Emotionnelle
   ========================================================================== */
.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.emotion-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.emotion-copy,
.emotion-kpi,
.video-card {
    padding: 2rem;
}

.emotion-copy h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.emotion-copy .badge {
    margin-bottom: 1rem;
}

.emotion-list {
    list-style: none;
    margin: 1.5rem 0 2rem;
    display: grid;
    gap: 0.9rem;
}

.emotion-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--text-primary);
}

.emotion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.emotion-side {
    display: flex;
}

.emotion-kpi {
    width: 100%;
    display: grid;
    gap: 1rem;
    align-content: center;
}

.emotion-kpi-item {
    padding: 1.2rem 1.25rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.emotion-kpi-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.emotion-kpi-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.video-card {
    overflow: hidden;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0,0,0,0.3);
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card-content {
    padding-top: 1.25rem;
}

.video-card-content p {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .emotion-layout,
    .emotion-videos {
        grid-template-columns: 1fr;
    }

    .emotion-copy h3 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .emotion-actions {
        flex-direction: column;
    }

    .emotion-actions .btn {
        width: 100%;
    }
}
