/* 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: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border-radius: 0 0 15px 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.header h1 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 600;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

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

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

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

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

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

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

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

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

/* Main content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Dashboard */
.dashboard h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
}

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

.action-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.action-card.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-card.admin {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.action-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.action-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.action-card p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Statistiques */
.stats h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

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

.stat-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

/* Formulaires */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

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

/* Sélecteur de type avec icônes */
.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.type-option {
    position: relative;
}

.type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.type-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.type-option input[type="radio"]:checked + label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.type-option i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.type-option span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Particularités */
.particularities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.particularity-option {
    position: relative;
}

.particularity-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.particularity-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 60px;
    font-size: 1.2rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Fallback pour les navigateurs qui ne supportent pas gap */
    padding-left: 15px;
    padding-right: 15px;
}

.particularity-option input[type="checkbox"]:checked + label {
    border-color: #48bb78;
    background: #f0fff4;
    color: #38a169;
}

.particularity-option input[type="checkbox"]:checked + label i,
.particularity-option input[type="checkbox"]:checked + label span {
    color: #38a169;
}

/* Mode icône uniquement pour les particularités */
.particularity-option label i {
    font-size: 1.5rem;
    display: inline-block;
    margin-right: 8px;
    /* Fallback pour les navigateurs plus anciens */
    float: left;
    margin-top: 2px;
}

.particularity-option label span {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
    /* Fallback pour les navigateurs plus anciens */
    float: left;
    margin-left: 8px;
}

/* Nettoyer les floats pour les navigateurs plus anciens */
.particularity-option label::after {
    content: "";
    display: table;
    clear: both;
}

/* Amélioration de l'affichage des badges particularités dans les listes */
.badge i {
    font-size: 0.9rem;
}

.badge[title] {
    cursor: help;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.upload-zone.dragover {
    border-color: #667eea;
    background: #e6f3ff;
}

.upload-zone i {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.upload-zone p {
    color: #4a5568;
    margin-bottom: 10px;
}

.upload-zone small {
    color: #718096;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

.table tbody tr:hover {
    background: #f7fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-warning {
    background: #faf089;
    color: #744210;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge-info {
    background: #bee3f8;
    color: #2a4365;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.alert-error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    color: #742a2a;
}

.alert-info {
    background: #bee3f8;
    border: 1px solid #90cdf4;
    color: #2a4365;
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2d3748;
    margin-bottom: 10px;
}

.login-header p {
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .type-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .particularities {
        grid-template-columns: 1fr;
    }
    
    .particularity-option label {
        padding: 12px 10px;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .particularity-option label i {
        font-size: 1.2rem;
        margin-right: 6px;
    }
    
    .particularity-option label span {
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .type-selector {
        grid-template-columns: 1fr;
    }
    
    .action-card {
        padding: 20px;
    }
    
    .login-container {
        margin: 20px auto;
        padding: 30px 20px;
    }
    
    /* Correction modal soumission sur mobile */
    .submit-content {
        margin: 2% auto !important;
        width: 95% !important;
        max-height: 95vh !important;
    }
    
    .submit-body {
        padding: 20px !important;
        max-height: calc(95vh - 80px) !important;
    }
    
    .submit-header {
        padding: 20px !important;
    }
    
    .submit-header h3 {
        font-size: 1.2rem !important;
    }
    
    .submit-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-confirm, .btn-cancel {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 