
.cse-provider-documents-card{margin-top:18px;padding:16px;border:1px solid #dbe5ef;border-radius:14px;background:#fff}
.cse-provider-documents-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.cse-provider-documents-head h5{margin:0}.cse-provider-documents-head small{color:#718196}
.cse-provider-documents-head button{border:1px solid #ccd8e4;border-radius:9px;background:#fff;padding:8px 10px;font-weight:800}
.cse-provider-document-notice{margin-top:12px;padding:10px;border-radius:9px;background:#e8f7ed;color:#1f6c3d}
.cse-provider-documents-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;margin-top:12px}
.cse-provider-documents-grid article{padding:12px;border:1px solid #dce5ee;border-radius:10px;background:#f8fafc}.cse-provider-documents-grid article>a{display:flex;gap:9px;color:#17243b;text-decoration:none}.cse-provider-documents-grid article>a>span{font-size:24px}.cse-provider-documents-grid strong,.cse-provider-documents-grid small{display:block}.cse-provider-documents-grid p{margin:8px 0;color:#53657b}.cse-provider-documents-grid form{margin-top:8px}.cse-provider-documents-grid form button{border:1px solid #efc4c4;border-radius:8px;background:#fff;color:#a42626;padding:6px 8px;font-weight:800}
.cse-provider-document-empty{grid-column:1/-1;padding:18px;text-align:center;color:#718196}
.cse-provider-document-modal{position:fixed;inset:0;z-index:2147481200;display:grid;place-items:center;padding:18px;background:rgba(2,17,37,.75);backdrop-filter:blur(7px)}.cse-provider-document-modal[hidden]{display:none!important}
.cse-provider-document-modal-card{position:relative;width:min(620px,96vw);max-height:92vh;overflow:auto;padding:22px;border-radius:20px;background:#fff;box-shadow:0 25px 80px rgba(0,0,0,.38)}
.cse-provider-document-close{position:absolute;right:13px;top:12px;width:38px;height:38px;border:0;border-radius:9px;background:#eef2f6;font-size:24px}.cse-provider-document-modal-card label{display:block;margin-bottom:12px;font-weight:800}.cse-provider-document-modal-card input,.cse-provider-document-modal-card select,.cse-provider-document-modal-card textarea{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:10px;border:1px solid #ccd8e4;border-radius:10px}
.cse-provider-document-actions{display:flex;justify-content:flex-end;gap:8px}.cse-provider-document-actions>button:first-child{border:1px solid #ccd8e4;border-radius:10px;background:#fff;padding:10px 14px;font-weight:800}.cse-provider-document-primary{border:0!important;border-radius:10px!important;background:#ff8a00!important;color:#fff!important;padding:10px 15px!important;font-weight:900!important}


/* Correctif 7.3.3-b.4.4-a.1 — insertion directe et visibilité */
.cse-provider-documents-card{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    margin:20px 0 !important;
    border:2px solid #1769d1 !important;
    background:#ffffff !important;
    color:#17243b !important;
    box-shadow:0 8px 22px rgba(23,105,209,.09);
}
.cse-provider-documents-card h5,
.cse-provider-documents-card strong,
.cse-provider-documents-card p,
.cse-provider-documents-card small{
    color:#17243b !important;
    opacity:1 !important;
}
.cse-provider-documents-head:before{
    content:"📂";
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    margin-right:10px;
    border-radius:10px;
    background:#eaf3ff;
    font-size:20px;
}
.cse-provider-documents-head{
    justify-content:flex-start !important;
}
.cse-provider-documents-head > div{
    flex:1;
}
.cse-provider-documents-head button{
    background:#ff8a00 !important;
    border-color:#ff8a00 !important;
    color:#ffffff !important;
}


/* Correctif 7.3.3-b.4.4-a.2 — GED directement dans la fiche prestataire */
.cse-provider-documents-provider{
    margin:18px 0 !important;
    border:2px solid #1769d1 !important;
    background:#fff !important;
}
.cse-provider-documents-provider .cse-provider-documents-head h5{
    color:#132b45 !important;
    font-size:18px;
}


/* ==========================================================
   Correctif 7.3.3-b.4.4-a.3
   Lisibilité complète GED et fiche prestataire
   ========================================================== */

/* Carte GED : neutralisation des couleurs héritées du thème */
.cse-provider-documents-card,
.cse-provider-documents-provider,
.cse-provider-documents-card *,
.cse-provider-documents-provider *{
    box-sizing:border-box;
}

.cse-provider-documents-card,
.cse-provider-documents-provider{
    background:#ffffff !important;
    color:#17243b !important;
    opacity:1 !important;
}

.cse-provider-documents-card h1,
.cse-provider-documents-card h2,
.cse-provider-documents-card h3,
.cse-provider-documents-card h4,
.cse-provider-documents-card h5,
.cse-provider-documents-card h6,
.cse-provider-documents-card strong,
.cse-provider-documents-card p,
.cse-provider-documents-card small,
.cse-provider-documents-card span,
.cse-provider-documents-card div,
.cse-provider-documents-provider h1,
.cse-provider-documents-provider h2,
.cse-provider-documents-provider h3,
.cse-provider-documents-provider h4,
.cse-provider-documents-provider h5,
.cse-provider-documents-provider h6,
.cse-provider-documents-provider strong,
.cse-provider-documents-provider p,
.cse-provider-documents-provider small,
.cse-provider-documents-provider span,
.cse-provider-documents-provider div{
    color:#17243b !important;
    opacity:1 !important;
    text-shadow:none !important;
}

/* En-tête */
.cse-provider-documents-head{
    background:#ffffff !important;
    color:#17243b !important;
}

.cse-provider-documents-head h5{
    color:#102a43 !important;
    font-weight:900 !important;
}

.cse-provider-documents-head small{
    color:#60758c !important;
    font-weight:600 !important;
}

/* Bouton Ajouter */
.cse-provider-documents-head button,
.cse-provider-documents-head [type="button"]{
    background:#ff8a00 !important;
    border:1px solid #ff8a00 !important;
    color:#ffffff !important;
    opacity:1 !important;
    box-shadow:none !important;
}

.cse-provider-documents-head button:hover,
.cse-provider-documents-head [type="button"]:hover{
    background:#e87800 !important;
    border-color:#e87800 !important;
    color:#ffffff !important;
}

/* Cartes de documents */
.cse-provider-documents-grid article{
    background:#f8fafc !important;
    border-color:#d8e3ef !important;
    color:#17243b !important;
}

.cse-provider-documents-grid article:hover{
    background:#f1f6fb !important;
    border-color:#b8cbe0 !important;
}

.cse-provider-documents-grid article a,
.cse-provider-documents-grid article a:visited,
.cse-provider-documents-grid article a:hover{
    color:#17243b !important;
    opacity:1 !important;
}

.cse-provider-documents-grid article strong{
    color:#102a43 !important;
    font-weight:850 !important;
}

.cse-provider-documents-grid article small{
    color:#60758c !important;
}

.cse-provider-documents-grid article p{
    color:#40566d !important;
}

/* Bouton supprimer */
.cse-provider-documents-grid form button{
    background:#ffffff !important;
    border:1px solid #e5a8a8 !important;
    color:#a42626 !important;
    opacity:1 !important;
}

.cse-provider-documents-grid form button:hover{
    background:#fff1f1 !important;
    border-color:#d94343 !important;
    color:#8b1f1f !important;
}

/* Message vide et notifications */
.cse-provider-document-empty{
    background:#f8fafc !important;
    color:#60758c !important;
    border:1px dashed #c7d5e3 !important;
    border-radius:10px;
}

.cse-provider-document-notice{
    background:#e8f7ed !important;
    color:#1f6c3d !important;
    border:1px solid #b9e2c7 !important;
}

/* Fenêtre d'ajout */
.cse-provider-document-modal-card,
.cse-provider-document-modal-card *{
    color:#17243b !important;
    text-shadow:none !important;
    opacity:1 !important;
}

.cse-provider-document-modal-card{
    background:#ffffff !important;
}

.cse-provider-document-modal-card h3{
    color:#102a43 !important;
}

.cse-provider-document-modal-card label{
    color:#24364d !important;
}

.cse-provider-document-modal-card input,
.cse-provider-document-modal-card select,
.cse-provider-document-modal-card textarea{
    background:#ffffff !important;
    border:1px solid #bfcddd !important;
    color:#17243b !important;
    -webkit-text-fill-color:#17243b !important;
    opacity:1 !important;
}

.cse-provider-document-modal-card input::placeholder,
.cse-provider-document-modal-card textarea::placeholder{
    color:#75879a !important;
    opacity:1 !important;
}

.cse-provider-document-modal-card input:focus,
.cse-provider-document-modal-card select:focus,
.cse-provider-document-modal-card textarea:focus{
    border-color:#1769d1 !important;
    box-shadow:0 0 0 3px rgba(23,105,209,.12) !important;
    outline:none !important;
}

.cse-provider-document-close{
    background:#eef2f6 !important;
    color:#17243b !important;
    border:0 !important;
}

.cse-provider-document-actions > button:first-child{
    background:#ffffff !important;
    border:1px solid #bfcddd !important;
    color:#24364d !important;
}

.cse-provider-document-actions > button:first-child:hover{
    background:#f4f7fa !important;
    color:#17243b !important;
}

.cse-provider-document-primary{
    background:#ff8a00 !important;
    border:1px solid #ff8a00 !important;
    color:#ffffff !important;
}

.cse-provider-document-primary:hover{
    background:#e87800 !important;
    border-color:#e87800 !important;
    color:#ffffff !important;
}

/* Fiche prestataire : coordonnées et informations commerciales */
.cse-provider-detail,
.cse-provider-detail section,
.cse-provider-info-grid section,
.cse-provider-description,
.cse-provider-section{
    color:#17243b !important;
}

.cse-provider-info-grid section,
.cse-provider-description{
    background:#f8fafc !important;
}

.cse-provider-detail h4,
.cse-provider-detail h5,
.cse-provider-detail h6,
.cse-provider-detail strong{
    color:#102a43 !important;
    opacity:1 !important;
}

.cse-provider-detail p,
.cse-provider-detail span,
.cse-provider-detail small,
.cse-provider-detail a{
    color:#40566d !important;
    opacity:1 !important;
    text-shadow:none !important;
}

.cse-provider-detail a:hover{
    color:#1769d1 !important;
}

/* Boutons Modifier / Archiver */
.cse-provider-detail-actions button,
.cse-provider-section-head button{
    background:#ffffff !important;
    border:1px solid #bfcddd !important;
    color:#24364d !important;
    opacity:1 !important;
}

.cse-provider-detail-actions button:hover,
.cse-provider-section-head button:hover{
    background:#f1f6fb !important;
    border-color:#1769d1 !important;
    color:#1769d1 !important;
}

/* Les badges de statut gardent leurs propres couleurs */
.cse-provider-detail-head .status-active{
    background:#ddf5e6 !important;
    color:#1e7944 !important;
}

.cse-provider-detail-head .status-pending{
    background:#fff0d9 !important;
    color:#9a5900 !important;
}

.cse-provider-detail-head .status-suspended{
    background:#fde5e5 !important;
    color:#a42626 !important;
}

.cse-provider-detail-head .status-archived{
    background:#eef1f5 !important;
    color:#53657b !important;
}

/* Protection contre le mode sombre automatique */
@media (prefers-color-scheme: dark){
    .cse-provider-documents-card,
    .cse-provider-documents-provider,
    .cse-provider-document-modal-card,
    .cse-provider-documents-grid article,
    .cse-provider-info-grid section,
    .cse-provider-description{
        background:#ffffff !important;
        color:#17243b !important;
    }

    .cse-provider-documents-card *,
    .cse-provider-documents-provider *,
    .cse-provider-document-modal-card *,
    .cse-provider-detail *{
        text-shadow:none !important;
    }
}
