/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.25s ease-out;
}
.slide-down {
    animation: slideDown 0.2s ease-out;
}

/* Layout général */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e5e7eb;
}

/* Carte centrale de login */
.center-card {
    max-width: 420px;
    margin: 10vh auto;
    padding: 24px 28px;
    background: #020617;
    border-radius: 16px;
    border: 1px solid #1f2937;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    text-align: center;
    animation: fadeIn 0.25s ease-out;
}

.center-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.center-card p {
    margin: 4px 0 16px;
    color: #9ca3af;
}

.center-card input {
    width: 100%;
    padding: 8px 10px;
    margin: 8px 0;
    border-radius: 10px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
}

.center-card button {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.1s;
}

.center-card button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37,99,235,0.35);
}

.error {
    color: #f97373;
    font-size: 0.9rem;
}

/* Topbar */
.topbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #020617;
    border-bottom: 1px solid #1f2937;
}

.logo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg,#22c55e,#3b82f6);
    margin-right: 6px;
}

.logo-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.topbar-right button {
    margin-left: 8px;
}

.ghost-btn {
    background: transparent;
    border-radius: 999px;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.1s, transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

.ghost-btn:hover {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15,23,42,0.7);
}

/* Layout principal */
.layout {
    display: flex;
    height: calc(100vh - 52px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #020617;
    border-right: 1px solid #1f2937;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 8px;
}

.sidebar-btn {
    width: 100%;
    margin-bottom: 6px;
    padding: 6px 8px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    background: #111827;
    color: #e5e7eb;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s, transform 0.08s ease-out;
}

.sidebar-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.sidebar-btn.danger {
    background: #7f1d1d;
}

.sidebar-btn.danger:hover {
    background: #991b1b;
}

/* Arbre */
.tree-root {
    list-style: none;
    padding-left: 0;
    font-size: 0.85rem;
}

.tree-root li {
    margin: 2px 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.08s;
}

.tree-root li:hover {
    background: #111827;
}

.tree-root ul {
    list-style: none;
    padding-left: 14px;
    margin: 0;
}

/* Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    overflow: hidden;
}

.content-topbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.path-container {
    font-size: 0.82rem;
    color: #9ca3af;
}

.path-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
}

.path-value {
    color: #e5e7eb;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.view-toggle {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #374151;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.08s;
}

.view-btn.active {
    background: #1f2937;
    color: #e5e7eb;
}

.search-box {
    display: flex;
    gap: 4px;
    align-items: center;
}

.search-box input,
.search-box select {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.8rem;
}

/* Upload panel */
.upload-panel {
    margin: 8px 0;
    border-radius: 12px;
    border: 1px dashed #374151;
    background: #020617;
    padding: 10px;
    transition: border-color 0.1s, background 0.1s, box-shadow 0.1s;
}

.upload-panel.dragover {
    background: #030712;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.5);
}

.upload-inner {
    text-align: center;
}

.upload-title {
    margin: 0;
    font-size: 0.9rem;
}

.upload-subtitle {
    margin: 4px 0;
    font-size: 0.8rem;
    color: #9ca3af;
}

.upload-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 6px;
}

.upload-row input[type="file"],
.upload-row input[type="text"] {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.8rem;
}

.upload-row button {
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: #22c55e;
    color: #022c22;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.1s, transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

.upload-row button:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34,197,94,0.25);
}

.upload-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Progress bar */
.progress-bar {
    margin-bottom: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 2px;
}

.progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #111827;
    overflow: hidden;
}

.progress-fill {
    height: 6px;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#3b82f6);
    transition: width 0.1s linear;
}

/* Selection bar */
.selection-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 6px 10px;
    background: #020617;
    border-radius: 999px;
    border: 1px solid #374151;
    margin-bottom: 6px;
}

.selection-bar button {
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.selection-bar button:last-child {
    background: #3b82f6;
}

/* File container */
.file-container {
    flex: 1;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: #020617;
    padding: 4px;
}

/* Table view */
.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.file-table th,
.file-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #111827;
}

.file-table th {
    text-align: left;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
}

.file-table tbody tr {
    transition: background 0.08s;
}

.file-table tbody tr:hover {
    background: #030712;
}

.file-type {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Grid view */
.grid-view {
    padding: 6px 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
    gap: 8px;
}

.grid-item {
    background: #020617;
    border-radius: 12px;
    border: 1px solid #111827;
    padding: 6px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.08s, transform 0.08s ease-out, box-shadow 0.08s;
}

.grid-item:hover {
    background: #030712;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.grid-name {
    font-weight: 500;
}

.grid-meta {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Actions */
.action-btn {
    padding: 2px 6px;
    border-radius: 999px;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    margin-right: 2px;
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.1s;
}

.action-btn.copy {
    background: #111827;
    color: #e5e7eb;
}

.action-btn.rename {
    background: #3b82f6;
    color: white;
}

.action-btn.delete {
    background: #ef4444;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* Checkbox */
input[type="checkbox"] {
    cursor: pointer;
}
