/* ============================================================================
   LAB — FEUILLE DE STYLES PRINCIPALE
   Fichier : assets/css/lab-style.css
   ============================================================================ */

/* Empêche les styles front-end d'affecter l'administration WP */
body.wp-admin * {
    all: revert !important;
}


/* ============================================================================
   BOUTONS PRINCIPAUX
   ============================================================================ */

.lab-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}
.lab-btn:hover {
    background: #e8e8e8;
}

.lab-btn-danger {
    color: #a00 !important;
}

.button-danger {
    background: #c62828 !important;
    color: white !important;
}

.lab-btn-submit {
    margin-top: 25px;
    padding: 10px 20px;
    background: #2c6eaf;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}


/* ============================================================================
   CHAMPS ET LABELS
   ============================================================================ */

.lab-money {
    width: 120px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.lab-label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

.lab-input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.lab-select-25 {
    width: 25%;
    min-width: 220px;
}

.lab-select-membre {
    padding: 6px 10px;
    width: 220px;
}


/* ============================================================================
   FORMULAIRES EN GRILLE
   ============================================================================ */

.lab-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.lab-form-grid label {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

.lab-form-grid input[type="text"],
.lab-form-grid input[type="email"],
.lab-form-grid input[type="number"] {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


/* ============================================================================
   MODULE MEMBRES — HEADER ET SÉLECTION
   ============================================================================ */

.lab-membres-header select {
    min-width: 220px;
    padding: 6px 10px;
    font-size: 14px;
}

.lab-delete-box {
    background: #fff3f3;
    border: 1px solid #e0b4b4;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
}


/* ============================================================================
   MODULE ADHÉSION
   ============================================================================ */

.lab-adhesion-clean {
    max-width: 900px;
    margin: 0;
    padding: 20px;
    text-align: left;
}

.lab-adhesion-clean .lab-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.lab-adhesion-clean label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.lab-adhesion-clean input[type="text"],
.lab-adhesion-clean input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.lab-regles-clean {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.lab-adhesion-note {
    margin-top: 15px;
    font-size: 14px;
    color: #444;
}


/* ============================================================================
   TABLEAU DES SUGGESTIONS
   ============================================================================ */
    
    .atl-sugg-table th:nth-child(1),
    .atl-sugg-table td:nth-child(1) {
        width: 140px;
        white-space: nowrap;
    }
    
    .atl-sugg-table th:nth-child(2),
    .atl-sugg-table td:nth-child(2) {
        width: 180px;
    }
    
    .atl-sugg-table th:nth-child(3),
    .atl-sugg-table td:nth-child(3) {
        width: auto;
    }

    /* Mise en page 2 colonnes */
    .lab-pres-wrapper {
        display: flex;
        gap: 40px;
        align-items: flex-start;
        width: 100%;
    }
    .lab-pres-left  { flex: 1; max-width: 700px; }
    .lab-pres-right { flex: 1; max-width: 520px; margin-left: auto; }
    
    /* Formulaire d'arrivée */
    .lab-line1, .lab-line2 {
        display: flex;
        gap: 20px;
        align-items: flex-end;
    }
    .lab-time-small      { width: 140px !important; margin-left: 3px; }
    .lab-select-activite { width: 260px !important; }
    .lab-desc-wide       { width: 320px !important; }
    
    /* Tableau des présences en cours */
    .lab-pres-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }
    .lab-pres-table th,
    .lab-pres-table td {
        padding: 8px;
        vertical-align: middle;
    }
    
    /* Colonne 1 : Membre — largeur automatique */
    .lab-pres-table th:nth-child(1),
    .lab-pres-table td:nth-child(1) {
        width: auto;
        white-space: nowrap;
    }
    /* Colonne 2 : Activité — largeur automatique */
    .lab-pres-table th:nth-child(2),
    .lab-pres-table td:nth-child(2) { width: auto; }
    
    /* Colonne 3 : Heure + bouton Modifier — largeur fixe */
    .lab-pres-table th:nth-child(3),
    .lab-pres-table td:nth-child(3) {
        width: 220px;
        white-space: nowrap;
    }
    .lab-pres-table td:nth-child(3) input[type="time"] {
        width: 90px;
        margin-right: 6px;
    }
    
    /* Colonne 4 : Départ — largeur fixe */
    .lab-pres-table th:nth-child(4),
    .lab-pres-table td:nth-child(4) {
        width: 90px;
        text-align: center;
    }
    
    /* Tableau des réservations QuickCal */
    .lab-reservations-table {
        width: 100%;
        border-collapse: collapse;
    }
    .lab-reservations-table th,
    .lab-reservations-table td {
        padding: 8px;
        border: 1px solid #ccc;
    }
    .lab-reservations-table th:nth-child(1),
    .lab-reservations-table td:nth-child(1) { width: 200px; }
    .lab-reservations-table th:nth-child(2),
    .lab-reservations-table td:nth-child(2) { width: 160px; }
    .lab-reservations-table th:nth-child(3),
    .lab-reservations-table td:nth-child(3) { width: 200px; }
    
    /* ============================================================================
   FICHE MEMBRE — IMPRESSION
   ============================================================================ */

    .titre-lab, .sous-titre-lab { text-align: left; }
    
    @media print {
        .no-print { display: none !important; }
        .titre-lab, .sous-titre-lab { text-align: center !important; }
    }
    
    .fiche-membre {
        max-width: 600px;
        font-family: Arial, sans-serif;
        margin-top: 20px;
    }
    .fiche-membre table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }
    .fiche-membre th {
        text-align: left;
        padding: 6px 4px;
        width: 35%;
        font-weight: bold;
    }
    .fiche-membre td { padding: 6px 4px; text-align: left; }
    .fiche-membre h3 { margin-top: 25px; margin-bottom: 10px; }
    

    /* On cache la zone de rapport par défaut à l'écran */
    #lab-rapport-print {
        display: none;
    }
    
    /* --- GESTION GLOBALE DES RAPPORTS --- */
    
    /* 1. Cache les éléments marqués "print-only" sur tous les écrans */
    /* .print-only { display: none; } */ 
    /* #lab-rapport-print { display: none; } */

    
    /* 2. Règles spécifiques au moment de l'impression */
        @media print {
            .print-only { display: block !important; }
        }    
        /* On cache l'interface WordPress pour tous les rapports */
        #adminmenuback, #adminmenuwrap, #wpfooter, .screen-reader-shortcut, .wp-header-end, .action {
            display: none !important;
        }
    
        /* On force le contenu à prendre toute la largeur de la page */
        #wpcontent, #wpbody-content {
            margin-left: 0 !important;
            padding: 0 !important;
        }

    
    .print-only { display: none; }

@media print {
    body * { visibility: hidden !important; }
    #lab-rapport-print, #lab-rapport-print * { visibility: visible !important; }
    #lab-rapport-print { position: absolute; top: 0; left: 0; width: 100%; }
    .print-only { display: block !important; text-align: center; }
    button { display: none !important; }
}

#lab-rapport-print {
    display: block !important;
    visibility: visible !important;
}
