body {
    font-family: Arial, sans-serif;
    margin: 20px;
    font-size: 14px;
}

h1 {
    text-align: left;
}

.top-fields {
    display: flex;
    flex-wrap: wrap;
    /* Permettre aux éléments de passer à la ligne si nécessaire */
    gap: 20px;
    /* Espace entre les éléments */
    margin-bottom: 20px;
    align-items: baseline;
}

.top-fields label {
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.top-fields input {
    margin-left: 10px;
    /* Espace entre le label et l'input */
    flex: 1;
    /* Permettre à l'input de prendre l'espace disponible */
}

/* Style pour les petits écrans */
@media (max-width: 600px) {
    .top-fields {
        flex-direction: column;
        /* Disposer les éléments en colonne */
        align-items: flex-start;
        /* Aligner les éléments à gauche */
    }

    .top-fields label {
        width: 100%;
        /* Prendre toute la largeur disponible */
    }

    .top-fields input {
        width: calc(100% - 10px);
        /* Ajuster la largeur de l'input pour tenir compte de la marge */
    }
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

td,
th {
    word-wrap: break-word;
    /* forcer le retour à la ligne dans une cellule */
    white-space: normal;
    /* permettre le retour à la ligne */
    overflow-wrap: break-word;
    padding: 8px;
}

th {
    background: #f0f0f0;
}

select,
input[type="text"],
input[type="date"] {
    width: 100%;
}

.PP {
    background: #e6ffe6;
}

.CD {
    background: #fff5e6;
}

.AD {
    background: #ffe6e6;
}

.counters {
    margin-bottom: 20px;
        display: flex;
    align-items: center;
    gap: 10px;
}

.counters span {
    margin-right: 15px;
    font-weight: bold;
}

button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-row {
    background: #4CAF50;
    color: white;
}

.show-consignes {
    background: #f44336;
    color: white;
}

.remove-row {
    background: #f44336;
    color: white;
}

.export {
    background: #2196F3;
    color: white;
}

.abreviations {
    color: #f44336;
    font-size: smaller;
}

.buttons {
    margin-bottom: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    background-color: #fefefe;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.picto {
    width: 50px;
}

input::placeholder {
    font-size: 0.7rem;
    /* Taille par défaut */
}

/* Conteneur principal utilisant Flexbox */
.container {
    display: flex;
    align-items: center;
    /* Aligner les éléments verticalement au centre */
    justify-content: space-between;
    /* Espacer les éléments uniformément */
    /* Ajouter un peu de padding autour du conteneur */
    margin-bottom: 50px;
    background-color: rgb(116, 204, 239);
}

/* Styles pour les images */
.logo {
    max-width: 100px;
    /* Ajuster la taille des images selon vos besoins */
    height: auto;
    /* Maintenir les proportions des images */
}

@media (max-width: 600px) {
    .regles {
        max-width: 250px;
        /* Ajuster la taille des images selon vos besoins */
        height: auto;
        /* Maintenir les proportions des images */
    }
}

@media (min-width: 1200px) {
    .regles {
        max-width: 500px;
        /* Ajuster la taille des images selon vos besoins */
        height: auto;
        /* Maintenir les proportions des images */
    }
}

/* Style pour le titre */
h1 {
    margin: 0;
    /* Supprimer la marge par défaut */
    font-size: 2rem;
    /* Ajuster la taille du texte selon vos besoins */
}

/* Pour les écrans de largeur inférieure à 600px */
@media (max-width: 600px) {
    input::placeholder {
        font-size: 0.3rem;
        /* Taille plus petite pour les petits écrans */
    }

    input,
    select {
        font-size: 0.3rem;
        /* Taille plus petite pour les petits écrans */
    }

}

/* Pour les écrans de largeur supérieure à 1200px */
@media (min-width: 1200px) {
    input::placeholder {
        font-size: 1.0rem;
        /* Taille plus grande pour les grands écrans */
    }
}

.regles {
    width: 100%;
}

.aligned-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.aligned-table th,
.aligned-table td {
    border: 1px solid #ccc;
    padding: 8px;
    vertical-align: top;
    width: 50%;
}

.input-bilan {
    width: 100%;
    resize: vertical;
    box-sizing: border-box;
    border: 1px solid #aaa;
    font-size: 14px;
}

input {
    min-height: 25px;
}

.large-row {
    min-height: 200px;
    align-items: center;
}

button {
    margin-left: auto;
}

input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    /* Assure que le padding et la bordure sont inclus dans la largeur */
}

.input-bilan {
    height: 50px;
}

select {
    min-height: 25px;
}


textarea {
    width: 400px;
    height: 250px;
}


.large-row {
    width: 200px;
}

.medium-row {
    width: 100px;
}

.small-row {
    width: 40px;
}

.no-print {
    display: table-cell;
}

#obs-table tr {
    transition: transform 0.18s ease;
}

.dragging {
    opacity: 0.5;
}


.activite {
    width: 300px;
}

/* Conteneur principal */
.attestation .contenu {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Image à gauche */
.attestation img {
    width: 120px;
    height: auto;
    flex-shrink: 0;
}

/* Bloc texte */
.attestation .texte {
    text-align: left;
}

/* Titre exemples */
.attestation .titre {
    font-weight: bold;
}

/* Liste */
.attestation ul {
    margin-top: 5px;
    padding-left: 20px;
}
.modal-fho {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content-fho {
    background: white;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    position: relative;
}
.btn-image {

    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-image:hover {
    transform: scale(1.1);
}

.close-fho {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

@media print {

    * {
        -webkit-print-color-adjust: exact;
        /* Chrome, Safari */
        print-color-adjust: exact;
        /* Standard */
    }
    body {
        transform: scale(0.85);   /* réduit toute la page */
        transform-origin: top left;
        width: 297mm;
    }

    /* Important : empêcher les marges automatiques */
    @page {
        size: A4 landscape;
        margin: 5mm; /* ajuste si besoin */
    }

    /* Cache les boutons et éléments non pertinents à l'impression */
    button,
    .no-print {
        display: none !important;
    }

    /* Supprime les marges inutiles */
    body {
        margin: 0;
        padding: 0;
    }

    .regles {
        max-width: 300px;
        /* Ajuster la taille des images selon vos besoins */
        height: auto;
        /* Maintenir les proportions des images */
    }

    table {
        width: 100%;
        table-layout: fixed;
    }

    textarea {
        max-width: 200px;
        font-size: 10pt;
    }

}