/**
 * Tableaux — Styles des tableaux de données
 *
 * Structure, en-têtes, colonnes et mise en forme responsive
 * des tableaux utilisés dans l'interface d'administration.
 *
 * @file        cc-tables.css
 * @package     CaisseConnect
 * @subpackage  CSS\Components
 * @since       0.9
 * @version     1.5.0
 * @author      Microlibre <contact@microlibre.net>
 * @copyright   2026 Microlibre
 * @license     GPL-2.0+ https://www.gnu.org/licenses/gpl-2.0.html
 * @link        https://microlibre.net/caisse-connect
 */

/* ========================================
   STRUCTURE DE TABLEAUX
   ======================================== */

/* Tableau avec largeur auto */
.cc-table-auto {
    width: auto;
}

/* ========================================
   EN-TETES DE COLONNES (TH)
   ======================================== */

.form-table thead th {
    background-color: var(--cc-gray-300, #f0f0f0);
}

/* Colonne checkbox (etroite, centree) */
.cc-th-checkbox {
    width: 30px;
    text-align: center;
}

/* Cellule sous colonne checkbox */
.cc-th-checkbox + td,
.cc-td-checkbox {
    text-align: center;
}

/* Colonne action (boutons) */
.cc-th-action {
    width: 100px;
}

/* Colonne etroite (icones, numeros) */
.cc-th-narrow {
    width: 40px;
    padding: 5px;
    text-align: center;
}

/* Colonne medium */
.cc-th-medium {
    width: 150px;
}

/* Colonne wide */
.cc-th-wide {
    width: 200px;
}

/* Colonne wider */
.cc-th-wider {
    width: 250px;
}

/* Colonne quart (25%) */
.cc-th-quarter {
    width: 25%;
}

/* Colonne auto (prend l'espace restant) */
.cc-th-auto {
    width: auto;
}

/* ========================================
   CELLULES (TD)
   ======================================== */

/* Cellule centree avec padding */
.cc-td-centered {
    padding: 5px;
    text-align: center;
}

/* Cellule sans retour a la ligne */
.cc-td-nowrap {
    white-space: nowrap;
}

/* ========================================
   CODE DANS TABLEAUX
   ======================================== */

/* Code discret (gris, petit) */
.cc-code-display {
    color: var(--cc-gray-600, #999);
    font-size: 11px;
    margin-left: 5px;
}

/* Code monospace */
.cc-code-mono {
    color: var(--cc-gray-700, #666);
    font-family: var(--cc-font-mono, monospace);
    font-size: 12px;
}

/* ========================================
   TABLEAUX SPECIFIQUES
   ======================================== */

/* Tableau TVA */
.cc-table-tva {
    width: auto;
}

.cc-table-tva .cc-th-classe {
    width: 200px;
}

.cc-table-tva .cc-th-taux {
    width: 150px;
}

/* Tableau categories expedition */
.cc-table-expedition {
    margin-top: 10px;
}

.cc-table-expedition thead th {
    font-weight: 600;
    vertical-align: middle;
}

.cc-table-expedition .cc-th-auto {
    white-space: nowrap;
}

.cc-table-expedition .cc-th-auto .button-small {
    vertical-align: middle;
    margin-left: 4px;
}

.cc-table-expedition .cc-icone-information {
    margin-left: 2px;
}

/* Tableau de statistiques dans une carte : largeur de la colonne des libellés.
   Remplace un style="width:40%" inline — la convention du dépôt est « pas de CSS
   inline, classes préfixées cc- ». Volontairement GÉNÉRIQUE (tableau de carte),
   jamais préfixée à un module : elle vit dans les composants. */
.cc-table-carte-libelles {
    width: 40%;
}
