/* Structure générale */
.product-catalogue {
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.cs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cs-header h2 {
    font-size: 1.5rem;
}

/* Boutons */
.cs-actions button,
.cs-button-group .btn {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.cs-btn-primary {
    background-color: #2ba0ff;
    color: white;
}

.cs-btn-primary:hover {
    background-color: #2ba0ff;
}

.cs-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.cs-btn-secondary:hover {
    background-color: #5a6268;
}

/* Filtres */
.cs-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cs-filters input[type="text"],
.cs-filters select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Grille produits */
.cs-product-grid {
    width: 95%;
    border-collapse: collapse;
    margin-top: 10px;
}

.cs-product-grid th,
.cs-product-grid td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.cs-product-grid tbody tr:hover {
    background-color: #f1f1f1;
}

.cs-product-grid input[type="checkbox"] {
    transform: scale(1.2);
}

/* Search input avec clear button */
.cs-input-with-clear {
    position: relative;
    display: inline-block;
}

.cs-clear-button {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #2ba0ff;
}

.cs-clear-button:hover {
    color: #000;
}

/* Produits */
.cs-product-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.cs-product-reference {
    font-size: 0.8rem;
    color: #666;
}

/* Checkbox switch custom */
.cs-custom-control {
    transform: scale(1.3);
    transform-origin: top left;
    margin-left: 20px;
}

.cs-custom-control-input:checked ~ .cs-custom-control-label::before {
    background-color: #1b51ff;
    border-color: #003ea4;
}

.cs-custom-control-input:focus ~ .cs-custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(31, 44, 43, 0.25);
}

/* Modal */
.cs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cs-modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 1500px;
    max-height: 85vh;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cs-modal-header,
.cs-modal-footer {
    position: sticky;
    background: white;
    z-index: 10;
}

.cs-modal-header {
    top: 0;
}

.cs-modal-footer {
    bottom: 0;
}

.cs-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    min-height: 22vh;
    max-height: 65vh;
    flex: 1;
}

/* Dropzone */
.cs-dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.cs-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cs-dropzone-image {
    max-width: 100%;
    width: 150px;
    margin-bottom: 10px;
}

.cs-dropzone-text {
    max-width: 150px;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

/* Form */
.cs-form-group {
    margin-bottom: 15px;
    padding: 2px;
}

.cs-form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.cs-form-group input,
.cs-form-group textarea {
    width: 100%;
    padding: 4px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.cs-form-group textarea {
    resize: vertical;
    height: 100px;
}

/* Divers */
.material-icons {
    color: #158f7d;
}

.material-icons-white {
    color: #ffffff !important;
}

.cs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.cs-checkbox-label input {
    width: auto !important;
}

.cs-border-red-500-important {
    border: 2px solid #ef4444 !important;
}

.cs-border-yellow-500-important {
    border: 2px solid #f59e0b !important;
}

.cs-page-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

/* Loader */
.cs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cs-loadable.loading .loading-overlay {
    display: flex;
}

.cs-loader {
    width: 50px;
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #25b09b;
    -webkit-mask:
        conic-gradient(#0000 10%, #000),
        linear-gradient(#000 0 0) content-box;
    mask:
        conic-gradient(#0000 10%, #000),
        linear-gradient(#000 0 0) content-box;
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: l3 1s infinite linear;
}

@keyframes l3 {
    to {
        transform: rotate(1turn);
    }
}
