/* Appels de Fonds Styles */

.chantier-select-form {
    padding: 0;
}

.chantier-select-form .input-group {
    margin-bottom: 20px;
}

.main-content {
    padding: 12px !important;
}

.chantier-select-form .input-group label {
    display: block;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.chantier-select-form .input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: white;
}

.chantier-select-form .input-group select:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.appels-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

/* Résumé financier pour comptable */
.financial-summary {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.summary-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.summary-value.paid {
    color: #28a745;
}

.summary-value.pending {
    color: #dc3545;
}

/* Tableau des appels */
.appels-table-container {
    overflow-x: auto;
    width: 100%;
}

.appels-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.appels-table thead {
    background: #f8f9fa;
}

.appels-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e5e5;
}

.appels-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #495057;
    vertical-align: middle;
}

.appels-table tbody tr:hover {
    background: #f8f9fa;
}

.appels-table tbody tr:last-child td {
    border-bottom: none;
}

.appel-num {
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    text-align: center;
    width: 60px;
}

.appel-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.appel-date {
    font-family: 'Courier New', monospace;
    color: #495057;
}

.appel-date-input-cell {
    padding: 8px 16px;
}

.date-reglement-form {
    margin: 0;
    padding: 0;
}

.date-reglement-input {
    width: 100%;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #495057;
    background: white;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.date-reglement-input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.date-reglement-input:hover {
    border-color: #cbd5e0;
}

.appel-montant-cell {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    text-align: right;
}

.appel-montant-cell.paid {
    color: #28a745;
}

.appels-table tfoot {
    background: #f8f9fa;
    border-top: 2px solid #e5e5e5;
}

.total-row {
    font-weight: 700;
}

.total-label {
    font-size: 15px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-montant {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #2c3e50;
    text-align: right;
}

.appel-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chantier-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.chantier-header {
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 24px;
}

.chantier-header h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.chantier-info {
    color: #495057;
    font-size: 14px;
    margin: 4px 0;
}

.chantier-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.chantier-content {
    padding: 24px;
}

.appel-item {
    background: #f8f9fa;
    border-left: 3px solid #2c3e50;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.appel-item:last-child {
    margin-bottom: 0;
}

.appel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.appel-number {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.appel-montant {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.appel-montant.paid {
    color: #28a745;
}

.appel-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
}

.appel-date-item {
    display: flex;
    flex-direction: column;
}

.appel-date-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appel-date-value {
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.no-appels {
    text-align: center;
    padding: 24px;
    color: #6c757d;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #6c757d;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
    color: #6c757d;
}

.empty-state h2 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 20px;
}

.empty-state p {
    font-size: 14px;
    color: #6c757d;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .appel-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .appel-dates {
        grid-template-columns: 1fr;
    }

    .financial-summary {
        flex-direction: column;
        gap: 16px;
    }

    .appels-table {
        font-size: 12px;
    }

    .appels-table th,
    .appels-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .appels-table-container {
        overflow-x: scroll;
    }
}

