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

/* Ensure body and html take full height */
html, body {
    height: 100%;
}

/* Container Flexbox Layout */
body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: tahoma;
}

nav {
    background-color: #2c3e50;
    padding: 1rem 0;
}

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

.logo a {
    color: #ecf0f1;
    font-size: 50px;
    text-decoration: none;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1rem;
}

nav .nav-links a:hover {
    color: #e74c3c;
}

section {
    padding: 4rem 0;
    background-color: #ecf0f1;
}

.container {
    width: 80%;
    margin: 0 auto;
}

h1, h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #555;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

form input, form textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 300px;
}

form button, form input[type="submit"] {
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    background-color: #4c3ce7;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

form button:hover, form input[type="submit"]:hover {
    background-color: #392bc0;
}

/* Main Content Area */
main {
    flex: 1;
}

/* Footer Styling */
footer {
    background-color: black;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 0.5rem 0;
    color: #ccc;
}

footer a {
    color: #4c3ce7;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Section Visibility and Animation */
section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

section.active {
    display: block;
    opacity: 1;
}

nav a.active {
    color: #e74c3c;
}

/* Style du menu principal */
.menu {
    border: #ddd 2px solid;
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    opacity: 0.8;
    background-color: #2c3e50; /* Assurez-vous que le menu principal a une couleur de fond pour plus de visibilité */
}

.menu button {
    background-color: #2c3e50;
    color: white;
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    margin: 0;
    padding: 5px 15px;
}

.menu ul {
    list-style-type: none;
    padding: 2px;
    margin: 0;
}

.menu li {
    display: block;
    margin: 8px;
    border-bottom: #ddd 1px solid;
    min-width: 250px;
    position: relative; /* Important for positioning the sub-menu */
}

.menu a {
    text-decoration: none;
    color: white;
    padding: 5px;
    display: block; /* Ensure the link fills the list item */
}

/* Style des sous-menus */
.menu-item-has-children .sub-menu {
    display: none;
    position: absolute;
    background-color: #444;
    padding: 10px;
    top: 100%; /* Position the sub-menu directly below the parent item */
    left: 0;
    min-width: 250px;
    border: #ddd 1px solid;
    z-index: 1; /* Ensure the sub-menu is above other content */
}

.menu-item-has-children:hover .sub-menu {
    display: block; /* Show the sub-menu when hovering over the parent item */
}

.menu li:hover {
    font-weight: bold;
    border: #ddd 1px solid;
}
