/* Page « CoddyDraw » : même gabarit que les pages Langage et CoddyBlock */

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

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

.cd-duo-dessin {
    border-left: 1px solid var(--border);
    background: var(--surface2);
    padding-bottom: 16px;
}

.cd-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);
}

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

.cd-toile {
    display: block;
    width: calc(100% - 32px);
    max-width: 420px;
    height: auto;
    margin: 12px 16px 0;
    border-radius: 6px;
    box-shadow: 0 0 0 1px var(--border2);
}

.cd-reperes {
    fill: #7ee0ff;
}

/* 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;
}

.cd-outils td:first-child,
.cd-touches td:first-child {
    white-space: nowrap;
    width: 1%;
}

.cd-outils td:nth-child(2) {
    white-space: nowrap;
}

.cd-aucun {
    color: var(--text-dimmer);
}

.ref-table .cd-groupe th {
    padding-top: 14px;
    background: var(--surface2);
    color: var(--accent);
}

.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;
}

@media (max-width: 760px) {
    .cd-duo {
        grid-template-columns: 1fr;
    }

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

    .section .row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

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

    .section .row code {
        white-space: normal;
        overflow-wrap: break-word;
    }

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

    /* outils : une carte par ligne */
    .cd-outils thead {
        display: none;
    }

    .cd-outils tr,
    .cd-outils td {
        display: block;
        width: auto;
    }

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

    .cd-outils td {
        padding: 2px 0;
        border: 0;
    }

    .cd-outils td:first-child,
    .cd-outils td:nth-child(2) {
        display: inline-block;
        width: auto;
        margin-right: 8px;
    }

    .cd-outils td:has(.cd-aucun) {
        display: none;
    }
}
