/* 
 * DESIGN 2 : STYLE LISTE AVEC LIGNE VERTICALE
 * Version avec nouveau header style
 */

.top-fichiers-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1800px;
  margin-top: 20px;
    padding: 0 20px;
}

/* ============================================ */
/* HEADER - STYLE AVEC FOND COLORÉ ET ICÔNE */
/* ============================================ */

.top-fichiers-header {
    background: linear-gradient(135deg, #b794f6 0%, #9f7aea 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.top-fichiers-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.header-text {
    text-align: left;
}

.top-fichiers-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-fichiers-header p {
    margin: 5px 0 0 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    font-weight: 400;
	text-align: center;
}

/* Thèmes de couleurs pour le header */
body[data-theme="blue"] .top-fichiers-header {
    background: linear-gradient(135deg, #5b72db 0%, #4a5dc7 100%);
}

body[data-theme="green"] .top-fichiers-header {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

body[data-theme="orange"] .top-fichiers-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

body[data-theme="red"] .top-fichiers-header {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

body[data-theme="purple"] .top-fichiers-header {
    background: linear-gradient(135deg, #b794f6 0%, #9f7aea 100%);
}

body[data-theme="black"] .top-fichiers-header {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

body[data-theme="default"] .top-fichiers-header {
    background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 100%);
}

/* ============================================ */
/* LISTE AVEC LIGNE VERTICALE */
/* ============================================ */

.fichiers-liste {
    position: relative;
    padding-left: 0;
}

/* Ligne verticale à gauche */
.fichiers-liste::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--backg, #2bbbac) 0%, var(--backgf, #13e2af) 50%, transparent 100%);
    border-radius: 2px;
}

/* Item de liste */
.liste-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.liste-item:hover {
    transform: translateX(5px);
}

/* Badge de rang */
.rank-badge {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    background: var(--backg);
    box-shadow: 0 4px 15px var(--backg);
    z-index: 2;
    border: 3px solid white;
}

.rank-badge.gold { 
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.rank-badge.silver { 
    background: linear-gradient(135deg, #c0c0c0 0%, #9a9a9a 100%);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.5);
}

.rank-badge.bronze { 
    background: linear-gradient(135deg, #cd7f32 0%, #a0621e 100%);
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5);
}

/* Content */
.liste-content {
    background: white;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

.liste-item:nth-child(1) .liste-content {
    border-left: 4px solid #ffd700;
}

.liste-item:nth-child(2) .liste-content {
    border-left: 4px solid #c0c0c0;
}

.liste-item:nth-child(3) .liste-content {
    border-left: 4px solid #cd7f32;
}

.liste-item:nth-child(n+4) .liste-content {
    border-left: 4px solid var(--backg, #2bbbac);
}

.liste-content:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--backg, #2bbbac);
}

.file-main {
    flex: 1;
    min-width: 200px;
}

.file-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.3;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 17px;
}

.meta-item::before {
    font-size: 14px;
}

.file-folder::before {
    content: "📁";
}

.file-date::before {
    content: "📅";
}

.download-badge {
    background: linear-gradient(135deg, var(--backg, #2bbbac) 0%, var(--backgf, #13e2af) 100%);
    color: #000000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(43, 187, 172, 0.3);
}

.download-badge::before {
    content: "⬇️";
    font-size: 16px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-download {
    background: var(--backg, #2bbbac);
    color: white;
}

.btn-download:hover {
    background: var(--backgf, #13e2af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 187, 172, 0.3);
}

.btn-view {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-view:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-icon {
    width: 14px;
    height: 14px;
}

/* Variables CSS */
:root {
    --backg: #2bbbac;
    --backgf: #13e2af;
}

body[data-theme="blue"] {
    --backg: #4a5dc7;
    --backgf: #3a4db7;
}

body[data-theme="green"] {
    --backg: #10b981;
    --backgf: #059669;
}

body[data-theme="orange"] {
    --backg: #f59e0b;
    --backgf: #d97706;
}

body[data-theme="red"] {
    --backg: #ef4444;
    --backgf: #dc2626;
}

body[data-theme="purple"] {
    --backg: #9b42bf;
    --backgf: #7e22a0;
}

body[data-theme="black"] {
    --backg: #1f2937;
    --backgf: #111827;
}

/* Thèmes pour badges et éléments */
body[data-theme="blue"] .fichiers-liste::before {
    background: linear-gradient(180deg, #4a5dc7 0%, #3a4db7 50%, transparent 100%);
}

body[data-theme="green"] .fichiers-liste::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 50%, transparent 100%);
}

body[data-theme="orange"] .fichiers-liste::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 50%, transparent 100%);
}

body[data-theme="red"] .fichiers-liste::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, transparent 100%);
}

body[data-theme="purple"] .fichiers-liste::before {
    background: linear-gradient(180deg, #9b42bf 0%, #7e22a0 50%, transparent 100%);
}

body[data-theme="black"] .fichiers-liste::before {
    background: linear-gradient(180deg, #1f2937 0%, #111827 50%, transparent 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .top-fichiers-header {
        padding: 25px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .top-fichiers-header h2 {
        font-size: 26px;
    }
    
    .top-fichiers-header p {
        font-size: 14px;
    }
    
    .header-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .fichiers-liste::before {
        left: 18px;
    }
    
    .liste-item {
        padding-left: 50px;
    }
    
    .rank-badge {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .liste-content {
        padding: 15px 18px;
    }
    
    .file-main {
       /* min-width: 100%;*/
    }
    
    .file-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    
    .download-badge {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .top-fichiers-header h2 {
        font-size: 22px;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-name {
        font-size: 15px;
    }
}