/******************
    User custom CSS
    ---------------

    In this file you can add your own custom CSS
    It will be loaded last, so you can override any other property.
    Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/
/* --- AMÉLIORATION DE L'ERGONOMIE PDF --- */
@media print {
   /* 1. NETTOYAGE DES ÉLÉMENTS INUTILES */
    .noprint, .btn, .text-muted, .question-help, .v-id, .type-help, 
    .instruction, .help-block, .question-help-container, br,
    .navbar, #survey-nav {
        display: none !important;
    }

    /* 2. LOGO IRD */
    .logo-print {
        display: block !important;
        margin: 0 auto 15px auto !important;
        max-height: 80px !important;
    }

    /* 3. STRUCTURE DU TABLEAU (Questions à gauche, Réponses à droite) */
    .question-block {
        display: flex !important;
        flex-direction: row !important;
        border: 2px solid #D6D6D6 !important;
        margin-bottom: -2px !important;
        page-break-inside: avoid !important;
        align-items: stretch !important;
        
        /* --- RÈGLE ANTI-COUPURE --- */
        break-inside: avoid !important;
        page-break-inside: avoid !important; /* Pour la compatibilité anciens navigateurs */
        
        align-items: stretch !important;
    }

    .question-text {
        flex: 0 0 35% !important;
        background-color: #eeeeee !important;
        padding: 8px 12px !important;
        border-right: 1px solid #D6D6D6 !important;
        font-size: 9pt !important;
        font-weight: bold !important;
        color: #000 !important;
    }

    /* Conteneur de réponse (col-lg-8 dans votre code) */
    .col-lg-8, .answer-text-container {
        flex: 1 !important;
        padding: 8px 12px !important;
        background-color: #ffffff !important;
        max-width: none !important; /* Annule la limite Bootstrap */
    }

    /* 4. ALIGNEMENT DES DATES ET DES COCHES (La partie critique) */
    
    /* On neutralise le système de lignes/colonnes de LimeSurvey pour les réponses */
    .question-block .row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 2px 0 !important;
        width: 100% !important;
    }

    /* L'icône (col-lg-4 dans votre code) */
    .col-lg-4.text-end {
        flex: 0 0 30px !important; /* Largeur fixe pour la coche */
        text-align: left !important;
        padding: 0 !important;
        width: 30px !important;
    }

    /* Le texte de la date (col-lg-8 dans votre code) */
    .col-lg-8.text-start {
        flex: 1 !important;
        padding-left: 5px !important;
        width: auto !important;
    }

    /* Style de l'icône FontAwesome */
    .fa-check-square-o, .fa-check {
        font-size: 12pt !important;
        color: #004b87 !important;
        display: inline-block !important;
    }

    /* 5. SUPPRESSION DES CODES TECHNIQUES (43041...) */
    /* On ne peut pas supprimer le texte dans <b>, mais on peut réduire sa visibilité 
       si LimeSurvey les place dans des balises identifiables. 
       D'après votre source, ils sont fusionnés dans le texte. 
       Tentative de masquage si LimeSurvey utilise des spans cachés : */
    small, .v-id, .text-mutedSmall {
        display: none !important;
    }
}    

/* --- BOUTON "IMPRIMER VOS RÉPONSES" (écran de fin) --- */
a[href*="printanswers"] {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1.15rem;
    font-weight: bold;
    line-height: 1.5;
    color: #14AE5C;
    background-color: #ffffff;
    border: 1px solid #14AE5C;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

a[href*="printanswers"]:hover,
a[href*="printanswers"]:focus {
    background-color: #14AE5C;
    color: #ffffff;
    text-decoration: none;
}