/* Store des modules Capsule — aligné sur la Logithèque (mintinstall) */
.ms-app {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-family: "Ubuntu", "Cantarell", "DejaVu Sans", sans-serif;
    color: #222;
    background: #f8f8f9;
}

.ms-app__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid #d8d8d8;
    background: #fafafa;
}

.ms-app__search-wrap {
    position: relative;
    width: min(100%, 22rem);
    flex: 0 1 22rem;
}

.ms-app__search {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    font: inherit;
    box-sizing: border-box;
}

.ms-app__search:focus,
.ms-app__search:focus-visible {
    outline: 2px solid #1f9ede;
    outline-offset: 1px;
}

.ms-app__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.ms-app__page {
    display: block;
    padding: 0.65rem 0.85rem 0.85rem;
    box-sizing: border-box;
}

.ms-app__page[hidden] {
    display: none !important;
}

.ms-app__page-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.ms-app__lead {
    margin: 0 0 0.85rem;
    font-size: 0.9em;
    opacity: 0.75;
    line-height: 1.4;
}

.ms-app__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 0;
}

.ms-app__card {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.15rem 0.55rem;
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    min-width: 0;
}

.ms-app__card:hover,
.ms-app__card.is-active {
    border-color: #1f9ede;
    box-shadow: 0 1px 4px rgba(31, 158, 222, 0.18);
}

.ms-app__card-icon {
    grid-row: 1 / span 2;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.ms-app__card-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
}

.ms-app__card-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    grid-column: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.8em;
    line-height: 1.3;
    opacity: 0.75;
}

.ms-app__card-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.78em;
    opacity: 0.9;
}

.ms-app__card-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #c09000;
    letter-spacing: 0.04em;
}

.ms-app__card-stars-glyphs {
    color: #e5a50a;
    letter-spacing: 0.02em;
}

.ms-app__card-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: #eaf3fc;
    color: #1a6fa0;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.ms-app__card-badge--installed {
    background: #e6f4ea;
    color: #1e7e34;
}

.ms-app__detail-toolbar {
    display: flex;
    align-items: center;
    margin: 0 0 0.75rem;
}

.ms-app__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0.4rem 0.85rem;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.ms-app__back-btn:hover {
    border-color: #1f9ede;
    color: #1a6fa0;
    background: #f3f9fc;
}

.ms-app__detail-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

.ms-app__detail-icon {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
}

.ms-app__detail-titles {
    min-width: 0;
}

.ms-app__detail-meta,
.ms-app__detail-rating {
    margin: 0.2rem 0 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.ms-app__detail-rating .ms-app__stars-display {
    color: #e5a50a;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}

.ms-app__detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
}

.ms-app__detail-blurb {
    margin: 0 0 1rem;
    line-height: 1.45;
    font-size: 0.95em;
}

.ms-app__install {
    padding: 0.35rem 0.75rem;
    border: 1px solid #1f9ede;
    border-radius: 4px;
    background: #1f9ede;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.ms-app__install:hover {
    background: #1889c4;
    border-color: #1889c4;
}

.ms-app__install--secondary {
    border-color: #c8c8c8;
    background: #e8e8e8;
    color: #444;
}

.ms-app__install--secondary:hover {
    border-color: #b0b0b0;
    background: #dedede;
}

.ms-app__install--open {
    background: #0c75de;
    border-color: #1889c4;
}

.ms-app__install:disabled {
    border-color: #b8b8b8;
    background: #e8e8e8;
    color: #666;
    cursor: default;
}

.ms-app__auth-gate {
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #c6d8f0;
    border-radius: 6px;
    background: #f3f8fd;
}

.ms-app__auth-gate-text {
    margin: 0 0 0.65rem;
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0.9;
}

.ms-app__subtitle {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 600;
}

.ms-app__stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.ms-app__star {
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    color: #888;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
}

.ms-app__star.is-on {
    border-color: #e5a50a;
    background: #fff6d5;
    color: #e5a50a;
}

.ms-app__star:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.ms-app__rate,
.ms-app__feedback {
    margin-bottom: 1rem;
}

.ms-app__feedback-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.ms-app__label {
    font-size: 0.85em;
    font-weight: 600;
}

.ms-app__textarea {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
    font: inherit;
    background: #fff;
}

.ms-app__feedback-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ms-app__feedback-item {
    margin: 0 0 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
}

.ms-app__feedback-author {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.8em;
    font-weight: 600;
}

.ms-app__feedback-body {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.ms-app__empty {
    margin: 1rem 0;
    font-size: 0.9em;
    opacity: 0.7;
}

.ms-app__status {
    flex-shrink: 0;
    min-height: 1.4rem;
    padding: 0.25rem 0.75rem;
    border-top: 1px solid #d8d8d8;
    font-size: 0.85em;
    background: #ececec;
}

body#mint .windowElement[data-link="modules_store"] main#modulesStoreApp {
    height: 100%;
}

body#mint .windowElement[data-link="modules_store"]:not(#mainMenu) {
    width: 900px;
    min-width: 720px;
    height: 620px;
    min-height: 480px;
}

@media (max-width: 640px) {
    .ms-app__detail-head {
        grid-template-columns: auto 1fr;
    }

    .ms-app__detail-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}
