* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

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

.menu-header {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.menu-header h1 {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: #4a5568;
    font-weight: 500;
    font-size: 15px;
}

.btn-logout {
    padding: 10px 24px;
    background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(252, 70, 107, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 70, 107, 0.4);
}

.menu-content {
    margin-top: 20px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.menu-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.menu-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}

.menu-card:hover::before {
    opacity: 0.05;
}

.menu-card h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-card p {
    color: #718096;
    font-size: 15px;
    line-height: 1.8;
}

.menu-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(30%);
}

.menu-card-disabled:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.menu-card-disabled:hover::before {
    opacity: 0;
}

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

.upload-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-header h1 {
    color: #333;
    font-size: 28px;
}

.btn-back {
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #1976D2;
}

.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.upload-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.upload-box h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.file-list {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    min-height: 50px;
}

.file-list h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
}

.file-list ul {
    list-style: none;
    padding: 0;
}

.file-list li {
    padding: 5px 0;
    color: #666;
}

.btn-upload {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-upload:hover {
    background-color: #45a049;
}

.files-list-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.files-list-box h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.table-defilante {
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background-color: #f5f5f5;
}

.files-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.files-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #666;
}

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

.files-stats {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

.actions-cell {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.btn-download:hover {
    background-color: #1976D2;
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.empty-state {
    background: white;
    padding: 60px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.empty-state p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select option {
    padding: 10px;
}

.sql-result-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    overflow: hidden;
}

.sql-header {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    padding: 25px 30px;
    color: white;
}

.sql-header h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 700;
}

.sql-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: 0.95;
}

.sql-info span {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.sql-content {
    max-height: 600px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-top: 3px solid #667eea;
}

.sql-content pre {
    margin: 0;
    padding: 25px 30px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #2d3748;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.sql-content code {
    font-family: inherit;
}

.sql-actions {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.sql-content::-webkit-scrollbar {
    width: 10px;
}

.sql-content::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.sql-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.sql-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.liste-cases {
    max-height: 420px;
    overflow-y: auto;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8f9fa;
    padding: 8px;
}

.case-fichier {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #2d3748;
    transition: background-color 0.2s ease;
}

.case-fichier:hover {
    background-color: #edf2f7;
}

.case-fichier input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.case-tous {
    font-weight: 700;
    color: #4c51bf;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    margin-bottom: 6px;
    position: sticky;
    top: -8px;
    background-color: #f8f9fa;
    z-index: 1;
}

.case-nom {
    flex: 1;
    word-break: break-word;
}

.case-taille {
    font-size: 13px;
    color: #718096;
    white-space: nowrap;
}

.liste-cases::-webkit-scrollbar {
    width: 10px;
}

.liste-cases::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.liste-cases::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.cellule-erreur {
    color: #c53030;
    font-style: italic;
}

.couche-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    padding: 30px;
}

.couche-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

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

.couche-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px 18px;
    background-color: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 10px;
}

.couche-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
    font-weight: 600;
}

.couche-valeur {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
    word-break: break-word;
}

.couche-avertissement {
    margin-top: 20px;
    padding: 12px 18px;
    background-color: #fffaf0;
    border-left: 4px solid #ed8936;
    border-radius: 8px;
    color: #7b341e;
    font-size: 14px;
}

@media (max-width: 768px) {
    .menu-header {
        flex-direction: column;
        gap: 20px;
        padding: 25px 20px;
        text-align: center;
    }

    .menu-header h1 {
        font-size: 26px;
    }

    .user-info {
        flex-direction: column;
        gap: 15px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .menu-card {
        padding: 30px 25px;
    }

    .menu-container {
        padding: 20px 15px;
    }

    .sql-info {
        flex-direction: column;
        gap: 10px;
    }

    .sql-content pre {
        padding: 15px;
        font-size: 12px;
    }

    .sql-actions {
        flex-direction: column;
    }

    .sql-actions .btn-action {
        width: 100%;
        text-align: center;
    }

    .couche-box {
        padding: 25px 20px;
    }

    .couche-grid {
        grid-template-columns: 1fr;
    }
}
