/* =============================================
   DOCUMENTS CLIENT - FRONT CSS
   Style dashboard SaaS - Arts Tec
   ============================================= */

/* ── Wrapper principal ── */
.ct-documents-wrap {
    max-width: 860px;
    margin: 2rem auto 0;
    font-family: inherit;
}

/* ── Header ── */
.ct-documents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #056175;
}
.ct-documents-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.ct-documents-count {
    font-size: 0.82rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* ── Recherche ── */
.ct-doc-search-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}
.ct-doc-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    align-items: center;
}
#ct-doc-search {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
#ct-doc-search:focus {
    border-color: #056175;
    box-shadow: 0 0 0 3px rgba(5,97,117,0.1);
    background: #fff;
}

/* ── Onglets ── */
.ct-doc-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    background: #eaf3f5;
    border-radius: 10px;
}
.ct-doc-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #056175;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
}
.ct-doc-tab:hover {
    background: rgba(5,97,117,0.1);
    color: #056175;
}
.ct-doc-tab.active {
    background: #056175;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(5,97,117,0.25);
}
.ct-doc-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ct-doc-tab.active .ct-doc-tab-count {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}
.ct-doc-tab:not(.active) .ct-doc-tab-count {
    background: #fff;
    color: #056175;
}

/* ── Etat vide ── */
.ct-documents-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    color: #9ca3af;
}
.ct-documents-empty svg {
    display: block;
    margin: 0 auto 1rem;
    color: #d1d5db;
}
.ct-documents-empty p {
    font-size: 0.95rem;
    margin: 0;
}

/* ── Aucun resultat recherche ── */
.ct-doc-no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ── Liste documents ── */
.ct-documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ── Item document ── */
.ct-document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1rem 1.25rem;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid #f3f4f6;
}
.ct-document-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

/* ── Icone fichier ── */
.ct-document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #eaf3f5;
    border-radius: 8px;
    color: #056175;
    flex-shrink: 0;
}

/* ── Infos fichier ── */
.ct-document-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.ct-document-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ct-document-meta {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.ct-doc-cat-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #eaf3f5;
    color: #056175;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ── Bouton telechargement ── */
.ct-document-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #056175;
    color: #ffffff !important;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.ct-document-download:hover {
    background: #044f61;
    color: #ffffff !important;
}

/* ── Notice non connecte ── */
.ct-doc-front-notice {
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ct-doc-tabs { gap: 0.25rem; padding: 0.25rem; }
    .ct-doc-tab { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
    .ct-document-item { flex-wrap: wrap; gap: 0.75rem; }
    .ct-document-info { flex: 1 1 calc(100% - 58px); }
    .ct-document-download { width: 100%; justify-content: center; }
    .ct-documents-header h3 { font-size: 1rem; }
}
