﻿body {
    font-family: Arial, sans-serif;
    background: #f6f8fb;
    margin: 0;
    color: #1f2937;
}

.page {
    max-width: 1250px;
    margin: 28px auto;
    padding: 0 20px 40px;
}

h1 {
    margin: 0 0 8px 0;
    color: #1f4e79;
    font-size: 28px;
}

h2 {
    margin: 0;
    color: #1f4e79;
    font-size: 20px;
}

a {
    color: #1f4e79;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.topbar-left {
    flex: 1;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.breadcrumb {
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.breadcrumb a {
    color: #1f4e79;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #9ca3af;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    margin-bottom: 22px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.file-table th,
.file-table td {
    border-bottom: 1px solid #eceff3;
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

.file-table th {
    background: #f3f7fb;
    color: #1f4e79;
    font-weight: bold;
    font-size: 14px;
}

.file-table tr:hover td {
    background: #fafcff;
}

.file-name-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.folder-icon {
    background: #e8f0fe;
}

.file-icon-style {
    background: #eef2f7;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.main-file-link {
    font-weight: 600;
    color: #1f2937;
}

.main-file-link:hover {
    color: #1f4e79;
    text-decoration: none;
}

.main-file-text {
    font-weight: 500;
    color: #1f2937;
}

.muted-cell {
    color: #6b7280;
    font-size: 14px;
}

.line-action {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 8px;
    background: #e8f0fe;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.line-action:hover {
    background: #dbeafe;
    text-decoration: none;
}

.empty-row {
    text-align: center;
    color: #6b7280;
    padding: 25px 10px;
}

button,
.btn {
    display: inline-block;
    background: #1f4e79;
    color: white;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

button:hover,
.btn:hover {
    background: #163a59;
    text-decoration: none;
}

.btn.secondary {
    background: #6b7280;
}

.btn.secondary:hover {
    background: #4b5563;
}

/* MODALE */
.modal {
    display: none;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 999;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(760px, calc(100% - 30px));
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    z-index: 1000;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close {
    background: transparent;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
    padding: 0 6px;
}

.modal-close:hover {
    background: transparent;
    color: #111827;
}

#unified-upload-form {
    padding: 22px;
}

.drop-zone {
    border: 2px dashed #c7d2e0;
    border-radius: 14px;
    background: #fafcff;
    padding: 30px 20px;
    text-align: center;
    transition: 0.2s ease;
}

.drop-zone.dragover {
    border-color: #1f4e79;
    background: #eef6ff;
}

.drop-zone-inner {
    max-width: 620px;
    margin: 0 auto;
}

.drop-zone-icon {
    font-size: 34px;
    margin-bottom: 10px;
    color: #1f4e79;
}

.drop-zone-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.drop-zone-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.upload-selectors {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.selected-items {
    margin-top: 10px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: left;
    max-height: 220px;
    overflow: auto;
    color: #374151;
    font-size: 14px;
}

.selected-list {
    margin: 0;
    padding-left: 18px;
}

.selected-list li {
    margin-bottom: 6px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* LOGIN */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(180deg, #f6f8fb 0%, #eef4fa 100%);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
}

.auth-header {
    margin-bottom: 24px;
}

.auth-header h1 {
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.auth-form {
    margin-top: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.10);
}

.auth-btn {
    width: 100%;
    margin-top: 6px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.folder-path-cell {
    max-width: 420px;
    word-break: break-word;
}

/* LOGIN PERSONNALISÉ ORDIPRESS */
.login-page {
    min-height: 100vh;
    margin: 0;
    background: url('background-login.png') center center / cover no-repeat fixed;
    position: relative;
    overflow: hidden;
}

.login-background-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(9, 21, 40, 0.78), rgba(11, 37, 67, 0.72)),
        rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.login-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: center;
}

.login-card {
    border-radius: 22px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.login-card-visual {
    background: rgba(10, 28, 52, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
    padding: 42px 38px;
    color: #ffffff;
}

.login-logo {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 420px;
    width: 100%;
    display: block;
    margin-bottom: 20px;
}

.login-tagline {
    margin-top: 24px;
    font-size: 20px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    max-width: 620px;
    font-weight: 500;
}

.login-card-form {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.18);
    padding: 34px 32px;
}

.login-card-form .auth-header h1 {
    margin: 0 0 8px 0;
    color: #1f4e79;
    font-size: 30px;
}

.login-card-form .auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 24px 0;
}

.login-card-form .form-group {
    margin-bottom: 18px;
}

.login-card-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.login-card-form .form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #ffffff;
}

.login-card-form .form-group input:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 4px rgba(31, 78, 121, 0.12);
}

.login-card-form .auth-btn {
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 620px;
        padding: 28px 18px;
    }

    .login-card-visual {
    background: rgba(10, 28, 52, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
    padding: 42px 38px;
    color: #ffffff;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .login-tagline {
        font-size: 17px;
        margin-top: 18px;
    }
}

/* LOGIN 2 PANNEAUX */
.login-shell-single-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
}

.login-brand-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-main {
    max-width: 460px;
    width: 100%;
    display: block;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.20));
}

.login-panels {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.login-card-guest,
.login-card-form {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.18);
    padding: 34px 32px;
    border-radius: 22px;
}

.login-card-guest .auth-header h1,
.login-card-form .auth-header h1 {
    margin: 0 0 8px 0;
    color: #1f4e79;
    font-size: 30px;
}

.login-card-guest .auth-subtitle,
.login-card-form .auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 24px 0;
}

.guest-drop-zone {
    min-height: 260px;
}

.guest-actions {
    justify-content: flex-start;
}

.guest-upload-message {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.guest-upload-message.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.guest-upload-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 980px) {
    .login-panels {
        grid-template-columns: 1fr;
    }

    .login-logo-main {
        max-width: 340px;
    }
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alt-action {
    background: #eef2ff;
    color: #4338ca;
}

.alt-action:hover {
    background: #e0e7ff;
}

.share-link-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.share-link-input {
    flex: 1;
    min-width: 320px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

.share-result-label {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #1f2937;
}

.share-result-help {
    margin-top: 12px;
    color: #6b7280;
    font-size: 14px;
}

.folder-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.folder-search-input {
    flex: 1;
    min-width: 260px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

.table-sort-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.table-sort-link:hover {
    text-decoration: underline;
}