/* ==========================================================================
   OsmoTools : créateur de bannière aux bonnes dimensions (shortcode [osmova_banniere])
   ========================================================================== */

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

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

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

.obn__intro {
    margin: 0 0 18px;
    color: var(--obn-gris);
}

.obn__controls,
.obn__row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-end;
    margin: 0 0 16px;
}

.obn__custom {
    display: flex;
    gap: 12px;
}

.obn__custom[hidden] {
    display: none;
}

.obn__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.obn__field--grow {
    flex: 1 1 200px;
}

.obn__field--num input {
    width: 110px;
}

.obn__field select,
.obn__field input[type="number"] {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--obn-border);
    border-radius: 10px;
    background: #fff;
    font: 500 15px/1.3 inherit;
    font-family: inherit;
    color: var(--obn-noir);
}

.obn__field input[type="range"] {
    width: 100%;
    accent-color: var(--obn-blue);
}

.obn__check {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 4px;
    font-size: 14px;
    cursor: pointer;
}

.obn__drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 20px;
    border: 2px dashed color-mix(in srgb, var(--obn-blue) 35%, white);
    border-radius: 14px;
    background: color-mix(in srgb, var(--obn-blue) 4%, white);
    text-align: center;
    cursor: pointer;
}

.obn__drop.is-over,
.obn__drop:hover {
    border-color: var(--obn-blue);
    background: color-mix(in srgb, var(--obn-blue) 8%, white);
}

.obn__drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.obn__drop-main {
    font-weight: 700;
}

.obn__drop-sub {
    font-size: 13px;
    color: var(--obn-gris);
}

.obn__status {
    min-height: 1.4em;
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--obn-gris);
}

.obn__status.is-error {
    color: var(--obn-rouge);
}

.obn__work {
    margin-top: 12px;
}

.obn__work[hidden] {
    display: none;
}

.obn__stage {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    background:
        linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%) 0 0 / 20px 20px,
        linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%) 10px 10px / 20px 20px,
        var(--obn-gris-bg);
}

.obn__canvas {
    display: block;
    max-width: 100%;
    max-height: 420px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    cursor: grab;
    touch-action: none;
}

.obn__canvas.is-dragging {
    cursor: grabbing;
}

.obn__safe {
    position: absolute;
    border: 2px dashed #fff;
    outline: 1px solid rgba(0, 0, 0, .35);
    pointer-events: none;
}

.obn__safe[hidden] {
    display: none;
}

.obn__safe span {
    position: absolute;
    top: 4px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font: 600 11px/1.4 var(--obn-mono);
}

.obn__hint {
    margin: 8px 0 16px;
    font-size: 13px;
    color: var(--obn-gris);
    text-align: center;
}

.obn__out {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--obn-gris-bg);
}

.obn__info,
.obn__warn {
    margin: 0;
    font-size: 14px;
}

.obn__info {
    font-family: var(--obn-mono);
}

.obn__warn {
    flex-basis: 100%;
    color: var(--obn-rouge);
    font-weight: 600;
}

.obn__warn[hidden],
.obn__fit[hidden] {
    display: none;
}

.obn__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.obn__dl,
.obn__fit {
    padding: 11px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--obn-blue);
    color: #fff;
    font: 700 15px/1.2 inherit;
    font-family: inherit;
    cursor: pointer;
}

.obn__fit {
    border: 1px solid var(--obn-blue);
    background: #fff;
    color: var(--obn-blue);
}

.obn__dl:hover {
    background: color-mix(in srgb, var(--obn-blue) 85%, black);
}

.obn__dl:disabled {
    opacity: .5;
    cursor: wait;
}

.obn__more {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--obn-gris);
}

@media (max-width: 600px) {
    .obn {
        padding: 18px;
    }

    .obn__field,
    .obn__field select {
        width: 100%;
    }

    .obn__custom {
        width: 100%;
    }

    .obn__field--num,
    .obn__field--num input {
        width: 100%;
    }

    .obn__actions,
    .obn__dl,
    .obn__fit {
        width: 100%;
    }
}
