/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
nav {
    background-color: #1a1a1a;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffd700; /* Jaune doré pour le survol */
}

/* En-tête */
header {
    text-align: center;
    padding: 3rem 1rem;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid #ddd;
    color: #fff; /* Couleur par défaut pour le contenu */
    position: relative;
}

/* Optionnel : Filtre sombre */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Assurer que le contenu reste au-dessus du filtre */
header h1, header p, header .cta-button {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffd700; /* Jaune doré */
}

header p {
    font-size: 1.2rem;
    color: #e0e0e0; /* Gris clair */
}

/* Contenu principal */
main {
    flex: 1 0 auto;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2 {
    color: #1a1a1a;
    margin-bottom: 1rem;
}

/* Formulaire de contact */
form {
    width: 800px; 
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

label {
    font-weight: 500;
}

input, textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #ffd700;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button {
    padding: 0.8rem;
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #ffd700;
    color: #1a1a1a;
}

/* Catalogue */
.catalogue {
    margin: 2rem 0;
}

.machine-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes fixes */
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.machine-item {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.machine-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.machine-item h3 {
    margin-bottom: 0.8rem;
    color: #1a1a1a;
}

.machine-item p {
    color: #666;
}

/* Tarifs */
.tarifs table {
    width: 1000px;
    max-width: 1000px;
    margin: 1.5rem auto;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tarifs th, .tarifs td {
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
}

.tarifs th {
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 500;
}

.tarifs td {
    color: #333;
}

.tarifs p {
    text-align: center;
    margin: 1rem 0;
    color: #666;
}

/* Admin Table */
main table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

main th, main td {
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: left;
}

main th {
    background-color: #1a1a1a;
    color: #fff;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #1a1a1a;
    color: #fff;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .machine-list {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
    }

    .tarifs table, main table {
        font-size: 0.9rem;
    }

    form {
        padding: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .intro {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    button {
        font-size: 0.9rem;
    }
}

/* Bouton Call-to-Action */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #ffd700;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
}

/* Section Intro */
.intro {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.intro p {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
}

/* Section Services */
.services {
    padding: 2rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.service-item {
    background-color: #fff;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    color: #1a1a1a;
    margin-bottom: 0.8rem;
}

.service-item p {
    color: #666;
}

/* Section Pourquoi nous choisir */
.why-us {
    padding: 2rem 0;
    text-align: center;
    background-color: #f4f4f4;
    border-radius: 8px;
}

.why-us ul {
    list-style: none;
    max-width: 600px;
    margin: 1.5rem auto;
    text-align: left;
}

.why-us li {
    margin: 0.8rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.why-us li:before {
    content: "✔";
    color: #ffd700;
    position: absolute;
    left: 0;
}

/* Responsive adjustments pour les nouvelles sections */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .intro {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
    }
}

/* Options Admin */
.admin-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}