/* Améliorations générales pour la page e6 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
}

header {
    background-color: #007bff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header .navbar {
    padding: 15px;
}

header .navbar-brand img {
    max-height: 50px;
}

.main_menu {
    background-color: #ffffff;
}

/* Ajustement final pour éviter que la section soit cachée par la barre de navigation */
.projects-section.container {
    margin-top: 120px; /* Augmentation de l'espacement supérieur pour éviter tout chevauchement */
    max-width: 700px; /* Largeur maximale ajustée */
    padding: 20px; /* Espacement interne équilibré */
    min-height: auto; /* Ajustement de la hauteur minimale */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.projects-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #007bff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-card img {
    max-width: 80px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.project-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

.project-card button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.project-card button:hover {
    background-color: #0056b3;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 80%;
    max-width: 700px;
    text-align: center;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #007bff;
}

.modal-content .pdf-container {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
}

footer {
    margin-top: auto;
    background-color: #007bff;
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
}

footer a {
    color: #ffffff;
    text-decoration: underline;
}

footer a:hover {
    color: #f1f1f1;
}

/* Ajustement de la taille de la box des contextes en mode bureau */
@media (min-width: 1024px) {
    .projects-section.container {
        max-width: 700px; /* Réduction de la largeur maximale en mode bureau */
        padding: 20px; /* Espacement interne équilibré */
        min-height: auto; /* Ajustement de la hauteur minimale */
    }

    .project-card {
        padding: 10px; /* Réduction de l'espacement interne des cartes */
    }
}