.L2 {
    font-style: italic;
}

/*
.inconnu {
    color: black;
}
.L1 {
    color: black;
}
.francais {
    color: black;
}
.english {
    color: black;
}
*/
.traduction {
    font-style: italic;
}


.translation {
    font-style: italic;
}

.date {
    border-top: 1px solid black;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    font-weight: bold;
}

/* Lignes de contexte (date / titre d’œuvre) : bordures verticales externes uniquement */
tr.context-row td,
tr.context-row th {
    border-left: 0;
    border-right: 0;
}
tr td.date:first-child,
tr.context-row td:first-child,
tr.context-row th:first-child {
    border-left: 1px solid black;
}
tr td.date:last-child,
tr.context-row td:last-child,
tr.context-row th:last-child {
    border-right: 1px solid black;
}

.comments {
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 0px solid black;
    padding: 5px;
}

.firstLine {
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 0px solid black;
}

.otherLine {
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    text-align: justify;
}

.otherLine_nb {
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    text-align: justify;
}

/* Ligne de fermeture des tableaux de résultats */
tr.table-closer td {
    border-top: 1px solid black;
    height: 4px;
    padding: 0 !important;
    line-height: 1;
}

table,
th,
td {
    border-collapse: collapse;
}

th,
td {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    cursor: pointer;
}

.tableau-bouton-flottant button {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
}


.tableau-bouton-flottant button:hover {
    background-color: #3e8e41;
}

#color-palette {
    position: fixed;
    top: 50px;
    left: 50px;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: move;
    border-radius: 5px;
    user-select: none;
    font-family: Arial, sans-serif;
}

#color-palette .color-section {
    margin-bottom: 6px;
}

#color-palette .color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 0;
    overflow: hidden;
    max-height: 32px;
    transition: max-height 0.35s ease;
}

#color-palette:hover .color-options {
    max-height: 400px;
}

#color-palette .color-option {
    width: 32px;
    height: 32px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#color-palette .color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

#color-palette .color-option.selected {
    border-color: #000;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

#color-palette .color-radio {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

#color-palette label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

#color-palette .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}

#color-palette .close-btn:hover {
    color: #333;
}

#color-palette .palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

#color-palette .palette-title {
    font-weight: bold;
    color: #444;
}

.sort {
    font-size: 0.8em;
    margin-left: 6px;
    color: #999;
}

th.active-asc .sort::after {
    content: " ↑";
    color: #000;
}

th.active-desc .sort::after {
    content: " ↓";
    color: #000;
}

.filters input,
.filters select {
    font-size: 0.8em;
    padding: 2px 4px;
}

/* ========================================
   STYLES COMMUNS POUR LES PAGES DE GESTION
   ======================================== */

/* Structure du tableau avec défilement */
.table-wrapper {
    height: calc(100vh - 350px);
    overflow-y: auto;
    overflow-x: hidden;
}

.table-wrapper-compact {
    height: calc(100vh - 450px);
}

.table-header,
.table-body {
    width: 100%;
    display: table;
}

.table-body {
    table-layout: fixed;
}

/* Styles de tri */
th[data-field] {
    cursor: pointer;
    user-select: none;
}

.sort {
    font-size: 0.8em;
    margin-left: 6px;
    color: #999;
}

th.active-asc .sort::after {
    content: " ↑";
    color: #000;
}

th.active-desc .sort::after {
    content: " ↓";
    color: #000;
}

/* Filtres */
.filters input,
.filters select {
    font-size: 0.8em;
    padding: 2px 4px;
}

.column-filter {
    width: 100%;
}

/* Boutons standardisés */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0 2px;
}

/* Badges */
.badge {
    font-size: 0.9rem;
    padding: 0.35rem 0.5rem;
}

/* Utilitaires */
.text-uppercase {
    text-transform: uppercase;
}

/* Responsive pour mobile (optionnel) */
@media (max-width: 768px) {
    .table-wrapper {
        height: calc(100vh - 250px);
    }

    .table-wrapper-compact {
        height: calc(100vh - 350px);
    }

    th,
    td {
        padding: 5px 10px;
    }
}

/* Empêcher la copie de la section */
.no-copy {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Style pour les expressions cliquables */
.regex-example {
    cursor: pointer;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: all 0.2s;
    display: inline-block;
    margin: 2px 0;
    font-family: 'Courier New', monospace;
}

.regex-example:hover {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.regex-example:active {
    transform: scale(0.95);
}

/* Animation de succès */
.regex-success {
    animation: regexFlash 0.3s ease;
}

@keyframes regexFlash {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #28a745;
        color: white;
    }

    100% {
        background-color: #fff;
    }
}

.regex-pair {
    border-left: 3px solid #007bff;
    padding-left: 10px;
    margin-bottom: 8px;
}

.regex-regex {
    color: #28a745;
    font-weight: bold;
}

.regex-replace {
    color: black;
    font-weight: bold;
}

.arrow-icon {
    color: #6c757d;
    margin: 0 8px;
}

/* ── Concordancier : tableau 3 colonnes (gauche | clé | droite) ─────── */
.container-fluid.resultats {
    padding-left: 4px !important;
    padding-right: 4px !important;
}
/* table-layout:auto + width:100% garantit que la table pend toute
   la largeur, sans dépasser l'écran car le conteneur est overflow:hidden */
.conc-table {
    table-layout: auto;
    width: 100%;
    border-collapse: collapse;
}
.conc-table th,
.conc-table td {
    padding: 0 !important;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 2;       /* = 2 × 14px = 28px */
    white-space: nowrap;
    overflow: hidden;
}
/* Colonne contexte gauche : overflow masqué à gauche grâce à direction:rtl */
.conc-left-hd, .conc-left {
    width: 49%;
    text-align: right;
    direction: rtl;
}
/* Colonne mot-clé : width:1% = réduit au contenu réel (shrink-to-fit)   */
.conc-key-hd, .conc-key-cell {
    width: 1%;
    text-align: center;
}
.conc-key-word {
    color: red;
    font-weight: bold;
    direction: ltr;
    unicode-bidi: embed;
}
/* Colonne contexte droit */
.conc-right-hd, .conc-right {
    width: 49%;
    text-align: left;
}
.conc-row {
    cursor: pointer;
}
/* Ligne séparatrice de groupe corpus */
.conc-group-header td {
    font-family: sans-serif !important;
    font-size: 13px !important;
    font-weight: bold;
    line-height: 2 !important;
    padding: 0 !important;
    text-align: center !important;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: visible;
}
/* Bandeau sticky affichant le corpus courant lors du défilement */
#conc-sticky-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 3px 8px;
    font-family: sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #ccc;
    pointer-events: none;
    transition: background 0.2s;
}