* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f7fa;
    padding: 20px;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.role-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
}

.section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.input,
.textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 16px;
    transition: all 0.2s;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-secondary {
    background: #6b7280;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

.table table {
    width: 100%;
}

.th,
.td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.th {
    font-weight: 600;
    color: #374151;
    background: #f8fafc;
}

.tr:hover {
    background: #f0f9ff;
}

.status {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-EN_ATTENTE_ENVOI {
    background: #fef3c7;
    color: #92400e;
}

.status-ENVOYE {
    background: #d1fae5;
    color: #065f46;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.overlay-content {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-overlay {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 60px auto;
}

.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    .form-group {
        min-width: auto;
    }
}
