/* Style Administratif Uniforme - Comme le fichier dettes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif !important;
    background: #ffffff !important;
    color: #000000 !important;
    line-height: 1.4;
    padding: 20px;
    font-size: 12px;
}

.document {
    max-width: 210mm;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #000000;
}

.header {
    border-bottom: 2px solid #000000;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #000000 !important;
}

.header p {
    color: #000000 !important;
}

.header-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 11px;
    border-bottom: 1px solid #cccccc;
}

.content {
    padding: 20px;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #000000;
    padding: 8px 0;
    margin-bottom: 15px;
    background: #f5f5f5;
    padding-left: 10px;
    color: #000000 !important;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.summary-box {
    border: 1px solid #000000;
    padding: 15px;
    text-align: center;
}

.summary-box .label {
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #666666;
}

.summary-box .value {
    font-size: 16px;
    font-weight: bold;
    color: #000000 !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #000000 !important;
    padding: 8px 12px;
    text-align: left;
    color: #000000 !important;
}

th {
    background: #f5f5f5 !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 10px;
    color: #000000 !important;
}

td {
    font-size: 11px;
    color: #000000 !important;
}

tr:nth-child(even) {
    background: #fafafa !important;
}

.amount {
    text-align: right;
    font-weight: bold;
    color: #000000 !important;
}

.status-badge,
.badge-received,
.badge-pending,
.badge-first-payment,
.badge-second-payment {
    padding: 2px 8px;
    font-size: 9px;
    text-transform: uppercase;
    border: 1px solid #000000;
    background: #ffffff !important;
    color: #000000 !important;
}

.total-row {
    background: #e8e8e8 !important;
    font-weight: bold;
}

.grand-total {
    background: #000000 !important;
    color: #ffffff !important;
    font-weight: bold;
}

.grand-total td {
    border: 1px solid #000000;
}

.footer {
    border-top: 2px solid #000000;
    padding: 15px 20px;
    text-align: center;
    font-size: 10px;
    color: #666666;
}

.date-note {
    margin-top: 30px;
    padding: 10px;
    border: 1px dashed #999999;
    font-size: 10px;
    background: #ffffcc;
}

/* Override des styles existants */
.container,
.summary-card,
.summary-item,
.total-highlight,
.section-header,
.table-container {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Boutons et liens */
button,
a,
.print-btn {
    font-family: 'Times New Roman', Times, serif !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    text-decoration: none;
    padding: 8px 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

button:hover,
a:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

/* Forcer les textes en noir */
h1, h2, h3, h4, h5, h6, p, span, div, li, td, th {
    color: #000000 !important;
}

/* backgrounds */
.header,
.summary-card,
.summary-item,
.section-header {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
}

/* Supprimer les dégradés */
* {
    background: none !important;
    background-image: none !important;
}

body,
.header,
.summary-card,
.summary-item,
.section-header {
    background: #ffffff !important;
}

@media print {
    body {
        padding: 0;
    }
    .document {
        border: none;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .document {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .header {
        padding: 15px 10px !important;
    }

    .header h1 {
        font-size: 16px !important;
        letter-spacing: 1px !important;
    }

    .header-info {
        flex-direction: column !important;
        gap: 5px;
        padding: 10px !important;
        font-size: 10px !important;
    }

    .content {
        padding: 15px 10px !important;
    }

    .section {
        margin-bottom: 20px !important;
    }

    .section-title {
        font-size: 12px !important;
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .summary-box {
        padding: 10px !important;
    }

    .summary-box .label {
        font-size: 9px !important;
    }

    .summary-box .value {
        font-size: 14px !important;
    }

    table {
        font-size: 10px !important;
    }

    th, td {
        padding: 6px 8px !important;
        font-size: 9px !important;
    }

    th {
        font-size: 8px !important;
    }

    .date-note {
        font-size: 9px !important;
        padding: 8px !important;
    }

    .footer {
        font-size: 9px !important;
        padding: 10px !important;
    }

    button,
    a,
    .print-btn {
        padding: 8px 12px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px !important;
        font-size: 12px !important;
    }

    .document {
        border: none !important;
    }

    .header {
        padding: 10px 5px !important;
    }

    .header h1 {
        font-size: 14px !important;
    }

    .content {
        padding: 10px 5px !important;
    }

    .section-title {
        font-size: 11px !important;
        padding: 8px !important;
    }

    .summary-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .summary-box {
        padding: 8px !important;
    }

    .summary-box .label {
        font-size: 8px !important;
    }

    .summary-box .value {
        font-size: 13px !important;
    }

    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    th, td {
        padding: 4px 6px !important;
        font-size: 8px !important;
    }

    th {
        font-size: 7px !important;
    }

    .amount,
    td[class*="amount"] {
        font-size: 9px !important;
    }

    .status-badge,
    .badge-received,
    .badge-pending,
    .badge-first-payment,
    .badge-second-payment {
        font-size: 7px !important;
        padding: 1px 4px !important;
    }

    button,
    a,
    .print-btn {
        padding: 6px 10px !important;
        font-size: 9px !important;
    }
}
