:root {
    --color-primary: #1A2E49;
    /* Abstract Navy */
    --color-secondary: #4DB1B3;
    /* Copper Blue */
    --color-accent: #64D2FF;
    /* Light Sky Blue */
    --color-bg: #F2F0EA;
    /* Cloud Dancer */
    --color-text: #333333;
    /* Mine Shaft */
    --color-glass: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.5);

    --font-heading: 'Fjalla One', sans-serif;
    --font-body: 'Noto Sans', sans-serif;

    --shadow-soft: 0 10px 30px rgba(26, 46, 73, 0.1);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(26, 46, 73, 0.2);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* IMAGE RATIOS & UTILS */
.img-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #ddd;
    border-radius: 8px;
}

.ratio-16-9 {
    padding-bottom: 56.25%;
    /* 16:9 */
}

.ratio-4-3 {
    padding-bottom: 75%;
    /* 4:3 */
}

.ratio-1-1 {
    padding-bottom: 100%;
    /* 1:1 */
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.img-container:hover img {
    transform: scale(1.05);
}

/* SKELETON LOADING */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* PAGE LOADER */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(26, 46, 73, 0.1);
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* UI ELEMENTS */
.btn-primary {
    background-color: var(--color-accent);
    color: white;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border: 2px solid var(--color-accent);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: white;
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 118, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border: 2px solid var(--color-primary);
    /* margin-left: 10px; NO MORE MARGIN, USING GAP */
}

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

.btn-outline {
    border: 2px solid var(--color-primary);
    padding: 10px 20px;
    display: inline-block;
    font-weight: bold;
    margin-top: 20px;
}

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

.glass {
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    box-shadow: var(--shadow-glass);
}

.dot {
    color: var(--color-accent);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-glass);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
}

/* Liquid Glass Nav Indicator */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.nav-active-bg {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 40px;
    background: rgba(100, 210, 255, 0.15);
    /* Slightly blueish */
    backdrop-filter: blur(8px);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(100, 210, 255, 0.1);
    opacity: 0;
    pointer-events: none;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.nav-links li a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-links li a:not(.btn-primary):hover {
    color: var(--color-accent);
}

/* Removed underline effect in favor of liquid glass */
.nav-links li a:not(.btn-primary)::after {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

/* HERO SECTION - Updated for Visual Impact */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    /* Increased top padding */
    padding-bottom: 80px;
    background-color: #f5f7fa;
    overflow: hidden;
}

/* Hero Background Image Handling */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://placehold.co/1920x1080/1A2E49/1A2E49?text=.+');
    /* Solid color placeholder to hide text until real image is loaded */
    background-size: cover;
    /* Cover ensures 16:9 like behavior on wide screens */
    background-position: center;
    z-index: 0;
    opacity: 0.05;
    /* Very subtle */
    animation: zoomSlow 20s infinite alternate;
}

@keyframes zoomSlow {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    /* max-width: 650px; REMOVED LIMIT */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    /* Enable stacking */
}

.hero-text {
    max-width: 650px;
    flex: 1;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    background: rgba(26, 46, 73, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color-primary);
    display: inline-block;
    margin-bottom: 25px;
    border: 1px solid rgba(26, 46, 73, 0.1);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--color-primary);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    /* Improve readability */
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #444;
    max-width: 500px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
        /* Reduced from 2rem (total -20%) */
    }

    .hero p {
        font-size: 0.9rem;
        /* Approx 50% reduction */
    }
}

/* Helper for mobile break */
.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}

/* 2.5D Isometric Element */
.isometric-feature {
    position: relative;
    /* Changed from absolute */
    /* right: 5%; REMOVED */
    /* top: 50%; REMOVED */
    /* transform: translateY(-50%); REMOVED */
    width: 500px;
    height: 500px;
    display: none;
    pointer-events: none;
    flex-shrink: 0;
    /* Prevent shrinking */
    margin-left: auto;
    /* Push to right */
    margin-top: 100px;
    /* Push down significantly */
    z-index: 10;
}

@media (min-width: 1100px) {
    .isometric-feature {
        display: block;
    }
}

.iso-card {
    position: absolute;
    width: 280px;
    padding: 35px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    /* More opacity */
    transform: rotateX(10deg) rotateY(-10deg) rotateZ(0deg);
    box-shadow: -20px 20px 40px rgba(26, 46, 73, 0.15);
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.iso-card:hover {
    transform: rotateX(0deg) rotateY(0deg) scale(1.05);
    z-index: 10;
    background: white;
}

.iso-card.offset {
    top: 180px;
    left: 140px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2;
}

.iso-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    padding: 10px;
    background: rgba(77, 177, 179, 0.1);
    border-radius: 12px;
}

