/* ==========================================
   RESET & BASE STYLES
   ========================================== */

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

:root {
    /* Colors */
    --primary-color: rgb(67, 141, 215);
    --primary-dark: rgb(32, 55, 93);
    --text-dark: #000000;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --bg-dark: #000000;
    --border-color: #e5e5e5;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 20px;

    /* Effects */
    --blur-light: 20px;
    --blur-medium: 40px;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

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

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

/* ==========================================
   NAVIGATION - MODERN BLUR
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(var(--blur-light));
    -webkit-backdrop-filter: blur(var(--blur-light));
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-100%);
    opacity: 0;
}

.navbar.visible {
    transform: translateY(0);
    opacity: 1;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(var(--blur-medium));
    -webkit-backdrop-filter: blur(var(--blur-medium));
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .nav-wrapper {
    padding: 8px 0;
}

.navbar.scrolled .logo-img {
    height: 40px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img {
    height: 65px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(67, 141, 215, 0.15));
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(67, 141, 215, 0.25));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

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

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

/* ==========================================
   HERO SECTION - GLASSMORPHIC WITH PARALLAX
   ========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-dark);
    padding-top: 90px;
    overflow: hidden;
}

/* Background video styling */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    z-index: 0;
    pointer-events: none;
    filter: brightness(0.98);
}

/* Soft vignette overlay */
.hero .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.30) 100%);
    mix-blend-mode: multiply;
}

/* Glassmorphic container with parallax */
.hero-glass-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    padding: 60px 80px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    /* Only transition hover effects, NOT transform */
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    max-width: 90%;
    text-align: center;
}

.hero-glass-container:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        0 0 80px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%) scale(1.02);
}

.hero-glass-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
    color: var(--text-white);
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(67, 141, 215, 0.3);
}

.hero-glass-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.6;
    font-style: italic;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Hidden original content */
.hero-content {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.8rem;
    animation: bounce 2s infinite;
    z-index: 11;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-12px);
    }

    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* ==========================================
   BUTTONS - SIMPLE & CLEAN
   ========================================== */

.btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
        background-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.18s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    will-change: transform;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 4px 16px rgba(67, 141, 215, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(67, 141, 215, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

/* Hover: become dark primary blue */
.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    border-color: var(--primary-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(32, 55, 93, 0.18);
}

/* Click/press: 3D recoil (push inward) with smooth animation */
.btn-secondary:active {
    transform: translateY(6px) scale(0.98) rotateX(2deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) inset;
    transition: transform 0.16s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn:focus-visible {
    outline: 3px solid rgba(67, 141, 215, 0.18);
    outline-offset: 4px;
}

.btn-secondary:active {
    transform: translateY(-1px) scale(1);
}

/* ==========================================
   SECTIONS - MODERN SPACING
   ========================================== */

.section-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.portfolio .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 24px auto 0;
    line-height: 1.7;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays (portfolio grid items) */

.portfolio-item:nth-child(1) {
    transition-delay: 0.1s;
}

.portfolio-item:nth-child(2) {
    transition-delay: 0.2s;
}

.portfolio-item:nth-child(3) {
    transition-delay: 0.3s;
}

.portfolio-item:nth-child(4) {
    transition-delay: 0.4s;
}

/* ==========================================
   FLOATING PARALLAX ELEMENTS
   ========================================== */

.parallax-float {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.float-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(67, 141, 215, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    top: 10%;
    right: 5%;
    animation: float-slow 20s ease-in-out infinite;
}

.float-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    filter: blur(80px);
    bottom: 15%;
    left: 8%;
    animation: float-medium 15s ease-in-out infinite reverse;
}

.float-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(32, 55, 93, 0.12) 0%, transparent 70%);
    filter: blur(50px);
    top: 50%;
    left: 10%;
    animation: float-fast 12s ease-in-out infinite;
}

@keyframes float-slow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 40px) scale(1.1);
    }
}

@keyframes float-medium {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-40px, -30px) scale(1.15);
    }
}

@keyframes float-fast {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, -50px) scale(1.2);
    }
}

/* ==========================================
   SERVICES - PRICING LAYOUT
   ========================================== */

.services {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.pricing-surface {
    position: relative;
    margin-top: 56px;
    padding: 44px;
    border-radius: 36px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.pricing-card {
    position: relative;
    border-radius: 26px;
    padding: 28px 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 22px 48px rgba(27, 44, 80, 0.10);
    transition: opacity 0.8s ease,
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform, opacity;
}

.pricing-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right,
            rgba(67, 141, 215, 0.18) 0%,
            transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(67, 141, 215, 0.30);
    box-shadow: 0 30px 70px rgba(27, 44, 80, 0.14);
}

.card-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(32, 55, 93, 0.75);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 10px 0 8px;
    letter-spacing: -0.01em;
}

