@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    font-family: 'Roboto', sans-serif;
}

h1, h2, h3 {
    text-align: center;
    color: #333; 
}

h1 {
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
}

body {
    margin: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), 
                url('https://images.unsplash.com/photo-1518605348400-43ded6040069?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
    background-size: cover;
    background-color: #a2c2e4;
}

header {
    background-color: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.terrain h2{
    margin-top: 3rem;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.terrain h3{
    text-align: center;
    margin-top: 2.5rem;
    color: #f0f0f0;
}


.container_texte_rappel {
    background-color: rgba(255, 255, 255, 0.85) !important; 
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none !important;
    padding: 15px;
}

.container_texte_rappel p {
    width : 100%;
    font-size: 1.2rem;
    margin-left: 0.3rem;
    line-height: 1.6;
}

.container_texte_rappel h2 {
    text-align: left;
    margin-left: 0.3rem;
    color: #2c3e50;
}

#reservation_jour {
    display: block;
}

.terrain:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

#messageErreur {
    color: #e74c3c;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.erreur {
    color: #e74c3c;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.close {
    color: #555;
    position: absolute; /* Sort du flux normal */
    top: 15px;          /* Fixe en haut */
    right: 20px;        /* Fixe à droite */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 101;       /* S'assure qu'elle est au-dessus du reste */
}
.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.centrer {
    text-align: center;
}

.aucuneReservation {
    background-color: #2ecc71; 
    opacity: 0.8;
}

td {
    cursor: pointer; 
    transition: opacity 0.2s; 
}

td:hover {
    opacity: 0.6;
}

.quelquesReservations {
    background-color: #f39c12; 
    opacity: 0.8;
}

.tousReserves {
    background-color: #e74c3c; 
    opacity: 0.8;
}

