.form-container input[type="text"],
.form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;  /* Espace après chaque champ */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
}

/* Bouton de soumission avec un style cohérent au reste de l'app */
.form-container input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.form-container input[type="submit"]:hover {
    background-color: #45a049;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa;
    line-height: 1.6;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-tag {
    font-size: 28px;
    font-weight: 600;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    background-color: #4CAF50;
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

th {
    background-color: #4CAF50;
    color: white;
}

th, td {
    text-align: left;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

td {
    vertical-align: middle;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f5e8;
    transition: background-color 0.2s;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    margin: 4px 8px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

#date-selector {
    align-self: center;
}

#date-select {
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 2px solid #4CAF50;
    background-color: white;
    color: #4CAF50;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#date-select:focus {
    outline: none;
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.grid-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

label {
    font-weight: bold;
    margin: 10px 0 5px 0;
}

/* Checkbox styling */
.checkbox {
    display: none;
}

.checkbox + label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    background-color: #fff;
}

.checkbox:checked + label {
    background-color: #4CAF50;
}

.scrollable-table {
    overflow-y: auto;
    height: 600px;
    display: block;
    border-radius: 8px;
    margin-bottom: 10px;
}

.scrollable-table::-webkit-scrollbar {
    width: 8px;
}

.scrollable-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.scrollable-table::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

.scrollable-table::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .header-tag {
        font-size: 20px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .scrollable-table {
        height: 65vh;
        overflow-x: hidden;
    }

    table {
        width: 100%;
        font-size: 12px;
        table-layout: fixed;
    }

    th, td {
        padding: 8px 2px;
        text-align: center;
        word-wrap: break-word;
        overflow: hidden;
    }

    th:nth-child(1), td:nth-child(1) { width: 30%; } /* Nom */
    th:nth-child(2), td:nth-child(2) { width: 30%; } /* Prénom */
    th:nth-child(3), td:nth-child(3) { width: 13%; } /* Matin */
    th:nth-child(4), td:nth-child(4) { width: 13%; } /* Midi */
    th:nth-child(5), td:nth-child(5) { width: 14%; } /* Soir */

    th {
        font-size: 11px;
        padding: 8px 1px;
    }

    .grid-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
        align-items: center;
    }

    button {
        width: 100%;
        margin: 0;
        padding: 12px 8px;
        font-size: 13px;
    }

    #date-selector {
        display: flex;
        justify-content: center;
    }

    #date-select {
        width: 100%;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-tag {
        font-size: 18px;
        padding: 10px;
    }

    table {
        font-size: 11px;
    }

    th, td {
        padding: 6px 1px;
    }
}

@media print {
    .scrollable-table {
        overflow: visible !important;
        display: block !important;
        height: auto !important;
        max-height: none !important;
    }
    #save-button {
        display: none;
    }

    /* Forcer l'affichage des cases cochées à l'impression */
    .checkbox {
        display: inline-block !important;
        width: 20px !important;
        height: 20px !important;
        -webkit-appearance: checkbox !important;
        appearance: checkbox !important;
    }

    .checkbox + label {
        display: none !important;
    }
}