.card-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.card-price-note {
    margin-top: 6px;
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.55);
    font-weight: 600;
}

.card-features {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 18px;
    color: var(--text-light);
}

.card-features li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.card-features li i {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(67, 141, 215, 0.14);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.75rem;
}

.pricing-footnote {
    margin-top: 18px;
    text-align: center;
    color: rgba(0, 0, 0, 0.55);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   ABOUT - MODERN LAYOUT
   ========================================== */

.about {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Portfolio Status Pins */
.portfolio-status-pin {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    cursor: help;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.portfolio-status-pin::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.portfolio-status-pin.real {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.portfolio-status-pin.real::before {
    background-color: #4ade80;
    /* Green for real */
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.portfolio-status-pin.fictive {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
}

.portfolio-status-pin.fictive::before {
    background-color: #60a5fa;
    /* Blue for concept */
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

/* Tooltip on hover */
.portfolio-status-pin .status-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    width: 200px;
    font-size: 0.8rem;
    color: #ccc;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    line-height: 1.4;
    text-align: left;
}

.portfolio-status-pin:hover .status-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.portfolio-status-pin:hover {
    transform: translateY(-2px);
    background: rgba(30, 30, 30, 0.9);
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 32px;
}

.about-text .section-title::after {
    left: 0;
    transform: none;
}

.about-description {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    background: var(--primary-dark);
    border-radius: 24px;
    font-size: 10rem;
    color: rgba(67, 141, 215, 0.15);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(32, 55, 93, 0.15);
}

/* Image initiale centrée avec léger zoom */
.about-image-wrapper img {
    width: 110%;
    height: 110%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 24px;
    will-change: transform;
}

/* Overlay animé en arrière-plan */
.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(67, 141, 215, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

/* Keyframes pour l'animation radiale */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   PORTFOLIO - CARD STACK
   ========================================== */

.portfolio {
    padding: 90px 0 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transition: min-height 0.5s ease, padding 0.5s ease;
}

/* Remove snap scroll and height constraints in grid view */
.portfolio.grid-view-active {
    min-height: auto;
    scroll-snap-align: none;
    padding: 60px 0;
    align-items: flex-start;
}

.portfolio .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Portfolio content area with smooth height transitions */
.portfolio-content-area {
    width: 100%;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 15px 0;
}

.portfolio-stack-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.portfolio-stack-wrapper.hiding {
    opacity: 0;
    pointer-events: none;
}

/* Portfolio View Toggle - Right Side */
.portfolio-view-toggle {
    position: absolute;
    top: 30px;
    right: 20px;
    display: inline-flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px;
    border-radius: 16px;
    box-shadow: 8px 8px 16px rgba(174, 174, 192, 0.2),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.view-toggle-indicator {
    position: absolute;
    width: 36px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(67, 141, 215, 0.3);
    top: 4px;
    left: 4px;
    pointer-events: none;
}

.view-toggle-indicator.grid-active {
    transform: translateX(36px);
}

.view-toggle-btn {
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.view-toggle-btn.active {
    color: white;
}

.view-toggle-btn:hover:not(.active) {
    color: var(--primary-color);
}

/* Grid View Styles */
.portfolio-grid-view {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-grid-view.active {
    display: grid;
}

.portfolio-grid-view.visible {
    opacity: 1;
}

.portfolio-grid-item {
    background: #ffffff;
    border-radius: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 12px 12px 24px rgba(174, 174, 192, 0.3),
        -12px -12px 24px rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.portfolio-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 15px 15px 30px rgba(174, 174, 192, 0.35),
        -15px -15px 30px rgba(255, 255, 255, 0.95),
        0 8px 32px rgba(67, 141, 215, 0.2);
}

.portfolio-grid-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portfolio-grid-content {
    padding: 24px;
    text-align: center;
}

.portfolio-grid-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.portfolio-grid-category {
    display: none;
}

.portfolio-grid-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Hide stack view when grid is active */
.portfolio-stack-wrapper.grid-active {
    display: none;
}

.portfolio-stack-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 10px 0;
}

.portfolio-stack {
    position: relative;
    width: 600px;
    height: 350px;
    perspective: 1000px;
}

.portfolio-card {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.portfolio-card-image {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 12px 12px 24px rgba(174, 174, 192, 0.3),
        -12px -12px 24px rgba(255, 255, 255, 0.9),
        inset 2px 2px 5px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: all 0.4s ease;
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.portfolio-card:hover .portfolio-card-image {
    box-shadow: 15px 15px 30px rgba(174, 174, 192, 0.35),
        -15px -15px 30px rgba(255, 255, 255, 0.95),
        0 8px 32px rgba(67, 141, 215, 0.2),
        inset 2px 2px 5px rgba(255, 255, 255, 0.6);
}

/* Card stacking positions - NO OPACITY */
.portfolio-card[data-position="0"] {
    z-index: 4;
    transform: translateX(0) translateY(0) rotate(0deg);
}

.portfolio-card[data-position="1"] {
    z-index: 3;
    transform: translateX(25px) translateY(-20px) rotate(4deg);
}

.portfolio-card[data-position="2"] {
    z-index: 2;
    transform: translateX(50px) translateY(-35px) rotate(7deg);
}

.portfolio-card[data-position="3"] {
    z-index: 1;
    transform: translateX(75px) translateY(-50px) rotate(10deg);
}

.portfolio-card[data-position="-1"] {
    z-index: 0;
    transform: translateX(-150px) translateY(0) rotate(-15deg) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

/* Entering from left animation */
.portfolio-card.entering[data-position="-1"] {
    z-index: 5;
    opacity: 1;
    pointer-events: auto;
}

.portfolio-card[data-position="-2"],
.portfolio-card[data-position="-3"],
.portfolio-card[data-position="-4"],
.portfolio-card[data-position*="-"] {
    z-index: 0;
    transform: translateX(-200px) translateY(0) rotate(-20deg) scale(0.7);
    opacity: 0;
    pointer-events: none;
}

/* Card Info Below */
.portfolio-card-info {
    text-align: center;
    max-width: 600px;
    padding: 8px;
    transition: opacity 0.3s ease;
}

.portfolio-info-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.portfolio-info-category {
    display: none;
}

.portfolio-info-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Navigation Arrows */
.portfolio-nav {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 8px 8px 16px rgba(174, 174, 192, 0.2),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portfolio-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 10px 10px 20px rgba(174, 174, 192, 0.25),
        -10px -10px 20px rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    transform: scale(1.1);
}

.portfolio-nav:active {
    transform: scale(0.95);
}

/* ==========================================
   CONTACT - MODERN FORMS
   ========================================== */

.contact {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    margin-top: 60px;
}

.contact-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    align-items: center;
}

.contact-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(67, 141, 215, 0.25);
}

.contact-item:hover .contact-icon {
    background: var(--primary-dark);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(67, 141, 215, 0.35);
}

.contact-details h4 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 600;
}

.contact-details p {
    color: var(--text-light);
    font-size: 1.05rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: inset 4px 4px 8px rgba(174, 174, 192, 0.15),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 141, 215, 0.1),
        inset 2px 2px 5px rgba(67, 141, 215, 0.1),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.8);
}

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

/* ==========================================
   FOOTER - MODERN
   ========================================== */

.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 80px 0 32px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 20px rgba(67, 141, 215, 0.5);
}

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

.footer-logo-glass {
    position: relative;
    display: inline-block;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.footer-logo-glass::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(67, 141, 215, 0.1) 40%,
            transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    filter: blur(20px);
    transition: all 0.4s ease;
}

.footer-logo-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(67, 141, 215, 0.3);
    box-shadow: 0 8px 32px rgba(67, 141, 215, 0.2);
    transform: translateY(-4px);
}

.footer-logo-glass:hover::before {
    width: 150%;
    height: 150%;
    opacity: 0.8;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.25) 0%,
            rgba(67, 141, 215, 0.15) 40%,
            transparent 70%);
}

.footer-logo {
    height: 80px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(67, 141, 215, 0.15));
    transition: filter 0.4s ease;
}

.footer-logo-glass:hover .footer-logo {
    filter: drop-shadow(0 4px 12px rgba(67, 141, 215, 0.25));
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 1.05rem;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 600;
    color: var(--text-white);
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(67, 141, 215, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Large Tablets / Small Laptops (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .nav-menu {
        gap: 24px;
    }

    .hero-glass-container {
        padding: 50px 60px;
    }

    .hero-glass-title {
        font-size: 3.5rem;
    }

    .pricing-surface {
        padding: 36px;
        border-radius: 30px;
    }

    .pricing-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-stack {
        width: 500px;
        height: 320px;
    }

    .portfolio-stack-container {
        gap: 60px;
    }

    .about-content {
        gap: 60px;
    }

    .contact-content {
        gap: 60px;
    }
}

/* Tablet (768px) - Hamburger menu activé */
@media (max-width: 768px) {
    /* Navigation Mobile */
    .hamburger {
        display: flex;
        z-index: 1001;
        padding: 8px;
        margin: -8px;
    }

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

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

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

    .nav-wrapper {
        position: relative;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        transition: max-height 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        max-height: 300px;
        padding: 20px 24px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

    .nav-menu li {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu.active li:nth-child(1) { transition-delay: 0.05s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.2s; }

    .nav-link {
        display: block;
        padding: 12px 0;
    }

    /* Logo */
    .logo-img {
        height: 50px;
    }

    .navbar.scrolled .logo-img {
        height: 38px;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Sections */
    .section-title {
        font-size: 2.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .pricing-surface {
        padding: 28px;
        border-radius: 26px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    /* Portfolio Toggle */
    .portfolio-view-toggle {
        position: relative;
        top: auto;
        right: auto;
        margin: 20px auto 0;
    }

    .portfolio-stack {
        width: 450px;
        height: 300px;
    }

    .portfolio-stack-container {
        gap: 50px;
        padding: 30px 0;
    }

    .portfolio-info-title {
        font-size: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Intermediate (600px) */
@media (max-width: 600px) {
    .hero-glass-container {
        padding: 40px 35px;
        margin: 0 20px;
    }

    .hero-glass-title {
        font-size: 2.8rem;
    }

    .portfolio-stack {
        width: 350px;
        height: 280px;
    }

    .portfolio-stack-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 30px 20px;
        justify-items: center;
    }

    .portfolio-stack {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .portfolio-nav-prev {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }

    .portfolio-nav-next {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }

    .portfolio-info {
        text-align: center;
        max-width: 100%;
    }

    .section-header {
        padding: 0 10px;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-glass-title {
        font-size: 2.2rem;
    }

    .hero-glass-subtitle {
        font-size: 1rem;
    }

    .hero-glass-container {
        padding: 35px 25px;
        margin: 0 16px;
    }

    .section-title {
        font-size: 1.9rem;
    }
    .pricing-surface {
        padding: 22px;
        border-radius: 22px;
    }

    .pricing-card {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .card-price {
        font-size: 2rem;
    }

    .portfolio-stack {
        width: 280px;
        height: 280px;
    }

    .portfolio-info-title {
        font-size: 1.6rem;
    }

    .portfolio-info-category {
        font-size: 0.9rem;
    }

    .portfolio-info-description {
        font-size: 0.95rem;
    }

    .portfolio-nav {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .portfolio-stack-container {
        gap: 24px 16px;
    }

    .about-image-wrapper {
        height: 300px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 18px;
        font-size: 16px; /* Prevent iOS zoom */
    }

    .btn {
        padding: 14px 32px;
        font-size: 0.95rem;
        width: 100%;
    }

    .btn-secondary {
        width: auto;
    }
}

/* Small Mobile (360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .logo-img {
        height: 42px;
    }

    .navbar.scrolled .logo-img {
        height: 34px;
    }

    .hero-glass-title {
        font-size: 1.9rem;
    }

    .hero-glass-subtitle {
        font-size: 0.9rem;
    }

    .hero-glass-container {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    .portfolio-stack {
        width: 240px;
        height: 240px;
    }

    .portfolio-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .portfolio-info-title {
        font-size: 1.4rem;
    }

    .portfolio-stack-container {
        gap: 20px 12px;
    }

    .about-image-wrapper {
        height: 260px;
    }

    .footer {
        padding: 50px 0 20px;
    }

    .footer-logo {
        height: 55px;
    }

    .footer-title {
        font-size: 1.05rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .portfolio-view-toggle {
        padding: 3px;
    }

    .view-toggle-indicator {
        width: 32px;
        height: 28px;
        top: 3px;
        left: 3px;
        border-radius: 8px;
    }

    .view-toggle-indicator.grid-active {
        transform: translateX(32px);
    }

    .view-toggle-btn {
        width: 32px;
        height: 28px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        height: auto;
        padding: 100px 0 40px;
    }

    .hero-glass-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
    }

    .scroll-indicator {
        display: none;
    }

    /* En landscape sur mobile, garder le menu horizontal si possible */
    @media (min-width: 568px) {
        .hamburger {
            display: none;
        }

        .nav-menu {
            position: static;
            flex-direction: row;
            max-height: none;
            overflow: visible;
            background: transparent;
            padding: 0;
            gap: 20px;
            box-shadow: none;
        }

        .nav-menu li {
            opacity: 1;
            transform: none;
        }
    }
}

/* ==========================================
   CUSTOM MODAL - GLASSMORPHISM
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

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

.modal-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    width: 100%;
    padding: 40px 32px 32px;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.modal-icon.success {
    background: rgba(74, 222, 128, 0.15);
    color: #22c55e;
}

.modal-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.modal-icon.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-message {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-close-btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 12px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
        background-color 0.22s ease,
        box-shadow 0.22s ease;
    box-shadow: 0 4px 16px rgba(67, 141, 215, 0.25);
}

.modal-close-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(67, 141, 215, 0.35);
}

.modal-close-btn:active {
    transform: translateY(-1px) scale(1);
}

.modal-overlay.closing {
    opacity: 0;
}

.modal-overlay.closing .modal-container {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
}
