/* Styles généraux */
body {
    margin: 0 auto;
    text-align: center;
    max-width: 1200px;
    font-family: 'Roboto', Arial, sans-serif;
    background-image: url(../images/bmw.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
}

/* Header */
header {
    background-color: rgba(0, 47, 108, 0.9);
    background-image: url(../images/BMW_logo.jpg);
    background-repeat: no-repeat;
    background-size: 70px;
    background-position: 20px center;
    width: 90%;
    height: 120px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

nav {
    margin-left: 200px;
}

.liste {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-left: 400px;
    padding: 0;
}

.liste a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.liste a:hover {
    color: #81c4ff;
}

/* Contenu principal */



/* Style général pour le conteneur */
#formulaire {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Style des labels */
label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

/* Indicateur obligatoire */
label span {
    color: #e63946;
}

/* Style des champs de saisie */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    height: 30px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #495057;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Champ au focus */
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* Style du textarea */
textarea {
    resize: none;
    height: 120px;
}

/* Conteneurs pour les champs */
#debut {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

/* Adaptation des blocs pour écrans mobiles */
#bloc1,
#bloc2 {
    flex: 1;
}

/* Bouton de soumission */
#bouton {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Bouton au survol */
#bouton:hover {
    background-color: #0056b3;
    transform: scale(1.02);
}

/* Bouton au clic */
#bouton:active {
    background-color: #004494;
}

/* Style pour les petits écrans */
@media (max-width: 600px) {
    #debut {
        flex-direction: column;
    }
}
main {
    background-color: rgba(255, 255, 255, 0.95);
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}



.photo {
    width: 100%;
    width: 600px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.galerie {
    width: 100%;
    width: 600px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    filter: grayscale(90%);
    transition:all 0.5s ease-out ;
    margin: 10px auto;
}

.galerie:hover{
    width: 620px;
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
    filter: grayscale(0%);
    transition: all 0.5s ease-in-out;
}

main p {
    font-size: 1.2em;
    line-height: 1.6;
    margin: 20px;
    color: #555;
}

/* Table */
table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 90%;
    max-width: 800px;
}

td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.message {
    position: fixed; /* Fixe en haut de l'écran */
    top: 10px; /* Espacement du haut */
    left: 50%; /* Centré horizontalement */
    transform: translateX(-50%); /* Ajuste pour centrer */
    width: 80%;
    max-width: 500px;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    z-index: 1000; /* Toujours au-dessus */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Message de succès */
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Message d'erreur */
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: fadeIn 0.5s ease-in-out;
}

/* Disparition automatique après 3 secondes */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.message.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
}




/* Footer */
footer {
    background-color: #002f6c;
    background-image: url(../images/M8.png);
    background-size: 10%;
    background-repeat: no-repeat;
    background-position: right center;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 20px;
    color: white;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 0;
    font-size: 0.9em;
    color: #ccc;
}

#lien {
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    header,
    main,
    footer {
        width: 95%;
    }

    .liste {
        gap: 15px;
        flex-wrap: wrap;
    }

    main img {
        width: 80%;
    }

    table {
        font-size: 0.9em;
    }
}
