/* ========================================
   Variables CSS
   ======================================== */
:root {
    /* Couleurs principales basées sur le logo TargetAds */
    --primary: #5B4DFF;
    --primary-dark: #4840CC;
    --primary-light: #7B6FFF;

    /* Couleurs neutres */
    --dark: #1a1a2e;
    --dark-secondary: #2d2d44;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --black: #111111;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5B4DFF 0%, #4840CC 100%);
    --gradient-subtle: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    /* Typographie */
    --font-primary: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.gradient-text {
    color: var(--primary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

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

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-block {
    width: 100%;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    position: relative;
    color: var(--dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--dark);
    padding-top: 80px;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(91, 77, 255, 0.15) 0%, rgba(26, 26, 46, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto var(--spacing-md);
    opacity: 0.95;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Scroll Indicator Arrow */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--white);
    font-size: 1.5rem;
    opacity: 0.8;
    cursor: pointer;
    animation: bounceDown 2s infinite;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

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

/* ========================================
   Services Section
   ======================================== */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--white);
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

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

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

.service-icon.google {
    background: var(--gradient-primary);
}

.service-icon.facebook {
    background: var(--primary);
}

.service-icon.analytics {
    background: var(--primary-dark);
}

.service-icon.website {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card > p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray);
}

.service-features i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ========================================
   Expertise Section
   ======================================== */
.expertise {
    padding: var(--spacing-xl) 0;
    background: var(--light-gray);
}

.expertise-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.expertise-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.expertise-content .lead {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.expertise-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.expertise-item {
    display: flex;
    gap: 1.5rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.expertise-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.expertise-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.expertise-text h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.expertise-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    height: 420px;
    background: var(--dark);
    margin-top: 140px;
}

#expertiseCanvas {
    width: 100%;
    height: 100%;
}

/* ========================================
   Process Section
   ======================================== */
.process {
    padding: var(--spacing-xl) 0;
    background: var(--white);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
}

.process-step {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   Calendly Section
   ======================================== */
.calendly-section {
    position: relative;
    padding: var(--spacing-xl) 0;
    background: var(--dark);
    overflow: hidden;
}

#calendlyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.calendly-section .container {
    position: relative;
    z-index: 1;
}

.calendly-section .section-header h2,
.calendly-section .section-header p {
    color: var(--white);
}

.calendly-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.3s ease;
}

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

.contact-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.contact-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-card p,
.contact-card a {
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-card a:hover {
    color: var(--primary);
}

.contact-form-wrapper {
    background: var(--light-gray);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 1.25rem;
    margin-top: -0.5rem;
}

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 77, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--light-gray);
    color: var(--dark);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid #e5e7eb;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
}

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

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

.footer-text p {
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ========================================
   Accessibilité - Screen Reader Only
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .expertise-wrapper,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .expertise-visual {
        height: 350px;
        order: -1;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-content {
        padding: var(--spacing-md) 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        margin-bottom: var(--spacing-lg);
    }

    .hero-stats {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-item i {
        font-size: 2rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero {
        padding: 100px 0 50px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        padding: 0 0.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
        gap: 0.75rem;
        margin-bottom: var(--spacing-md);
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }

    .stat-item {
        padding: 1rem 0.5rem;
    }

    .stat-item i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-item h3 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .stat-item p {
        font-size: 0.7rem;
    }

    .services-grid,
    .process-timeline {
        grid-template-columns: 1fr;
    }

    .expertise-content h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .logo img {
        height: 55px;
    }

    .footer-logo img {
        height: 70px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 90px 0 40px;
    }

    .hero-content h1 {
        font-size: 1.4rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-item {
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .stat-item i {
        font-size: 1.5rem;
        margin-bottom: 0;
        min-width: 30px;
    }

    .stat-item h3 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .stat-item p {
        font-size: 0.8rem;
        margin-left: 0.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .logo img {
        height: 45px;
    }

    .expertise-visual {
        height: 280px;
        margin: 0 -20px;
        width: calc(100% + 40px);
    }

    .expertise-content {
        padding: 0;
    }

    .expertise-content h2,
    .expertise-content .lead {
        text-align: center;
    }

    .expertise-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .expertise-text {
        text-align: left;
    }

    .contact-info {
        gap: 1rem;
    }

    .contact-card {
        padding: 1rem;
    }

    .contact-form-wrapper {
        padding: 1.25rem;
    }

    .form-header h3 {
        font-size: 1.25rem;
    }
}

/* ========================================
   Très petits écrans (Galaxy Z Fold plié, etc.)
   ======================================== */
@media (max-width: 360px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.25rem;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    .expertise-visual {
        height: 260px;
        margin: 0 -15px;
        width: calc(100% + 30px);
    }

    .expertise-content h2 {
        font-size: 1.3rem;
        text-align: center;
    }

    .expertise-content .lead {
        text-align: center;
    }

    .expertise-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .expertise-text {
        text-align: left;
    }

    .expertise-text h4 {
        font-size: 1.1rem;
    }

    .expertise-text p {
        font-size: 0.85rem;
    }

    .contact-card {
        padding: 0.875rem;
    }

    .contact-card h3 {
        font-size: 1rem;
    }

    .contact-form-wrapper {
        padding: 1rem;
    }

    .form-header h3 {
        font-size: 1.1rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .process-step {
        padding: 1rem;
    }

    .step-number {
        font-size: 1.5rem;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    .logo img {
        height: 40px;
    }

    .nav-menu {
        padding: 1.5rem;
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
