/* Réinitialisation des marges et paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Styles généraux */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

header img {
    max-width: 100px;
    height: auto;
    margin: 10px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

nav ul li {
    display: block;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background: #005f87;
    border-radius: 5px;
}

nav ul li a:hover {
    background: #023e7d;
}

/* Mise en page du contenu */
.container {
    display: flex;
    gap: 30px;
    margin: 30px auto;
    max-width: 1200px;
    width: 80%;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0px 6px 10px rgba(255, 0, 0, 0.5);
}

.intitule {
    flex: 1;
    font-weight: bold;
    color: #0077b6;
    padding-right: 20px;
    border-right: 3px solid #0077b6;
    text-align: right;
}

.contenu {
    flex: 3;
    padding-left: 20px;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    word-wrap: break-word;
    max-width: 200px;
}

th {
    background-color: #0077b6;
    color: white;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

tr:hover {
    background: #dbeafe;
}

/* Formulaire */
form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="file"], textarea, button {
    padding: 10px;
    font-size: 16px;
}

button {
    background: #0077b6;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
}

button:hover {
    background: #005f8a;
}

/* Galerie */
.galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo {
    text-align: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.photo img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.photo p {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

.lightbox p {
    color: white;
    font-size: 18px;
    margin-top: 10px;
    text-align: center;
}

.fermer {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    table {
        display: block;
    }

    tr {
        display: block;
        margin-bottom: 10px;
    }

    th, td {
        display: block;
        width: 100%;
    }

    th {
        background-color: #19a068;
        text-align: left;
        padding: 10px 0;
    }

    td {
        padding-left: 40%;
        text-align: right;
        position: relative;
    }

    td:before {
        content: attr(data-column);
        position: absolute;
        left: 10px;
        font-weight: bold;
    }
}
