/* ============================ SAT – style calqué sur HANDICAP/DIAG  ============================ */

/* 1. Largeur globale identique à handicap */
.erpcf-page-taux {
    --wp--custom--ast-content-width-size: 1280px;
    --wp--custom--ast-container-width: 1280px;
    --wp--custom--ast-wide-width-size: calc(1280px + var(--wp--custom--ast-default-block-left-padding) + var(--wp--custom--ast-default-block-right-padding));
}

/* Conteneur Astra sur la page tauxisfaction */
.erpcf-page-taux .site-content > .ast-container {
    max-width: 1280px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* Conteneur interne tauxisfaction */
.erpcf-page-taux .erpcf-taux-wrapper {
    max-width: 1280px;
    margin: 40px auto;
}

/* Titre */
.erpcf-page-taux h1,
.erpcf-taux-title {
    margin-bottom: 32px;
}

/* 2. Bloc filtres tauxisfaction : boîte blanche identique handicap
   + même largeur que les tableaux */
.erpcf-taux-filtres-box {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;

    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #d0d4da;
    padding: 10px 16px; /* un peu moins haut que diag */
}

/* Tableau des filtres */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table {
    width: 100%;
    border: none;
    border-collapse: collapse;
    margin: 0;
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table th,
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td {
    border: none;
    padding: 8px 10px;
}

/* En-têtes filtres */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table thead th {
    font-weight: 600;
    color: #22304a;
}

/* Alignement labels / champs */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table thead th,
.erpcf-taux-filtres-box .erpcf-taux-filtres-table tbody td {
    text-align: left;
    vertical-align: top;
}

/* Marge entre label (ligne du dessus) et champ (ligne du dessous) */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table thead th {
    padding-bottom: 4px;
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table tbody td {
    padding-top: 4px;
}

/* Largeur des colonnes de filtres (comme diag) */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table th:nth-child(1),
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td:nth-child(1) {
    width: 10%;   /* Année */
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table th:nth-child(2),
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td:nth-child(2) {
    width: 15%;   /* Mois */
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table th:nth-child(3),
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td:nth-child(3) {
    width: 25%;   /* Catégorie formation */
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table th:nth-child(4),
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td:nth-child(4) {
    width: 25%;   /* Formation */
}

.erpcf-taux-filtres-box .erpcf-taux-filtres-table th:nth-child(5),
.erpcf-taux-filtres-box .erpcf-taux-filtres-table td:nth-child(5) {
    width: 25%;   /* Session */
}

/* Champs filtres (selects) */
.erpcf-taux-filtres-box select {
    width: 90%;
    max-width: none;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d0d4da;
    background: #f8fafc;
    font-size: 14px;
    margin: 0;
}

/* Champ Année (input) stylé comme les selects
   => correspond à <input type="number" name="sstaf_annee" id="sstaf_annee"> dans ton HTML */
.erpcf-taux-filtres-box input[type="number"]#sstaf_annee {
    width: 90%;
    max-width: none;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d0d4da;
    background: #f8fafc;
    font-size: 14px;
    margin: 0;
    box-shadow: none;
    -moz-appearance: textfield;
}

.erpcf-taux-filtres-box input[type="number"]#sstaf_annee::-webkit-outer-spin-button,
.erpcf-taux-filtres-box input[type="number"]#sstaf_annee::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Bouton Afficher aligné à droite */
.erpcf-taux-filtres-actions {
    text-align: right;
    margin-top: 5px;
}

.erpcf-taux-filtres-actions .button.button-primary {
    min-width: 120px;
}

/* 3. Tableaux de résultats tauxisfaction + bloc vide (même logique que diag) */

.erpcf-taux-table,
.erpcf-taux-table-empty {
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Tableaux (widefat) */
.erpcf-taux-table {
    table-layout: fixed;
}

/* Texte qui wrap proprement */
.erpcf-taux-table th,
.erpcf-taux-table td {
    word-wrap: break-word;
    white-space: normal;
}

/* Bloc message vide tauxisfaction : même largeur / position que les tableaux */
.erpcf-taux-table-empty {
    display: block;
    margin-top: 0;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;

    border: 1px solid #d0d4da;
    border-top: none;            /* collé au bloc filtres */
    border-radius: 0 0 10px 10px;/* coins arrondis en bas */

    padding: 16px 20px;
}

/* On s'assure qu'aucun parent ne coupe l'arrondi du bloc vide */
.erpcf-taux-table-empty,
.erpcf-taux-table-empty * {
    overflow: visible;
}

/* Forcer le tableau de filtres à la même largeur que les tableaux résultats */
.erpcf-taux-filtres-box .erpcf-taux-filtres-table {
    display: table;
    width: 100% !important;
    max-width: none !important;
    table-layout: fixed;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Plus de marge à droite dans la liste Formation (colonne 4) */
.erpcf-taux-filtres-box td:nth-child(4) select {
    padding-right: 40px !important;
}

/* En-tête des tableaux tauxisfaction : gris clair */
.erpcf-taux-table thead th {
    background-color: #f3f4f6; /* gris très clair */
    color: #22304a;
    font-weight: 600;
}

/* On neutralise le striped de widefat pour nos tableaux */
.erpcf-taux-table tbody tr {
    background-color: #ffffff;
}

/* Zébrage blanc / gris très clair */
.erpcf-taux-table tbody tr:nth-child(even) {
    background-color: #f9fafb; /* gris ultra léger */
}

/* Arrondi haut du tableau principal */
.erpcf-taux-table {
    border-radius: 10px 10px 0 0;
}