.reserve {
    background: linear-gradient(135deg, #c0392b, #e74c3c); 
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: none !important;
}

.non-reserve {
    background: linear-gradient(135deg, #27ae60, #2ecc71); 
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: none !important;
}

input, select {
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #80c7e4;
    box-shadow: 0 0 5px rgba(128, 199, 228, 0.5);
}

/* --------------- STYLES DU FOOTER MODIFIÉS --------------- */
.footer {
    /* Fond clair (Glassmorphism) au lieu de foncé */
    background-color: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(10px);
    width: 100%;
    color: #333; /* Texte foncé pour le contraste */
    padding-bottom: 20px;
    border-radius: 15px 15px 0 0; /* Arrondi sur le dessus uniquement */
    box-shadow: 0 -4px 6px rgba(0,0,0,0.05);
    margin-top: 40px;
}

.footer h2 {
    color: #2c3e50;
    padding-top: 20px;
    text-shadow: none;
}

/* -------------------------------------------------------- */

@media (max-width: 2000px) {
    .modal-content {
        background-color: #ffffff; 
        padding: 30px; 
        border-radius: 15px; 
        width: 700px;
        max-width: 80%;
        display: flex; /* Ajout pour la structure interne */
        flex-direction: column; 
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);

        max-height: 90vh; /* La modale ne dépassera jamais 90% de la hauteur de l'écran */
        overflow-y: auto; /* Ajoute une barre de défilement verticale si nécessaire */
        position: relative; /* Pour le positionnement de la croix de fermeture */
    }

    .modal-content input, .modal-content select {
        width: 95%;
        border-radius: 8px;
        height : 2rem;
        margin-left: 1rem;
        margin-bottom: 1rem;
        padding-left: 10px;
    }

    label {
        margin-left: 2rem;
        font-weight: 500;
        color: #555;
    }

    .submit {
        margin-left: 85%;
        border-radius: 2rem;
        background: linear-gradient(to right, #27ae60, #2ecc71);
        color: white;
        border: none;
        width : 7rem;
        height : 2.5rem;
        margin-top: 2rem;
        cursor: pointer;
        font-weight: bold;
        transition: transform 0.2s;
        box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    }
    
    .submit:hover {
        transform: scale(1.05);
    }

    /* --- NOUVEAU : ALIGNEMENT FORMULAIRE HEADER --- */
    /* On utilise Flexbox pour mettre Date, Heure et Bouton côte à côte */
/* Dans la section @media (max-width: 2000px) */

    .header-form {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 60px; /* <--- Augmenté de 20px à 60px pour bien écarter le bouton */
        flex-wrap: wrap; 
    }

    .form-group {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* On retire les marges "hardcodées" pour laisser le flexbox gérer */
    .labelDate, .labelHeure {
        width: auto;
        margin: 0 0 5px 0; /* Petite marge sous le label */
        height: auto;
        font-size: 1.5rem;
        font-weight: bold;
        color: #333;
    }
    
    .inputDate {
        width : 15rem; /* Largeur confortable */
        height : 3rem; 
        margin-bottom : 0; /* Plus besoin de marge bottom car flexbox gère l'espacement */
        font-size: 1.2rem;
        border-radius: 10px;
        padding-left: 10px;
        text-align: center;
    }
    
    .valideDate {
        height : 3rem;
        width : 8rem;
        border-radius: 0.8rem;
        background: linear-gradient(to right, #3498db, #2980b9);
        color: white;
        font-size: 1.2rem;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        transition: transform 0.1s;
        margin: 0; /* Reset des marges précédentes */
    }
    
    .valideDate:active {
        transform: scale(0.95);
    }
    /* ----------------------------------------------- */

    .contact-item {
        display: flex;
        justify-content: center; 
        align-items: center;
    }
    
    .mail {
        font-size: 30px;
        margin-left: 2%;
        margin-top: 2%;
        color: #333;
    }
    
    .ecriture_logo_facebook {
        margin-left: 1%;
        margin-right: 2%;
        margin-top: 0;
        padding-top: 0;
        font-size: 22px;
        text-decoration: none;
        color: #333;
        white-space: nowrap; 
    }
    
    .ecriture_mail {
        margin-left: 1%;
        margin-right: 2%;
        font-size: 22px;
        text-decoration: none;
        color: #333;
        margin-top: 1.9%;
    }
    
    .contact-item a {
        text-decoration: none; 
        display: inline-flex; 
        margin-top: 2%;
        align-items: center;
    }

    .facebook_logo {
        font-size: 30px;
        color: #3b5998; 
        display: inline-flex; 
    }

    img {
        width : 7%; 
        margin-left: 5%;
        transition: transform 0.3s;
    }
    
    img:hover {
        transform: scale(1.1);
    }

    .terrain {
        width: 20%;
        height: 100%;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: pointer;
    }

    .container_texte_rappel {
        width : 25%;
        height: 90%;
    }

    td,th {
        border: 1px solid rgba(0,0,0,0.1); 
        width : 5rem;
        height : 2rem;
        background-color: rgba(255,255,255,0.8); 
    }
    
    th {
        background-color: #333;
        color: white;
        border-radius: 3px;
    }

    table {
        margin-left: 27%;
        border-spacing : 5px; 
        border-collapse: separate;
    }

    .container-terrain {
        display: flex;  
        justify-content: space-between;  
        height: 400px;
    }
}
@media (max-width: 700px) {
    
    /* --- 1. HEADER (Espace en haut + côtés) --- */
    header {
        width: 94%;            
        margin-left: auto;     
        margin-right: auto;
        margin-top: 20px;      /* <--- AJOUT : Espace en haut de l'écran */
        display: block;        
        box-sizing: border-box;
    }

    /* --- 2. CONTENEURS GLOBAUX --- */
    .container-terrain, 
    .container_texte_rappel,
    table {
        width: 94%;
        margin-left: auto;
        margin-right: auto;
        display: block;
        box-sizing: border-box;
    }

    /* --- 3. FOOTER (Espace côtés + Éléments en ligne) --- */
    .footer {
        width: 94%;            /* Espace sur les côtés */
        margin-left: auto;     /* Centré */
        margin-right: auto;    /* Centré */
        margin-bottom: 20px;   /* Espace en bas */
        
        border-radius: 15px;
        padding: 10px;         /* Padding réduit pour gagner de la place */
        box-sizing: border-box;
    }

    /* Force les éléments à rester sur une ligne (flex-row) */
    .contact-item {
        display: flex;
        flex-direction: row;        /* <--- Important : on garde la ligne */
        flex-wrap: wrap;            /* Permet de passer à la ligne si vraiment trop petit, sans casser */
        justify-content: center;    /* Centre le tout */
        align-items: center;        /* Aligne verticalement */
        gap: 8px;                  /* Petit espace entre les groupes */
    }

    /* Ajustement des tailles pour que ça rentre sur la ligne */
    .mail, .facebook_logo {
        font-size: 18px;    /* Icônes plus petites */
        margin: 0;          /* On retire les marges inutiles */
    }

    .ecriture_mail, .ecriture_logo_facebook {
        font-size: 10px;    /* Texte plus petit */
        margin: 0;
        margin-left: 5px;   /* Juste un petit espace après l'icône */
        display: inline-block;
    }

    /* Groupe Email et FB pour qu'ils restent liés icône+texte */
    .contact-item > h4, 
    .contact-item > a {
        display: flex;
        align-items: center;
    }

    /* Les logos (images) */
    img {
        width: 8%;          /* Logos plus petits */
        margin-left: 5px;
        margin-right: 5px;
    }

    /* --- 4. INPUTS ET FORMULAIRE --- */
    .header-form {
        flex-direction: column;
        align-items: center;
        gap: 0; 
    }

    .inputDate {
        width: 220px;
        max-width: 100%;
        height: 2.5rem;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
        font-size: 1rem;
        padding-left: 10px;
        text-align: center;
        display: block;
    }

    .valideDate {
        width: 220px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 1rem;
        height: 2.5rem;
        display: block;
    }

    /* --- 5. RESTE DES ÉLÉMENTS --- */
    .modal-content {
        width: 94%; 
    }

    .modal-content input {
        width: 100%; 
        margin-left: auto;
        margin-right: auto;
        height: 2rem;
        margin-bottom: 0.5rem;
    }

    .modal-content select {
        width: 100%; 
        height: 2rem;
        border-radius: 0.5rem;
    }

    .submit {
        width: 80%; 
        margin-left: auto;
        margin-right: auto;
        height: 2.5rem;
        display: block;
        float: none;
    }

    td, th {
        width: auto;
        min-width: 3rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }

    table {
        border-spacing: 2px;
        overflow-x: auto;
    }

    .container-terrain {
        height: auto; 
        display: block; /* Permet l'empilement */
    }

    .terrain {
        width: 100%;
        height: auto; 
        min-height: 150px;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .terrain h2 {
        margin-top: 1rem;
    }

    .container_texte_rappel {
        margin-top: 1rem;
        height: auto;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .separator {
        display: none;
    }

}

.containerContact {
    text-align: center;
}

/* ... code existant ... */

/* --------------- LIENS FOOTER --------------- */
.footer-links {
    text-align: center;
    margin-top: 25px;
    padding-bottom: 15px;
    font-size: 0.9em;
}

.footer-links a {
    color: #333; /* Gris foncé pour la lisibilité sur fond clair */
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #3498db; /* Bleu au survol */
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
    color: #999;
}

@media (max-width: 700px) {
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .separator {
        display: none; /* On cache le séparateur sur mobile */
    }
}