 html {
    scroll-behavior: smooth;
}
body {
    overflow-x: hidden;
}
.blur-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.organic-shape {
    clip-path: ellipse(100% 60% at 50% 40%);
}
.asymmetric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 200px;
    grid-gap: 1rem;
    grid-auto-flow: dense;
}
.asymmetric-grid > div:nth-child(3n) {
    grid-column: span 2;
    grid-row: span 2;
}
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 108, 158, 0.1);
}
.bg-orange-600 {
    background-color: #e5893e;
}

/* ==================== NAV LINK STYLES ==================== */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}
.nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2F6C9E;
    border-radius: 9999px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover .nav-underline,
.nav-link.active-link .nav-underline {
    width: 100%;
}
.nav-link.active-link {
    color: #2F6C9E;
    font-weight: 600;
}

/* ==================== HERO FIXED SIZE ==================== */
.hero-section {
    min-height: 600px;
}
#hero-carousel {
    min-height: 400px;
}
.carousel-slide {
    display: none;
}
.carousel-slide.active {
    display: block;
}
.carousel-slide-img {
    height: 260px;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}
.team-member-image {
    width: 100%;
    height: clamp(16rem, 48vw, 22rem);
    object-fit: cover;
    object-position: top;
    display: block;
}
@media (min-width: 768px) {
    .carousel-slide-img {
        height: 310px;
    }
    .team-member-image {
        height: clamp(18rem, 30vw, 24rem);
    }
}

/* Ribbon corner in hero carousel image */
.carousel-ribbon-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
    border-radius: 0 1rem 0 0;
}
.carousel-ribbon {
    position: absolute;
    top: 30px;
    right: -34px;
    width: 148px;
    padding: 7px 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #e5893e 60%, #d0601a 100%);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.4;
    transform: rotate(45deg);
    box-shadow: 0 4px 14px rgba(0,0,0,0.30);
}
.carousel-ribbon::before,
.carousel-ribbon::after {
    content: '';
    position: absolute;
    top: 100%;
    border: 5px solid #9a4008;
    border-top-color: transparent;
}
.carousel-ribbon::before {
    left: 0;
    border-left-color: transparent;
}
.carousel-ribbon::after {
    right: 0;
    border-right-color: transparent;
}

/* ==================== CAROUSEL ANIMATIONS ==================== */
@keyframes carouselSlideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0);    }
}
@keyframes carouselSlideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0);     }
}
.carousel-animate-right {
    animation: carouselSlideInRight 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.carousel-animate-left {
    animation: carouselSlideInLeft 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Carousel controls */
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: #cbd5e1;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.carousel-dot.active {
    background-color: #2F6C9E;
    width: 26px;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(47, 108, 158, 0.12);
    border: 2px solid rgba(47, 108, 158, 0.25);
    color: #2F6C9E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.carousel-arrow:hover {
    background-color: #2F6C9E;
    border-color: #2F6C9E;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}
.carousel-arrow-prev { left: 8px; }
.carousel-arrow-next { right: 8px; }
#carousel-dots { pointer-events: none; }
#carousel-dots .carousel-dot { pointer-events: auto; }

/* ==================== DARK MODE ==================== */
html.dark body {
    background-color: #0f172a;
    color: #e2e8f0;
}
html.dark #header {
    background-color: rgba(15, 23, 42, 0.97) !important;
    border-bottom: 1px solid #1e293b;
}
html.dark #hero-carousel {
    background-color: rgba(30, 41, 59, 0.92) !important;
}
html.dark .text-gray-800,
html.dark .text-gray-700 {
    color: #cbd5e1 !important;
}
html.dark .text-gray-600 {
    color: #94a3b8 !important;
}
html.dark .bg-white {
    background-color: #1e293b !important;
}
html.dark .bg-beige {
    background-color: #0f172a !important;
}
html.dark .bg-bleu-ciel {
    background-color: #1e3a5f !important;
}
html.dark .border-gray-100,
html.dark .border-gray-300 {
    border-color: #334155 !important;
}
html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-2xl {
    box-shadow: 0 4px 24px rgba(0,0,0,0.45) !important;
}
html.dark .form-input {
    background-color: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
html.dark .form-input::placeholder {
    color: #64748b;
}
html.dark .card-hover.bg-white {
    background-color: #1e293b !important;
}
html.dark .nav-link {
    color: #94a3b8 !important;
}
html.dark .nav-link:hover {
    color: #93c5fd !important;
}
html.dark .nav-underline {
    background-color: #93c5fd;
}
html.dark .nav-link.active-link {
    color: #93c5fd !important;
}
html.dark #mobile-menu {
    background-color: #0f172a;
    border-top: 1px solid #1e293b;
}
html.dark .carousel-dot {
    background-color: #334155;
}
html.dark .carousel-dot.active {
    background-color: #93c5fd;
}
html.dark .carousel-arrow {
    background-color: rgba(147, 197, 253, 0.1);
    border-color: rgba(147, 197, 253, 0.25);
    color: #93c5fd;
}
html.dark .carousel-arrow:hover {
    background-color: #1e40af;
    border-color: #1e40af;
    color: #fff;
}
.dark .text-bleu-profond {
    color: #93c5fd !important;
}
html.dark .bg-bleu-profond {
    background-color: #1e40af !important;
}
html.dark .organic-shape {
    background: linear-gradient(to bottom, #1e3a5f, #0f172a) !important;
}
html.dark .carousel-ribbon {
    background: linear-gradient(135deg, #b45309, #92400e);
}
html.dark #dark-mode-btn {
    color: #fbbf24;
}
html.dark section.bg-white {
    background-color: #1e293b !important;
}

/* ==================== LIGHTBOX ==================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    animation: lightboxIn 0.3s ease forwards;
}
@keyframes lightboxIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.lightbox-image {
    max-width: 88vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    display: block;
    margin: 0 auto;
}
.lightbox-caption {
    color: rgba(255,255,255,0.75);
    margin-top: 14px;
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.02em;
}
.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    color: #fff;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2010;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(1.1);
}
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2010;
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-prev:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-next:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-50%) scale(1.1);
}
@media (max-width: 640px) {
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-image { max-height: 65vh; }
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
    .organic-shape {
        clip-path: ellipse(150% 55% at 50% 40%);
    }
    .hero-section {
        min-height: auto;
        padding-bottom: 3rem;
    }
    #hero-carousel {
        min-height: auto;
        padding: 1.5rem !important;
    }
    .asymmetric-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .asymmetric-grid > div:nth-child(3n) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    .carousel-slide-img {
        height: 200px;
    }
    .team-member-image {
        height: clamp(15rem, 70vw, 20rem);
    }
    .carousel-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}
@media (max-width: 520px) {
    #contact .bg-bleu-ciel {
        padding: 1rem;
    }
    #contact #contact-info .flex {
        align-items: flex-start;
    }
    #contact #contact-info .flex > div:last-child {
        min-width: 0;
    }
    #contact #contact-info a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    h2.text-3xl {
        font-size: 1.5rem !important;
    }
    #hero-carousel {
        border-radius: 1.25rem !important;
    }
}