/* ==========================================================================
   VARIABLES & SETUP
   ========================================================================== */
:root {
    --primary: #1A1A1A; /* Deep Anthracite */
    --primary-light: #333333;
    --accent: #B81D22; /* Keep the DNA but use sparingly */
    --accent-hover: #96161B;
    --text-main: #222222;
    --text-light: #555555;
    --bg-main: #FFFFFF;
    --bg-light: #F9F9F9;
    --bg-dark: #121212;
    --white: #FFFFFF;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
    --radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--white);
    letter-spacing: -2px;
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 span {
    color: var(--accent);
    font-style: normal;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.125rem;
}

.small-text {
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   LAYOUT UTILS
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--white);
}

.bg-dark h2,
.bg-dark p {
    color: var(--white);
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.w-100 {
    width: 100%;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ==========================================================================
   SPLASH SCREEN
   ========================================================================== */
#splash {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-main);
    position: relative;
    z-index: 1001;
    /* Above navbar if needed */
}

.splash-logo-container {
    animation: fade-in-up 1.5s ease-out forwards;
}

.splash-logo {
    width: 80vw;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.scroll-down-btn {
    position: absolute;
    bottom: 3rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-family: var(--font-body);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s infinite, fade-in-up 1.5s ease-out 1s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

#navbar.scrolled .logo {
    height: 50px;
    filter: none;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary) {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#navbar.scrolled .nav-links a:not(.btn-primary) {
    color: var(--primary);
    text-shadow: none;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
#hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--primary);
    background-image: url('../img/hero_pool.jpg');
    /* High Quality Realization Background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-brand-clean {
    display: block;
    margin: 0 auto 3rem auto; /* Center as a banner */
    max-width: 700px; /* Banner width */
    text-align: center;
    filter: 
        drop-shadow(0 0 2px #fff) 
        drop-shadow(0 0 2px #fff) 
        drop-shadow(0 0 4px #fff)
        drop-shadow(0 0 8px #fff)
        drop-shadow(0 10px 30px rgba(0,0,0,0.8));
    /* Layered white drop-shadows to create a thick, glowing contour perfect for a banner-style logo on dark background */
}

.hero-brand-clean img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: normal; /* default */
    background: transparent !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.85));
    /* Balanced dark overlay for centered layout */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
    text-align: center; /* Center everything */
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensure vertical stack is centered */
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.1;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    border-left: none;
    padding-left: 0;
    text-align: center;
}

.badge {
    display: none; /* Removed as per instruction */
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center; /* Center buttons */
}

/* ==========================================================================
   CONCEPT SECTION
   ========================================================================== */
.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-list h3 {
    margin-bottom: 0.3rem;
    font-size: 1.25rem;
}

.feature-list p {
    margin-bottom: 0;
    font-size: 1rem;
}

.rounded-img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   BANNER CTA
   ========================================================================== */
.banner-cta {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 0;
}

.banner-cta h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.banner-cta p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

/* ==========================================================================
   ACTUALITÉS SECTION
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: var(--radius);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.news-card:hover {
    transform: translateY(-10px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}

.news-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.services-logo-main {
    max-width: 600px; /* Larger */
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
    margin: 1rem auto;
}

@media (max-width: 768px) {
    .services-logo-main {
        max-width: 350px;
    }
    .hero-brand-clean {
        max-width: 90%;
        margin-bottom: 2rem;
    }
}

/* ==========================================================================
   LOGEMENTS SECTION (GALLERY)
   ========================================================================== */
.section-header {
    margin-bottom: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-card {
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #ddd;
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.card-img {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent);
}

/* ==========================================================================
   SERVICES & PRICING
   ========================================================================== */
.pricing-box {
    background: var(--white);
    border-radius: 0;
    padding: 2.5rem;
    box-shadow: none;
    border: 2px solid var(--primary);
    border-left: 8px solid var(--accent);
    margin: 2rem 0;
}

.price-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.price-header h3 {
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
}

.price span {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
    font-family: var(--font-body);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    background: var(--white);
}

.service-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    background: var(--primary);
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.service-text {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
}

.services-badge {
    max-width: 80%;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card h4 {
    color: var(--accent);
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
}

.phone-link {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.phone-link:hover {
    color: var(--accent);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-main);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 29, 34, 0.1);
}

/* ==========================================================================
   LOCALISATION / MAP
   ========================================================================== */
.map-container {
    width: 100%;
    line-height: 0;
}

.map-container iframe {
    width: 100%;
    filter: grayscale(80%) contrast(1.1);
    /* Matches the anthracite/pro look */
    transition: var(--transition);
}

.map-container iframe:hover {
    filter: grayscale(0%) contrast(1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: #151D22;
    padding: 3rem 0;
    color: rgba(255, 255, 255, 0.5);
}

.footer-logo {
    height: 40px;
    opacity: 0.5;
    margin-bottom: 1rem;
    filter: grayscale(100%);
}

.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 0;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    animation: fade-in-up 1s ease-out forwards;
}

.floating-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-5px);
}

/* ==========================================================================
   ANIMATIONS (Scroll Reveal)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .reverse-desktop {
        display: flex;
        flex-direction: column-reverse;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add mobile menu logic in JS if needed */
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        width: 25px;
        height: 3px;
        background-color: var(--white);
        border-radius: 3px;
        transition: var(--transition);
    }

    #navbar.scrolled .mobile-menu-btn span {
        background-color: var(--primary);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .floating-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
}

/* ==========================================================================
   MOBILE FIXES CRITIQUES
   ========================================================================== */

/* Fix: background-attachment: fixed ne marche pas sur iOS/Android */
@media (max-width: 992px) {
    #hero {
        background-attachment: scroll !important;
    }
}

/* Fix: H1 trop grand sur mobile */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.4rem !important;
        letter-spacing: -1px;
        line-height: 1.15;
        margin-bottom: 1.2rem;
    }

    .hero-content p {
        font-size: 1.1rem !important;
        margin-bottom: 2rem;
    }

    /* Boutons hero en colonne et pleine largeur */
    .hero-cta {
        flex-direction: column !important;
        gap: 1rem;
        width: 100%;
        align-items: stretch;
    }

    .hero-cta a {
        text-align: center;
    }

    /* Réduction du padding des sections sur mobile */
    .section {
        padding: 3.5rem 0 !important;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    /* Container padding réduit */
    .container {
        padding: 0 1.2rem;
    }

    /* Bouton flottant plus compact */
    .floating-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Formulaire de contact padding réduit */
    .contact-form-wrapper {
        padding: 1.5rem !important;
    }

    /* Image plan dans "l'entreprise" ne déborde pas */
    .image-block img {
        height: auto !important;
        max-height: 350px;
    }

    /* Logo hero plus petit */
    .hero-brand-clean {
        max-width: 85% !important;
        margin-bottom: 1.5rem;
    }

    /* pricing-box padding réduit */
    .pricing-box {
        padding: 1.5rem;
    }

    /* Services grid 1 colonne */
    .services-grid {
        grid-template-columns: 1fr !important;
    }

    /* News grid 1 colonne */
    .news-grid {
        grid-template-columns: 1fr !important;
    }

    /* News card padding réduit */
    .news-card {
        padding: 1.5rem !important;
    }
}

/* Menu mobile ouvert */
.nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    z-index: 999;
}

.nav-links.open a {
    color: var(--white) !important;
    font-size: 1.4rem !important;
    text-shadow: none !important;
}

.nav-links.open .btn-primary {
    background-color: var(--accent) !important;
    padding: 1rem 2.5rem !important;
}

/* Burger animé quand ouvert */
.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
