.patrimoine-card {
    position: relative;
    /* Cleaned up meandre styles */
}

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

:root {
    --brand-blue: #071A4C;
    --brand-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #555555;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    width: 100%;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Outfit', sans-serif;
    background-color: var(--brand-white);
    color: var(--text-dark);
}

.section-separator {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 0;
    border: none;
}


/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    /* Reduced from 100vh to 80vh to show content below */
    overflow: hidden;
}

/* Video Background */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Standard display for video background */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.bg-video.active {
    opacity: 1;
}

.hero-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%);
    z-index: 0; /* Below overlay, above video */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-placeholder.active {
    opacity: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 70%, rgba(0, 0, 0, 1) 100%);
    /* Very subtle 5% overlay, then a smooth fade to solid black starting at 70% height */
    z-index: 1;
}

/* Content */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    /* Align to the left */
    align-items: flex-start;
    /* Align to the top */
    padding: 180px 40px 40px;
    /* Spacing from edges, top increased to clear navbar logo */
}

.header {
    text-align: left;
    /* Text aligns left */
    color: white;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Items align left */
}

/* Logo Styling */
.logo {
    /* Kept for backward compatibility if needed, but mainly used in nav now */
    max-width: 100px;
    height: auto;
    margin-bottom: 10px;
    display: none;
    /* Hide default logo in content since it's in nav */
}

/* Slogan Styling */
.slogan {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: none;
    font-style: italic;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Scroll Indicator */
.scroll-indicator-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.scroll-indicator-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator-container:hover {
    color: white;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        justify-content: center;
        align-items: center;
        /* Center on mobile? Or keep top left? User said "sous le logo" which is top left on mobile too usually */
        padding: 120px 20px 40px;
    }

    .slogan {
        font-size: 1.5rem;
    }

    .logo {
        max-width: 100px;
    }
}

/* Contact Section */
.contact {
    width: 100%;
    color: white;
}

