* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif; line-height: 1.6; color: #ccc; background-color: #000; }

/* Header */
header { background-color: #000; padding: 20px 0; position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
nav { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; position: relative; }
.nav-container { display: flex; align-items: center; gap: 40px; }

.logo img {
    height: 50px;
    width: auto;
    display: block;
}
.nav-links { display: flex; gap: 40px; list-style: none; align-items: center; }
.nav-links a { color: #fff; text-decoration: none; font-size: 16px; transition: color 0.3s; font-weight: 500; }
.nav-links a:hover { color: #FFD700; }

/* Menu déroulant Produits */
.dropdown { position: relative; }
.dropdown-content { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #000; min-width: 800px; max-width: 900px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,215,0,0.1); opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-10px); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 1000; margin-top: 15px; border: 2px solid rgba(255,215,0,0.2); }
.dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 20px; }
.dropdown-item { position: relative; background: #000; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.05); margin: 8px; }
.dropdown-item:hover { transform: translateY(-8px) scale(1.02); background: rgba(255,215,0,0.05); border-color: rgba(255,215,0,0.3); box-shadow: 0 15px 35px rgba(255,215,0,0.2); }
.dropdown-item-link { display: block; text-decoration: none; color: #fff; height: 100%; position: relative; overflow: hidden; }
.dropdown-item-image { width: 100%; height: 120px; background-size: cover; background-position: center; position: relative; transition: transform 0.4s ease; }
.dropdown-item:hover .dropdown-item-image { transform: scale(1.1); }
.dropdown-item-image::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6)); transition: opacity 0.3s ease; }
.dropdown-item:hover .dropdown-item-image::before { opacity: 0.8; }
.dropdown-item-content { padding: 15px; position: relative; }
.dropdown-item-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #fff; transition: color 0.3s ease; }
.dropdown-item:hover .dropdown-item-title { color: #FFD700; }
.dropdown-item-desc { font-size: 13px; color: #ccc; line-height: 1.4; opacity: 0.9; }
.dropdown-item::after { content: '→'; position: absolute; top: 15px; right: 15px; color: #FFD700; font-size: 18px; font-weight: bold; opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; }
.dropdown-item:hover::after { opacity: 1; transform: translateX(0); }

/* Images spécifiques dropdown */
.dropdown-item:nth-child(1) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/portail.jpeg'); }
.dropdown-item:nth-child(2) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/card-porte.jpeg'); }
.dropdown-item:nth-child(3) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/card-volet.jpeg'); }
.dropdown-item:nth-child(4) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/card-portail.jpeg'); }
.dropdown-item:nth-child(5) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/card-garage.jpeg'); }
.dropdown-item:nth-child(6) .dropdown-item-image { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../img/card-pergola.png'); }

.dropdown > a::after { content: '▼'; font-size: 12px; margin-left: 8px; transition: transform 0.3s ease; color: #FFD700; }
.dropdown:hover > a::after { transform: rotate(180deg); }

.cta-button { background-color: #FFD700; color: #000; padding: 12px 30px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s; position: relative; overflow: hidden; animation: pulse 2s ease-in-out infinite; box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); } 50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); } }
.cta-button::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.cta-button:hover { transform: scale(1.08); box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6); animation: none; }
.cta-button:hover::before { width: 300px; height: 300px; }
.desktop-cta { animation: pulse 2s ease-in-out infinite, shake 3s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0deg); } 10%, 30% { transform: rotate(-2deg); } 20%, 40% { transform: rotate(2deg); } }
.nav-links .cta-button { display: none; }
.desktop-cta { display: inline-block; }

.menu-toggle { display: none; flex-direction: column; cursor: pointer; z-index: 1001; padding: 10px; background: transparent; border: none; margin-left: auto; }
.menu-toggle span { width: 30px; height: 3px; background-color: #FFD700; margin: 3px 0; transition: all 0.3s ease; border-radius: 3px; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 999; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.mobile-overlay.active { display: block; opacity: 1; pointer-events: auto; }

/* Breadcrumb */
.breadcrumb { background-color: #111; padding: 20px 40px; margin-top: 80px; border-bottom: 1px solid #333; }
.breadcrumb-content { max-width: 1400px; margin: 0 auto; }
.breadcrumb a { color: #999; text-decoration: none; font-size: 14px; }
.breadcrumb a:hover { color: #FFD700; }
.breadcrumb span { color: #777; margin: 0 8px; }

/* Hero Section */
.hero-page {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/bg-realisation.jpeg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}
.hero-content h1 { font-size: 48px; margin-bottom: 20px; font-weight: 700; }
.hero-content h1 .highlight { color: #FFD700; }
.hero-content p { font-size: 20px; max-width: 800px; margin: 0 auto 30px; line-height: 1.7; }

/* Main Content */
.main-content { padding: 80px 40px; max-width: 1400px; margin: 0 auto; }

/* Intro Section */
.intro-section { margin-bottom: 80px; text-align: center; }
.intro-section h2 { font-size: 40px; margin-bottom: 30px; color: #fff; font-weight: 700; }
.intro-text { font-size: 18px; line-height: 1.8; color: #b0b0b0; max-width: 1000px; margin: 0 auto; }
.intro-text p { margin-bottom: 20px; }

/* Gallery Filter */
.gallery-filter { text-align: center; margin-bottom: 60px; }
.filter-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { background: #1a1a1a; color: #ccc; border: 2px solid rgba(255,255,255,0.1); padding: 12px 25px; border-radius: 30px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; font-size: 16px; }
.filter-btn:hover, .filter-btn.active { background: #FFD700; color: #000; border-color: #FFD700; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3); }

/* --- NOUVEAU STYLE GALLERIE MASONRY --- */
.gallery-grid {
    column-count: 3; /* 3 colonnes sur grand écran */
    column-gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.gallery-item {
    break-inside: avoid; /* Empêche de couper l'image */
    margin-bottom: 25px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block; /* Essentiel pour le column-count */
    width: 100%;
    border: 1px solid rgba(255,255,255,0.05);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(255,215,0,0.2);
    border-color: rgba(255,215,0,0.2);
}

/* L'image s'adapte à sa vraie hauteur */
.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Petit zoom au survol sur l'image */
.gallery-item:hover .gallery-image {
    transform: scale(1.03);
}

.gallery-item.hidden {
    display: none;
}
/* --- FIN NOUVEAU STYLE --- */

/* Modal Lightbox */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.95); overflow: auto; }
.modal-content { position: relative; margin: auto; padding: 20px; width: 95%; max-width: 1200px; top: 50%; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.modal-image { max-width: 100%; max-height: 90vh; height: auto; width: auto; border-radius: 16px; object-fit: contain; }
.modal-close { position: absolute; top: 15px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; transition: color 0.3s; z-index: 2001; }
.modal-close:hover { color: #FFD700; }

/* Stats Section */
.stats-section { background: linear-gradient(135deg, #000 0%, #1a1a1a 100%); color: #fff; padding: 80px 40px; text-align: center; margin: 80px 0; border-radius: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1000px; margin: 0 auto; }
.stat-item { text-align: center; }
.stat-number { font-size: 48px; font-weight: bold; color: #FFD700; margin-bottom: 10px; display: block; }
.stat-label { font-size: 18px; color: #ccc; }

/* Footer */
footer { background-color: #000; color: #fff; padding: 80px 40px 40px; }
.footer-content { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 60px; margin-bottom: 60px; }
.footer-section h3 { color: #FFD700; font-size: 20px; margin-bottom: 20px; font-weight: 600; }
.footer-section p, .footer-section a { color: #ccc; text-decoration: none; display: block; margin-bottom: 12px; font-size: 15px; line-height: 1.6; transition: color 0.3s; }
.footer-section a:hover { color: #FFD700; padding-left: 5px; }
.footer-logo-section { grid-column: 1; }
.footer-logo-text { font-size: 32px; font-weight: bold; color: #FFD700; font-style: italic; margin-bottom: 15px; }
.footer-logo-img { height: 50px; width: auto; margin-bottom: 15px; display: block; }
.footer-description { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 20px; margin-top: 20px; }
.social-icon { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; color: #ccc; transition: all 0.3s; text-decoration: none; }
.social-icon:hover { transform: scale(1.2); }
.social-icon svg { width: 35px; height: 35px; fill: currentColor; display: block; }
.social-icon.facebook:hover { color: #1877f2; }
.social-icon.instagram:hover { color: #e6683c; }
.social-icon.linkedin:hover { color: #0077b5; }
.footer-bottom { border-top: 1px solid #333; padding-top: 30px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-bottom p { color: #888; font-size: 14px; margin: 0; }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-links a { color: #888; text-decoration: none; font-size: 14px; transition: color 0.3s; }
.footer-links a:hover { color: #FFD700; }

/* Mobile Responsive */
@media (max-width: 1024px) {
    .dropdown-content { min-width: 600px; max-width: 700px; }
    .dropdown-grid { grid-template-columns: repeat(2, 1fr); }
    .dropdown-item:hover { transform: none; background: rgba(255,215,0,0.05); border-color: rgba(255,215,0,0.3); box-shadow: none; }
    .dropdown-item:hover .dropdown-item-image { transform: none; }
    .dropdown-item::after { display: none; }
    .footer-content { grid-template-columns: repeat(2, 1fr); gap: 40px; }

    /* Modification responsive gallery */
    .gallery-grid { column-count: 2; gap: 20px; }
}

@media (max-width: 768px) {
    /* --- DROPDOWN MOBILE SIMPLE --- */
    /* Masquer images et descriptions */
    .dropdown-item-image,
    .dropdown-item-desc {
        display: none !important;
    }

    /* Dropdown caché par défaut */
    .dropdown-content {
        position: static !important;
        transform: none !important;
        min-width: auto;
        max-width: none;
        width: 100%;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;

        /* Animation accordéon */
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Dropdown ouvert */
    .dropdown.open .dropdown-content {
        max-height: 600px !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-top: 10px !important;
    }

    /* Désactiver hover */
    .dropdown:hover .dropdown-content {
        opacity: 0 !important;
        visibility: hidden !important;
        max-height: 0 !important;
    }

    /* Mais réactiver si .open */
    .dropdown.open:hover .dropdown-content {
        max-height: 600px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Grid en colonne */
    .dropdown-grid {
        display: flex !important;
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    /* Items style simple */
    .dropdown-item {
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .dropdown-item-link {
        display: block;
        padding: 20px 0 !important;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        transition: all 0.3s;
    }

    .dropdown-item:hover .dropdown-item-link {
        padding-left: 10px !important;
    }

    .dropdown-item:hover {
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .dropdown-item-content {
        padding: 0 !important;
    }

    .dropdown-item-title {
        font-size: 20px !important;
        font-weight: 500;
        color: #fff !important;
        margin: 0 !important;
    }

    .dropdown-item:hover .dropdown-item-title {
        color: #FFD700 !important;
    }

    .dropdown-item::after {
        display: none !important;
    }
    /* --- FIN DROPDOWN MOBILE --- */

    .hero-page {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center !important;
        padding: 0 15px;
        min-height: 350px;
    }
    .hero-content h1 { font-size: 36px; }
    .hero-content p { font-size: 16px; }
    nav { padding: 0 20px; }
    .menu-toggle { display: flex; }
    .desktop-cta { display: none !important; }

    .nav-links { position: fixed; right: -100%; top: 0; height: 100vh; width: 80%; max-width: 400px; flex-direction: column; background: linear-gradient(135deg, #1a1a1a 0%, #000 100%); text-align: left; transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); box-shadow: -5px 0 25px rgba(0,0,0,0.5); padding: 100px 40px 40px 40px; gap: 0; align-items: flex-start; overflow-y: auto; }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; padding: 0; margin: 0; opacity: 0; transform: translateX(50px); animation: slideIn 0.4s forwards; }
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { animation-delay: 0.35s; }
    @keyframes slideIn { to { opacity: 1; transform: translateX(0); } }
    .nav-links a { display: block; padding: 20px 0; font-size: 20px; border-bottom: 1px solid rgba(255, 215, 0, 0.1); width: 100%; transition: all 0.3s; }
    .nav-links a:hover { padding-left: 10px; color: #FFD700; }

    /* Flèche dropdown mobile */
    .dropdown > a::after {
        content: '▼';
        font-size: 14px;
        color: #FFD700;
        display: inline-block !important;
        margin-left: 10px;
        transition: transform 0.3s ease;
    }

    .dropdown.open > a::after {
        transform: rotate(180deg);
    }

    .nav-links .cta-button { display: block; }
    .desktop-cta { display: none; }
    .cta-button { display: block; margin: 30px 0 0 0; width: 100%; text-align: center; padding: 15px 30px; font-size: 18px; }
    .main-content { padding: 40px 20px; }
    .intro-section h2 { font-size: 28px; }

    /* Modification responsive gallery mobile */
    .gallery-grid { column-count: 1; gap: 20px; }

    .filter-buttons { gap: 10px; }
    .filter-btn { padding: 10px 20px; font-size: 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .stat-number { font-size: 36px; }
    .breadcrumb { padding: 15px 20px; }
    footer { padding: 60px 20px 30px; }
    .footer-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-logo-section { grid-column: 1; }
    .social-links { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 15px; }
    .footer-links { justify-content: center; gap: 20px; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 24px; }
    .intro-section h2 { font-size: 24px; }
    .stats-section { padding: 40px 20px; }
    .footer-content { gap: 30px; }
    .footer-section h3 { font-size: 18px; }
    .footer-logo-text { font-size: 28px; }
    .footer-links { flex-direction: column; gap: 10px; }
    .modal-content { padding: 10px; width: 95%; }
    .modal-close { top: 10px; right: 20px; font-size: 30px; }
    /* Mobile column */
    .gallery-grid { column-count: 1; gap: 15px; }
}