/* =========================
   LAYOUT GÉNÉRAL
   ========================= */

.rm-inventory {
    max-width: 1200px;
    margin: 20px auto;
}

.rm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================
   BOUTONS
   ========================= */

.rm-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.rm-btn-sm {
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.rm-btn-icon {
    padding: 6px 10px;
    font-size: 18px;
}

/* =========================
   TABLEAU / CARTES
   ========================= */

.rm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.rm-table th,
.rm-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.rm-out {
    opacity: 0.5;
}

.rm-cards {
    display: none;
}

.rm-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.rm-actions {
    margin-top: 10px;
}

/* =========================
   RESPONSIVE TABLE / CARDS
   ========================= */

@media (max-width: 768px) {
    .rm-table {
        display: none;
    }
    .rm-cards {
        display: block;
    }
}

/* =========================
   MODALES (STRUCTURE SAINE)
   ========================= */

.rm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;
}

.rm-modal.is-open {
    display: flex;
}

.rm-modal-content {
    background: #fff;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    border-radius: 10px;

    max-height: 90vh;
    overflow-y: auto;
}

/* =========================
   FORMULAIRES MODALES
   ========================= */

.rm-modal-content label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.rm-modal-content input,
.rm-modal-content select {
    width: 100%;
    padding: 6px;
    margin-top: 4px;
}

.rm-modal-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =========================
   GRILLE FORMULAIRE
   ========================= */

.rm-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.rm-col {
    flex: 1;
}

.rm-col-grow {
    flex: 2;
}

.rm-col-small {
    max-width: 140px;
}

.rm-col-auto {
    flex: 0 0 auto;
}

/* =========================
   RESPONSIVE FORMULAIRES
   ========================= */

@media (max-width: 600px) {
    .rm-row {
        flex-direction: column;
    }
    .rm-col-small {
        max-width: 100%;
    }
}

/* =========================
   TYPES D’INSTRUMENTS
   ========================= */

.rm-types-add {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.rm-types-add input {
    flex: 1;
}
.rm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;

    /* CLÉ ABSOLUE */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    display: flex;
    align-items: center;
    justify-content: center;
}

.rm-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
