/* Reset and base styles */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e2e;
    min-height: 100vh;
    margin: 0;
    padding-top: 60px; /* Adjusted for fixed navbar */
    box-sizing: border-box;
    overflow-x: hidden;
}

#nouvelle_h1, #nouvelle_h2, #nouvelle_p, #image {
    transition: all 1s ease;
}

#image {
    width: 100%;
}

/* Layout containers */
#text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45%;
    padding: 0 2.5%;
    color: #e0e0e0;
}

#text-container h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

#text-container p {
    font-size: 1.2em;
    letter-spacing: 0.5px;
}

#map-container {
    position: relative;
    width: 45%;
    height: 80vh;
    margin-right: 2.5%;
}

/* Images */
#images {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 20px auto;
    border-radius: 80px;
    box-shadow: 0 0 2px 1px rgba(167, 95, 206, 0.5);
    object-fit: contain;
}

/* Map region styles */
.region {
    fill: #3a86ff;
    stroke: #ffffff;
    stroke-width: 1.5px;
    transition: fill 0.5s ease;
}
.region:hover {
    fill: #ffbe0b;
    cursor: pointer;
    stroke-width: 2px;
}

/* Tooltip styles */
#tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 15px;
    border-radius: 6px;
    pointer-events: none;
    max-width: 565px;
    width: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#tooltip strong {
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

#tooltip span {
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.4;
}

/* Navigation Bar */
nav { 
    background-color: #252634;
    padding: 10px 30px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 97%;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 10px 10px;
}

nav .logo {
    font-size: 24px;
    color: #e0e0e0;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #dfe6e9;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.5s ease, background-color 0.7s ease;
    border-radius: 15px;
    display: inline-block;
}

nav ul li a:hover {
    color: #1e1e2e;
    background-color: #ffb703;
}

/* Dropdown styles */
nav .dropdown > a {
    background-color: #252634;
    color: #dfe6e9;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
    transition: color 0.5s ease, background-color 0.7s ease, transform 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
}

nav .dropdown > a:hover {
    color: #1e1e2e;
    background-color: #ffb703;
    transform: scale(1.05);
}

/* Dropdown content */
nav .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #252634;
    z-index: 1;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

nav .dropdown-content a {
    color: #dfe6e9;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    background-color: #252634;
    border-radius: 8px;
    transition: color 0.5s ease, background-color 0.7s ease;
}

nav .dropdown-content a:hover {
    color: #1e1e2e;
    background-color: #ffb703;
}

nav .dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.map-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #ffbe0b;
    color: #1e1e2e;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.map-button:hover {
    background-color: #ff9f00;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        padding: 20px;
    }

    #text-container,
    #map-container {
        width: 95%;
        margin: 50px auto;
    }

    #map-container {
        height: 60vh;
    }

    #tooltip {
        max-width: 90%;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #tooltip {
        padding: 8px;
        font-size: 12px;
    }

    #tooltip strong {
        font-size: 14px;
    }

    #tooltip span {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    #map-container {
        width: 90%;
        margin: auto;
    }

    #text-container h1 {
        font-size: 1.8em;
    }

    #text-container p {
        font-size: 1em;
    }
}
