/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #004499;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== LAYOUT 3 BANDEAUX ===== */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-content {
    flex: 1;
    padding: 30px 0;
}

.footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 25px 0;
    margin-top: auto;
}

/* ===== HEADER ===== */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0066cc;
    transition: width 0.2s;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 0.9rem;
    color: #666;
}

.user-info small {
    display: block;
    font-size: 0.8rem;
    color: #999;
}

.btn-login {
    background-color: #0066cc;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #004499;
}

.btn-logout {
    color: #dc3545;
    font-size: 0.9rem;
}

.btn-logout:hover {
    color: #991b24;
    text-decoration: underline;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
}

.btn-primary:hover {
    background-color: #004499;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #0066cc;
    color: #0066cc;
}

.btn-outline:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #d49500;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #991b24;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

.form-note {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #155724;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    color: #856404;
}

/* ===== SECTIONS ===== */
.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
    padding: 40px 0;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-message {
    margin-top: 20px;
}

.welcome-message p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ===== FILES PREVIEW ===== */
.files-preview {
    padding: 40px 0;
    background-color: #ffffff;
}

.files-preview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.files-preview h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #2c3e50;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.file-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.file-info {
    margin-top: 10px;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
}

.see-all {
    text-align: center;
    margin-top: 20px;
}

.see-all a {
    color: #0066cc;
    font-weight: 500;
}

/* ===== LOGIN & REGISTER ===== */
.login-section,
.register-section {
    padding: 40px 0;
    background-color: #ffffff;
}

.login-container,
.register-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
}

.login-card,
.register-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.login-card h1,
.register-card h1 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: #2c3e50;
}

.login-card p,
.register-card p {
    color: #666;
    margin-bottom: 25px;
}

.login-footer,
.register-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer a,
.register-footer a {
    color: #666;
    font-size: 0.9rem;
}

.register-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== DASHBOARD ===== */
.dashboard-section {
    padding: 40px 0;
    background-color: #ffffff;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.company-name {
    color: #666;
    margin-top: 10px;
}

.dashboard-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
}

.files-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.no-files {
    text-align: center;
    color: #666;
    padding: 40px;
}

.files-table-container {
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.files-table th,
.files-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.files-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.files-table tr:hover {
    background-color: #f8f9fa;
}

/* ===== ADMIN ===== */
.admin-section {
    padding: 40px 0;
    background-color: #ffffff;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h1 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.admin-nav {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.admin-nav a {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: #0066cc;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-number.pending {
    color: #ffc107;
}

.admin-actions {
    margin-bottom: 40px;
}

.admin-actions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.action-card:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
}

.action-text {
    font-weight: 500;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.upload-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.upload-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.files-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.files-list h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.admin-files-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.admin-files-table th,
.admin-files-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-files-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ===== USERS MANAGEMENT ===== */
.users-management {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.users-filters {
    margin-bottom: 25px;
}

.users-filters h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tab:hover {
    background-color: #e9ecef;
}

.filter-tab.active {
    background-color: #0066cc;
    color: white;
}

.users-list h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.users-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.users-table tr.pending {
    background-color: rgba(255, 193, 7, 0.1);
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-badge.user {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.role-badge.admin {
    background-color: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* ===== FOOTER ===== */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-info {
    font-size: 0.9rem;
}

.footer-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.footer-info p {
    color: #ccc;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-copyright p {
    font-size: 0.85rem;
    color: #999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-container,
    .register-container {
        padding: 0 15px;
    }
    
    .login-card,
    .register-card {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TABLE RESPONSIVE ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

