/* =====================================================================
   Documents juridiques mis à disposition des clients
   - .djc-  : onglet Documents de l'écran Entreprises (cabinet)
   - .djl-  : carte et page « Mes documents juridiques » (client)
   ===================================================================== */

/* ---------------------------------------------------------------- commun */
.djc, .djl, .djc-panneau, .djl-page, .djl-apercu { font-family: inherit; color: #1E293B; }
.djc *, .djl *, .djc-panneau *, .djl-page *, .djl-apercu * { box-sizing: border-box; }
.djc-btn, .djl-btn {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; border: 1px solid transparent;
    padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.3; background: #fff;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.djc-btn:disabled, .djl-btn:disabled { opacity: .5; cursor: not-allowed; }
.djc-btn-primaire, .djl-btn-primaire { background: #2350C8; color: #fff; }
.djc-btn-primaire:hover:not(:disabled), .djl-btn-primaire:hover:not(:disabled) { background: #1C42A8; }
.djc-btn-contour, .djl-btn-contour { border-color: #CBD5E1; color: #1E293B; }
.djc-btn-contour:hover:not(:disabled), .djl-btn-contour:hover:not(:disabled) { border-color: #2350C8; color: #2350C8; }
.djc-btn-lien { background: none; border: none; color: #2350C8; padding: 4px 6px; font-weight: 600; }
.djc-btn-lien:hover { text-decoration: underline; }
.djc-icone-btn {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: none; color: #475569;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.djc-icone-btn:hover { background: #EEF2FF; color: #2350C8; }
.djc-icone-btn.djc-icone-danger:hover { background: #FEF2F2; color: #DC2626; }
.djc-icone-btn[data-info]:hover::after, .djc-badge[data-info]:hover::after {
    content: attr(data-info); position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 20; white-space: nowrap;
    background: #0F172A; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 6px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .25);
}

/* ---------------------------------------------------------------- cabinet */
.djc { padding: 4px 2px 24px 2px; }
.djc-entete {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(120deg, #13286B 0%, #1F3F9E 100%); color: #fff; border-radius: 12px; padding: 18px 22px;
    margin-bottom: 16px;
}
.djc-entete h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.djc-entete p { margin: 4px 0 0 0; font-size: 13px; color: #C7D2FE; }
.djc-entete-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.djc-entete .djc-btn-contour { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }
.djc-entete .djc-btn-contour:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #fff; border-color: #fff; }
.djc-entete .djc-btn-primaire { background: #fff; color: #13286B; }
.djc-entete .djc-btn-primaire:hover:not(:disabled) { background: #E0E7FF; }
.djc-pastille {
    background: #F59E0B; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 2px;
}

.djc-depot {
    border: 2px dashed #CBD5E1; border-radius: 12px; padding: 16px; text-align: center; color: #64748B; font-size: 13px;
    margin-bottom: 14px; background: #F8FAFC; cursor: pointer; transition: border-color .15s, background .15s;
}
.djc-depot:hover, .djc-depot.djc-survol { border-color: #2350C8; background: #EEF2FF; color: #2350C8; }
.djc-depot i { font-size: 20px; display: block; margin-bottom: 4px; }

.djc-attente {
    border: 1px solid #C7D2FE; background: #F5F7FF; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.djc-attente-titre { font-weight: 700; font-size: 13px; margin-bottom: 8px; color: #13286B; }
.djc-attente-ligne {
    display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(170px, 1fr) 150px minmax(140px, 1fr) auto;
    gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #E0E7FF;
}
.djc-attente-ligne:first-of-type { border-top: none; }
.djc-attente-nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.djc-attente-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.djc-champ { width: 100%; height: 34px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff; }
.djc-champ:focus { outline: none; border-color: #2350C8; box-shadow: 0 0 0 3px rgba(35, 80, 200, .12); }
.djc .nya-bs-select { width: 100% !important; }
.djc .nya-bs-select .btn { height: 34px; border-radius: 8px; border-color: #CBD5E1; }

.djc .djc-interrupteur, .djc-panneau .djc-interrupteur { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px;
    margin: 0; font-weight: 500; }
.djc-interrupteur input { display: none; }
.djc-interrupteur .djc-glissiere {
    display: inline-block; width: 34px; height: 20px; border-radius: 999px; background: #CBD5E1; position: relative;
    transition: background .15s; flex: 0 0 auto;
}
.djc-interrupteur .djc-glissiere::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: left .15s;
}
.djc-interrupteur input:checked + .djc-glissiere { background: #16A34A; }
.djc-interrupteur input:checked + .djc-glissiere::after { left: 16px; }

.djc-filtres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.djc-puce {
    border: 1px solid #E2E8F0; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
    color: #475569; cursor: pointer;
}
.djc-puce.djc-actif { background: #13286B; border-color: #13286B; color: #fff; }
.djc-recherche { margin-left: auto; width: 220px; }

.djc-groupe { margin-bottom: 14px; }
.djc-groupe-titre {
    display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; color: #64748B; margin: 0 0 6px 2px;
}
.djc-groupe-titre small { text-transform: none; letter-spacing: 0; font-weight: 500; color: #94A3B8; }
.djc-ligne {
    display: grid; grid-template-columns: 34px minmax(180px, 1fr) 170px 190px auto; gap: 12px; align-items: center;
    background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px;
}
.djc-ligne:hover { border-color: #C7D2FE; box-shadow: 0 2px 10px rgba(35, 80, 200, .06); }
.djc-ligne.djc-non-publie { background: #FAFAFB; }
.djc-fichier-icone { color: #2350C8; font-size: 20px; text-align: center; }
.djc-nom { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.djc-sous { font-size: 12px; color: #64748B; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.djc-suivi { font-size: 12px; color: #475569; }
.djc-suivi .djc-jamais { color: #94A3B8; }
.djc-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.djc-badge {
    display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; position: relative;
}
.djc-badge-publie { background: #DCFCE7; color: #15803D; }
.djc-badge-brouillon { background: #F1F5F9; color: #64748B; }
.djc-badge-expire { background: #FEE2E2; color: #B91C1C; }
.djc-badge-version { background: #EEF2FF; color: #3730A3; margin-left: 6px; }
.djc-badge-prevenu { background: #E0F2FE; color: #0369A1; margin-left: 6px; }
.djc-edition {
    grid-column: 1 / -1; display: grid; grid-template-columns: minmax(170px, 1fr) 150px minmax(160px, 1.4fr) auto;
    gap: 10px; align-items: center; padding-top: 10px; border-top: 1px dashed #E2E8F0;
}
.djc-vide { text-align: center; color: #94A3B8; padding: 30px 10px; font-size: 13px; }
.djc-vide i { font-size: 30px; display: block; margin-bottom: 8px; color: #CBD5E1; }

/* Panneau latéral (catégories, historique) : un seul à la fois, pas de modale empilée */
.djc-voile { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 10000; }
.djc-panneau {
    position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 95vw; background: #fff; z-index: 10001;
    box-shadow: -10px 0 30px rgba(15, 23, 42, .18); display: flex; flex-direction: column;
    animation: djcEntree .18s ease-out;
}
@keyframes djcEntree { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.djc-panneau-entete {
    background: linear-gradient(120deg, #13286B 0%, #1F3F9E 100%); color: #fff; padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.djc-panneau-entete h4 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; }
.djc-panneau-entete small { display: block; color: #C7D2FE; font-size: 12px; margin-top: 2px; }
.djc-panneau-entete button { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.djc-panneau-corps { padding: 16px 18px; overflow-y: auto; flex: 1; }
.djc-panneau-section { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #64748B; margin: 14px 0 8px; }
.djc-panneau-section:first-child { margin-top: 0; }
.djc-cat {
    display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; border: 1px solid #E2E8F0;
    border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.djc-cat.djc-inactive { opacity: .6; }
.djc-cat-libelle { font-weight: 600; font-size: 13px; }
.djc-cat-desc { font-size: 12px; color: #64748B; }
.djc-cat-form { display: grid; gap: 8px; border: 1px dashed #C7D2FE; border-radius: 10px; padding: 12px; background: #F8FAFF; }
.djc-histo {
    display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #F1F5F9; font-size: 13px;
}
.djc-histo small { color: #64748B; }

/* ---------------------------------------------------------------- client : carte de l'accueil */
.djl-carte-bloc { margin: 14px 0 18px 0; }
.djl-bandeau {
    background: linear-gradient(120deg, #13286B 0%, #1F3F9E 100%); color: #fff; border-radius: 14px 14px 0 0;
    padding: 18px 24px;
}
.djl-bandeau h2 { margin: 0; font-size: 22px; font-weight: 800; color: #fff; }
.djl-bandeau p { margin: 4px 0 0 0; color: #DBE4FF; font-size: 14px; }
.djl-carte {
    background: #fff; border: 1px solid #E2E8F0; border-top: none; border-radius: 0 0 14px 14px; padding: 22px 24px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}
.djl-carte h3 { margin: 0 0 6px 0; font-size: 20px; font-weight: 800; color: #13286B; display: flex; align-items: center; gap: 12px; }
.djl-carte h3 i { color: #2350C8; }
.djl p.djl-intro, .djl div.djl-intro { color: #475569; font-size: 14px; line-height: 1.5; margin: 0 0 14px 0; font-weight: 400; }
.djl .djl-bandeau p { font-size: 14px; }
.djl .djl-carte h3 { font-size: 20px; }
.djl-choix-entreprise { margin: 0 0 12px 0; max-width: 360px; }
.djl-choix-entreprise .nya-bs-select { width: 100% !important; }
.djl-categorie {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 1px solid #E2E8F0;
    border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; cursor: pointer; font-size: 15px; color: #1E293B;
    transition: border-color .15s, box-shadow .15s;
}
.djl-categorie:hover { border-color: #2350C8; box-shadow: 0 2px 10px rgba(35, 80, 200, .08); }
.djl-categorie i.fa-file-text { color: #2350C8; font-size: 17px; }
.djl-categorie .djl-cat-libelle { font-weight: 500; }
.djl-categorie .djl-cat-desc { margin-left: auto; color: #64748B; font-size: 13px; text-align: right; }
.djl-compte {
    min-width: 24px; height: 22px; border-radius: 999px; background: #EEF2FF; color: #3730A3; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 7px;
}
.djl-compte.djl-zero { background: #F1F5F9; color: #94A3B8; }
.djl-nouveau { background: #F59E0B; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 8px; }
.djl-btn-large {
    width: 100%; justify-content: center; padding: 13px 16px; font-size: 16px; border-radius: 10px; margin-top: 8px;
}

/* ---------------------------------------------------------------- client : page des documents */
.djl-page {
    position: fixed; inset: 0; z-index: 10000; background: #F1F5F9; display: flex; flex-direction: column;
    animation: djcEntree .18s ease-out;
}
.djl-page-entete {
    background: linear-gradient(120deg, #13286B 0%, #1F3F9E 100%); color: #fff; padding: 18px 28px;
    display: flex; align-items: center; gap: 16px;
}
.djl-page-entete h2 { margin: 0; font-size: 20px; font-weight: 800; color: #fff; }
.djl-page-entete p { margin: 2px 0 0 0; color: #DBE4FF; font-size: 13px; }
.djl-page-entete .djl-btn-contour { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }
.djl-page-entete .djl-btn-contour:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: #fff; }
.djl-page-corps { flex: 1; overflow-y: auto; padding: 22px 28px; }
.djl-page-contenu { max-width: 980px; margin: 0 auto; }
.djl-recherche { width: 100%; height: 40px; border: 1px solid #CBD5E1; border-radius: 10px; padding: 0 14px; margin-bottom: 14px; font-size: 14px; }
.djl-section { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.djl-section-titre {
    display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; padding: 14px 18px;
    cursor: pointer; text-align: left; font-size: 15px;
}
.djl-section-titre strong { color: #13286B; }
.djl-section-titre .djl-cat-desc { color: #64748B; font-size: 13px; }
.djl-section-titre .fa-chevron-down { margin-left: auto; color: #94A3B8; transition: transform .15s; }
.djl-section.djl-ouverte .fa-chevron-down { transform: rotate(180deg); }
.djl-doc {
    display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid #F1F5F9;
}
.djl-doc i.fa-file-pdf-o { color: #DC2626; font-size: 18px; }
.djl-doc-nom { font-weight: 600; font-size: 14px; }
.djl-doc-sous { font-size: 12px; color: #64748B; }
.djl-doc-actions { margin-left: auto; display: flex; gap: 8px; }
.djl-section-vide { padding: 12px 18px; border-top: 1px solid #F1F5F9; color: #94A3B8; font-size: 13px; }
.djl-apercu { position: fixed; inset: 0; z-index: 10002; background: rgba(15, 23, 42, .55); display: flex; flex-direction: column; }
.djl-apercu-barre { background: #0F172A; color: #fff; padding: 10px 18px; display: flex; align-items: center; gap: 12px; }
.djl-apercu-barre span { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.djl-apercu iframe { flex: 1; border: none; background: #fff; }

@media (max-width: 900px) {
    .djc-ligne { grid-template-columns: 30px 1fr auto; }
    .djc-ligne > .djc-statut, .djc-ligne > .djc-suivi { display: none; }
    .djc-attente-ligne, .djc-edition { grid-template-columns: 1fr; }
    .djl-categorie .djl-cat-desc { display: none; }
}
