/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Page de connexion */
.login-body {
    background: #34495E;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header .logo img {
    max-width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-form {
    text-align: left;
}

.browser-compatibility {
    padding: 20px 0;
  }
  .browser-warning {
    padding: 20px 0;
  }

  .browser-logos {
    padding: 10px 0;
  }
  .browser-logos a span {
    color:blue;
  }

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: #34495E;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.main-site-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.main-site-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* En-tête principal */
.main-header {
    background: #34495e;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    max-width: 50px;
    height: auto;
}

.site-info h1 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.site-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Contenu principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-header {
    margin-bottom: 2rem;
    text-align: center;
}

.content-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Grille des fichiers */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.file-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #34495e;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.file-card[data-type="image"] {
    border-left-color: #e74c3c;
}

.file-card[data-type="document"] {
    border-left-color: #34495e;
}

.file-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.file-name {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.file-details {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.view-btn, .download-btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.view-btn {
    background: #34495e;
    color: white;
}

.view-btn:hover {
    background: #2c3e50;
    transform: translateY(-1px);
}

.download-btn {
    background: #e74c3c;
    color: white;
}

.download-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Aucun fichier */
.no-files {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.no-files-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-files h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-files p {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

/* En-tête du visualiseur */
.viewer-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.viewer-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.viewer-logo img {
    max-width: 30px;
    height: auto;
}

.viewer-actions {
    display: flex;
    gap: 1rem;
}

.back-btn {
    background: #95a5a6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
}

.back-btn:hover {
    background: #7f8c8d;
}

/* Contenu du visualiseur */
.viewer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.file-viewer {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.file-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
}

.file-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.file-meta {
    display: flex;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.file-content {
    padding: 1rem;
}

.image-container {
    text-align: center;
}

.viewer-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.document-container {
    height: 70vh;
}

.pdf-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e1e8ed;
}

.open-new-tab-btn, .toggle-iframe-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.open-new-tab-btn:hover, .toggle-iframe-btn:hover {
    background: #2980b9;
}

.toggle-iframe-btn {
    background: #95a5a6;
}

.toggle-iframe-btn:hover {
    background: #7f8c8d;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
}

.pdf-fallback-message {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.pdf-fallback-message .document-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.pdf-fallback-message h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.pdf-fallback-message p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.document-placeholder {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.document-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.document-placeholder h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Pied de page */
.main-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .viewer-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .viewer-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .main-content, .viewer-content {
        padding: 1rem;
    }
}
