.signature-pad {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    height: 200px;
    margin-bottom: 10px;
    background-color: #fff;
}

.form-section {
    margin-bottom: 2rem;
}

.total-section {
    font-size: 1.2rem;
    font-weight: bold;
}

.vat-notice {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

.card {
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #000 !important;
    color: #fff !important;
    padding: 12px 20px;
}

.delete-row {
    padding: 0.25rem 0.5rem;
}

/* Conditional fields */
.devis-field,
.facture-field {
    transition: display 0.3s ease;
}

/* Logo styles */
.logo {
    max-width: 200px;
    max-height: 100px;
    display: block;
    margin-bottom: 20px;
}

/* Signature styles */
.signatures {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    page-break-inside: avoid;
}

.signature-block {
    width: 45%;
    text-align: center;
}

.signature-image {
    max-width: 200px;
    max-height: 100px;
    display: block;
    margin: 10px auto;
}

.signature-line {
    border-top: 1px solid #000;
    margin-top: 50px;
    width: 100%;
}

/* Button styles */
.btn-secondary,
.btn-danger,
.btn-primary,
input[type="file"].form-control {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    /* Make table rows display as cards */
    #servicesTable tbody tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
    }
    
    /* Hide table headers on mobile */
    #servicesTable thead {
        display: none;
    }
    
    /* Style each cell as a form group */
    #servicesTable td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border: none;
    }
    
    /* Add labels before inputs */
    #servicesTable td:nth-child(1)::before { content: 'Désignation:'; }
    #servicesTable td:nth-child(2)::before { content: 'Quantité:'; }
    #servicesTable td:nth-child(3)::before { content: 'Unité:'; }
    #servicesTable td:nth-child(4)::before { content: 'Prix:'; }
    #servicesTable td:nth-child(5)::before { content: 'Total:'; }
    
    #servicesTable td::before {
        display: block;
        font-weight: bold;
        margin-bottom: 5px;
    }
    
    /* Make designation input larger */
    #servicesTable td:first-child input {
        min-height: 60px;
    }
    
    /* Style inputs */
    #servicesTable input,
    #servicesTable select {
        width: 100%;
        padding: 10px;
        margin: 0;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    /* Center total and make it stand out */
    #servicesTable .row-total {
        text-align: right;
        font-weight: bold;
        font-size: 1.1em;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 4px;
    }
    
    /* Style delete button */
    #servicesTable .delete-row {
        width: 100%;
        margin-top: 10px;
    }
    
    .signature-pad {
        height: 150px;
    }
}

/* Add spacing at the bottom of the form */
#documentForm {
    margin-bottom: 50px;  /* Add space at bottom of form */
}

/* Add space after submit button */
.d-grid.gap-2 {
    margin-bottom: 30px;
}

/* Make submit button easier to tap on mobile */
@media (max-width: 768px) {
    .d-grid.gap-2 {
        margin-bottom: 50px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 16px;
    }
}