.contact-content h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-email {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.contact-email:hover {
    border-bottom-color: #fff;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .contact {
        padding: 60px 20px;
    }

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

    .contact-email {
        font-size: 1.2rem;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: var(--brand-blue);
    transition: var(--transition);
}

.nav-logo {
    height: 50px;
    /* Limit logo height in navbar */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.nav-logo-link:hover .nav-logo {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Hide Portfolio link by default (only visible via specialized link) */
.nav-link[href="portfolio.html"],
.footer-col li:has(a[href="portfolio.html"]) {
    display: none !important;
}

/* Show Portfolio link ONLY for CV visitors */
body.cv-visitor .nav-active .nav-link[href="portfolio.html"],
body.cv-visitor .nav-link[href="portfolio.html"],
body.cv-visitor .footer-col li:has(a[href="portfolio.html"]) {
    display: block !important;
}

/* Hide Espace Presse link in horizontal menu by default */
.nav-link[href="presse.html"] {
    display: none !important;
}

/* Show Espace Presse link ONLY in the active hamburger menu */
.nav-active .nav-link[href="presse.html"] {
    display: block !important;
}


.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

/* ... existing styles ... */

/* ===== Actualités ===== */
.actualite-hero {
    width: 100%;
    height: 60vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 1) 100%), url('car-4.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.nav-link:hover,
.nav-link.active {
    color: #ccc;
    /* Subtle highlight */
}

/* Services Page Specifics */
.services-hero {
    width: 100%;
    height: 60vh;
    /* Shorter hero for sub-pages */
    background-color: #111;
    /* Dark background since no video yet */
    position: relative;
    overflow: hidden;
}

.presse-hero {
    width: 100%;
    height: 60vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 1) 100%), url('presse.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.a-propos-hero {
    width: 100%;
    height: 60vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 1) 100%), url('car-3.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.services-list {
    width: 100%;
    background-color: #000;
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.services-row {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

.services-video-half {
    width: 50%;
    height: 100vh;
    position: relative;
    overflow: visible; /* To allow the glow to spill over */
    background: #000;
    z-index: 5;
}

/* Specific glow towards the text half */
.services-row:nth-child(odd) .services-video-half {
    box-shadow: 20px 0 80px rgba(255, 255, 255, 0.08); /* Glow to the right */
}

.services-row:nth-child(even) .services-video-half {
    box-shadow: -20px 0 80px rgba(255, 255, 255, 0.08); /* Glow to the left */
}

.services-video-half video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #111;
    opacity: 1 !important;
}

.services-text-half {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 60px;
    gap: 80px;
}

.service-item {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(5px);
}

.service-item:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-item h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.service-item p {
    font-size: 1.2rem;
    color: #ccc;
    font-weight: 300;
    line-height: 1.6;
}

/* Responsive: Stack on mobile */
@media (max-width: 968px) {
    .services-row {
        flex-direction: column;
        min-height: auto;
    }

    .services-video-half {
        width: 100%;
        height: 50vh;
        overflow: hidden;
        background: #111;
        margin-bottom: 20px;
    }

    .services-video-half video,
    .video-vertical-container video,
    #bg-video {
        opacity: 1 !important;
        display: block !important;
        visibility: visible !important;
    }

    .services-text-half {
        width: 100%;
        padding: 60px 30px;
        gap: 60px;
    }

    .service-item h2 {
        font-size: 2.2rem;
    }

    .service-item p {
        font-size: 1.1rem;
    }
}

.footer {
    padding: 60px 40px 20px;
    background-color: var(--brand-blue);
    color: #ffffff;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-col h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-logo {
    max-width: 250px;
    margin-bottom: 20px;
    display: block;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 300;
}

.footer-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-contact-item a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.footer-rights {
    display: block;
    width: 100%;
    max-width: 250px;
    font-size: 1.17rem;
    color: #888;
    font-style: italic;
    text-align: left;
    margin-bottom: 20px;
    margin-top: 25px;
}

.footer-bottom {
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.hamburger {
    display: none;
    /* Hidden by default in all views */
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 10px;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Scroll behavior for all formats (reveal hamburger) */
.navbar.scrolled .nav-links:not(.nav-active) {
    display: none !important;
}

.navbar.scrolled .hamburger {
    display: flex !important;
}

.navbar.scrolled {
    background: var(--brand-blue) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    /* Added visible border instead of red for professionalism but high contrast */
    transition: background 0.3s ease;
}

/* Base Full-screen menu when active (for both mobile and desktop scrolled) */
.nav-links.nav-active {
    display: flex !important;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.5s ease-in;
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    /* In mobile, horizontal links are always hidden unless menu is active */
    .nav-links:not(.nav-active) {
        display: none !important;
    }

    /* Hamburger only appears on scroll in mobile too */
    .navbar:not(.scrolled) .hamburger {
        display: none !important;
    }

    .nav-link {
        font-size: 1.5rem;
        margin: 20px 0;
    }
}

/* Hamburger Animation */
.hamburger.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

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

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

.service-item h2 {
    font-size: 2rem;
}

.service-item p {
    font-size: 1rem;
}

.video-item h3 {
    font-size: 1rem;
}

/* Body lock for mobile menu */
body.no-scroll {
    overflow: hidden;
}

/* Contact Form */
.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto 0;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
    border-radius: 4px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.form-group select option {
    background-color: #111;
    color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-submit {
    width: 100%;
    padding: 15px 30px;
    background-color: white;
    color: black;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px;
    border-radius: 4px;
}

.btn-submit:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hide the old email link if still present via CSS or ensure HTML replaced it */
.contact-email {
    display: none;
}

/* Video Gallery Section */
.video-gallery {
    padding: 80px 40px;
    background-color: #000;
    color: white;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.video-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.video-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-top: 15px;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    background: #111;
}

.card-logo-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    /* Adjust size as needed */
    height: auto;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through to the link */
}

.video-wrapper iframe,
.video-wrapper .coming-soon,
.video-wrapper a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #444;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px dashed #333;
}

@media (max-width: 768px) {
    .video-gallery {
        padding: 40px 20px;
    }
}

/* Patrimoine Page Styles */
.patrimoine-hero {
    width: 100%;
    height: 60vh;
    /* Increased height for heritage header with video */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    /* Ensure relative positioning for absolute child */
}

/* Very light veil specifically for Les petites curiosités */
.patrimoine-hero .overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 1) 100%);
    /* Stronger fade than default to make text pop against the static image */
}

.hero-logo-overlay {
    position: absolute;
    top: 30px;
    /* Moved up as requested */
    right: 30px;
    width: 180px;
    /* Increased from 120px to make the logo larger */
    height: auto;
    z-index: 20;
}

