/* Coquille, voile et couche : voir .modal dans components.css. */
.binder-slot-modal__panel {
    width: min(96vw, 920px);
    max-height: min(92vh, 900px);
    padding: 1.35rem 1.5rem;
}

.binder-slot-modal__panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-family: var(--font-heading);
    color: var(--gold);
}

.binder-slot-modal__target {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.binder-slot-modal__search-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}

.binder-slot-modal__search {
    --cut: 8px;
    --cut-r: 10px;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0;
    background-color: #0c0b18;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 48%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(180, 190, 255, 0.28),
        inset 0 2px 8px rgba(0, 0, 0, 0.35);
    color: var(--text);
    font: inherit;
    margin-bottom: 0.75rem;
    clip-path: polygon(
        var(--cut) 0,
        calc(100% - var(--cut-r)) 0,
        100% var(--cut-r),
        100% 100%,
        0 100%,
        0 var(--cut)
    );
}

.binder-slot-modal__search:focus-visible {
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 0 rgba(180, 190, 255, 0.7),
        0 0 14px rgba(180, 190, 255, 0.22);
}

/* Trame : .cards-grid dans components.css ; ici la contrainte de hauteur. */
.binder-slot-fill-results {
    max-height: min(68vh, 680px);
    overflow-y: auto;
    margin-bottom: 0.75rem;
    align-content: start;
}

.binder-slot-fill-hint {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.binder-slot-fill-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

/* Non rangée — fond neutre */
.binder-slot-fill-result--unplaced {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
}

/* Déjà rangée ailleurs — cadre vert, badge et illustration un peu assombrie */
.binder-slot-fill-result--placed {
    background: var(--tint-success);
    border: 2px solid var(--success);
}

.binder-slot-fill-result--placed .binder-slot-fill-result__img {
    filter: saturate(0.55) brightness(0.72);
}

.binder-slot-fill-result--placed .binder-slot-fill-result__loc {
    color: var(--success);
    font-weight: 700;
}

.binder-slot-fill-result:hover:not(:disabled) {
    border-color: var(--gold-dim);
    background: var(--tint-gold-soft);
    transform: translateY(-2px);
}

.binder-slot-fill-result--placed:hover:not(:disabled) {
    border-color: var(--success);
    background: var(--tint-success-strong);
}

.binder-slot-fill-result:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.binder-slot-fill-result__art {
    position: relative;
    display: block;
    width: 100%;
    flex-shrink: 0;
}

.binder-slot-fill-result__img {
    width: 100%;
    aspect-ratio: 63 / 88;
    height: auto;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    background: var(--surface-sunken);
}

.binder-slot-fill-result__qty {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 1;
    min-width: 2.1rem;
    padding: 0.28rem 0.45rem;
    border-radius: var(--radius-pill);
    background: var(--seal-gradient);
    border: 1px solid rgba(255, 240, 200, 0.45);
    color: #fff;
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.binder-slot-fill-result__qty--multi {
    font-size: var(--fs-md);
    min-width: 2.4rem;
    padding: 0.35rem 0.5rem;
    box-shadow:
        0 0 0 1px var(--gold-bright),
        0 2px 10px rgba(0, 0, 0, 0.6);
}

.binder-slot-fill-result__badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 1;
    padding: 0.22rem 0.5rem;
    border-radius: var(--radius-pill);
    background: rgba(8, 24, 16, 0.88);
    border: 1px solid var(--success);
    color: var(--success);
    font-family: var(--font-heading);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.binder-slot-fill-result__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0 0.15rem 0.2rem;
}

.binder-slot-fill-result__name {
    font-weight: 700;
    font-size: var(--fs-sm);
    line-height: 1.25;
}

.binder-slot-fill-result__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.binder-slot-fill-result__loc {
    font-size: 0.82rem;
    color: var(--gold);
}

@media (max-width: 640px) {
    .binder-slot-modal__panel {
        width: min(100%, 520px);
        padding: 1.1rem;
    }

    .binder-slot-fill-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }
}

.binder-slot-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
