/* --- Conteneur Principal --- */
.charte-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* --- Titres --- */
.charte-header h1 {
    color: #004c34; /* Vert Isabella */
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 800;
}

.charte-header h2 {
    color: #666;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.separator {
    width: 80px;
    height: 4px;
    background-color: #f7b300; /* Or/Jaune */
    margin: 20px auto 50px auto;
}

.charte-section h3 {
    color: #004c34;
    font-size: 1.6em;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.charte-section h4 {
    color: #333;
    font-size: 1.3em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* --- Listes --- */
.charte-container ul {
    list-style: none;
    padding-left: 0;
}

.charte-container ul li {
    padding-left: 20px;
    margin-bottom: 10px;
    position: relative;
}

.charte-container ul li::before {
    content: "•";
    color: #f7b300;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.sub-list {
    margin-top: 10px;
    margin-left: 20px;
    font-size: 0.95em;
    color: #555;
}

/* --- Alertes et Box --- */
.warning-box {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
}

/* --- Tableaux (Reconstitués des images) --- */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 25px;
}

.charte-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: #fff;
    border: 1px solid #ddd;
}

.charte-table thead tr {
    background-color: #004c34;
    color: #fff;
    text-align: center;
}

.charte-table th, .charte-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
}

.charte-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.charte-table tbody tr:hover {
    background-color: #f1f1f1;
}

.separator-row td {
    border-top: 2px solid #004c34;
}

.table-note {
    font-size: 0.85em;
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* --- Grille Objectifs (Hommes/Dames) --- */
.objectives-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.objective-col {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.objective-col h5 {
    background-color: #004c34;
    color: #fff;
    padding: 10px;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    font-size: 1.2em;
}

/* --- Zone de Signature --- */
.charte-signature-zone {
    margin-top: 60px;
    padding: 30px;
    background-color: #f4fcf9;
    border: 2px dashed #004c34;
    border-radius: 10px;
    text-align: center;
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .charte-container {
        padding: 20px;
        margin: 10px;
    }
    .objectives-grid {
        grid-template-columns: 1fr;
    }
    .charte-table th, .charte-table td {
        padding: 8px;
        font-size: 0.85em;
    }
}

/* --- Ajouts pour le formulaire public --- */
.public-form .form-row {
    display: flex;
    gap: 20px;
}
.public-form .form-row .form-group {
    flex: 1; /* Les champs prennent 50% chacun */
}
.public-form input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.public-form small {
    display: block;
    color: #666;
    margin-top: 5px;
    font-size: 0.85em;
}
/* Responsive pour mobile : champs l'un sous l'autre */
@media (max-width: 600px) {
    .public-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- Correction Alignement Formulaire Charte --- */
.isa-form {
    max-width: 100%;
    margin-top: 20px;
}

/* Force les deux champs sur la même ligne avec alignement vertical */
.isa-row {
    display: flex;
    flex-wrap: wrap; /* Permet le passage à la ligne sur petit écran */
    gap: 20px;       /* Espace entre les colonnes */
    margin-bottom: 20px;
    align-items: flex-end; /* Aligne le bas des champs si les labels ont des tailles différentes */
}

/* Chaque colonne prend 50% de la place */
.isa-col {
    flex: 1;
    min-width: 250px; /* Si l'écran est trop petit, ça passe l'un sous l'autre */
}

/* Style des Labels pour qu'ils soient propres */
.isa-form label {
    display: block; /* Force le label au-dessus du champ */
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.2;
}

/* Style des Inputs pour qu'ils aient la même hauteur */
.isa-form input[type="text"],
.isa-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* IMPORTANT : Empêche le padding de casser la largeur */
    height: 45px; /* Force une hauteur identique */
    margin: 0;
}

.isa-full-width {
    margin-bottom: 20px;
}

.isa-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

/* Bouton */
.isa-btn {
    width: 100%;
    padding: 15px;
    background-color: #004c34; /* Vert Isabella */
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
}
.isa-btn:hover {
    background-color: #003322;
}

/* Alignement Case à cocher */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.checkbox-label input {
    width: 20px;
    height: 20px;
}

/* --- Interface Manager --- */
.isa-manager {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.manager-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 5px;
}
.manager-search input {
    flex: 1;
    padding: 10px;
}

.manager-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.manager-table th {
    background: #333;
    color: white;
    padding: 10px;
    text-align: left;
}

.manager-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Inputs dans le tableau */
.edit-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.save-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
}
.save-btn:hover { background: #005a87; }

.reset-btn {
    padding: 10px;
    text-decoration: none;
    color: #666;
    align-self: center;
}

/* --- KPI Dashboard (Version Compacte) --- */
.kpi-container {
    display: flex;
    gap: 10px; /* Espace réduit */
    margin-bottom: 20px;
}

.kpi-box {
    flex: 1;
    padding: 10px; /* Moins de marge interne */
    border-radius: 5px;
    text-align: center;
    color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.kpi-total { background-color: #004c34; }
.kpi-signed { background-color: #28a745; }
.kpi-pending { background-color: #ffc107; color: #333; }

.kpi-number {
    display: block;
    font-size: 1.8em; /* Réduit de 2.5em à 1.8em */
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
}

.kpi-label {
    font-size: 0.75em; /* Réduit */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Barre d'outils --- */
.manager-tools {
    display: flex;
    gap: 10px;
    background: #f1f1f1;
    padding: 10px; /* Plus fin */
    border-radius: 4px;
    margin-bottom: 15px;
    align-items: center;
    font-size: 0.9em; /* Police des outils réduite */
}

.manager-tools input, .manager-tools select {
    padding: 6px; /* Champs de recherche plus fins */
    font-size: 0.9em;
}

.isa-btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* --- Tableau Compact --- */
.manager-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em; /* Police globale du tableau réduite (0.8em) */
}

.manager-table th {
    background: #333;
    color: white;
    padding: 8px; /* En-têtes moins hauts */
    text-align: left;
    font-size: 0.9em;
}

.manager-table td {
    padding: 4px 6px; /* Cellules plus serrées */
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

/* Inputs dans le tableau (Édition) */
.edit-input, .edit-input-small, .edit-input-bold {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 3px 5px; /* Saisie plus compacte */
    font-size: 1em; /* Hérite de la taille du tableau (donc petit) */
    width: 100%;
    box-sizing: border-box;
}

.edit-input-bold { font-weight: bold; color: #004c34; }
.status-select { 
    padding: 2px; 
    font-size: 1em; 
    border-radius: 3px;
    width: 100%;
}

.date-cell {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap; /* Empêche la date de se couper en 2 lignes */
}

.save-icon {
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    padding: 0;
}

/* --- Messages d'Alerte (Top Page) --- */
.isa-msg-success, .isa-msg-error, .isa-msg-warning {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
}

.isa-msg-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 10px solid #28a745;
}

.isa-msg-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 10px solid #dc3545;
}

.isa-msg-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-left: 10px solid #ffc107;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}