/* --- STYLES (Mission 44 - CORRIGÉ) : FICHIER DE STRUCTURE --- */
/* Responsabilité unique : Layout (flex, grid), marges, padding. */
/* L'esthétique (couleurs, polices, ombres) est gérée par theme.css */

body {
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px 40px;
}

h2 { 
    /* (Esthétique gérée par theme.css) */
    padding-bottom: 10px; 
    margin-top: 40px; 
}

/* --- Classe utilitaire --- */
.hidden {
    display: none !important;
}

/* --- Formulaire de Login --- */
#login-form { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    max-width: 400px; 
    margin-top: 30px; 
}
#login-error { 
    /* (Esthétique gérée par theme.css) */
    font-weight: 500; 
}

/* --- Styles pour l'En-tête du Formulaire --- */
#form-header { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 2px solid #f0f0f0; /* (Sera redéfini par theme.css) */
}
.header-item { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    position: relative; 
}
.header-item label { 
    font-size: 0.9em; 
    font-weight: 500; 
}

/* --- Styles pour l'Auto-complétion --- */
#address-suggestions { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    z-index: 1000; 
    max-height: 200px; 
    overflow-y: auto; 
    /* (Esthétique gérée par theme.css) */
}
#address-suggestions div { 
    padding: 10px; 
    cursor: pointer; 
}

/* --- Styles du Formulaire Checklist --- */
.form-item { 
    display: grid; 
    grid-template-columns: 3fr 2fr 3fr; 
    gap: 20px; 
    align-items: center; 
    padding: 15px 0; 
    border-bottom: 1px solid #eee; 
}
.form-item-label { 
    font-weight: 500; 
}
.radio-group { 
    display: flex; 
    gap: 10px; 
    justify-content: space-around; 
}

/* --- Style Zone Commentaire --- */
.comment-box { 
    width: 100%; 
    resize: none; 
    overflow-y: hidden; 
    min-height: 38px; 
    box-sizing: border-box; 
}

/* --- Styles pour les Smileys (Composant Spécifique) --- */
.smiley-label { 
    cursor: pointer; 
    display: inline-block; 
}
.smiley-label input[type="radio"] { 
    display: none; 
}
.smiley-label .smiley { 
    font-size: 1.5rem; 
    padding: 5px; 
    border-radius: 50%; 
    border: 3px solid transparent; 
    transition: all 0.2s ease; 
}
/* (Les couleurs des smileys restent ici car elles sont sémantiques) */
.smiley-ts { color: #28a745; }
.smiley-s  { color: #ffc107; }
.smiley-ms { color: #fd7e14; }
.smiley-ps { color: #dc3545; }
.smiley-na { color: #6c757d; }
.smiley-label input[type="radio"]:checked + .smiley { 
    background-color: #f0f0f0; 
    /* (Couleur de bordure gérée par theme.css) */
}

/* --- (Mission 44) Wrapper pour TOUS les tableaux --- */
.admin-table-wrapper,
.dashboard-table-wrapper { 
    width: 100%; 
    overflow-x: auto; 
    margin-top: 20px; 
}

.admin-table,
.dashboard-table { 
    width: 100%; 
    border-collapse: collapse; 
}
.admin-table th, .admin-table td,
.dashboard-table th, .dashboard-table td { 
    padding: 12px; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
    white-space: nowrap; 
}
.admin-input { 
    width: 200px; 
}

/* --- Onglets Dashboard --- */
.tab-bar { 
    display: flex; 
}

/* --- Section Photo (par ZONE) --- */
.zone-photo-section { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    align-items: flex-start; 
    margin-top: 15px; 
    padding: 15px; 
    border: 1px dashed #ccc; 
    border-radius: 4px; 
    background-color: #fdfdfd; 
}
.photo-upload-input { 
    display: none; 
}
.photo-thumbnail-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-top: 5px; 
}

/* --- Styles Miniatures --- */
.photo-thumbnail { 
    position: relative; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    background-color: #f0f0f0; 
    padding: 4px; 
    font-size: 0.8em; 
    color: #333; 
}
.photo-thumbnail img { 
    display: block; 
    width: 100px; 
    height: 100px; 
    object-fit: cover; 
    border-radius: 2px; 
}
/* (CORRIGÉ Mission 44) : Structure du bouton Delete uniquement */
.btn-delete-photo { 
    position: absolute; 
    top: -5px; 
    right: -5px; 
    width: 22px; 
    height: 22px; 
    border: 2px solid white; /* (Sera redéfini par theme.css) */
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: bold; 
    padding: 0; 
    line-height: 18px; 
    /* (Esthétique gérée par theme.css) */
}

/* --- (Mission 38) : Styles pour l'Annexe Photo (Caché à l'écran) --- */
#print-photo-appendix {
    display: none; 
}

/* --- (Modifié Mission 38) : Styles d'impression --- */
@media print {
    body > .container > *:not(#checklist-section) {
        display: none !important;
    }

    #action-buttons,
    #loading-message,
    .zone-photo-section,
    .form-item-label small 
    {
        display: none !important;
    }

    body, .container {
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
        max-width: 100%;
        background-color: #ffffff;
    }
    
    #checklist-section {
        display: block !important;
    }

    .header-item input, .header-item select, .comment-box {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #ccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .form-item {
        grid-template-columns: 3fr 2fr 3fr;
        page-break-inside: avoid;
    }
    
    h2 {
        display: block;
        border-bottom: 2px solid #ccc;
        page-break-after: avoid;
    }

    #print-photo-appendix {
        display: block !important; 
        margin-top: 40px;
        page-break-before: always; 
    }
    
    #print-photo-appendix h2 {
        font-size: 1.5em;
        color: #000;
        border-bottom: 2px solid #888;
        page-break-before: always; 
        page-break-after: avoid;
    }

    #print-photo-appendix .photo-print-item {
        display: block;
        width: 90%;
        margin: 20px auto;
        page-break-inside: avoid; 
        text-align: center;
    }

    #print-photo-appendix .photo-print-item img {
        max-width: 100%;
        height: auto;
        border: 1px solid #ccc;
    }
    
    #print-photo-appendix .photo-print-item p {
        font-style: italic;
        color: #555;
        font-size: 0.9em;
    }
}
