/* Styles pour le système de gestion des visites avion */

/* 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: #f5f7fa;
}

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

/* Header */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.role-badge {
    background-color: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Page header */
.page-header {
    margin-bottom: 2rem;
}

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

.page-header p {
    color: #718096;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Formulaire */
.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    padding: 2rem;
    margin-bottom: 2rem;
}

.demande-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

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

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

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

.btn-danger:hover {
    background: #e53e3e;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fff5f5;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.message.info {
    background: #ebf8ff;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #718096;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Actions rapides */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: inherit;
}

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

.action-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.action-desc {
    color: #718096;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #2d3748;
}

.data-table tr:hover {
    background: #f8fafc;
}

.table-actions {
    padding: 1rem 0;
    text-align: right;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.en_attente {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.confirmee {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.annulee {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.available {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.reserved {
    background: #fef3c7;
    color: #92400e;
}

/* Visites */
.visits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.visit-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.visit-card:hover {
    transform: translateY(-4px);
}

.visit-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.visit-day {
    font-weight: 600;
}

.visit-content {
    padding: 1.5rem;
}

.visit-demandeur h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.visit-type {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.visit-details {
    margin-bottom: 1rem;
}

.detail-item {
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 0.875rem;
}

.visit-guide {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.875rem;
}

.visits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visit-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.visit-info h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.visit-details {
    color: #718096;
    font-size: 0.875rem;
    line-height: 1.5;
}

.visit-meta {
    text-align: right;
}

.visit-date {
    color: #718096;
    font-size: 0.875rem;
}

/* Disponibilités */
.availability-form {
    margin-bottom: 2rem;
}

.availability-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.availability-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s ease;
}

.availability-item:hover {
    border-color: #cbd5e0;
}

.availability-item.reserved {
    background: #fef3c7;
    border-color: #f59e0b;
}

.availability-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.availability-date {
    font-weight: 600;
    color: #2d3748;
}

.availability-slot {
    color: #718096;
}

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

/* Filtres */
.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Charts */
.chart-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.chart-section h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    min-width: 120px;
    font-size: 0.875rem;
    color: #4a5568;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.bar-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #2d3748;
}

/* Login */
.login-form {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-form p {
    text-align: center;
    color: #718096;
    margin-bottom: 2rem;
}

.login-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.875rem;
    color: #718096;
}

/* Footer */
.main-footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* No data */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-menu {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .visits-grid {
        grid-template-columns: 1fr;
    }
    
    .visit-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .visit-meta {
        text-align: left;
    }
    
    .availability-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .bar-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
