/* ==========================================================================
   custom.css - Styles personnalisés pour hse.laventin85.fr
   ========================================================================== */

/* --- 1. Déclaration de la police locale (Poppins) --- 
   Note : Assurez-vous d'avoir uploadé les fichiers .woff2 dans un dossier /fonts/
*/
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Améliore le rendu pendant le chargement */
}

@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- 2. Styles Généraux (Base) --- */
body {
    font-family: "Poppins", sans-serif; /* Application de la police */
    background-color: #ffffff;
    color: #444;
    line-height: 1.6;
}

/* --- 3. NavBar Professionnelle --- */
.navbar {
    background-color: #2c3e50 !important; /* Bleu nuit professionnel */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: bold;
    letter-spacing: 1px;
    color: #ffffff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
}

/* --- 4. Contenu Épuré --- */
.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}


/* --- Style spécifique pour l'impression (PDF) --- */
@media print {
    /* 1. On cache les éléments inutiles pour un document officiel */
    .navbar,
    .btn,
    #searchInput,
    .card-header,
    footer,
    .navbar-toggler {
        display: none !important;
    }

    /* 2. On réinitialise les marges du conteneur pour occuper toute la page */
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. On force le tableau à s'étendre et on ajuste la police */
    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .table-responsive {
        overflow: visible !important; /* Indispensable pour ne pas couper le tableau */
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9pt !important; /* Police plus petite pour faire tenir les colonnes */
    }

    th {
        background-color: #eee !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }

    td {
        border: 1px solid #ddd !important;
    }

    /* 4. On ajoute un titre qui n'apparaît qu'à l'impression (optionnel) */
    body::before {
        content: "Registre du Personnel HSE - Date : " attr(data-date);
        display: block;
        text-align: center;
        font-weight: bold;
        font-size: 14pt;
        margin-bottom: 20px;
    }
}
@media print {
    @page {
        size: landscape; /* Force le format Paysage pour le PDF */
        margin: 1cm;
    }
}