@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap');

.navbar {
    background-color: #f8ead5;
    padding: 15px 0;
    position: relative;
    z-index: 100;
    width: 100%;
}

.logo img {
    height: 130px;
    width: auto;
    position: absolute;
    top: 75px;
    left: 40px;
    z-index: 200;
    border-radius: 10px;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 1200px;
    gap: 20px;
    margin: 0 auto;
    padding: 0 0 0 15px;
}

.nav-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-bottom: 20px;
    margin-top: 30px;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #693d22;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
    padding: 8px;
    position: relative;
    transition: color 0.3s ease;
    font-family: 'Raleway', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    color: #d2691e;
    text-decoration: underline;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 3px;
    left: 50%;
    background: #d2691e;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.devis-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    padding: 14px 32px !important;
    margin-top: 1.5rem !important;    
    background: linear-gradient(135deg, #e1c5a0 0%, #54301a 100%) !important;
    border: 2px solid rgba(226, 199, 133, 0.8) !important;
    box-shadow: 0 6px 20px rgba(105, 61, 34, 0.35) !important;    
    border-radius: 50px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

.devis-button:hover {
    color: #000000 !important;
    box-shadow: 0 10px 28px rgba(105, 61, 34, 0.5) !important;
    border-color: rgba(255, 228, 160, 0.95) !important;
    transform: translateY(-2px) !important;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 180px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 150;
}

.nav-item:hover .dropdown,
.nav-item.active .dropdown {
    opacity: 1;
    visibility: visible;
    background-color: rgba(225, 197, 160, 0.2);
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.dropdown-item:hover {
    color: #ffffff;
    padding-left: 20px;
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 11px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-arrow,
.nav-item.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* ======= BURGER MENU ======= */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 200;
}

.line {
    height: 3px;
    width: 100%;
    background-color: #693d22;
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* ======= BURGER ANIMATION ======= */
.burger.active .line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active .line2 {
    opacity: 0;
}

.burger.active .line3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ======= MOBILE SLIDING MENU ======= */
.nav-links {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background-color: #f8ead5;
    display: flex;
    flex-direction: column;
    padding: 60px 20px 20px;
    transition: right 0.3s ease;
    z-index: 150;
    list-style: none;
}

.nav-links.active {
    right: 0;
}

.nav-links .nav-item {
    margin: 10px 0;
}

.nav-links .nav-link {
    font-size: 22px;
    padding: 10px;
    display: block;
}

.nav-links .dropdown {
    position: static;
    transform: none;
    background: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
    margin-left: 0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 0;               /* Fermé par défaut */
    transition: max-height 0.4s ease;
}

.nav-links .nav-item.active .dropdown {
    max-height: 500px;           /* assez grand pour contenir les formules */
}

/* Style des sous-liens */
.nav-links .dropdown-item {
    display: block;
    padding: 12px;
    font-size: 18px;
    border-bottom: 1px solid #e0d6c5;
}

.nav-links .dropdown-item:last-child {
    border-bottom: none;
}

/* ======= OVERLAY ======= */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 100;
}

.nav-overlay.active {
    display: block;
}

/* Styles pour l'effet de machine à écrire */
.typewriter-slogan {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 15px;
    font-family: 'Dancing Script', cursive;
    font-size: 72px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Styles pour le conteneur panoramique */
.panoramique-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.panoramique-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[id^="formule-"] {
    scroll-margin-top: 120px;
}

#typing-text {
    display: inline-block;
    text-align: center;
    width: 100%;
    white-space: normal;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        padding: 0 0 0 10px;
    }

    .nav-menu {
        display: none !important;
    }

    .burger {
        display: flex;
        margin-right: 0;
    }

    .nav-center {
        margin-right: 50px; /* Increased space between Devis button and burger menu */
    }

    .logo img {
        height: 80px;
        top: 15px;
        left: 20px;
    }

    .typewriter-slogan {
        font-size: 32px;
        top: 120px;
        padding: 0 10px;
    }

    .panoramique-container {
        height: 300px;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {     
    .logo img {
        height: 60px;
        top: 20px;
        left: 15px;
    }

    .devis-button {
        width: 250px;
        font-size: 1.1rem;
        padding: 12px 10px;
        word-wrap: break-word;
        display: flex;
        align-items: center;
        text-align: center;
    }

    .nav-center {
        padding-left: 50px;
        margin-right: 30px; /* Increased for smaller screens */
    }

    .nav-links .nav-link {
        font-size: 20px;
        padding: 8px;
    }

    .typewriter-slogan {
        font-size: 28px;
        top: 100px;
    }

    .panoramique-container {
        height: 250px;
    }
}

/* Styles pour tablette */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-center {
        gap: 20px;
    }
    
    .nav-menu {
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .devis-button {
        padding: 10px 18px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    .nav-link {
        font-size: 18px;
    }

    .logo img {
        height: 110px;
        top: 60px;
        left: 30px;
    }

    .typewriter-slogan {
        font-size: 60px;
        top: 130px;
    }
}