/* ═══════════════════════════════════════════
   Mes droits d'auteur — LivreConnect
   ═══════════════════════════════════════════ */

.droits-page-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* ── KPI Cards ── */
.kpi-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #dee2e6;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-actifs  { border-left-color: #198754; }
.kpi-revenus { border-left-color: #0d6efd; }
.kpi-attente { border-left-color: #ffc107; }
.kpi-echeance { border-left-color: #6f42c1; }

.kpi-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.kpi-actifs .kpi-icon  { color: #198754; }
.kpi-revenus .kpi-icon { color: #0d6efd; }
.kpi-attente .kpi-icon { color: #ffc107; }
.kpi-echeance .kpi-icon { color: #6f42c1; }

.kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ── Tables ── */
.droits-table th,
.royalties-table th {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.droits-table td,
.royalties-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ── Type badges ── */
.badge-type {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.type-edition     { background: #e8f5e9; color: #2e7d32; }
.type-traduction  { background: #e3f2fd; color: #1565c0; }
.type-adaptation  { background: #fff3e0; color: #e65100; }
.type-numerique   { background: #f3e5f5; color: #7b1fa2; }
.type-audio       { background: #fce4ec; color: #c62828; }
.type-derive      { background: #e0f2f1; color: #00695c; }
.type-mondial     { background: #ede7f6; color: #4527a0; }

/* ── Expiry alert icon ── */
.fa-exclamation-triangle.text-warning {
    animation: pulse-warn 2s ease-in-out infinite;
}

@keyframes pulse-warn {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Status badges (override Bootstrap sizes) ── */
.droits-table .badge,
.royalties-table .badge {
    font-size: 0.78rem;
    padding: 0.3em 0.6em;
}

/* ── Card headers ── */
.card-header h5 {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ── Empty states ── */
.card-body .text-muted i.fa-3x {
    opacity: 0.3;
}

/* ── Modal form ── */
#modalAjouterDroit .form-label {
    font-weight: 600;
    font-size: 0.88rem;
}

#modalAjouterDroit .form-control,
#modalAjouterDroit .form-select {
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .droits-page-container {
        padding: 0 0.5rem;
    }

    .kpi-value {
        font-size: 1.1rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }

    .card-header .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .droits-table,
    .royalties-table {
        font-size: 0.82rem;
    }
}

@media (max-width: 576px) {
    .droits-page-container h1 {
        font-size: 1.2rem;
    }

    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start !important;
    }
}