/* SECTIONS */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.line {
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    margin: 0 auto;
    border-radius: 2px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    padding: 40px;
    border-radius: 16px;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-secondary);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.link-arrow {
    color: var(--color-accent);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    /* Push to bottom */
    padding-top: 20px;
    font-size: 1.1rem;
}

.link-arrow:hover {
    transform: translateX(5px);
}

/* PORTFOLIO PREVIEW */
.bg-light {
    background-color: white;
}

.project-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.project-img-real {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.project-card:hover .project-img-real {
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 20px;
    border-radius: 12px;
    transform: translateY(100px);
    /* Hidden initially */
    opacity: 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-info h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.project-info p {
    color: #666;
    font-size: 0.9rem;
}

/* TRUST SECTION */
.trust {
    background-color: var(--color-primary);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.trust::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(77, 177, 179, 0.2), transparent);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.trust-item .number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-secondary);
    margin-bottom: 10px;
    line-height: 1;
}

.trust-item .label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* FOOTER */
.footer {
    background-color: #111;
    color: white;
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    padding-bottom: 60px;
    border-bottom: 1px solid #333;
}

.footer h3 {
    color: white;
    margin-bottom: 25px;
}

.footer h4 {
    color: var(--color-secondary);
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer ul li a {
    color: #aaa;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    background-color: #000;
    text-align: center;
    padding: 25px;
    font-size: 0.9rem;
    color: #666;
}

/* MOBILE */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .mobile-menu-btn {
        display: block;
        width: 30px;
        height: 25px;
        position: relative;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--color-primary);
        position: absolute;
        transition: 0.3s;
        border-radius: 2px;
    }

    .mobile-menu-btn span:nth-child(1) {
        top: 0;
    }

    .mobile-menu-btn span:nth-child(2) {
        top: 11px;
    }

    .mobile-menu-btn span:nth-child(3) {
        top: 22px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        padding: 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1000;
    }

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

    .project-slider {
        grid-template-columns: 1fr;
    }
}

/* ANIMATIONS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInName 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

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

.demo-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Image Fit Utils */
.fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Shiny Text Effect */
/* Shiny Text Effect */
/* Shiny Text Effect */
.shiny-text {
    background-size: 300% auto;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
    /* 2s active + 6s pause = 8s total */
    animation: shine-move 8s linear infinite;
    text-shadow: none !important;
}

@keyframes shine-move {
    0% {
        background-position: 0% center;
    }

    /* End of movement (2s / 8s = 25%) */
    25% {
        background-position: 100% center;
    }

    /* Pause */
    100% {
        background-position: 100% center;
    }
}

/* For White Text contexts (Services, Contact) */
.shiny-text.dark-mode {
    background-image: linear-gradient(120deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.8) 40%,
            #ffffff 50%,
            rgba(255, 255, 255, 0.8) 60%,
            rgba(255, 255, 255, 0.8) 100%);
}

/* For Dark Text contexts (Index, About, Portfolio) */
.shiny-text.light-mode {
    background-image: linear-gradient(120deg,
            #1A2E49 0%,
            #1A2E49 40%,
            #64D2FF 50%,
            #1A2E49 60%,
            #1A2E49 100%);
}

/* COOKIE BANNER */
/* COOKIE BANNER CORRIGÉ */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    /* Un peu plus opaque pour la lisibilité */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 10000;
    display: flex;
    justify-content: center;
    /* Centré par défaut */
    align-items: center;
    gap: 30px;

    /* Animation */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
}

#cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
    max-width: 600px;
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

.cookie-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* Bouton Accepter */
.cookie-btn.btn-primary {
    background-color: var(--color-secondary);
    /* Ton bleu/vert */
    color: white;
    /* Disable inherited .btn-primary styles */
    border: none;
    overflow: visible;
}

.cookie-btn.btn-primary::before {
    display: none !important;
    content: none !important;
}

.cookie-btn.btn-primary:hover {
    background-color: var(--color-primary) !important;
    /* Ton bleu foncé */
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Bouton Refuser (plus discret) */
.cookie-btn.btn-secondary {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #666;
}

.cookie-btn.btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    #cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding-bottom: 30px;
        /* Espace pour les pouces */
    }

    .cookie-actions {
        width: 100%;
        display: flex;
        flex-direction: column-reverse;
        /* "Accepter" en haut sur mobile souvent mieux, ou l'inverse selon préférence */
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px;
    }
}

/* BACK TO TOP BUTTON */
#backToTop {
    position: fixed;
    bottom: 30px;
    left: 30px; /* BAS À GAUCHE */
    width: 50px;
    height: 50px;
    background-color: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}