/* Page « CoddyBlock » : même gabarit que la page Langage */

/* exemple : code et blocs côte à côte */
.ck-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-top: 1px solid var(--border);
}

.ck-exemple > .card-header + .ck-duo {
    border-top: 0;
}

.ck-duo-code,
.ck-duo-blocs {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ck-duo-blocs {
    border-left: 1px solid var(--border);
    background: var(--surface2);
}

.ck-etiq {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px 0;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.ck-etiq .mdi {
    font-size: 14px;
    color: var(--accent);
}

/* la vue blocs sans sa barre (le nombre de blocs n'apporte rien ici) */
.ck-rendu .cbv-bar {
    display: none;
}

.ck-rendu .cbv-ws {
    padding: 12px 16px 18px;
    max-height: none;
}

/* familles : pastille de couleur */
.ck-pastille {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 4px;
    vertical-align: -1px;
    background: var(--ck-c);
}

.ck-familles td:first-child {
    white-space: nowrap;
}

/* étiquettes du glisser-déposer (mêmes couleurs que dans l'éditeur) */
.ck-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    justify-self: start;
}

.ck-chip.is-ok { background: #1d9bf0; }
.ck-chip.is-meme { background: #66727f; }
.ck-chip.is-non { background: #e8590c; }
.ck-chip.is-corbeille { background: #f4212e; }
.ck-chip.is-annule { background: rgba(15, 20, 25, .72); }
:root[data-theme="dark"] .ck-chip.is-annule { background: #3d4a56; }

/* raccourcis */
.ck-touches td:first-child {
    white-space: nowrap;
    width: 1%;
}

.ck-touches .ck-groupe th {
    padding-top: 14px;
    background: var(--surface2);
    color: var(--accent);
}

.ck-touches kbd,
.section kbd {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    border: 1px solid var(--border2);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

/* lignes « libellé → description » : les descriptions de cette page sont longues */
.section .row {
    grid-template-columns: auto minmax(0, 1fr);
}

.section .row .desc {
    white-space: normal;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .section .row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .section .row .desc {
        text-align: left;
    }

    /* familles : une carte par ligne */
    .ck-familles thead {
        display: none;
    }

    .ck-familles tr,
    .ck-familles td {
        display: block;
    }

    .ck-familles tr {
        padding: 10px 14px;
        border-bottom: 1px solid var(--border);
    }

    .ck-familles td {
        padding: 2px 0;
        border: 0;
    }

    .ck-duo {
        grid-template-columns: 1fr;
    }

    .ck-duo-blocs {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .ref-table {
        font-size: 11px;
    }
}
