/* ==========================================================================
   OsmoTools — Outil couleur compact (shortcode [osmova_couleur_hex])
   ========================================================================== */

.och {
    --och-noir: #0A0A0A;
    --och-gris: #6B7280;
    --och-gris-bg: #F3F4F6;
    --och-border: #E5E7EB;
    --och-blue: #0064FF;
    --och-green: #028a5e;
    --och-mono: 'JetBrains Mono', monospace;
    margin: 0 0 40px;
    padding: 28px;
    border: 1px solid var(--och-border);
    border-radius: 16px;
    background: #fff;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--och-noir);
}

.och__badge {
    display: inline-block;
    margin: 0 0 12px;
    padding: 4px 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--och-blue) 10%, white);
    color: var(--och-blue);
    font: 700 11px/1.4 var(--och-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.och .och__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    line-height: 1.25;
}

.och__intro {
    margin: 0 0 20px;
    color: var(--och-gris);
}

.och__grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.och__swatch {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 180px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, .08);
    cursor: pointer;
    transition: background .15s;
}

.och__swatch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.och__swatch-hint {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.och__swatch.is-light .och__swatch-hint {
    color: var(--och-noir);
}

.och__input {
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--och-border);
    border-radius: 10px;
    font: 600 16px/1.3 var(--och-mono);
}

.och__input:focus {
    outline: 2px solid var(--och-blue);
    outline-offset: 1px;
}

.och__error {
    min-height: 1.2em;
    margin: 6px 0 0;
    font-size: 13px;
    color: #B91C1C;
}

.och__row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--och-border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.och__label {
    font: 700 12px var(--och-mono);
    color: var(--och-gris);
}

.och .och__value {
    padding: 0;
    background: none;
    font: 600 15px var(--och-mono);
    color: var(--och-noir);
    overflow-wrap: anywhere;
}

.och__copy {
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--och-noir);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.och__copy:hover {
    background: var(--och-blue);
}

.och__copy.is-done {
    background: var(--och-green);
}

.och__contrast {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--och-gris);
}

.och__shades-title {
    margin: 22px 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.och__shades {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 6px;
}

.och__shade {
    height: 64px;
    padding: 4px;
    border: 0;
    border-radius: 8px;
    font: 600 10px var(--och-mono);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.och__shade.is-base {
    outline: 2px solid var(--och-noir);
    outline-offset: 2px;
}

.och__more {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--och-gris);
}

/* Codes HEX cliquables dans les tableaux de l'article */
.entry-content code.och-code {
    cursor: pointer;
    white-space: nowrap;
}

.entry-content code.och-code--dot::before {
    content: '';
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-right: .35em;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, .15);
    background: var(--och-dot);
    vertical-align: -1px;
}

.entry-content code.och-code:hover {
    outline: 1px solid #0064FF;
}

/* Gabarit article-outil (en tête d'article, à la place de l'image à la une) */
.och--hero {
    margin: 0;
    padding: 36px 40px;
    border-color: color-mix(in srgb, var(--och-blue) 18%, white);
    background: linear-gradient(180deg, color-mix(in srgb, var(--och-blue) 5%, white) 0, #fff 220px);
    box-shadow: 0 10px 30px rgba(10, 10, 10, .06);
}

.och--hero .och__title {
    font-size: 1.75rem;
}

@media (max-width: 760px) {
    .och,
    .och--hero {
        padding: 22px 16px;
    }

    .och__grid {
        grid-template-columns: 1fr;
    }

    .och__swatch {
        height: 120px;
    }

    .och__shades {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