.patrimoine-hero .content-wrapper {
    padding-top: 80px;
    /* Offset for fixed navbar */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-title {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 5rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    margin-bottom: 20px;
    line-height: 1.1;
}

.page-subtitle {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* --- Heritage Categories Section --- */
.patrimoine-categories {
    padding: 80px 40px;
    background-color: var(--brand-white);
    text-align: center;
}

.section-title-curiosites {
    font-size: 2.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--brand-blue);
    margin-bottom: 50px;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: rgba(7, 26, 76, 0.02);
    border: 1px solid rgba(7, 26, 76, 0.1);
    padding: 40px 30px;
    border-radius: 24px;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.category-card:hover {
    background: rgba(7, 26, 76, 0.05);
    transform: translateY(-10px);
    border-color: var(--brand-blue);
    box-shadow: 0 20px 40px rgba(7, 26, 76, 0.05);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 1.4rem;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.category-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 968px) {
    .categories-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title-curiosites {
        font-size: 1.8rem;
    }
}
.category-section-title {
    grid-column: 1 / -1;
    font-size: 2rem;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 60px 0 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(7, 26, 76, 0.1);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-section-title span {
    font-size: 2.4rem;
}

.category-anchor {
    position: relative;
    top: -120px; /* Offset for navbar */
    visibility: hidden;
}

.patrimoine-content {
    background-color: var(--brand-white);
    color: var(--text-dark);
    padding: 80px 40px;
    min-height: 100vh;
}

.patrimoine-grid {
    display: flex;
    flex-direction: column;
    gap: 120px;
    max-width: 1200px;
    margin: 0 auto;
}

.patrimoine-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.patrimoine-card.reverse {
    flex-direction: row-reverse;
}

.video-vertical-container {
    flex: 0 0 300px;
    aspect-ratio: 9 / 16;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.text-content {
    flex: 1;
    position: relative;
    z-index: 10;
}

.video-vertical-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #111;
    opacity: 1 !important;
}

.video-placeholder-vertical {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #222;
    color: #555;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px dashed #444;
}

.text-content {
    flex: 1;
}

.text-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
    text-align: justify;
}

@media (max-width: 968px) {
    .patrimoine-hero {
        height: 40vh;
    }

    .hero-logo-overlay {
        width: 100px;
        top: 15px;
        right: 15px;
    }

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

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

    .patrimoine-content {
        padding: 60px 20px;
    }

    .patrimoine-grid {
        gap: 80px;
    }

    .patrimoine-card,
    .patrimoine-card.reverse {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .video-vertical-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        aspect-ratio: 9 / 16;
        /* Limit width on mobile but keep centered */
        margin: 40px auto; /* Added margin for better spacing */
        overflow: hidden;
        position: relative;
        box-shadow: none !important; /* Fix potential rendering issues on mobile */
    }

    /* Force visibility if script fails to add 'loaded' class on some mobile browsers */
    .video-vertical-container video {
        opacity: 1 !important;
        transition: none;
    }

    .text-content h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .text-content p {
        text-align: left;
        /* Keep left align for readability or center if preferred */
        font-size: 1.1rem;
    }
}

.next-curiosity {
    text-align: center;
    font-style: italic;
    color: #888;
    margin-top: 40px;
    font-family: 'Inria Serif', serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    width: 100%;
    /* Animation initial state */
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.next-curiosity.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Curiosités Aperçu (Homepage compact preview) ===== */
.curiosites-apercu {
    background-color: transparent; /* Changed to transparent for reveal effect */
    color: white;
    padding: 0; /* Adjusted padding for better scroll control */
    position: relative;
    z-index: 10;
}

.curiosites-apercu-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.curiosites-apercu-intro {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    text-align: center;
    max-width: 700px;
    line-height: 1.7;
}

.curiosites-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.curiosite-preview-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: white;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.curiosite-preview-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.curiosite-preview-media {
    width: 100%;
    aspect-ratio: 9 / 12;
    overflow: hidden;
    position: relative;
}

.curiosite-preview-media img,
.curiosite-preview-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.curiosite-preview-card:hover .curiosite-preview-media img,
.curiosite-preview-card:hover .curiosite-preview-media video {
    transform: scale(1.05);
}

.curiosite-preview-card h3 {
    font-size: 1.1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 18px;
    text-align: center;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.curiosites-apercu-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.curiosites-apercu-count {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .curiosites-apercu {
        padding: 40px 20px 60px;
    }

    .curiosites-preview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
        margin: 0;
    }

    .curiosite-preview-media {
        aspect-ratio: 9 / 16;
    }

    .curiosite-preview-card h3 {
        font-size: 0.7rem;
        padding: 10px 5px;
        letter-spacing: 0;
    }

    .curiosites-apercu-intro {
        font-size: 1.1rem;
    }
}

/* Homepage Feature Teasers (Presse, Curiosités, etc.) */
.feature-teaser {
    width: 100%;
    padding: 100px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Removed background-attachment: fixed for better Safari compatibility */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.feature-teaser::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.presse-teaser {
    background-image: url('presse.jpg');
}

.curiosites-teaser {
    background-image: url('curiosites.jpg');
}

.contact-teaser {
    background-image: url('contact.jpg');
}

.propos-divider {
    width: 100%;
    height: 60vh;
    background-image: url('propos.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: sticky;
    top: 0;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.propos-veil {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.1s linear;
}

.teaser-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.teaser-content h2 {
    font-size: 3rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.teaser-content p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 40px;
    line-height: 1.6;
}

.btn-teaser {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-teaser:hover {
    background-color: white;
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .feature-teaser {
        padding: 60px 20px;
        background-attachment: scroll;
    }

    .teaser-content h2 {
        font-size: 2.2rem;
    }

    .teaser-content p {
        font-size: 1.1rem;
    }
}

.realisations-teaser {
    position: relative;
    padding: 120px 40px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff; /* Ensure text is white */
}

.realisations-teaser .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.realisations-teaser .bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.realisations-teaser .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%),
                linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.2) 80%, rgba(0,0,0,1) 100%);
    z-index: 1;
}

.teaser-content {
    position: relative;
    z-index: 2;
    color: #fff; /* Ensure text is white */
}

.teaser-content h2, 
.teaser-content p {
    color: #fff;
}

.realisations-teaser::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* Press Logos Section - Horizontal Carousel */
.press-carousel {
    width: 100%;
    overflow: hidden;
    background: transparent;
    padding: 0 0 60px;
    margin-top: 0;
    position: relative;
}

/* Gradient masks for smooth fade edges */
.press-carousel::before,
.press-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.press-carousel::before {
    left: 0;
    background: linear-gradient(to right, #000 10%, transparent 100%);
}

.press-carousel::after {
    right: 0;
    background: linear-gradient(to left, #000 10%, transparent 100%);
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-carousel 60s linear infinite; /* Slowed down for smoother feel */
    align-items: center;
}

.carousel-track.reverse {
    animation: scroll-carousel 60s linear infinite reverse;
}

.press-logo {
    max-width: 140px; /* Slightly smaller for 2-row layout */
    height: auto;
    margin: 0 40px; /* Reduced margin for 2-row layout */
    filter: none;
    flex-shrink: 0;
    transition: filter 0.3s ease;
}

.press-logo:hover {
    filter: grayscale(0) contrast(1) brightness(1);
}

.press-logo.press-logo-highlight {
    filter: grayscale(1) contrast(0.1) brightness(1.4) drop-shadow(0 0 10px rgba(255,255,255,0.6));
    transform: scale(1.3);
}

.press-logo.press-logo-highlight:hover {
    filter: grayscale(0) contrast(1) brightness(1) drop-shadow(0 0 15px rgba(255,255,255,0.8));
    transform: scale(1.4);
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


@media (max-width: 768px) {
    .press-carousel {
        padding: 40px 0;
    }

    .press-logo {
        max-width: 100px;
        margin: 0 30px;
    }

    .press-carousel::before,

    .press-carousel::after {
        width: 80px;
    }
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed !important;
    bottom: calc(max(20px, env(safe-area-inset-bottom)) + 10px);
    left: 20px;
    right: 20px;
    width: auto;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    padding: 24px;
    z-index: 2147483647 !important; /* Max possible integer for z-index */
    display: none;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    /* For Safari mobile fixed positioning stability */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.cookie-banner.show {
    display: flex !important;
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text {
    font-size: 0.9rem;
    color: #ccc;
    flex: 1;
}

.cookie-text a {
    color: white;
    text-decoration: underline;
}

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

.btn-cookie {
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.btn-accept {
    background: #fff;
    color: #000;
}

.btn-accept:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-refuse {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-refuse:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

@media (max-width: 968px) {
    .about-teaser .container-split,
    .realisations-teaser .container-split {
        flex-direction: column !important;
    }
    .about-teaser .teaser-text,
    .realisations-teaser .teaser-text {
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .about-teaser .container-split,
    .realisations-teaser .container-split {
        flex-direction: column !important;
    }
    .about-teaser .teaser-text,
    .realisations-teaser .teaser-text {
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: center;
    }
}

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


    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.checkbox-group input {
    width: 24px;
    height: 24px;
    margin-top: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: white;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.checkbox-group label a {
    color: white;
    text-decoration: underline;
}

/* Home Popup */
.home-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    backdrop-filter: blur(5px);
}

.home-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.home-popup {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.home-popup-overlay.show .home-popup {
    transform: translateY(0) scale(1);
}

.home-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.home-popup-close:hover {
    transform: scale(1.1);
}

.home-popup-media {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    background: #000;
}

.home-popup-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-popup h3 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.home-popup p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.6;
}

.home-popup .btn-teaser {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.home-popup .btn-teaser:hover {
    background: #ccc;
}
/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(7, 26, 76, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #0a266b;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(7, 26, 76, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
