/* 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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


/* Styles pour la page d'importation */
.form-options {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
}

.option-group h4 {
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #6c757d;
}

.option-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}

.option-help {
    display: block;
    margin-left: 1.75rem;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-warning i {
    color: #e0a800;
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.impact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.impact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.impact-item i {
    font-size: 1.5rem;
    color: #6c757d;
}

.impact-item.important i {
    color: #e74c3c;
}

.impact-item.important {
    border-color: #f5c6cb;
    background-color: #f8d7da;
}

.impact-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.impact-item p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}





/* En-têtes */
h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #3498db;
    text-align: center;
}

h2, h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

/* Alertes */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-weight: 500;
}

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

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

/* Formulaires */
.upload-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px dashed #dee2e6;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    margin: 0 0.2rem;
}

.view-btn {
    background: #3498db;
}

.edit-btn {
    background: #2ecc71;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

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

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Progress bar */
.progress {
    display: block;
    height: 8px;
    background: linear-gradient(90deg, #2ecc71, #3498db);
    border-radius: 4px;
    position: relative;
    color: transparent;
    font-size: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

/* Styles pour les détails */
.details-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.details-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.details-table thead th {
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.detail-row {
    border-bottom: 1px solid #eaeaea;
    transition: background-color 0.2s;
}

.detail-row:hover {
    background-color: #f9f9f9;
}

.detail-row.empty {
    opacity: 0.6;
}

.detail-label {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    width: 30%;
    vertical-align: top;
    border-right: 2px solid #dee2e6;
}

.detail-value {
    padding: 1rem;
    vertical-align: top;
    line-height: 1.6;
}

.empty-value {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

/* Barre de pourcentage */
.percentage-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.percentage-value {
    min-width: 60px;
    font-weight: 600;
}

.percentage-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #3498db);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Icônes */
.fas {
    margin-right: 8px;
    color: #667eea;
}

/* Pied de page des détails */
.details-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-top: 3px solid #667eea;
}

.details-footer .stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #6c757d;
}

/* Alertes supplémentaires */
.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Media queries pour responsive */
@media (max-width: 768px) {
    .details-table {
        display: block;
        overflow-x: auto;
    }
    
    .detail-label,
    .detail-value {
        display: block;
        width: 100%;
        border: none;
        padding: 0.75rem;
    }
    
    .detail-label {
        background-color: #f1f3f4;
        border-bottom: 1px solid #dee2e6;
    }
    
    .details-footer .stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .percentage-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .percentage-bar {
        width: 100%;
    }
}

.info-box ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Stats */
.stats {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin: 1rem 0;
    font-weight: 600;
    color: #495057;
}

/* Links */
.links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .links {
        flex-direction: column;
    }
    
    .links .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Styles pour la page d'accueil */
.main-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #3498db;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stats-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-content {
    flex-grow: 1;
}

.stats-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.import-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.import-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.import-item i {
    color: #667eea;
    width: 20px;
}

.highlight {
    color: #2ecc71;
    font-weight: 600;
}

.update {
    color: #e74c3c;
    font-weight: 600;
}

.no-import {
    text-align: center;
    padding: 1rem;
    color: #7f8c8d;
}

.no-import i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #95a5a6;
}

/* Cartes principales */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
}

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

.card:nth-child(1) {
    border-top-color: #3498db;
}

.card:nth-child(2) {
    border-top-color: #2ecc71;
}

.card:nth-child(3) {
    border-top-color: #9b59b6;
}

.card-icon {
    color: #667eea;
    margin-bottom: 1rem;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.features li i {
    position: absolute;
    left: 0;
    color: #2ecc71;
}

/* Boutons spécifiques */
.btn.info {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Historique */
.history-section {
    margin-top: 3rem;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.history-section h3 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

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

.history-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid #eaeaea;
}

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

.history-table i {
    margin-right: 0.5rem;
    color: #667eea;
}

.badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.text-center {
    text-align: center;
    margin-top: 1rem;
}

/* Statistiques globales */
.global-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #dee2e6;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.stat-value.online {
    color: #2ecc71;
}

/* Exigences */
.requirements {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.requirement h4 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirement ul {
    margin-left: 1.5rem;
    color: #666;
}

.requirement li {
    margin-bottom: 0.5rem;
}

.columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.column-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .history-table-container {
        overflow-x: auto;
    }
    
    .stats-card {
        flex-direction: column;
        text-align: center;
    }
    
    .import-item {
        justify-content: center;
    }
}
/* Messages de succès/erreur */
.email-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.email-success {
    background: #38a169;
    color: white;
    border-left: 4px solid #2f855a;
}

.email-error {
    background: #e53e3e;
    color: white;
    border-left: 4px solid #c53030;
}

/* Pour l'impression paysage */
@page {
    size: landscape;
    margin: 0.5cm;
}

@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .saisie-table {
        page-break-inside: avoid;
    }
    
    .saisie-table tr {
        page-break-inside: avoid;
    }
}