.rps-dialogue {
    width: min(760px, calc(100vw - 32px));
    max-width: none;
    height: min(620px, calc(100vh - 32px));
    height: min(620px, calc(100dvh - 32px));
    padding: 0;
    overflow: hidden;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgb(18 35 61 / 28%);
}

.rps-dialogue::backdrop {
    background: rgb(18 35 61 / 55%);
}

.rps-contenu {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.rps-recherche-vue,
.rps-conditionnement-vue {
    display: flex;
    min-height: 0;
    height: 100%;
    flex-direction: column;
}

.rps-recherche-vue[hidden],
.rps-conditionnement-vue[hidden] {
    display: none;
}

.rps-dialogue.rps-conditionnement-actif {
    width: min(430px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}

.rps-dialogue.rps-conditionnement-actif .rps-contenu,
.rps-dialogue.rps-conditionnement-actif .rps-conditionnement-vue {
    height: auto;
}

.rps-entete {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5eaf1;
}

.rps-entete h2 {
    margin: 0 0 5px;
    color: #263247;
    font-size: 20px;
}

.rps-entete p {
    margin: 0;
    color: #66758a;
    font-size: 14px;
}

.rps-fermer {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #66758a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.rps-barre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #f8f9fc;
}

.rps-recherche {
    min-width: 200px;
    min-height: 42px;
    flex: 1;
    padding: 0 12px;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    font: inherit;
}

.rps-option {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
}

.rps-liste-zone {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0 24px;
}

.rps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rps-table th {
    position: sticky;
    top: 0;
    padding: 12px 10px;
    background: #fff;
    color: #66758a;
    text-align: left;
}

.rps-table td {
    padding: 11px 10px;
    border-top: 1px solid #e5eaf1;
    vertical-align: middle;
}

.rps-ligne {
    cursor: pointer;
}

.rps-ligne:hover,
.rps-ligne:focus-visible {
    background: #eef3fd;
    outline: none;
}

.rps-num {
    text-align: right !important;
    white-space: nowrap;
}

.rps-rupture {
    color: #c0392b;
    font-weight: 600;
}

.rps-secondaire {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #244d9b;
    border-radius: 7px;
    background: #fff;
    color: #244d9b;
    font: inherit;
    cursor: pointer;
}

.rps-secondaire:hover {
    background: #f3f6fc;
}

.rps-vide {
    padding: 34px 0;
    color: #66758a;
    text-align: center;
}

.rps-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid #e5eaf1;
    color: #66758a;
    font-size: 14px;
}

.rps-conditionnement-liste {
    min-height: 0;
    padding: 8px 22px;
    overflow-y: auto;
}

.rps-conditionnement-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid #e5eaf1;
    background: #fff;
    color: #263247;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.rps-conditionnement-option:first-child {
    border-top: 1px solid #e5eaf1;
}

.rps-conditionnement-option:hover,
.rps-conditionnement-option:focus-visible {
    background: #f8f9fc;
    outline: 2px solid #168aad;
    outline-offset: -2px;
}

.rps-conditionnement-contenu {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.rps-conditionnement-contenu small {
    color: #66758a;
}

.rps-conditionnement-prix {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .rps-dialogue {
        width: calc(100vw - 24px);
        height: min(620px, calc(100vh - 24px));
        height: min(620px, calc(100dvh - 24px));
    }

    .rps-entete,
    .rps-barre {
        padding-right: 16px;
        padding-left: 16px;
    }

    .rps-liste-zone {
        padding-right: 12px;
        padding-left: 12px;
    }

    .rps-table {
        font-size: 12px;
    }

    .rps-table th,
    .rps-table td {
        padding: 9px 6px;
    }

    .rps-option {
        width: 100%;
    }
}
